<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/perf/util/hist.c, branch linux-3.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.6.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.6.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-07-25T14:32:26Z</updated>
<entry>
<title>perf hists: Print newline between hists callchains</title>
<updated>2012-07-25T14:32:26Z</updated>
<author>
<name>Frederic Weisbecker</name>
</author>
<published>2012-07-18T17:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6654f5d8bdaa438b1e60dfeb90f9d46ca969c012'/>
<id>urn:sha1:6654f5d8bdaa438b1e60dfeb90f9d46ca969c012</id>
<content type='text'>
Tiny cosmetic fix. The lack of a newline between hists callchains was
looking slightly messy.

Before:

     0.24%      swapper  [kernel.kallsyms]  [k] _raw_spin_lock_irq
                |
                --- _raw_spin_lock_irq
                    run_timer_softirq
                    __do_softirq
                    call_softirq
                    do_softirq
                    irq_exit
                    smp_apic_timer_interrupt
                    apic_timer_interrupt
                    default_idle
                    amd_e400_idle
                    cpu_idle
                    start_secondary
     0.10%         perf  [kernel.kallsyms]  [k] lock_is_held
                   |
                   --- lock_is_held
                       __might_sleep
                       mutex_lock_nested
                       perf_event_for_each_child
                       perf_ioctl
                       do_vfs_ioctl
                       sys_ioctl
                       system_call_fastpath
                       ioctl
                       cmd_record
                       run_builtin
                       main
                       __libc_start_main

After:

     0.24%      swapper  [kernel.kallsyms]  [k] _raw_spin_lock_irq
                |
                --- _raw_spin_lock_irq
                    run_timer_softirq
                    __do_softirq
                    call_softirq
                    do_softirq
                    irq_exit
                    smp_apic_timer_interrupt
                    apic_timer_interrupt
                    default_idle
                    amd_e400_idle
                    cpu_idle
                    start_secondary

     0.10%         perf  [kernel.kallsyms]  [k] lock_is_held
                   |
                   --- lock_is_held
                       __might_sleep
                       mutex_lock_nested
                       perf_event_for_each_child
                       perf_ioctl
                       do_vfs_ioctl
                       sys_ioctl
                       system_call_fastpath
                       ioctl
                       cmd_record
                       run_builtin
                       main
                       __libc_start_main

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1342631456-7233-3-git-send-email-fweisbec@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists: Return correct number of characters printed in callchain</title>
<updated>2012-07-25T14:31:37Z</updated>
<author>
<name>Frederic Weisbecker</name>
</author>
<published>2012-07-18T17:10:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8760db726e2afcd1a78e2ff58965c6b35a5826cb'/>
<id>urn:sha1:8760db726e2afcd1a78e2ff58965c6b35a5826cb</id>
<content type='text'>
Include the omitted number of characters printed for the first entry.

Not that it really matters because nobody seem to care about the number
of printed characters for now. But just in case.

Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1342631456-7233-2-git-send-email-fweisbec@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf callchain: Make callchain cursors TLS</title>
<updated>2012-05-31T13:47:12Z</updated>
<author>
<name>Namhyung Kim</name>
</author>
<published>2012-05-31T05:43:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=472606458f3e1ced5fe3cc5f04e90a6b5a4732cf'/>
<id>urn:sha1:472606458f3e1ced5fe3cc5f04e90a6b5a4732cf</id>
<content type='text'>
perf top -G has a race on callchain cursor between main thread and
display thread. Since the callchain cursors are used locally make them
thread-local data would solve the problem.

Signed-off-by: Namhyung Kim &lt;namhyung.kim@lge.com&gt;
Reported-by: Sunjin Yang &lt;fan4326@gmail.com&gt;
Suggested-by: Arnaldo Carvalho de Melo &lt;acme@ghostprotocols.net&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Sunjin Yang &lt;fan4326@gmail.com&gt;
Link: http://lkml.kernel.org/r/1338443007-24857-1-git-send-email-namhyung.kim@lge.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists: Fix callchain ip printf format</title>
<updated>2012-05-17T16:18:19Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2012-05-16T06:59:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0187060f4ab68cf1aa533446b906cae5b14eb48'/>
<id>urn:sha1:a0187060f4ab68cf1aa533446b906cae5b14eb48</id>
<content type='text'>
The callchain address is stored as u64. Current code uses following
format string to display callchain address:

  "%p\n", (void *)(long)chain-&gt;ip

This way we lose upper 32 bits if we report 64 bit addresses in 32 bit
environment. Fixing this to always display whole 64 bits.

Note, running following to test perf endianity handling:
test 1)
  - origin system:
    # perf record -a -- sleep 10 (any perf record will do)
    # perf report &gt; report.origin
    # perf archive perf.data

  - copy the perf.data, report.origin and perf.data.tar.bz2
    to a target system and run:
    # tar xjvf perf.data.tar.bz2 -C ~/.debug
    # perf report &gt; report.target
    # diff -u report.origin report.target

  - the diff should produce no output
    (besides some white space stuff and possibly different
     date/TZ output)

test 2)
  - origin system:
    # perf record -ag -fo /tmp/perf.data -- sleep 1
  - mount origin system root to the target system on /mnt/origin
  - target system:
    # perf script --symfs /mnt/origin -I -i /mnt/origin/tmp/perf.data \
     --kallsyms /mnt/origin/proc/kallsyms
  - complete perf.data header is displayed

Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Corey Ashford &lt;cjashfor@linux.vnet.ibm.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1337151548-2396-8-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists: Catch and handle out-of-date hist entry maps.</title>
<updated>2012-04-05T21:53:47Z</updated>
<author>
<name>David Miller</name>
</author>
<published>2012-03-27T07:14:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63fa471dd49e9c9ce029d910d1024330d9b1b145'/>
<id>urn:sha1:63fa471dd49e9c9ce029d910d1024330d9b1b145</id>
<content type='text'>
When a process exec()'s, all the maps are retired, but we keep the hist
entries around which hold references to those outdated maps.

