<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/perf/builtin-c2c.c, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-12-03T19:07:46Z</updated>
<entry>
<title>perf c2c: Clean up some defensive gets and make asan clean</title>
<updated>2025-12-03T19:07:46Z</updated>
<author>
<name>Ian Rogers</name>
</author>
<published>2025-11-22T08:19:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3118d14349cdbef112aa8b60c22b74c12478c4b1'/>
<id>urn:sha1:3118d14349cdbef112aa8b60c22b74c12478c4b1</id>
<content type='text'>
To deal with histogram code that had missing gets the c2c code had
some defensive gets. Those other issues were cleaned up by the
reference count checker, clean them up for the c2c command here.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Reviewed-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf c2c annotate: Start from the contention line</title>
<updated>2025-10-19T03:50:07Z</updated>
<author>
<name>Tianyou Li</name>
</author>
<published>2025-10-13T14:48:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad83f3b7155db28e82de24dbaa1af2b8f5d972a3'/>
<id>urn:sha1:ad83f3b7155db28e82de24dbaa1af2b8f5d972a3</id>
<content type='text'>
Add support to highlight the contention line in the annotate browser,
use 'TAB'/'UNTAB' to refocus to the contention line.

Signed-off-by: Tianyou Li &lt;tianyou.li@intel.com&gt;
Reviewed-by: Dapeng Mi &lt;dapeng1.mi@linux.intel.com&gt;
Reviewed-by: Thomas Falcon &lt;thomas.falcon@intel.com&gt;
Reviewed-by: Jiebin Sun &lt;jiebin.sun@intel.com&gt;
Reviewed-by: Pan Deng &lt;pan.deng@intel.com&gt;
Reviewed-by: Zhiguo Zhou &lt;zhiguo.zhou@intel.com&gt;
Reviewed-by: Wangyang Guo &lt;wangyang.guo@intel.com&gt;
Tested-by: Ravi Bangoria &lt;ravi.bangoria@amd.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf c2c: Add annotation support to perf c2c report</title>
<updated>2025-10-19T03:49:59Z</updated>
<author>
<name>Tianyou Li</name>
</author>
<published>2025-10-13T14:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd3466cd2639783da563253f1f9e3fb2ba936317'/>
<id>urn:sha1:cd3466cd2639783da563253f1f9e3fb2ba936317</id>
<content type='text'>
Perf c2c report currently specified the code address and source:line
information in the cacheline browser, while it is lack of annotation
support like perf report to directly show the disassembly code for
the particular symbol shared that same cacheline. This patches add
a key 'a' binding to the cacheline browser which reuse the annotation
browser to show the disassembly view for easier analysis of cacheline
contentions.

