<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/perf/util/hist.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-05-05T17:13:24Z</updated>
<entry>
<title>perf hists: Fix HISTC_MEM_DCACHELINE width setting</title>
<updated>2020-05-05T17:13:24Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2016-01-20T11:56:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=203598aa54fdca3cdf395e1955a935e324b1151e'/>
<id>urn:sha1:203598aa54fdca3cdf395e1955a935e324b1151e</id>
<content type='text'>
commit 0805909f59e02036a4e2660159f27dbf8b6084ac upstream.

Set correct width for unresolved mem_dcacheline addr.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Don Zickus &lt;dzickus@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Fixes: 9b32ba71ba90 ("perf tools: Add dcacheline sort")
Link: http://lkml.kernel.org/r/1453290995-18485-3-git-send-email-jolsa@kernel.org
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: Fix time sorting</title>
<updated>2019-11-12T18:13:19Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2019-11-04T23:27:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9aeedfc71ce8427c0c770f38df34f47e73f27cfa'/>
<id>urn:sha1:9aeedfc71ce8427c0c770f38df34f47e73f27cfa</id>
<content type='text'>
commit 722ddfde366fd46205456a9c5ff9b3359dc9a75e upstream.

The final sort might get confused when the comparison is done over
bigger numbers than int like for -s time.

Check the following report for longer workloads:

  $ perf report -s time -F time,overhead --stdio

Fix hist_entry__sort() to properly return int64_t and not possible cut
int.

Fixes: 043ca389a318 ("perf tools: Use hpp formats to sort final output")
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Reviewed-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Michael Petlan &lt;mpetlan@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: stable@vger.kernel.org # v3.16+
Link: http://lore.kernel.org/lkml/20191104232711.16055-1-jolsa@kernel.org
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 report: Fix memory corruption in --branch-history mode --branch-history</title>
<updated>2018-05-30T05:49:16Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2018-02-16T12:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e1396c536b6a5539a67559e5a05c19e29b815cdf'/>
<id>urn:sha1:e1396c536b6a5539a67559e5a05c19e29b815cdf</id>
<content type='text'>
[ Upstream commit e3ebaa465136ecfedf9c6f4671df02bf625f8125 ]

