<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.6(BH)" -->
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>diablo</title>
        <description></description>
        <link>http://maemo.org/development/tools/doc/diablo/</link>
        <lastBuildDate>Mon, 17 Aug 2020 04:15:12 +0000</lastBuildDate>
        <generator>FeedCreator 1.7.6(BH)</generator>
        <item>
            <title>oprofile</title>
            <link>http://maemo.org/development/tools/doc/diablo/oprofile/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;Oprofile is a low overhead system-wide profiler for linux. It can be
used to find CPU usage bottlenecks in the whole system and within
processes.&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: oprofile&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: oprofile&lt;/p&gt;

&lt;h1&gt;Installing Oprofile&lt;/h1&gt;

&lt;h2&gt;Configuring the device&lt;/h2&gt;

&lt;p&gt;In order to run oprofile on your device, the device's kernel needs to
be oprofile-enabled. A pre-compiled kernel with oprofile support is
provided in the kernel-diablo-oprofile package.&lt;/p&gt;

&lt;h2&gt;Getting a new kernel&lt;/h2&gt;

&lt;p&gt;The kernel package can be downloaded from the Diablo tools repository
in scratchbox environment (in an ARM target) with the command&lt;/p&gt;

&lt;pre&gt;
[sbox-arm: ~] &amp;gt; fakeroot apt-get install kernel-diablo-oprofile
&lt;/pre&gt;

&lt;p&gt;This will install the kernel image to /boot/&lt;/p&gt;

&lt;pre&gt;
[sbox-arm: ~] &amp;gt; ls -l /boot/
total 1512
-rw-r--r--  1 user users 1543892 Dec 20 10:02 zImage-oprofile-diablo-200850
&lt;/pre&gt;

&lt;p&gt;the numbers at the end of the filename resemble a date and will be
different if the kernel has been updated since the writing of this
document.&lt;/p&gt;

&lt;p&gt;By copying the image to outside of the scratchbox chroot environment,
you'll be able to easily access it when you're ready to flash the
image.&lt;/p&gt;

&lt;pre&gt;
[sbox-arm: ~] &amp;gt; cp /boot/zImage-oprofile-diablo-200850 /tmp
&lt;/pre&gt;

&lt;h2&gt;Using the new kernel&lt;/h2&gt;

&lt;p&gt;There are &lt;strong&gt;two&lt;/strong&gt; ways to use the kernel image. You can flash it to the
device or you can just boot the device so that it uses this kernel
until you reboot it again.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Option 1: Flashing the kernel&lt;/p&gt;

&lt;p&gt;To flash your new kernel image, use the linux flasher utility (as root)&lt;/p&gt;

&lt;pre&gt;
$ flasher -f --kernel /tmp/zImage-oprofile-diablo-200850 -R
&lt;/pre&gt;

&lt;p&gt;Flashing just the kernel does not destroy your other data. After
the flasher has finished, your device is ready for oprofile.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Option 2: Boot with the new kernel&lt;/p&gt;

&lt;pre&gt;
$ flasher --load --boot --kernel /tmp/zImage-oprofile-diablo-200850
&lt;/pre&gt;

&lt;p&gt;With the boot option the power cord has to be kept plugged in until
you want to revert back to the previous kernel.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Restoring the normal kernel&lt;/h2&gt;

&lt;p&gt;After you are done with oprofile you can restore the normal
kernel. How you do this depends on which one of the options above you
used to load the oprofile kernel.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Option 1: You chose to flash the oprofile kernel&lt;/p&gt;

&lt;p&gt;In this case the normal kernel needs to be re-flashed:&lt;/p&gt;

&lt;pre&gt;
$ flasher -f --flash-only kernel -F &amp;lt;FIASCO image&amp;gt; -R


# The FIASCO image is the whole product image with a name like:
# RX-44_DIABLO_3.2008.17-8_PR_COMBINED_MR0_ARM.bin
&lt;/pre&gt;

&lt;p&gt;Note that just re-flashing the kernel part does not overwrite any of
the other parts, so your data and settings will be intact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Option 2: You chose to just boot with the new kernel&lt;/p&gt;

&lt;p&gt;Restoring the old kernel is as easy as unplugging the power cable
and power cycling the device.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Recognizing a suitable kernel&lt;/h2&gt;

&lt;p&gt;It's easy to see if your current kernel does not support oprofile by
testing it with opcontrol:&lt;/p&gt;

&lt;pre&gt;
Nokia-N810:~# opcontrol --status
modprobe: cannot parse modules.dep
modprobe: cannot parse modules.dep
Kernel doesn't support oprofile
&lt;/pre&gt;

&lt;h2&gt;Installing oprofile to the device&lt;/h2&gt;

&lt;p&gt;Providing that you have the Diablo tools repository in your APT
sources.list, the easiest way to install oprofile is using apt.&lt;/p&gt;

&lt;pre&gt;
Nokia-N810:~# apt-get install oprofile
&lt;/pre&gt;

&lt;p&gt;This will also install binutils.&lt;/p&gt;

&lt;h2&gt;Installing debug symbols&lt;/h2&gt;

&lt;p&gt;In order to view any useful profiling information at functions level,
you will have to install debugging symbols. Debugging symbols normally
come with debugging (-dbg) packages. The easiest way to install all
dbg packages required for a given binary is to use debug-dep-install
script which comes with the maemo-debug-scripts package:&lt;/p&gt;

&lt;pre&gt;
Nokia-N810:~# apt-get install maemo-debug-scripts
Nokia-N810:~# debug-dep-install /usr/bin/osso-xterm.launch
&lt;/pre&gt;

&lt;h1&gt;Usage&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;On the device, type:&lt;/p&gt;

&lt;pre&gt;
Nokia-N810:~# opcontrol --init
Nokia-N810:~# opcontrol --no-vmlinux
Nokia-N810:~# opcontrol -e=CPU_CYCLES:100000
&lt;/pre&gt;

&lt;p&gt;100000 indicates the number of CPU cycles between interrupts. Increasing this number lowers down the accuracy but decreases the CPU overhead. --no-vmlinux indicates we are not interested in the kernel or do not have an unstripped kernel image.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start the usecase you are interested in and type:&lt;/p&gt;

&lt;pre&gt;
Nokia-N810:~# opcontrol --start
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you've finished, type:&lt;/p&gt;

&lt;pre&gt;
Nokia-N810:~# opcontrol --stop
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now you've collected the data.&lt;/p&gt;

&lt;h2&gt;Viewing profile reports&lt;/h2&gt;

&lt;p&gt;To see basic per-process picture, type opreport:&lt;/p&gt;

&lt;pre&gt;
Nokia-N810:~# opreport
CPU: ARM11 PMU, speed 0 MHz (estimated)
Counted CPU_CYCLES events (clock cycles counter) with a unit mask of 0x00 (No unit mask) count 100000
CPU_CYCLES:100000|
  samples|      %|
------------------
     1677 69.1546 no-vmlinux
      240  9.8969 libc-2.5.so
      230  9.4845 busybox
      215  8.8660 ld-2.5.so
       58  2.3918 oprofiled
    3  0.1237 ophelp
    2  0.0825 libcrypt-2.5.so