Signed-off-by: Tianyou Li &lt;tianyou.li@intel.com&gt;
Reviewed-by: Dapeng Mi &lt;dapeng1.mi@linux.intel.com&gt;
Reviewed-by: Thomas Falcon &lt;thomas.falcon@intel.com&gt;
Reviewed-by: Jiebin Sun &lt;jiebin.sun@intel.com&gt;
Reviewed-by: Pan Deng &lt;pan.deng@intel.com&gt;
Reviewed-by: Zhiguo Zhou &lt;zhiguo.zhou@intel.com&gt;
Reviewed-by: Wangyang Guo &lt;wangyang.guo@intel.com&gt;
Tested-by: Ravi Bangoria &lt;ravi.bangoria@amd.com&gt;
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf sort: Use perf_env to set arch sort keys and header</title>
<updated>2025-07-25T17:37:58Z</updated>
<author>
<name>Ian Rogers</name>
</author>
<published>2025-07-24T16:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e19839a80b8713b836722ba9d99a3ab12cfb651'/>
<id>urn:sha1:6e19839a80b8713b836722ba9d99a3ab12cfb651</id>
<content type='text'>
Previously arch_support_sort_key and arch_perf_header_entry used a
weak symbol to compile as appropriate for x86 and powerpc. A
limitation to this is that the handling of a data file could vary in
cross-platform development. Change to using the perf_env of the
current session to determine the architecture kind and set the sort
key and header entries as appropriate.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Link: https://lore.kernel.org/r/20250724163302.596743-23-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf session: Add accessor for session-&gt;header.env</title>
<updated>2025-07-25T17:37:56Z</updated>
<author>
<name>Ian Rogers</name>
</author>
<published>2025-07-24T16:32:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee'/>
<id>urn:sha1:c3e5b9ec96dee864c2d6b00fbfe52e784f0d7bee</id>
<content type='text'>
The perf_env from the header in the session is frequently accessed,
add an accessor function rather than access directly. Cache the value
to avoid repeated calls. No behavioral change.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Link: https://lore.kernel.org/r/20250724163302.596743-10-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf hist: Set levels in output_field_add()</title>
<updated>2025-04-25T15:31:54Z</updated>
<author>
<name>Namhyung Kim</name>
</author>
<published>2025-03-31T07:37:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=390627dda7ee4e399d83972f04a2ec915b2bb159'/>
<id>urn:sha1:390627dda7ee4e399d83972f04a2ec915b2bb159</id>
<content type='text'>
It turns out that the output fields didn't consider the hierarchy mode
and put all the fields in the same level.  To support hierarchy, each
non-output field should be in a separate level.

Pass a pointer to level to output_field_add() and make it increase the
level when it sees non-output fields.

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20250331073722.4695-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf mem: Don't leak mem event names</title>
<updated>2025-03-10T21:26:45Z</updated>
<author>
<name>Ian Rogers</name>
</author>
<published>2025-03-08T01:28:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db5af2e4a02c9b3744453a84657ed1fc54a1ef82'/>
<id>urn:sha1:db5af2e4a02c9b3744453a84657ed1fc54a1ef82</id>
<content type='text'>
When preparing the mem events for the argv copies are intentionally
made. These copies are leaked and cause runs of perf using address
sanitizer to fail. Rather than leak the memory allocate a chunk of
memory for the mem event names upfront and build the strings in this -
the storage is sized larger than the previous buffer size. The caller
is then responsible for clearing up this memory. As part of this
change, remove the mem_loads_name and mem_stores_name global buffers
then change the perf_pmu__mem_events_name to write to an out argument
buffer.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Thomas Falcon &lt;thomas.falcon@intel.com&gt;
Reviewed-by: Leo Yan &lt;leo.yan@arm.com&gt;
Link: https://lore.kernel.org/r/20250308012853.1384762-1-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf mem: Fix missed p-core mem events on ADL and RPL</title>
<updated>2024-09-06T14:45:17Z</updated>
<author>
<name>Kan Liang</name>
</author>
<published>2024-09-05T17:07:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ad7db2c3f941cde3045ce38a9c4c40b0c7d56b9'/>
<id>urn:sha1:5ad7db2c3f941cde3045ce38a9c4c40b0c7d56b9</id>
<content type='text'>
The p-core mem events are missed when launching 'perf mem record' on ADL
and RPL.

  root@number:~# perf mem record sleep 1
  Memory events are enabled on a subset of CPUs: 16-27
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.032 MB perf.data ]
  root@number:~# perf evlist
  cpu_atom/mem-loads,ldlat=30/P
  cpu_atom/mem-stores/P
  dummy:u

A variable 'record' in the 'struct perf_mem_event' is to indicate
whether a mem event in a mem_events[] should be recorded. The current
code only configure the variable for the first eligible PMU.

It's good enough for a non-hybrid machine or a hybrid machine which has
the same mem_events[].

However, if a different mem_events[] is used for different PMUs on a
hybrid machine, e.g., ADL or RPL, the 'record' for the second PMU never
get a chance to be set.

