<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/perf/util/hist.c, branch linux-3.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-04-27T17:16:33Z</updated>
<entry>
<title>Perf: fix build breakage</title>
<updated>2012-04-27T17:16:33Z</updated>
<author>
<name>Zeev Tarantov</name>
</author>
<published>2012-04-23T06:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=968cb88a66d25f2a522e59dda0c1e6f229e9e239'/>
<id>urn:sha1:968cb88a66d25f2a522e59dda0c1e6f229e9e239</id>
<content type='text'>
[Patch not needed upstream as this is a backport build bugfix - gregkh

gcc correctly complains:

util/hist.c: In function ‘__hists__add_entry’:
util/hist.c:240:27: error: invalid type argument of ‘-&gt;’ (have ‘struct hist_entry’)
util/hist.c:241:23: error: invalid type argument of ‘-&gt;’ (have ‘struct hist_entry’)

for this new code:

+                       if (he-&gt;ms.map != entry-&gt;ms.map) {
+                               he-&gt;ms.map = entry-&gt;ms.map;
+                               if (he-&gt;ms.map)
+                                       he-&gt;ms.map-&gt;referenced = true;
+                       }

because "entry" is a "struct hist_entry", not a pointer to a struct.

In mainline, "entry" is a pointer to struct passed as argument to the function.
So this is broken during backporting. But obviously not compile tested.

Signed-off-by: Zeev Tarantov &lt;zeev.tarantov@gmail.com&gt;
Cc: Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>perf hists: Catch and handle out-of-date hist entry maps.</title>
<updated>2012-04-22T22:38:58Z</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=1cb41fe7e34a43a1d27dfdb6d65699786dd44c20'/>
<id>urn:sha1:1cb41fe7e34a43a1d27dfdb6d65699786dd44c20</id>
<content type='text'>
commit 63fa471dd49e9c9ce029d910d1024330d9b1b145 upstream.

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;
Link: http://lkml.kernel.org/r/20120327.031418.1220315351537060808.davem@davemloft.net
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&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>
<entry>
<title>perf report: Fix --stdio output alignment when --showcpuutilization used</title>
<updated>2012-01-08T15:32:51Z</updated>
<author>
<name>Namhyung Kim</name>
</author>
<published>2012-01-07T17:25:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ed35abc2b569e94498705d250c4767c5284f643'/>
<id>urn:sha1:0ed35abc2b569e94498705d250c4767c5284f643</id>
<content type='text'>
Current perf report output is broken if --showcpuutilization is used.
Combination with -n and/or --show-total-period make things worse.
This patch fixes it as follows:

before:
    48.25%    48.25%     0.00%    sleep  [kernel.kallsyms]  [k] trace_hardirqs_off
    34.99%    34.99%     0.00%    sleep  [kernel.kallsyms]  [k] __find_get_block_slow
    15.99%    15.99%     0.00%    sleep  [kernel.kallsyms]  [k] lock_release_holdtime
     0.77%     0.77%     0.00%    sleep  [kernel.kallsyms]  [k] native_write_msr_safe

after:
    48.25%    48.25%     0.00%    sleep  [kernel.kallsyms]  [k] trace_hardirqs_off
    34.99%    34.99%     0.00%    sleep  [kernel.kallsyms]  [k] __find_get_block_slow
    15.99%    15.99%     0.00%    sleep  [kernel.kallsyms]  [k] lock_release_holdtime
     0.77%     0.77%     0.00%    sleep  [kernel.kallsyms]  [k] native_write_msr_safe

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/1325957132-10600-8-git-send-email-namhyung@gmail.com
Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists: Stop using 'self' for struct hist_entry</title>
<updated>2012-01-06T17:42:52Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2012-01-04T14:27:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=12c142781ec076fad617e7cd9f83c8618d909619'/>
<id>urn:sha1:12c142781ec076fad617e7cd9f83c8618d909619</id>
<content type='text'>
Stop using this python/OOP convention, doesn't really helps. Will do
more from time to time till we get it cleaned up in all of /perf.

Suggested-by: Thomas Gleixner &lt;tglx@linutronix.de&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;
Link: http://lkml.kernel.org/n/tip-me4dyj6s5snh7jr8wb9gzt82@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists: Rename total_session to total_period</title>
<updated>2012-01-06T17:42:08Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2012-01-04T13:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=13d3ee5402970216291d2c514c2ba33ef8a0e8c1'/>
<id>urn:sha1:13d3ee5402970216291d2c514c2ba33ef8a0e8c1</id>
<content type='text'>
Nowadays we do it per evsel, not per session (that may have multiple
evsels), so rename it to avoid confusion.

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;
Link: http://lkml.kernel.org/n/tip-azsgomr5h4dmaudoogw48w49@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf python: Fix undefined symbol problem</title>
<updated>2011-11-16T12:02:26Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2011-11-04T10:16:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0e2a5f10fb550835e199a3b56a80ed88232188e9'/>
<id>urn:sha1:0e2a5f10fb550835e199a3b56a80ed88232188e9</id>
<content type='text'>
Recently we made perf_evsel__init call hists__init, which broke the perf
python binding:

[root@emilia linux]# ./tools/perf/python/twatch.py
Traceback (most recent call last):
  File "./tools/perf/python/twatch.py", line 16, in &lt;module&gt;
    import perf
ImportError: /home/acme/git/build/perf/python/perf.so: undefined symbol: hists__init

Fix it by moving the hists__init function to its only caller, evsel.c.

This way we avoid dragging in other parts of tools/perf/util/ to the
perf python binding.

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;
Link: http://lkml.kernel.org/n/tip-5nffmdt5mu6ozxgj54oi4qon@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists: Fix recalculation of total_period when sorting entries</title>
<updated>2011-10-27T11:19:48Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2011-10-27T11:19:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7928631a66c884b18f827fbd1b63cd80198f004b'/>
<id>urn:sha1:7928631a66c884b18f827fbd1b63cd80198f004b</id>
<content type='text'>
We were doing parts of it in hists__collapse_resort and parts of it in
hists__output_resort, leading to a bogus total_period.

Fix it by doing just the filtering operation when collapsing because
there we know that the Zoom operations adds filters just  what is in
hists-&gt;entries, not to the new batch of entries being collapsed.

And move all the nr_entries + total_period recalculation to
hists__output_resort since we will traverse all entries anyway there.

Problem introduced when developing threaded addition of new batches
of hist_entries, i.e. post v3.1.

Reported-by: Frederic Weisbecker &lt;fweisbec@gmail.com&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;
Link: http://lkml.kernel.org/n/tip-8xyh165h7hmwy0696hu25en6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists: Don't consider filtered entries when calculating column widths</title>
<updated>2011-10-20T09:35:45Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2011-10-20T09:35:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d197fd5d743289e90c160c8c17460b390d862b98'/>
<id>urn:sha1:d197fd5d743289e90c160c8c17460b390d862b98</id>
<content type='text'>
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;
Link: http://lkml.kernel.org/n/tip-rf01wktu1e3f3az32nry86vu@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists: Don't decay total_period for filtered entries</title>
<updated>2011-10-20T08:45:44Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
</author>
<published>2011-10-20T08:45:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c64550cfddfdbd7a6f9d5ffb37382a05d7f0306b'/>
<id>urn:sha1:c64550cfddfdbd7a6f9d5ffb37382a05d7f0306b</id>
<content type='text'>
Following the 'perf report' model we don't zap hist_entry instances from
the rb tree, we just keep them with he-&gt;filtered set to a mask of the
filters applied to it (thread, parent, DSO so far).

In top we need to decay even filtered entries, but we better not touch
total_period for them...

Now everything seems to work when filters are applied on top as they
worked in 'report', i.e. both dynamic and static hist entry browsing
works with filters.

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;
Link: http://lkml.kernel.org/n/tip-yt4xsbq20u9x9ypuwwyw2kao@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
