<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/perf/arch, branch v7.2-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-06-10T19:54:41+00:00</updated>
<entry>
<title>perf riscv: fix register name strings</title>
<updated>2026-06-10T19:54:41+00:00</updated>
<author>
<name>Martin Kaiser</name>
<email>martin@kaiser.cx</email>
</author>
<published>2026-06-09T08:13:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8d28a56cae9b298a351b361d8d374cb4a9089e3f'/>
<id>urn:sha1:8d28a56cae9b298a351b361d8d374cb4a9089e3f</id>
<content type='text'>
On risc-v, pref probe generates an invalid syntax for a named register in
a kprobe.

$ perf probe --debug verbose --add "n_tty_write tty"
...
Writing event: p:probe/n_tty_write _text+8922528 tty=%"%a0":x64
Failed to write event: Invalid argument

The problem is the combination of

   #define REG_DWARFNUM_NAME(reg, idx) [idx] = "%" #reg

and entries such as

   REG_DWARFNUM_NAME("%a0", 10)

where #reg will escape the quotes of the first macro parameter.

Update the macro definition to produce the correct syntax for a named
register in a kprobe, i.e. the unquoted register name with only one
leading %.

Fixes: a90c4519186dfc08 ("perf riscv: Remove dwarf-regs.c and add dwarf-regs-table.h")
Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Martin Kaiser &lt;martin@kaiser.cx&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf dwarf: Avoid redefinition warnings for REG_DWARFNUM_NAME</title>
<updated>2026-06-10T19:53:35+00:00</updated>
<author>
<name>Martin Kaiser</name>
<email>martin@kaiser.cx</email>
</author>
<published>2026-06-09T08:13:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5312a7ef79f5de574bce7b140ea1e48ce7e9262'/>
<id>urn:sha1:d5312a7ef79f5de574bce7b140ea1e48ce7e9262</id>
<content type='text'>
dwarf-regs.c includes an arch-specific dwarf-regs-table.h for several
architectures. This pulls in different definitions of REG_DWARFNUM_NAME
and causes compiler warnings for W=1 builds.

In file included from util/dwarf-regs.c:23:

  .../dwarf-regs-table.h:5: error: "REG_DWARFNUM_NAME" redefined [-Werror]
   #define REG_DWARFNUM_NAME(reg, idx) [idx] = reg

Undefine REG_DWARFNUM_NAME before each new definition.

Suggested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Martin Kaiser &lt;martin@kaiser.cx&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf arch common: Use perf_env e_machine rather than arch</title>
<updated>2026-06-03T19:48:23+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-06-02T15:25:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=82ed70f00ccce18bd68cc82b62a80bb5a7f44856'/>
<id>urn:sha1:82ed70f00ccce18bd68cc82b62a80bb5a7f44856</id>
<content type='text'>
Use the e_machine rather than arch string matching.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Honglei Wang &lt;jameshongleiwang@126.com&gt;
Cc: Jan Polensky &lt;japo@linux.ibm.com&gt;
Cc: Sumanth Korikkar &lt;sumanthk@linux.ibm.com&gt;
Cc: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf arm-spe: Don't warn about the discard bit if it doesn't exist</title>
<updated>2026-05-30T00:20:50+00:00</updated>
<author>
<name>James Clark</name>
<email>james.clark@linaro.org</email>
</author>
<published>2026-04-10T11:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=83eff458a690e650b68cd6467aae8959755c5388'/>
<id>urn:sha1:83eff458a690e650b68cd6467aae8959755c5388</id>
<content type='text'>
Opening an SPE event shows a warning that doesn't concern the user:

  $ perf record -e arm_spe
  Unknown/empty format name: discard

Perf only wants to know if the discard bit is set for configuring the
event, not in response to anything the user has done. Fix it by adding
another helper that returns if a config bit exists without warning.

We should probably keep the warning in evsel__get_config_val() to avoid
having every caller having to do it, and most format bits should never
be missing.