The mem_events[] of the second PMU are always ignored.

'perf mem' doesn't support the per-PMU configuration now. A per-PMU
mem_events[] 'record' variable doesn't make sense. Make it global.

That could also avoid searching for the per-PMU mem_events[] via
perf_pmu__mem_events_ptr every time.

Committer testing:

  root@number:~# perf evlist -g
  cpu_atom/mem-loads,ldlat=30/P
  cpu_atom/mem-stores/P
  {cpu_core/mem-loads-aux/,cpu_core/mem-loads,ldlat=30/}
  cpu_core/mem-stores/P
  dummy:u
  root@number:~#

The :S for '{cpu_core/mem-loads-aux/,cpu_core/mem-loads,ldlat=30/}' is
not being added by 'perf evlist -g', to be checked.

Fixes: abbdd79b786e036e ("perf mem: Clean up perf_mem_events__name()")
Reported-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Signed-off-by: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Closes: https://lore.kernel.org/lkml/Zthu81fA3kLC2CS2@x1/
Link: https://lore.kernel.org/r/20240905170737.4070743-2-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf mem: Check mem_events for all eligible PMUs</title>
<updated>2024-09-06T14:45:07Z</updated>
<author>
<name>Kan Liang</name>
</author>
<published>2024-09-05T17:07:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e05d28ff232cf445cc6ae59336b7f2081ef9b96'/>
<id>urn:sha1:6e05d28ff232cf445cc6ae59336b7f2081ef9b96</id>
<content type='text'>
The current perf_pmu__mem_events_init() only checks the availability of
the mem_events for the first eligible PMU. It works for non-hybrid
machines and hybrid machines that have the same mem_events.

However, it may bring issues if a hybrid machine has a different
mem_events on different PMU, e.g., Alder Lake and Raptor Lake. A
mem-loads-aux event is only required for the p-core. The mem_events on
both e-core and p-core should be checked and marked.

The issue was not found, because it's hidden by another bug, which only
records the mem-events for the e-core. The wrong check for the p-core
events didn't yell.

Fixes: abbdd79b786e036e ("perf mem: Clean up perf_mem_events__name()")
Signed-off-by: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: https://lore.kernel.org/r/20240905170737.4070743-1-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf c2c: Use perf_tool__init()</title>
<updated>2024-08-12T21:09:32Z</updated>
<author>
<name>Ian Rogers</name>
</author>
<published>2024-08-12T20:47:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6bfb6df8663f3baf901f6540bd3f95ccb86c2b9b'/>
<id>urn:sha1:6bfb6df8663f3baf901f6540bd3f95ccb86c2b9b</id>
<content type='text'>
Use perf_tool__init() so that more uses of 'struct perf_tool' can be const
and not relying on perf_tool__fill_defaults().

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Anshuman Khandual &lt;anshuman.khandual@arm.com&gt;
Cc: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Cc: Huacai Chen &lt;chenhuacai@kernel.org&gt;
Cc: Ilkka Koskinen &lt;ilkka@os.amperecomputing.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: James Clark &lt;james.clark@arm.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: John Garry &lt;john.g.garry@oracle.com&gt;
Cc: Jonathan Cameron &lt;jonathan.cameron@huawei.com&gt;
Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Cc: Leo Yan &lt;leo.yan@linux.dev&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Mike Leach &lt;mike.leach@linaro.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Cc: Nick Terrell &lt;terrelln@fb.com&gt;
Cc: Oliver Upton &lt;oliver.upton@linux.dev&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Song Liu &lt;song@kernel.org&gt;
Cc: Sun Haiyong &lt;sunhaiyong@loongson.cn&gt;
Cc: Suzuki Poulouse &lt;suzuki.poulose@arm.com&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Cc: Yanteng Si &lt;siyanteng@loongson.cn&gt;
Cc: Yicong Yang &lt;yangyicong@hisilicon.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20240812204720.631678-13-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