&lt;/pre&gt;

&lt;p&gt;To see more detailed symbol analysis use opreport -l:&lt;/p&gt;

&lt;pre&gt;
Nokia-N810:~# opreport -l|more
warning: /no-vmlinux could not be found.
BFD: /usr/lib/debug/lib/ld-2.5.so: warning: sh_link not set for section `.ARM.exidx'
BFD: /usr/lib/debug/lib/libc-2.5.so: warning: sh_link not set for section `.ARM.exidx'
CPU: ARM11 PMU, speed 0 MHz (estimated)
Counted CPU_CYCLES events (clock cycles counter) with a unit mask of 0x00 (No unit mask) count 100000
samples  %        app name                 symbol name
1695     65.3179  no-vmlinux               (no symbols)
255       9.8266  busybox                  (no symbols)
222       8.5549  oprofiled                (no symbols)
43        1.6570  libc-2.5.so              strchr
37        1.4258  ld-2.5.so                check_match.0
32        1.2331  ld-2.5.so                do_lookup_x
17        0.6551  ld-2.5.so                _dl_relocate_object
17        0.6551  libc-2.5.so              _dl_addr
16        0.6166  ld-2.5.so                strcmp
14        0.5395  ld-2.5.so                _dl_lookup_symbol_x
13        0.5010  ld-2.5.so                __udivsi3
13        0.5010  ld-2.5.so                _dl_fixup
12        0.4624  libc-2.5.so              _int_malloc
10        0.3854  libc-2.5.so              strcmp
8         0.3083  ophelp                   (no symbols)
7         0.2697  libc-2.5.so              strpbrk
7         0.2697  libc-2.5.so              vfprintf
&lt;/pre&gt;

&lt;h2&gt;Profiling with callgraphs&lt;/h2&gt;

&lt;p&gt;Quite often a basic flat profile is useless. In such a cases a
callgraph profile can be used. In order to profile code with
callgraphs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Add -fno-omit-frame-pointer to GCC options and recompile all the
code (binaries, libraries) involved. You can do this without
changing the package build rules by setting the appropriate scratchbox
environment variable (documented in the Scratchbox installation
/scratchbox/doc/variables.txt file) before re-building the
packages:&lt;/p&gt;

&lt;pre&gt;
[sbox-arm: ~] &amp;gt; export SBOX_BLOCK_COMPILER_ARGS=&amp;quot;-fomit-frame-pointer&amp;quot;
[sbox-arm: ~] &amp;gt; export SBOX_EXTRA_COMPILER_ARGS=&amp;quot;-fno-omit-frame-pointer&amp;quot;
[sbox-arm: ~] &amp;gt; cd package-1/
[sbox-arm: ~/package-1] &amp;gt; dpkg-buildpackage -rfakeroot
[sbox-arm: ~/package-1] &amp;gt; cd ../package-2/
[sbox-arm: ~/package-2] &amp;gt; dpkg-buildpackage -rfakeroot
...
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install re-built code and debug packages on the device&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Init oprofile as usually, but add -c parameter:&lt;/p&gt;

&lt;pre&gt;
Nokia-N810:~# opcontrol --init
Nokia-N810:~# opcontrol --no-vmlinux
Nokia-N810:~# opcontrol -e=CPU_CYCLES:100000 -c
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add -c to opreport:&lt;/p&gt;

&lt;pre&gt;
Nokia-N810:~# opreport -l -c
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Viewing reports from a PC&lt;/h2&gt;

&lt;p&gt;opreport -l, and especially opreport -c -l can take quite a long time
(10 minutes) when fired up on N800/N810 devices. Therefore, it often
makes sense to run opreport in scratchbox.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Configure scratchbox target in a way that its binaries and libraries 100% match the target's.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Collect profiling data as usual&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy contents of /var/lib/oprofile from the device to the corresponding directory in scratchbox target.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;in scratchbox, apt-get install maemo-debug-scripts (this may not be omitted)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;install debug packages either with debug-dep-install or by hand&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note: the binaries and libraries in the scratchbox target must match
what's in the device, otherwise you will get bogus results.&lt;/p&gt;

&lt;h2&gt;Oprofile with kcachegrind&lt;/h2&gt;

&lt;p&gt;kcachegrind is a useful GUI tool for viewing performance data
interactively. It comes with many modern linux distros.&lt;/p&gt;

&lt;p&gt;To use it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Get the callgraph oprofile data (see above) and install the same packages also to scratchbox.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the profile data to scratchbox session as described above.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;install kcachegrind-converters package on HOST (debian, ubuntu)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;in scratchbox: opreport -gdf | op2calltree (you might want to copy op2calltree script somewhere on target)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the resulting files can now be opened with kcachegrind on host, provided you set it to display ALL files (extensions are wrong)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/oprofile.html&quot;&gt;oprofile man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/oprofileui/&quot; class=&quot;wikipage default&quot; title=&quot;oprofileui&quot;&gt;oprofileui&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Juha Kallioinen</author>
            <pubDate>Wed, 13 May 2009 11:09:16 +0000</pubDate>
        </item>
        <item>
            <title>gdb</title>
            <link>http://maemo.org/development/tools/doc/diablo/gdb/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;GDB, the GNU Project debugger, allows you to see what is going on
'inside' another program while it executes -- or what another program
was doing at the moment it crashed.&lt;/p&gt;

&lt;p&gt;GDB can do four main kinds of things (plus other things in support of
these) to help you catch bugs in the act:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Start your program, specifying anything that might affect its behavior.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make your program stop on specified conditions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Examine what has happened, when your program has stopped.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Change things in your program, so you can experiment with correcting
the effects of one bug and go on to learn about another.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: gdb&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: gdb&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;p&gt;There are several issues you need to be aware when debugging
(optimized) code on ARM. Please read the &lt;a href=&quot;/maemo_release_documentation/maemo4.1.x/node15.html&quot;&gt;maemo debugging guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/gdb.html&quot;&gt;gdb man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/gdbserver.html&quot;&gt;gdb server man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/maemo_release_documentation/maemo4.1.x/node15.html&quot;&gt;maemo debugging guide&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;-&lt;/p&gt;
</description>
            <author>Juha Kallioinen</author>
            <pubDate>Wed, 18 Feb 2009 12:08:05 +0000</pubDate>
        </item>
        <item>
            <title>strace</title>
            <link>http://maemo.org/development/tools/doc/diablo/strace/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;Strace is a handy tool for seeing how an application is interacting
with the operating system using the system calls. It displays the used
system calls and parameters. It also shows the return codes of the
system calls. In addition strace can attach to a running process
making it a suitable tool for debugging the system calls that an
already running process is calling.&lt;/p&gt;