Jin Yao reported memory corrupton in perf report with
branch info used for stack trace:

  &gt; Following command lines will cause perf crash.

  &gt; perf record -j call -g -a &lt;application&gt;
  &gt; perf report --branch-history
  &gt;
  &gt; *** Error in `perf': double free or corruption (!prev): 0x00000000104aa040 ***
  &gt; ======= Backtrace: =========
  &gt; /lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7f6b37254725]
  &gt; /lib/x86_64-linux-gnu/libc.so.6(+0x7ff4a)[0x7f6b3725cf4a]
  &gt; /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f6b37260abc]
  &gt; perf[0x51b914]
  &gt; perf(hist_entry_iter__add+0x1e5)[0x51f305]
  &gt; perf[0x43cf01]
  &gt; perf[0x4fa3bf]
  &gt; perf[0x4fa923]
  &gt; perf[0x4fd396]
  &gt; perf[0x4f9614]
  &gt; perf(perf_session__process_events+0x89e)[0x4fc38e]
  &gt; perf(cmd_report+0x15d2)[0x43f202]
  &gt; perf[0x4a059f]
  &gt; perf(main+0x631)[0x427b71]
  &gt; /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f6b371fd830]
  &gt; perf(_start+0x29)[0x427d89]

For the cumulative output, we allocate the he_cache array based on the
--max-stack option value and populate it with data from 'callchain_cursor'.

The --max-stack option value does not ensure now the limit for number of
callchain_cursor nodes, so the cumulative iter code will allocate smaller array
than it's actually needed and cause above corruption.

I think the --max-stack limit does not apply here anyway, because we add
callchain data as normal hist entries, while the --max-stack control the limit
of single entry callchain depth.

Using the callchain_cursor.nr as he_cache array count to fix this. Also
removing struct hist_entry_iter::max_stack, because there's no longer any use
for it.

We need more fixes to ensure that the branch stack code follows properly the
logic of --max-stack, which is not the case at the moment.

Original-patch-by: Jin Yao &lt;yao.jin@linux.intel.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Reported-by: Jin Yao &lt;yao.jin@linux.intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/20180216123619.GA9945@krava
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>perf tools: Setup proper width for symbol_iaddr field</title>
<updated>2015-10-05T19:33:41Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2015-10-05T18:06:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b34b3bf0798633cc248b682f5b4f6509739ce234'/>
<id>urn:sha1:b34b3bf0798633cc248b682f5b4f6509739ce234</id>
<content type='text'>
We need to properly initialize column width for symbol_iaddr field, so
all symbols could fit in the column.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Don Zickus &lt;dzickus@redhat.com&gt;
Cc: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1444068369-20978-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf report: Fix a bug on "--call-graph none" option</title>
<updated>2015-10-01T12:54:33Z</updated>
<author>
<name>Namhyung Kim</name>
</author>
<published>2015-09-30T04:34:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=208e7607459477432d3df52c32d4b961a96d4a94'/>
<id>urn:sha1:208e7607459477432d3df52c32d4b961a96d4a94</id>
<content type='text'>
The patch f9db0d0f1b2c ("perf callchain: Allow disabling call graphs
per event") added an ability to enable/disable callchain recording per
event.  But it had a problem when the enablement setting is changed at
'perf report' time using -g/--call-graph option.

For example, the following scenario will get a segfault.

  $ perf record -ag sleep 1
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.500 MB perf.data (2555 samples) ]

  $ perf report -g none
  perf: Segmentation fault
  -------- backtrace --------
  perf[0x53a98a]
  /usr/lib/libc.so.6(+0x335af)[0x7f4e91df95af]

This is because callchain_param.sort() callback was not set but it
tried to call the function as it had the PERF_SAMPLE_CALLCHAIN bit.

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Fixes: f9db0d0f1b2c ("perf callchain: Allow disabling call graphs per event")
Link: http://lkml.kernel.org/r/1443587640-24242-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists: Allow for max_stack greater than PERF_MAX_STACK_DEPTH</title>
<updated>2015-09-28T20:06:16Z</updated>
<author>
<name>Adrian Hunter</name>
</author>
<published>2015-09-25T13:15:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96b40f3c05f36e061fd4dde920b9e9c795a88b69'/>
<id>urn:sha1:96b40f3c05f36e061fd4dde920b9e9c795a88b69</id>
<content type='text'>
Use the max_stack value instead of PERF_MAX_STACK_DEPTH so that
arbitrary-sized callchains can be supported.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: http://lkml.kernel.org/r/1443186956-18718-17-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf hists browser: Zoom in/out for processor socket</title>
<updated>2015-09-14T16:02:08Z</updated>
<author>
<name>Kan Liang</name>
</author>
<published>2015-09-04T14:45:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84734b06b63093cd44533f4caa43d4452fb11ec3'/>
<id>urn:sha1:84734b06b63093cd44533f4caa43d4452fb11ec3</id>
<content type='text'>
Currently, users can zoom in/out for threads and dso in 'perf top' and
'perf report'.

This patch extends it for the processor sockets.

'S' is the short key to zoom into current Processor Socket.

Signed-off-by: Kan Liang &lt;kan.liang@intel.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/1441377946-44429-4-git-send-email-kan.liang@intel.com
[ - Made it elide the Socket column when zooming into it,
    just like with the other zoom ops;
  - Make it use browser-&gt;pstack, to unzoom level by level;
  - Rename 'socket' variables to 'socket_id' to make it build on
    older systems where it shadows a global glibc declaration ]
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf report: Introduce --socket-filter option</title>
<updated>2015-09-14T15:50:31Z</updated>
<author>
<name>Kan Liang</name>
</author>
<published>2015-09-04T14:45:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=21394d948a0c7c451d4a4d68afed9a06c4969636'/>
<id>urn:sha1:21394d948a0c7c451d4a4d68afed9a06c4969636</id>
<content type='text'>
Introduce --socket-filter option for 'perf report' to only show entries
for a processor socket that match this filter.

  $ perf report --socket-filter 1 --stdio
  # To display the perf.data header info, please use --header/--header-only options.
  #
  # Total Lost Samples: 0
  #
  # Samples: 752  of event 'cycles'
  # Event count (approx.): 350995599
  # Processor Socket: 1
  #
  # Overhead  Command    Shared Object     Symbol
  # ........  .........  ................  .................................
  #
      97.02%  test       test              [.] plusB_c
       0.97%  test       test              [.] plusA_c
       0.23%  swapper    [kernel.vmlinux]  [k] acpi_idle_do_entry
       0.09%  rcu_sched  [kernel.vmlinux]  [k] dyntick_save_progress_counter
       0.01%  swapper    [kernel.vmlinux]  [k] task_waking_fair
       0.00%  swapper    [kernel.vmlinux]  [k] run_timer_softirq

Signed-off-by: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/1441377946-44429-3-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Introduce new sort type "socket" for the processor socket</title>
<updated>2015-09-14T15:50:30Z</updated>
<author>
<name>Kan Liang</name>
</author>
<published>2015-09-04T14:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e7ea3ab8282f6bb1d211d8af760a734c055f493'/>
<id>urn:sha1:2e7ea3ab8282f6bb1d211d8af760a734c055f493</id>
<content type='text'>
This patch enable perf report to sort by processor socket:

  $ perf report --stdio --sort socket,comm,dso,symbol
  # To display the perf.data header info, please use --header/--header-only options.
  #
  # Total Lost Samples: 0
  #
  # Samples: 686  of event 'cycles'
  # Event count (approx.): 349215462
  #
  # Overhead SOCKET Command Shared Object    Symbol
  # ........ ...... ....... ................ ............................
  #
    97.05%    000   test    test             [.] plusB_c
     0.98%    000   test    test             [.] plusA_c
     0.93%    001   perf    [kernel.vmlinux] [k] smp_call_function_single
     0.19%    001   perf    [kernel.vmlinux] [k] page_fault
     0.19%    001   swapper [kernel.vmlinux] [k] pm_qos_request
     0.16%    000   test    [kernel.vmlinux] [k] add_mm_counter_fast

Signed-off-by: Kan Liang &lt;kan.liang@intel.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/1441377946-44429-2-git-send-email-kan.liang@intel.com
[ Fix col calc, un-allcapsify col header &amp; read the topology when not using perf.data ]
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Add processor socket info to hist_entry and addr_location</title>
<updated>2015-09-14T15:50:29Z</updated>
<author>
<name>Kan Liang</name>
</author>
<published>2015-09-04T14:45:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c4c4debb0adda4c18c158d95031dc2b9f637869'/>
<id>urn:sha1:0c4c4debb0adda4c18c158d95031dc2b9f637869</id>
<content type='text'>
This information will come from perf.data files of from the current
system, cached when needed, such as when the 'socket' sort order gets
introduced.

Signed-off-by: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Link: http://lkml.kernel.org/r/1441377946-44429-1-git-send-email-kan.liang@intel.com
[ Don't blindly use env-&gt;cpu[al.cpu].socket_id &amp; use machine-&gt;env, fixes by Jiri &amp; Arnaldo ]
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