If the same library gets mapped in for which we have hist entries, a new
map will be created.  But when we take a perf entry hit within that map,
we'll find the existing hist entry with the older map.

This causes symbol translations to be done incorrectly.  For example,
the perf entry processing will lookup the correct uptodate map entry and
use that to calculate the symbol and DSO relative address.  But later
when we update the histogram we'll translate the address using the
outdated map file instead leading to conditions such as out-of-range
offsets in symbol__inc_addr_samples().

Therefore, update the map of the hist_entry dynamically at lookup/
creation time.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: stable@kernel.org
Link: http://lkml.kernel.org/r/20120327.031418.1220315351537060808.davem@davemloft.net
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Fix display of first level of callchains</title>
<updated>2012-03-26T18:14:40Z</updated>
<author>
<name>Frederic Weisbecker</name>
</author>
<published>2012-03-23T18:06:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d4818c5245fe00bee2c3bfb45edde178f302703'/>
<id>urn:sha1:6d4818c5245fe00bee2c3bfb45edde178f302703</id>
<content type='text'>
The callchain stdio mode display was written using a sorted by symbol
report. In this mode we have only one callchain root per hist so we
forgot to handle cases where we have multiple callchain root, as in per
dso sorting for example.

Fix this by handling these roots like any other branch, with the hist as
the parent.

Before:

     1.97%  libpthread-2.12.1.so
            |
            --- __libc_write
                create_worker
                bench_sched_messaging
                cmd_bench
                run_builtin
                main
                __libc_start_main

            |
            --- __libc_read
                create_worker
                bench_sched_messaging
                cmd_bench
                run_builtin
                main
                __libc_start_main

After:

     1.97%  libpthread-2.12.1.so
            |
            |--36.97%-- __libc_write
            |          create_worker
            |          bench_sched_messaging
            |          cmd_bench
            |          run_builtin
            |          main
            |          __libc_start_main
            |
            |--31.47%-- __libc_read
            |          create_worker
            |          bench_sched_messaging
            |          cmd_bench
            |          run_builtin
            |          main
            |          __libc_start_main
           ...

Single roots keep their entry without percentage because they have
the same overhead than the hist they refer to. ie: 100% in fractal
mode and the percentage of the hist in graph mode:

     0.00%  [k] reschedule_interrupt
            |
            --- default_idle
                amd_e400_idle
                cpu_idle
                start_secondary

Reported-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/1332526010-15400-1-git-send-email-fweisbec@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf diff: Fix to work with new hists design</title>
<updated>2012-03-22T18:12:09Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2012-03-22T13:37:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4bf9ce1b5ecffffeb8b9d7e925bac3e6b10109aa'/>
<id>urn:sha1:4bf9ce1b5ecffffeb8b9d7e925bac3e6b10109aa</id>
<content type='text'>
The perf diff command is broken since:
  perf hists: Threaded addition and sorting of entries
  commit 1980c2ebd7020d82c024b8c4046849b38e78e7da

Several places were broken:
  - hists data need to be collected into opened sessions instead
    of into events
  - session's hists data need to be initialized properly when the
    session is created
  - hist_entry__pcnt_snprintf: the percentage and displacement
    buffer preparation must not use 'ret' because it's used
    as a pointer to the final buffer

Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Corey Ashford &lt;cjashfor@linux.vnet.ibm.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/20120322133726.GB1601@m.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'perf/urgent' into perf/core</title>
<updated>2012-03-22T18:09:08Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2012-03-22T18:09:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d09eb7a9a2ca4d7ed32f7b440bea78c0622814a'/>
<id>urn:sha1:0d09eb7a9a2ca4d7ed32f7b440bea78c0622814a</id>
<content type='text'>
Merge Reason: to pick the fix:

 commit e7f01d1
     perf tools: Use scnprintf where applicable

Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists: Add hists__filter_by_symbol</title>
<updated>2012-03-16T19:31:09Z</updated>
<author>
<name>Namhyung Kim</name>
</author>
<published>2012-03-16T08:50:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e94d53ebec2fb4795c18ad2e76ec633390b1e794'/>
<id>urn:sha1:e94d53ebec2fb4795c18ad2e76ec633390b1e794</id>
<content type='text'>
This function will be used for simple (sub-)string matching filter based
on user input.

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Namhyung Kim &lt;namhyung@gmail.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1331887855-874-1-git-send-email-namhyung.kim@lge.com
Signed-off-by: Namhyung Kim &lt;namhyung.kim@lge.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Use scnprintf where applicable</title>
<updated>2012-03-14T15:36:19Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2012-03-14T15:29:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7f01d1e3d8d501deb8abeaa269d5d48a703b8b0'/>
<id>urn:sha1:e7f01d1e3d8d501deb8abeaa269d5d48a703b8b0</id>
<content type='text'>
Several places were expecting that the value returned was the number of
characters printed, not what would be printed if there was space.

Fix it by using the scnprintf and vscnprintf variants we inherited from
the kernel sources.

Some corner cases where the number of printed characters were not
accounted were fixed too.

Reported-by: Anton Blanchard &lt;anton@samba.org&gt;
Cc: Anton Blanchard &lt;anton@samba.org&gt;
Cc: Eric B Munson &lt;emunson@mgebm.net&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Yanmin Zhang &lt;yanmin_zhang@linux.intel.com&gt;
Cc: stable@kernel.org
Link: http://lkml.kernel.org/n/tip-kwxo2eh29cxmd8ilixi2005x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