Add a test for the new helper. Rename the parent test function to be
more generic rather than adding a new one as it requires a lot of
boilerplate.

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Reviewed-by: Leo Yan &lt;leo.yan@arm.com&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: John Garry &lt;john.g.garry@oracle.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: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf arch x86: Sort includes and add missed explicit dependencies</title>
<updated>2026-05-27T11:20:14+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-05-22T22:04:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03f5a800545eb483308988b578f8f8543aaf9c86'/>
<id>urn:sha1:03f5a800545eb483308988b578f8f8543aaf9c86</id>
<content type='text'>
Fix missing #includes found while cleaning the evsel/evlist header
files. Sort the remaining header files for consistency with the rest
of the code.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alice Rogers &lt;alice.mei.rogers@gmail.com&gt;
Cc: Dapeng Mi &lt;dapeng1.mi@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Cc: Leo Yan &lt;leo.yan@linux.dev&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf arch arm: Sort includes and add missed explicit dependencies</title>
<updated>2026-05-27T11:18:12+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-05-22T22:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=390d5ea26622f794c2d29cefd5a01ef116b4fe1d'/>
<id>urn:sha1:390d5ea26622f794c2d29cefd5a01ef116b4fe1d</id>
<content type='text'>
Fix missing #includes found while cleaning the evsel/evlist header
files. Sort the remaining header files for consistency with the rest
of the code.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alice Rogers &lt;alice.mei.rogers@gmail.com&gt;
Cc: Dapeng Mi &lt;dapeng1.mi@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Cc: Leo Yan &lt;leo.yan@linux.dev&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>powerpc tools perf: Initialize error code in auxtrace_record_init function</title>
<updated>2026-05-27T11:08:53+00:00</updated>
<author>
<name>Athira Rajeev</name>
<email>atrajeev@linux.ibm.com</email>
</author>
<published>2026-05-04T15:13:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=789d22d77879eabb042627f6627cdb62787bc142'/>
<id>urn:sha1:789d22d77879eabb042627f6627cdb62787bc142</id>
<content type='text'>
perf trace record fails some cases in powerpc

 # perf test "perf trace record and replay"
 128: perf trace record and replay                                    : FAILED!

  # perf trace record sleep 1
  # echo $?
    32