&lt;p&gt;Strace is especially helpful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Figuring out why the program is failing to start or exits early.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finding out what (configuration) files are used by the program.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Checking out whether the program is idle or wasting battery when it
should not be doing anything.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finding out where a frozen program got stuck.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Viewing an application's communications with the network.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: strace&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: strace&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;h2&gt;Installing Strace&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;strace&lt;/code&gt; tool can be installed to the Internet
Tablet. In Scratchbox it is possible to use the Scratchbox-provided
&lt;code&gt;strace&lt;/code&gt;. Using &lt;code&gt;strace&lt;/code&gt; in an X86 target rather
than in an ARMEL target is preferable for the reason that in an ARMEL
target &lt;code&gt;strace&lt;/code&gt; will actually trace the system calls of the
&lt;code&gt;QEMU&lt;/code&gt; process (which is used to run the arm binary).&lt;/p&gt;

&lt;h2&gt;Using Strace&lt;/h2&gt;

&lt;p&gt;These examples can be run both in Scratchbox X86 environment and in
the Internet Tablet device itself.&lt;/p&gt;

&lt;h3&gt;Getting a System Call Trace from an Application&lt;/h3&gt;

&lt;p&gt;To get a simple list of the system calls the application is calling,
strace is run with the path to the program as a parameter. Below
strace is run with the small &lt;code&gt;gdb_example&lt;/code&gt; program that is
introduced in the &lt;a href=&quot;/maemo_release_documentation/maemo4.1.x/node15.html&quot;&gt;maemo debugging guide&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;
[sbox-DIABLO_X86: ~/src/testing/gdb_example] &amp;gt; strace ./gdb_example
execve(&amp;quot;./gdb_example&amp;quot;, [&amp;quot;./gdb_example&amp;quot;], [/* 50 vars */]) = 0
brk(0)                                  = 0x804a000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4001c000
access(&amp;quot;/etc/ld.so.preload&amp;quot;, R_OK)      = -1 ENOENT (No such file or directory)
open(&amp;quot;/lib/tls/i686/sse2/libc.so.6&amp;quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat64(&amp;quot;/lib/tls/i686/sse2&amp;quot;, 0xbff86948) = -1 ENOENT (No such file or directory)
open(&amp;quot;/lib/tls/i686/libc.so.6&amp;quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat64(&amp;quot;/lib/tls/i686&amp;quot;, 0xbff86948)     = -1 ENOENT (No such file or directory)
open(&amp;quot;/lib/tls/sse2/libc.so.6&amp;quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat64(&amp;quot;/lib/tls/sse2&amp;quot;, 0xbff86948)     = -1 ENOENT (No such file or directory)
open(&amp;quot;/lib/tls/libc.so.6&amp;quot;, O_RDONLY)    = -1 ENOENT (No such file or directory)
stat64(&amp;quot;/lib/tls&amp;quot;, 0xbff86948)          = -1 ENOENT (No such file or directory)
open(&amp;quot;/lib/i686/sse2/libc.so.6&amp;quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
stat64(&amp;quot;/lib/i686/sse2&amp;quot;, 0xbff86948)    = -1 ENOENT (No such file or directory)
open(&amp;quot;/lib/i686/libc.so.6&amp;quot;, O_RDONLY)   = -1 ENOENT (No such file or directory)
stat64(&amp;quot;/lib/i686&amp;quot;, 0xbff86948)         = -1 ENOENT (No such file or directory)
open(&amp;quot;/lib/sse2/libc.so.6&amp;quot;, O_RDONLY)   = -1 ENOENT (No such file or directory)
stat64(&amp;quot;/lib/sse2&amp;quot;, 0xbff86948)         = -1 ENOENT (No such file or directory)
open(&amp;quot;/lib/libc.so.6&amp;quot;, O_RDONLY)        = 3
read(3, &amp;quot;\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 Y\1\000&amp;quot;..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1213256, ...}) = 0
mmap2(NULL, 1222300, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4001d000
mmap2(0x40142000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x124) = 0x40142000
mmap2(0x40145000, 9884, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40145000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40148000
set_thread_area({entry_number:-1 -&amp;gt; 6, base_addr:0x401486c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0x40142000, 4096, PROT_READ)   = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40149000
write(1, &amp;quot;Now in main().\n&amp;quot;, 15Now in main().
)        = 15
write(1, &amp;quot;Now in example_1(1) function.\n&amp;quot;, 30Now in example_1(1) function.
) = 30
write(1, &amp;quot;Now in example_2(parameter here)&amp;quot;..., 43Now in example_2(parameter here) function.
) = 43
write(1, &amp;quot;Now in example_3()\n&amp;quot;, 19Now in example_3()
)    = 19
exit_group(0)                           = ?
[sbox-DIABLO_X86: ~/src/testing/gdb_example] &amp;gt; 
&lt;/pre&gt;

&lt;div class=&quot;frame note&quot;&gt;
&lt;div class=&quot;label&quot;&gt;
N.B.
&lt;/div&gt;

&lt;div class=&quot;content&quot;&gt;
If you are using &lt;code&gt;strace&lt;/code&gt; in an ARMEL target, the option
&lt;code&gt;-f&lt;/code&gt; needs to be given, so that the process run under the
QEMU is also traced.
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Essentially, one line in the output refers to one system call made to
the Linux kernel. Every line has the name of the system call, the
parameters to the call, and finally the return value of the system
call.&lt;/p&gt;

&lt;p&gt;For example, the line:&lt;/p&gt;

&lt;pre&gt;
write(1, &amp;quot;Now in main().\n&amp;quot;, 15Now in main().
)        = 15
&lt;/pre&gt;

&lt;p&gt;tells that the system call that was called from gdb_example was
&lt;code&gt;write()&lt;/code&gt; with parameters &lt;code&gt;(1,&amp;quot;Now in main().\n&amp;quot;,
15)&lt;/code&gt;, next the output of the call is shown: &lt;code&gt;&amp;quot;Now in
main().&amp;quot;&lt;/code&gt; and finally the return code is displayed:
&lt;code&gt;=15&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Note: Failed system calls usually (not always) return a return code of -1.&lt;/p&gt;

&lt;p&gt;An example of a failed &lt;code&gt;stat64&lt;/code&gt; call would be:&lt;/p&gt;

&lt;pre&gt;
stat64(&amp;quot;/lib/sse2&amp;quot;, 0xbff86948)         = -1 ENOENT (No such file or directory)
&lt;/pre&gt;

&lt;p&gt;Here the &lt;code&gt;stat64&lt;/code&gt; return value of -1 is displayed together
with the symbolic name of &lt;code&gt;ENOENT&lt;/code&gt; error code. You can see
clearly that the program tried to access &lt;code&gt;/lib/sse2&lt;/code&gt;, but
failed for the reason that the file does not exist.&lt;/p&gt;

&lt;p&gt;Studying the output of strace and comparing it to the source file
tells that, for example, the gdb_example program's
&lt;code&gt;printf()&lt;/code&gt; functions are each calling the
&lt;code&gt;write()&lt;/code&gt; system call. In addition, it shows all the
&lt;code&gt;open()&lt;/code&gt; and &lt;code&gt;stat64()&lt;/code&gt; and other system calls
in the list.&lt;/p&gt;

&lt;h3&gt;Attaching to a Running Process with Strace&lt;/h3&gt;

&lt;p&gt;One can attach to a running process with strace. This is helpful,
especially when debugging a daemon type of an application, and it is
necessary to see what system calls the daemon is calling without
restarting the daemon.&lt;/p&gt;

&lt;p&gt;In the following example, the &lt;code&gt;top&lt;/code&gt; application is started
inside Scratchbox and left running in one terminal. Then another
terminal will be opened and &lt;code&gt;strace&lt;/code&gt; is attached to the
&lt;code&gt;top&lt;/code&gt; application.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Start the &lt;code&gt;top&lt;/code&gt; application inside one terminal in Scratchbox X86 target:&lt;/p&gt;

&lt;pre&gt;
[sbox-DIABLO_X86: ~] &amp;gt; top


## the screen clears and top starts to loop...


top - 14:49:35 up 17 days, 23:38,  0 users,  load average: 0.07, 0.02, 0.00
Tasks: 115 total,   2 running, 113 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0% us,  0.0% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    775176k total,   754708k used,    20468k free,   126608k buffers
Swap:  1622524k total,    19716k used,  1602808k free,   413752k cached


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
12807 user      16   0  2184 1172  888 R 79.0  0.2   0:00.09 top
    1 root      16   0  1632  536  448 S  0.0  0.1   0:01.56 init
    2 root      34  19     0    0    0 R  0.0  0.0   0:00.08 ksoftirqd/0
    3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 watchdog/0 
    4 root      10  -5     0    0    0 S  0.0  0.0   0:00.18 events/0 
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.01 khelper
    6 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 kthread
    8 root      10  -5     0    0    0 S  0.0  0.0   0:00.11 kblockd/0
    9 root      10  -5     0    0    0 S  0.0  0.0   0:00.05 kacpid
 ... etc ...
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start another terminal window, log in on the Scratchbox and run the
following commands:&lt;/p&gt;

&lt;pre&gt;
[sbox-DIABLO_X86: ~] &amp;gt; pidof top
12807
[sbox-DIABLO_X86: ~] &amp;gt; strace -p 12807
&lt;/pre&gt;

&lt;p&gt;With the &lt;code&gt;-p&lt;/code&gt; flag strace can be attached to a running process.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;pidof&lt;/code&gt; command tells the process id (PID) of a
running program. In this example, it is 12807 (in your machine the
number will be different). The output of strace would look similar to
this:&lt;/p&gt;

&lt;pre&gt;
Process 12807 attached - interrupt to quit
select(1, [0], NULL, NULL, {2, 320000}) = 0 (Timeout)
fcntl64(0, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
read(0, 0xbfeb191f, 1)                  = -1 EAGAIN (Resource temporarily unavailable)
ioctl(0, TCFLSH, 0)                     = 0
fcntl64(0, F_SETFL, O_RDWR)             = 0
gettimeofday({1195023907, 63212}, {4294967176, 0}) = 0
open(&amp;quot;/proc&amp;quot;, O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 7
fstat64(7, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
fcntl64(7, F_SETFD, FD_CLOEXEC)         = 0
getdents64(7, /* 35 entries */, 1024)   = 1008
getdents64(7, /* 37 entries */, 1024)   = 1008
stat64(&amp;quot;/proc/1&amp;quot;, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open(&amp;quot;/proc/1/stat&amp;quot;, O_RDONLY)          = 8
read(8, &amp;quot;1 (init) S 0 1 1 0 -1 4194560 43&amp;quot;..., 1023) = 187
close(8)                                = 0
open(&amp;quot;/proc/1/statm&amp;quot;, O_RDONLY)         = 8
read(8, &amp;quot;738 463 133 21 0 361 0\n&amp;quot;, 1023) = 23
close(8)                                = 0
stat64(&amp;quot;/proc/2&amp;quot;, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open(&amp;quot;/proc/2/stat&amp;quot;, O_RDONLY)          = 8
read(8, &amp;quot;2 (kthreadd) S 0 0 0 0 -1 41024 &amp;quot;..., 1023) = 128
close(8)                                = 0
open(&amp;quot;/proc/2/statm&amp;quot;, O_RDONLY)         = 8
read(8, &amp;quot;0 0 0 0 0 0 0\n&amp;quot;, 1023)        = 14
close(8)                                = 0
stat64(&amp;quot;/proc/3&amp;quot;, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open(&amp;quot;/proc/3/stat&amp;quot;, O_RDONLY)          = 8
read(8, &amp;quot;3 (migration/0) S 2 0 0 0 -1 410&amp;quot;..., 1023) = 135
close(8)                                = 0


... long list of output ...
&lt;/pre&gt;

&lt;p&gt;Studying the output of strace, you can see what system calls the
&lt;code&gt;top&lt;/code&gt; program is calling during its main loop. In this
case, &lt;code&gt;top&lt;/code&gt; is opening a lot of files under the
&lt;code&gt;/proc/&lt;/code&gt; file system to get information about the running
processes in the system.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;How to Trace All the Running Applications&lt;/h3&gt;

&lt;p&gt;Occasionally it may be necessary to trace all the running applications
in the device. For example, it may be necessary to know which process
accesses some specific file, while not keeping it open all the time
(if it is kept open all the time, it can be found from
&lt;code&gt;/proc/*/fd/&lt;/code&gt; or with &lt;code&gt;lsof&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;In the following example from the device, the &lt;code&gt;open()&lt;/code&gt;
system calls are traced from all running programs started after the
&lt;code&gt;DSME&lt;/code&gt; process.&lt;/p&gt;

&lt;pre&gt;
/home/user # strace -e trace=open \
      $(cd /proc/; dsme=$(pidof dsme|cut -d' ' -f1); \
      for pid in [0-9]*; do \
         if [ $pid -gt $dsme ] &amp;amp;&amp;amp; [ $pid != $$ ]; then \
             echo &amp;quot;-p $pid&amp;quot;; \
         fi; \
      done) 
&lt;/pre&gt;

&lt;p&gt;Note: The above command does not start to trace the
&lt;code&gt;DSME&lt;/code&gt;. Accidentally suspending &lt;code&gt;DSME&lt;/code&gt; would
cause the device to reboot because &lt;code&gt;DSME&lt;/code&gt; keeps the device's
HW watchdog refreshed.&lt;/p&gt;

&lt;p&gt;The output of the command will look similar to this:&lt;/p&gt;

&lt;pre&gt;
/home/user # strace -e trace=open \
&amp;gt;       $(cd /proc/; dsme=$(pidof dsme|cut -d' ' -f1); \
&amp;gt;       for pid in [0-9]*; do \
&amp;gt;          if [ $pid -gt $dsme ] &amp;amp;&amp;amp; [ $pid != $$ ]; then \
&amp;gt;              echo &amp;quot;-p $pid&amp;quot;; \
&amp;gt;          fi; \
&amp;gt;       done) 
Process 1019 attached - interrupt to quit
Process 1036 attached - interrupt to quit
Process 1039 attached - interrupt to quit
...snip...
Process 13559 attached - interrupt to quit
attach: ptrace(PTRACE_ATTACH, ...): No such process
Process 332 attached - interrupt to quit
Process 3606 attached - interrupt to quit
attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted
Process 434 attached - interrupt to quit
Process 682 attached - interrupt to quit
...snip...
Process 332 detached
[pid   762] open(&amp;quot;/dev/dspctl/ctl&amp;quot;, O_RDWR) = 6
[pid   762] open(&amp;quot;/dev/dspctl/ctl&amp;quot;, O_RDWR) = 6
[pid   762] open(&amp;quot;/dev/dspctl/ctl&amp;quot;, O_RDWR) = 6
[pid   709] --- SIGALRM (Alarm clock) @ 0 (0) ---
[pid   709] --- SIGALRM (Alarm clock) @ 0 (0) ---
[pid   762] open(&amp;quot;/dev/dspctl/ctl&amp;quot;, O_RDWR) = 6
[pid   709] --- SIGALRM (Alarm clock) @ 0 (0) ---
... etc ...
          
&lt;/pre&gt;

&lt;p&gt;The output shows which processes strace attaches to and what are the
files those processes are opening.&lt;/p&gt;

&lt;div class=&quot;frame note&quot;&gt;
&lt;div class=&quot;label&quot;&gt;
N.B.
&lt;/div&gt;

&lt;div class=&quot;content&quot;&gt;
If there are lots of system calls performed by the process(es),
&lt;code&gt;strace&lt;/code&gt; might not show all of them. So, basically the
output in this kind of a situation is only indicative. For more
accurate information, a specific single processes can be traced.
&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Other Strace Options&lt;/h3&gt;

&lt;p&gt;Here are examples of some of the useful strace options.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-f fork&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-f fork&lt;/code&gt; option tells strace to follow the execution
to the forked process from the calling process. By default, strace
does not follow forks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-e expr&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-e&lt;/code&gt; option is handy when it is necessary to limit the scope of the output. For example,&lt;/p&gt;

&lt;pre&gt;
[sbox-DIABLO_X86: ~/src/testing/gdb_example] &amp;gt; strace -e trace=network ./gdb_example
&lt;/pre&gt;

&lt;p&gt;would only output those calls that are network-related. In this example, there would be no other output than the normal output of the program.&lt;/p&gt;

&lt;p&gt;However,&lt;/p&gt;

&lt;pre&gt;
[sbox-DIABLO_X86: ~/src/testing/gdb_example] &amp;gt; strace -e trace=file ./gdb_example
&lt;/pre&gt;

&lt;p&gt;would only show which system calls are called related to accessing files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;-tt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;-tt&lt;/code&gt; option makes strace precede each system call
with the time it was called. This could potentially be used for rough
performance analysis.&lt;/p&gt;

&lt;p&gt;Start a process and trace all IPC and network related system calls it
makes and print the time of day with microseconds for each traced
system call.&lt;/p&gt;

&lt;pre&gt;
[sbox-DIABLO_X86: ~/] &amp;gt; strace -tt -e trace=ipc,network ./some_program -programs -own -args
&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/strace.html&quot;&gt;strace man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/maemo_release_documentation/maemo4.1.x/node15.html&quot;&gt;maemo debugging guide&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/ltrace/&quot; class=&quot;wikipage default&quot; title=&quot;ltrace&quot;&gt;ltrace&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Juha Kallioinen</author>
            <pubDate>Wed, 18 Feb 2009 12:04:55 +0000</pubDate>
        </item>
        <item>
            <title>crash-reporter</title>
            <link>http://maemo.org/development/tools/doc/diablo/crash-reporter/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Crash Reporter&lt;/em&gt; provides a user-friendly graphical user interface that allows users to easily upload crash reports provided by &lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/sp-rich-core/&quot; class=&quot;wikipage default&quot; title=&quot;sp-rich-core&quot;&gt;sp-rich-core&lt;/a&gt; to a centralized location to help developers to fix issues.&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: nitro&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: nitro&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/nitro_ui.html&quot;&gt;nitro_ui man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/sp-rich-core/&quot; class=&quot;wikipage default&quot; title=&quot;sp-rich-core&quot;&gt;sp-rich-core&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Juha Kallioinen</author>
            <pubDate>Tue, 25 Nov 2008 12:55:06 +0000</pubDate>
        </item>
        <item>
            <title>bluez-hcidump</title>
            <link>http://maemo.org/development/tools/doc/diablo/bluez-hcidump/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;Bluez-hcidump is the BlueZ project Bluetooth HCI data dumper.&lt;/p&gt;

&lt;p&gt;Hcidump lets you view raw HCI data to and from a Bluetooth device in a
human readable way.&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: bluez-hcidump&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: bluez-hcidump&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;p&gt;Start hcidump like this and create a Bluetooth connection to your
phone:&lt;/p&gt;

&lt;pre&gt;
# hcidump -V -x
&lt;/pre&gt;

&lt;p&gt;you'll see a lot of verbose messages of the data and state of the
connection.&lt;/p&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/hcidump.html&quot;&gt;hcidump man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.bluez.org/&quot;&gt;http://www.bluez.org/&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/bluez-utils-test/&quot; class=&quot;wikipage default&quot; title=&quot;bluez-utils-test&quot;&gt;bluez-utils-test&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Juha Kallioinen</author>
            <pubDate>Tue, 25 Nov 2008 12:53:11 +0000</pubDate>
        </item>
        <item>
            <title>bluez-utils-test</title>
            <link>http://maemo.org/development/tools/doc/diablo/bluez-utils-test/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;bluez-utils-test&lt;/em&gt; contains several test tools for testing the BlueZ stack. Listed here are a few of the tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;hciconfig&lt;/em&gt; configure Bluetooth devices&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;hcitool&lt;/em&gt; configure Bluetooth connections&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;l2ping&lt;/em&gt; send L2CAP echo request and receive answer&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;pand&lt;/em&gt; BlueZ Bluetooth PAN daemon&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: bluez-utils&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: bluez-utils-test&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/hciconfig.html&quot;&gt;hciconfig man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/hcitool.html&quot;&gt;hcitool man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/l2ping.html&quot;&gt;l2ping man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/pand.html&quot;&gt;pand man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.bluez.org/&quot;&gt;http://www.bluez.org/&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/bluez-hcidump/&quot; class=&quot;wikipage default&quot; title=&quot;bluez-hcidump&quot;&gt;bluez-hcidump&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Juha Kallioinen</author>
            <pubDate>Tue, 25 Nov 2008 12:52:29 +0000</pubDate>
        </item>
        <item>
            <title>check</title>
            <link>http://maemo.org/development/tools/doc/diablo/check/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;check&lt;/em&gt; features a simple interface for defining unit tests, putting little in the way of the developer. Tests are run in a separate address space, so Check can catch both assertion failures and code errors that cause segmentation faults or other signals. The output from unit tests can be used within source code editors and IDEs.&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: check&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: check&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://check.sourceforge.net/&quot;&gt;http://check.sourceforge.net/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://check.sourceforge.net/doc/check.html/index.html&quot;&gt;http://check.sourceforge.net/doc/check.html/index.html&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;-&lt;/p&gt;
</description>
            <author>Juha Kallioinen</author>
            <pubDate>Tue, 25 Nov 2008 12:50:29 +0000</pubDate>
        </item>
        <item>
            <title>functracer-postproc</title>
            <link>http://maemo.org/development/tools/doc/diablo/functracer-postproc/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;functracer-postproc&lt;/em&gt; is a post-processing tool. It generates detailed reports from Functracer output data. For now, functracer-postproc generates the following reports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Non-freed allocations detection (possible leaks)&lt;/li&gt;
&lt;li&gt;Free malloc/calloc/realloc detection&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: functracer-postproc&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: functracer-postproc&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/xxx.html&quot;&gt;xxx man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/functracer/&quot; class=&quot;wikipage default&quot; title=&quot;functracer&quot;&gt;functracer&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Juha Kallioinen</author>
            <pubDate>Tue, 25 Nov 2008 12:44:35 +0000</pubDate>
        </item>
        <item>
            <title>functracer</title>
            <link>http://maemo.org/development/tools/doc/diablo/functracer/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;functracer&lt;/em&gt; is a debugging tool that gets backtraces of all allocations done in ARM/x86 processes. It works with optimized (-O2) code, where debugging symbols are available either in the application  binaries themselves, or in separate debug files.&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: functracer&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: functracer&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/xxx.html&quot;&gt;xxx man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/functracer-postproc/&quot; class=&quot;wikipage default&quot; title=&quot;functracer-postproc&quot;&gt;functracer-postproc&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Juha Kallioinen</author>
            <pubDate>Tue, 25 Nov 2008 12:44:01 +0000</pubDate>
        </item>
        <item>
            <title>xresponse</title>
            <link>http://maemo.org/development/tools/doc/diablo/xresponse/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;Xresponse synthetizes X stylus events and outputs screen update sizes
and their timestamps.&lt;/p&gt;

&lt;p&gt;Xresponse can catch applications doing screen updates which are not
done as a response to user input/request and updates of unnecessary
parts of application UIs. These are detrimental to application
performance and device use-time.&lt;/p&gt;

&lt;p&gt;Xresponse can also be used to time the applications screen updates
i.e. their response time.&lt;/p&gt;

&lt;p&gt;The screen update areas are output in the &amp;quot;X geometry&amp;quot; format (WIDTH x HEIGHT + X + Y).&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: xresponse&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: xresponse&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;h2&gt;Monitoring screen updates&lt;/h2&gt;

&lt;p&gt;Xresponse can be used to monitor how large parts of the screen and how
often an application is updating them. To run it in the screen update
monitoring mode, use:&lt;/p&gt;

&lt;pre&gt;
# xresponse -w 0 -i 
&lt;/pre&gt;

&lt;p&gt;Then just use the applications.&lt;/p&gt;

&lt;h2&gt;Timing application response / screen updates&lt;/h2&gt;

&lt;p&gt;Xresponse can synthetize stylus taps; just specify where they should
happen with the -c option and how long Xresponse should wait for the
screen updates before proceeding with the -w option:&lt;/p&gt;

&lt;pre&gt;
# xresponse -w 5 -c 200x20 
&lt;/pre&gt;

&lt;p&gt;If you want to monitor only part of the screen, e.g. toolbar, you can
give which area of the screen is monitored with the -m option:&lt;/p&gt;

&lt;pre&gt;
# xresponse -m 800x80+0+400 -w 20 -c 650x430 
&lt;/pre&gt;

&lt;p&gt;(This is useful for example if an application like Browser can be
updating the normal application area also without user interaction.)&lt;/p&gt;

&lt;p&gt;To time application startup, open the Task Navigator application menu,
synthetize a tap to the menu item starting the application and monitor
the screen updates. With most applications the last screen update is
the time when the application is fully initialized and ready for use.&lt;/p&gt;

&lt;h2&gt;Keypress simulation&lt;/h2&gt;

&lt;p&gt;Xresponse can also simulate pressing single keys and typing strings.&lt;/p&gt;

&lt;p&gt;To simulate pressing the Tab key, entering the string 'Foobar' and
pressing Enter with a pause of one second between the events:&lt;/p&gt;

&lt;pre&gt;
# xresponse -w 1 -k Tab,100 -w 1 -t Foobar -w 1 -k Return,100
&lt;/pre&gt;

&lt;h1&gt;Notes&lt;/h1&gt;

&lt;p&gt;There are a few quirks with the order of the options. The &lt;strong&gt;-o&lt;/strong&gt; or
&lt;strong&gt;--logfile&lt;/strong&gt; option has to be given as the first option for it to
work.&lt;/p&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/xresponse.html&quot;&gt;xresponse man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/xnee/&quot; class=&quot;wikipage default&quot; title=&quot;xnee&quot;&gt;xnee&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Midgard Administrator</author>
            <pubDate>Tue, 24 Jun 2008 11:39:10 +0000</pubDate>
        </item>
        <item>
            <title>diablo</title>
            <link>http://maemo.org/development/tools/doc/diablo/</link>
            <description>&lt;p&gt;The SDK tools documentation for maemo 4 Chinook is available from the diablo tools page:&lt;/p&gt;

&lt;p&gt;
 &lt;a href=&quot;/development/tools/diablo.html&quot;&gt;http://maemo.org/development/tools/diablo.html&lt;/a&gt;
&lt;/p&gt;
</description>
            <author>Midgard Administrator</author>
            <pubDate>Tue, 24 Jun 2008 11:17:37 +0000</pubDate>
        </item>
        <item>
            <title>sp-response-time</title>
            <link>http://maemo.org/development/tools/doc/diablo/sp-response-time/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;sp-response-time monitors UI response times.&lt;/p&gt;

&lt;p&gt;This application monitors keyboard and mouse/touchscreen events and
calculates how long it takes when updates on the screen are done.
This tool is designed for giving support on performance analysis when
calculating UI response times against some performance requirements.&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: sp-response-time&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: sp-response-time&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;p&gt;Running this in a Scratchbox target and opening up menus in the
emulated device desktop results in output like this:&lt;/p&gt;

&lt;pre&gt;
[sbox-i386: ~/] &amp;gt; ./sp-response-time -w 100

sp-response-time 0.0.8

Timestamp      : Info ([event(s), damage(s), update(ms), ]message) -------------
1213704219.115 : 1213704218.997, 1213704219.008, 11, &amp;quot;Event at 1213704218.997s. Update took 11ms.&amp;quot;
1213704221.367 : 1213704221.190, 1213704221.200, 10, &amp;quot;Event at 1213704221.190s. Update took 10ms.&amp;quot;
1213704223.718 : 1213704222.220, 1213704223.574, 1354, &amp;quot;Event at 1213704222.220s. Update took 1354ms.&amp;quot;
&lt;/pre&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/sp-response-time.html&quot;&gt;sp-response-time man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/xresponse/&quot; class=&quot;wikipage default&quot; title=&quot;xresponse&quot;&gt;xresponse&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Midgard Administrator</author>
            <pubDate>Tue, 17 Jun 2008 12:08:59 +0000</pubDate>
        </item>
        <item>
            <title>valgrind</title>
            <link>http://maemo.org/development/tools/doc/diablo/valgrind/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;Valgrind is an Open Source suite of tools for debugging and profiling
Linux programs. It works only on x86 (and PPC).&lt;/p&gt;

&lt;p&gt;Valgrind is a really powerful and easy to use tool that can save you a
lot of debugging time.&lt;/p&gt;

&lt;p&gt;Because Valgrind works by simulating the x86 processor and
instrumenting the binaries on the fly, it can control the program
execution completely. As a downsize it makes program execution 10-300
times slower than normally, depending on the used Valgrind tools
(massif is the fastest, callgrind the slowest) and can take a huge
amount of memory.&lt;/p&gt;

&lt;p&gt;The tools available for Valgrind are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Massif&lt;/em&gt;: run-time memory usage graph and hyperlinked allocation
backtraces (allocation are sorted by time*size)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Memcheck&lt;/em&gt;: Detects memory access errors (writes to freed memory,
reads from uninitialized memory) and memory leaks (process has lost a
pointer to allocation). This reports less false positives than any
other (Open Source) tool and can call gdb when the error happens&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Cachegrind&lt;/em&gt;: Performance profiling which can be started and stopped
at any moment and the results can be sorted according to instructions,
cache hits etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Callgrind&lt;/em&gt;: Like Cachegrind, but stores also callgraph information
(but can show only instruction counts). Works very well with the
&lt;a href=&quot;http://kcachegrind.sourceforge.net/cgi-bin/show.cgi&quot;&gt;Kcachegrind UI&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Helgrind&lt;/em&gt;: Detects race conditions when (p)threaded programs access
global data&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Building Valgrind&lt;/h2&gt;

&lt;p&gt;Please note that in maemo environment we need to &lt;em&gt;export G_SLICE=&amp;quot;always-malloc&amp;quot;&lt;/em&gt;
to avoid getting bogus leakage reports from Glib GSlice allocator
(its TLS usage confuses Valgrind allocation tracking). If you build
your own Valgrind version, you should use this setting when Valgrinding
programs using Glib (e.g. all maemo UI apps).&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: valgrind&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: valgrind&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;p&gt;See the &lt;a href=&quot;/development/documentation/how-tos/4-x/maemo_debugging_guide.html&quot;&gt;maemo debugging guide&lt;/a&gt; for usage examples.&lt;/p&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/valgrind.html&quot;&gt;valgrind man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://valgrind.org/&quot;&gt;http://valgrind.org/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://valgrind.org/info/tools.html&quot;&gt;Valgrind tool-suite&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://valgrind.org/docs/manual/mc-manual.html&quot;&gt;Memcheck memory checker&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://valgrind.org/docs/manual/ms-manual.html&quot;&gt;Massif heap-profiler&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://valgrind.org/docs/manual/cl-manual.html&quot;&gt;Callgrind profiler&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://valgrind.org/docs/manual/hg-manual.html&quot;&gt;Helgrind data-race tracker&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/how-tos/4-x/maemo_debugging_guide.html&quot;&gt;maemo debugging guide&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;KCachegrind UI: &lt;a href=&quot;http://kcachegrind.sourceforge.net/cgi-bin/show.cgi&quot;&gt;http://kcachegrind.sourceforge.net/cgi-bin/show.cgi&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Midgard Administrator</author>
            <pubDate>Tue, 17 Jun 2008 11:43:44 +0000</pubDate>
        </item>
        <item>
            <title>doxygen</title>
            <link>http://maemo.org/development/tools/doc/diablo/doxygen/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;Doxygen is a documentation system for C, C++, Java, Python and other
languages.&lt;/p&gt;

&lt;p&gt;Doxygen extracts comments from source code comments and it can
generate online and offline documentation from them. Among the
supported output formats are for example HTML, RTF and PDF.&lt;/p&gt;

&lt;p&gt;Some of the maemo API documentation is published in Doxygen generated
format.&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: doxygen (available in diablo/sdk repository)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: doxygen (available in diablo/sdk repository)&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;p&gt;-&lt;/p&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/doxygen.html&quot;&gt;doxygen man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doxygen.org/&quot;&gt;http://www.doxygen.org/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Doxygen&quot;&gt;http://en.wikipedia.org/wiki/Doxygen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/apis&quot;&gt;maemo API documentation&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/gtk-doc/&quot; class=&quot;wikipage default&quot; title=&quot;gtk-doc&quot;&gt;gtk-doc&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Midgard Administrator</author>
            <pubDate>Mon, 16 Jun 2008 14:51:01 +0000</pubDate>
        </item>
        <item>
            <title>gtk-doc</title>
            <link>http://maemo.org/development/tools/doc/diablo/gtk-doc/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;GTK-Doc is typically used to document the public C API of
libraries. It has some special features that are useful in documenting
signals and properties of GTK+ widgets and GObject classes. It can
also be used to document application code.&lt;/p&gt;

&lt;p&gt;Many of the maemo API documents have been generated with GTK-Doc.&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: gtk-doc-tools (available in diablo/sdk repository)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: gtk-doc-tools (available in diablo/sdk repository)&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;p&gt;-&lt;/p&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://www.gtk.org/gtk-doc/&quot;&gt;http://www.gtk.org/gtk-doc/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/apis&quot;&gt;maemo API documentation&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/doxygen/&quot; class=&quot;wikipage default&quot; title=&quot;doxygen&quot;&gt;doxygen&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Midgard Administrator</author>
            <pubDate>Mon, 16 Jun 2008 14:49:09 +0000</pubDate>
        </item>
        <item>
            <title>xresponse-visualize</title>
            <link>http://maemo.org/development/tools/doc/diablo/xresponse-visualize/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;xresponse-visualize is a set of scripts that can be used on the
host/Scratchbox environment to visualize &lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/xresponse/&quot; class=&quot;wikipage default&quot; title=&quot;xresponse&quot;&gt;xresponse&lt;/a&gt; log files.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;xresponse-convert&lt;/em&gt;: create a series of images from xresponse logs
highlighting the area of the screen where changes were detected.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;xresponse-visualize&lt;/em&gt;: animates images create with xresponse-convert&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: xresponse-visualize&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: xresponse-visualize&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;p&gt;-&lt;/p&gt;

&lt;h1&gt;Notes&lt;/h1&gt;

&lt;p&gt;The recommended dependencies (&lt;em&gt;imagemagick&lt;/em&gt; and &lt;em&gt;python-pygame&lt;/em&gt;) for
xresponse-visualize are not (yet) provided with the maemo SDK, but are
expected to be found from the user's host system.&lt;/p&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/xresponse-convert.html&quot;&gt;xresponse-convert man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/xresponse-visualize.html&quot;&gt;xresponse-visualize man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/xresponse/&quot; class=&quot;wikipage default&quot; title=&quot;xresponse&quot;&gt;xresponse&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Midgard Administrator</author>
            <pubDate>Mon, 16 Jun 2008 13:37:51 +0000</pubDate>
        </item>
        <item>
            <title>sp-memusage</title>
            <link>http://maemo.org/development/tools/doc/diablo/sp-memusage/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;sp-memusage is a collection of memory usage monitoring tools and scripts.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;mem-dirty-code-pages&lt;/em&gt;: prints out the dirty code pages allocated by the given processes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;mem-monitor&lt;/em&gt;: prints out system memory usage at a given interval&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;mem-monitor-smaps&lt;/em&gt;: prints out the memory usage of a given process at a given interval&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;mem-smaps-private&lt;/em&gt;: prints out the private memory usage of a given process&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;run-with-mallinfo&lt;/em&gt;: run maemo applications under mallinfo&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;run-with-memusage&lt;/em&gt;: run maemo applications under memusage&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: sp-memusage&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: sp-memusage, sp-memusage-dbg&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;p&gt;See respective man pages for usage examples and more info on each utility.&lt;/p&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/mem-dirty-code-pages.html&quot;&gt;mem-dirty-code-pages man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/mem-monitor.html&quot;&gt;mem-monitor man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/mem-monitor-smaps.html&quot;&gt;mem-monitor-smaps man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/mem-smaps-private.html&quot;&gt;mem-smaps-private man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/run-with-mallinfo.html&quot;&gt;run-with-mallinfo man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/run-with-meminfo.html&quot;&gt;run-with-meminfo man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/sp-smaps-measure/&quot; class=&quot;wikipage default&quot; title=&quot;sp-smaps-measure&quot;&gt;sp-smaps-measure&lt;/a&gt;, &lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/sp-smaps-visualize/&quot; class=&quot;wikipage default&quot; title=&quot;sp-smaps-visualize&quot;&gt;sp-smaps-visualize&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Midgard Administrator</author>
            <pubDate>Mon, 16 Jun 2008 13:36:22 +0000</pubDate>
        </item>
        <item>
            <title>sp-smaps-measure</title>
            <link>http://maemo.org/development/tools/doc/diablo/sp-smaps-measure/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;sp-smaps-measure installs an utility that can be invoked to take a
snapshot of /proc/&lt;em&gt;PID&lt;/em&gt;/smaps files. The smaps files contain very
detailed information about processes' memory consumption.&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: sp-smaps&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: sp-smaps-measure&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;p&gt;Writes output similar to &lt;code&gt;head -2000 /proc/[1-9]*/smaps&lt;/code&gt; to logfile
&lt;em&gt;after_boot.cap&lt;/em&gt;.&lt;/p&gt;

&lt;pre&gt;
# sp_smaps_snapshot &amp;gt; after_boot.cap
&lt;/pre&gt;

&lt;p&gt;It is possible to request realtime priority with the &lt;em&gt;--realtime&lt;/em&gt;
option. This requires that the utility is run as superuser.&lt;/p&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/sp_smaps_snapshot.html&quot;&gt;sp_smaps_snapshot man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/sp-smaps-visualize/&quot; class=&quot;wikipage default&quot; title=&quot;sp-smaps-visualize&quot;&gt;sp-smaps-visualize&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Midgard Administrator</author>
            <pubDate>Mon, 16 Jun 2008 12:46:58 +0000</pubDate>
        </item>
        <item>
            <title>sp-smaps-visualize</title>
            <link>http://maemo.org/development/tools/doc/diablo/sp-smaps-visualize/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;sp-smaps-visualize provides utilities primarily for the
host/Scratchbox environment to analyze smaps data captured by
&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/sp-smaps-measure/&quot; class=&quot;wikipage default&quot; title=&quot;sp-smaps-measure&quot;&gt;sp-smaps-measure&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;sp_smaps_analyze&lt;/em&gt;: Reads raw (.cap) or normalized (.csv) sp_smaps_snapshot capture data and produces detailed view to system / process / object memory usage in html format.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;sp_smaps_appvals&lt;/em&gt;: Reads raw (.cap) or normalized (.csv) sp_smaps_snapshot capture data and produces a summary table for memory usage of all applications in the capture file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;sp_smaps_diff&lt;/em&gt;: Displays differences in application memory usage between smaps capture files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;sp_smaps_filter&lt;/em&gt;: Process captured smaps files in different ways.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;sp_smaps_flatten&lt;/em&gt;: Reads raw capture files generated with sp_smaps_snapshot and tries to detect and remove duplicate entries due to multiple threads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;sp_smaps_normalize&lt;/em&gt;: Reads smaps snapshots and writes CSV format data that can be imported to spreadsheet programs or sp_smaps_analyze and friends.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: sp-smaps&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: sp-smaps-visualize&lt;/p&gt;

&lt;h1&gt;Usage Examples&lt;/h1&gt;

&lt;p&gt;Refer to each utility's man page for usage examples.&lt;/p&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/sp_smaps_analyze.html&quot;&gt;sp_smaps_analyze man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/sp_smaps_appvals.html&quot;&gt;sp_smaps_appvals man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/sp_smaps_diff.html&quot;&gt;sp_smaps_diff man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/sp_smaps_filter.html&quot;&gt;sp_smaps_filter man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/sp_smaps_flatten.html&quot;&gt;sp_smaps_flatten man page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/sp_smaps_normalize.html&quot;&gt;sp_smaps_normalize man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/sp-smaps-measure/&quot; class=&quot;wikipage default&quot; title=&quot;sp-smaps-measure&quot;&gt;sp-smaps-measure&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Midgard Administrator</author>
            <pubDate>Mon, 16 Jun 2008 12:38:11 +0000</pubDate>
        </item>
        <item>
            <title>xrestop</title>
            <link>http://maemo.org/development/tools/doc/diablo/xrestop/</link>
            <description>&lt;h1&gt;Description&lt;/h1&gt;

&lt;p&gt;Xrestop shows how much X resources from the X server are being used by
the X clients. It is similar to &lt;strong&gt;top&lt;/strong&gt; and &lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/htop/&quot; class=&quot;wikipage default&quot; title=&quot;htop&quot;&gt;htop&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;Packages&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;source&lt;/strong&gt;: xrestop&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;binary&lt;/strong&gt;: xrestop&lt;/p&gt;

&lt;h1&gt;Usage&lt;/h1&gt;

&lt;pre&gt;
# xrestop
&lt;/pre&gt;

&lt;h1&gt;Links&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;/development/documentation/man_pages/xrestop.html&quot;&gt;xrestop man page&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;See Also&lt;/h1&gt;

&lt;p&gt;&lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/htop/&quot; class=&quot;wikipage default&quot; title=&quot;htop&quot;&gt;htop&lt;/a&gt;, &lt;a href=&quot;http://maemo.org/development/tools/doc/diablo/x-debug-tools/&quot; class=&quot;wikipage default&quot; title=&quot;x-debug-tools&quot;&gt;x-debug-tools&lt;/a&gt;&lt;/p&gt;
</description>
            <author>Juha Kallioinen</author>
            <pubDate>Tue, 06 May 2008 11:19:08 +0000</pubDate>
        </item>
    </channel>
</rss>