This is happening because of non-zero err value from
auxtrace_record__init() function.

 static int record__auxtrace_init(struct record *rec)
 {
        int err;

        if ((rec-&gt;opts.auxtrace_snapshot_opts || rec-&gt;opts.auxtrace_sample_opts)
            &amp;&amp; record__threads_enabled(rec)) {
                pr_err("AUX area tracing options are not available in parallel streaming mode.\n");
                return -EINVAL;
        }

        if (!rec-&gt;itr) {
                rec-&gt;itr = auxtrace_record__init(rec-&gt;evlist, &amp;err);
                if (err)
                        return err;
        }

Here "int err" is not initialised. The code expects "err" to be set from
auxtrace_record__init() function.

Update auxtrace_record__init() in arch/powerpc/util/auxtrace.c to clear
err value in the beginning.

- Clear err value in beginning of function. Any fail later will
set appropriate return code to err.

- Even if we haven't found any event for auxtrace, perf record
should continue for other events. NULL return
will indicate that there is no auxtrace record initialized.

- Not having "err" set here will affect monitoring of other events
also because perf record will fail seeing random value in err.

Set err to -EINVAL before invoking auxtrace_record__init() in
builtin-record.c

With the fix,

  # perf trace record sleep 1
  [ perf record: Woken up 2 times to write data ]
  [ perf record: Captured and wrote 0.033 MB perf.data (228 samples) ]

Fixes: 1dbfaf94cf66ec4b ("perf powerpc: Add basic CONFIG_AUXTRACE support for VPA pmu on powerpc")
Reviewed-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Signed-off-by: Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Athira Rajeev &lt;atrajeev@linux.ibm.com&gt;
Cc: Hari Bathini &lt;hbathini@linux.vnet.ibm.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Cc: Michael Petlan &lt;mpetlan@redhat.com&gt;
Cc: Shivani Nittor &lt;shivani@linux.ibm.com&gt;
Cc: Tanushree Shah &lt;tanushree.shah@ibm.com&gt;
Cc: Tejas Manhas &lt;tejas.manhas1@ibm.com&gt;
Cc: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf riscv: Fix discarded const qualifier in _get_field()</title>
<updated>2026-05-23T22:45:39+00:00</updated>
<author>
<name>Li Guan</name>
<email>guanli.oerv@isrc.iscas.ac.cn</email>
</author>
<published>2026-05-13T18:07:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7378b6656aa46fda56f2743d5a7c1f619c2f6f9b'/>
<id>urn:sha1:7378b6656aa46fda56f2743d5a7c1f619c2f6f9b</id>
<content type='text'>
The assignment of strrchr() return values to non-const char * variables
triggers a -Werror=discarded-qualifiers warning when building with GCC
14.

This happens because in newer glibc versions, strrchr() returns a 'const
char *' if the input string is const.

Properly declare 'line2' and 'nl' as const char * to match the glibc
function signature and ensure type safety. This avoids the need for
explicit type casting and aligns with the design pattern of not
modifying read-only memory in the perf tool.

Reviewed-by: Ian Rogers &lt;irogers@google.com&gt;
Signed-off-by: Li Guan &lt;guanli.oerv@isrc.iscas.ac.cn&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Palmer Dabbelt &lt;palmer@dabbelt.com&gt;
Cc: Paul Walmsley &lt;pjw@kernel.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test amd ibs: Fix incorrect kernel version check</title>
<updated>2026-05-23T00:30:38+00:00</updated>
<author>
<name>Ravi Bangoria</name>
<email>ravi.bangoria@amd.com</email>
</author>
<published>2026-05-08T05:59:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0b97e92393a178765ee1ea01fe5087efece2c425'/>
<id>urn:sha1:0b97e92393a178765ee1ea01fe5087efece2c425</id>
<content type='text'>
"AMD IBS sample period" unit test is getting skipped on kernel v7.x. Fix
the kernel version &gt;= v6.15 check.

Fixes: 21fb366b2f457611 ("perf test amd: Skip amd-ibs-period test on kernel &lt; v6.15")
Signed-off-by: Ravi Bangoria &lt;ravi.bangoria@amd.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Ananth Narayan &lt;ananth.narayan@amd.com&gt;
Cc: Dapeng Mi &lt;dapeng1.mi@linux.intel.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Cc: Manali Shukla &lt;manali.shukla@amd.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Ravi Bangoria &lt;ravi.bangoria@amd.com&gt;
Cc: Sandipan Das &lt;sandipan.das@amd.com&gt;
Cc: Santosh Shukla &lt;santosh.shukla@amd.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf arch x86 tests: Add test for topdown event sorting</title>
<updated>2026-05-20T21:24:01+00:00</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2026-05-18T06:29:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b439c20b2fe1cfed2210e50c06006845ae424c48'/>
<id>urn:sha1:b439c20b2fe1cfed2210e50c06006845ae424c48</id>
<content type='text'>
Add a test to capture the comment in tools/perf/arch/x86/util/evlist.c.

Test that slots and topdown-retiring get appropriately sorted with
respect to instructions when they're all specified together.

When the PMU requires topdown event grouping (indicated by the pressence
of the slots event) metric events should be after slots, which should be
the group leader.

Add a related test that when the slots event isn't given it is injected
into the appropriate group.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Zide Chen &lt;zide.chen@intel.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Collin Funk &lt;collin.funk1@gmail.com&gt;
Cc: Dmitrii Dolgov &lt;9erthalion6@gmail.com&gt;
Cc: German Gomez &lt;german.gomez@arm.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
