<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/perf, branch for-next</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=for-next</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=for-next'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-12-12T05:40:46Z</updated>
<entry>
<title>perf probe: Fix uninitialized variable</title>
<updated>2024-12-12T05:40:46Z</updated>
<author>
<name>James Clark</name>
<email>james.clark@linaro.org</email>
</author>
<published>2024-12-11T08:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=434fffa926b10706f2bde2db22979d68463302fc'/>
<id>urn:sha1:434fffa926b10706f2bde2db22979d68463302fc</id>
<content type='text'>
Since the linked fixes: commit, err is returned uninitialized due to the
removal of "return 0". Initialize err to fix it.

This fixes the following intermittent test failure on release builds:

 $ perf test "testsuite_probe"
 ...
 -- [ FAIL ] -- perf_probe :: test_invalid_options :: mutually exclusive options :: -L foo -V bar (output regexp parsing)
 Regexp not found: \"Error: switch .+ cannot be used with switch .+\"
 ...

Fixes: 080e47b2a237 ("perf probe: Introduce quotation marks support")
Tested-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Acked-by: Masami Hiramatsu (Google) &lt;mhiramat@kernel.org&gt;
Signed-off-by: James Clark &lt;james.clark@linaro.org&gt;
Link: https://lore.kernel.org/r/20241211085525.519458-2-james.clark@linaro.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test expr: Fix system_tsc_freq for only x86</title>
<updated>2024-12-11T17:19:44Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2024-12-05T02:23:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a93a620c38f3763ec74cb0def9625756966f12d9'/>
<id>urn:sha1:a93a620c38f3763ec74cb0def9625756966f12d9</id>
<content type='text'>
The refactoring of tool PMU events to have a PMU then adding the expr
literals to the tool PMU made it so that the literal system_tsc_freq
was only supported on x86. Update the test expectations to match -
namely the parsing is x86 specific and only yields a non-zero value on
Intel.

Fixes: 609aa2667f67 ("perf tool_pmu: Switch to standard pmu functions and json descriptions")
Reported-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Closes: https://lore.kernel.org/linux-perf-users/20241022140156.98854-1-atrajeev@linux.vnet.ibm.com/
Co-developed-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Tested-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Cc: akanksha@linux.ibm.com
Cc: hbathini@linux.ibm.com
Cc: kjain@linux.ibm.com
Cc: maddy@linux.ibm.com
Cc: disgoel@linux.vnet.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20241205022305.158202-1-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test hwmon_pmu: Fix event file location</title>
<updated>2024-12-09T23:00:26Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2024-12-06T04:23:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d4e17a322a8fc3266798ec8dee1fbe679078b2bc'/>
<id>urn:sha1:d4e17a322a8fc3266798ec8dee1fbe679078b2bc</id>
<content type='text'>
The temp directory is made and a known fake hwmon PMU created within
it. Prior to this fix the events were being incorrectly written to the
temp directory rather than the fake PMU directory. This didn't impact
the test as the directory fd matched the wrong location, but it
doesn't mirror what a hwmon PMU would actually look like.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Link: https://lore.kernel.org/r/20241206042306.1055913-2-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf hwmon_pmu: Use openat rather than dup to refresh directory</title>
<updated>2024-12-09T23:00:03Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2024-12-06T04:23:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f61a12b08bd84e6cf705484c2cb9d5b891882fa'/>
<id>urn:sha1:3f61a12b08bd84e6cf705484c2cb9d5b891882fa</id>
<content type='text'>
The hwmon PMU test will make a temp directory, open the directory with
O_DIRECTORY then fill it with contents. As the open is before the
filling the contents the later fdopendir may reflect the initial empty
state, meaning no events are seen. Change to re-open the directory,
rather than dup the fd, so the latest contents are seen.

Minor tweaks/additions to debug messages.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Link: https://lore.kernel.org/r/20241206042306.1055913-1-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf ftrace: Fix undefined behavior in cmp_profile_data()</title>
<updated>2024-12-09T21:54:08Z</updated>
<author>
<name>Kuan-Wei Chiu</name>
<email>visitorckw@gmail.com</email>
</author>
<published>2024-12-09T13:42:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=246dfe3dc199246bd64635163115f2691623fc53'/>
<id>urn:sha1:246dfe3dc199246bd64635163115f2691623fc53</id>
<content type='text'>
The comparison function cmp_profile_data() violates the C standard's
requirements for qsort() comparison functions, which mandate symmetry
and transitivity:

* Symmetry: If x &lt; y, then y &gt; x.
* Transitivity: If x &lt; y and y &lt; z, then x &lt; z.

When v1 and v2 are equal, the function incorrectly returns 1, breaking
symmetry and transitivity. This causes undefined behavior, which can
lead to memory corruption in certain versions of glibc [1].

Fix the issue by returning 0 when v1 and v2 are equal, ensuring
compliance with the C standard and preventing undefined behavior.

Link: https://www.qualys.com/2024/01/30/qsort.txt [1]
Fixes: 0f223813edd0 ("perf ftrace: Add 'profile' command")
Fixes: 74ae366c37b7 ("perf ftrace profile: Add -s/--sort option")
Cc: stable@vger.kernel.org
Signed-off-by: Kuan-Wei Chiu &lt;visitorckw@gmail.com&gt;
Reviewed-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: jserv@ccns.ncku.edu.tw
Cc: chuang@cs.nycu.edu.tw
Link: https://lore.kernel.org/r/20241209134226.1939163-1-visitorckw@gmail.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf tools: Fix precise_ip fallback logic</title>
<updated>2024-12-05T23:15:29Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2024-12-05T23:15:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c33aea446bf555ab2b4e06deb914ba8f87cdb068'/>
<id>urn:sha1:c33aea446bf555ab2b4e06deb914ba8f87cdb068</id>
<content type='text'>
Sometimes it returns other than EOPNOTSUPP for invalid precise_ip so
it cannot check the error code.  Let's move the fallback after the
missing feature checks so that it can handle EINVAL as well.  This also
aligns well with the existing behavior which blindly turns off the
precise_ip but we check the missing features correctly now.

Fixes: af954f76eea56453 ("perf tools: Check fallback error and order")
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Reported-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Closes: https://lore.kernel.org/oe-lkp/202411301431.799e5531-lkp@intel.com
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Link: https://lore.kernel.org/r/Z1DV0lN8qHSysX7f@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf tools: Fix build error on generated/fs_at_flags_array.c</title>
<updated>2024-12-04T22:34:50Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2024-12-03T03:53:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=968121f0a649ee2ff5ac7b29aa4d4f6b0798ea9e'/>
<id>urn:sha1:968121f0a649ee2ff5ac7b29aa4d4f6b0798ea9e</id>
<content type='text'>
It should only have generic flags in the array but the recent header
sync brought a new flags to fcntl.h and caused a build error.  Let's
update the shell script to exclude flags specific to name_to_handle_at().

    CC      trace/beauty/fs_at_flags.o
  In file included from trace/beauty/fs_at_flags.c:21:
  tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: error: initialized field overwritten [-Werror=override-init]
     13 |         [ilog2(0x002) + 1] = "HANDLE_CONNECTABLE",
        |                              ^~~~~~~~~~~~~~~~~~~~
  tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: note: (near initialization for ‘fs_at_flags[2]’)

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Link: https://lore.kernel.org/r/20241203035349.1901262-12-namhyung@kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools headers: Sync uapi/linux/prctl.h with the kernel sources</title>
<updated>2024-12-04T22:34:50Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2024-12-03T03:53:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c994ac74cc3683b1cca45bc425ea1c625da109f3'/>
<id>urn:sha1:c994ac74cc3683b1cca45bc425ea1c625da109f3</id>
<content type='text'>
To pick up the changes in this cset:

  09d6775f503b393d riscv: Add support for userspace pointer masking
  91e102e79740ae43 prctl: arch-agnostic prctl for shadow stack

This addresses these perf build warnings:

  Warning: Kernel ABI header differences:
    diff -u tools/perf/trace/beauty/include/uapi/linux/prctl.h include/uapi/linux/prctl.h

Please see tools/include/uapi/README for further details.

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: Palmer Dabbelt &lt;palmer@rivosinc.com&gt;
Link: https://lore.kernel.org/r/20241203035349.1901262-11-namhyung@kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools headers: Sync uapi/linux/mount.h with the kernel sources</title>
<updated>2024-12-04T22:34:50Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2024-12-03T03:53:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02116fcfd827fe17dbdb543f111cdd9b8b32f18e'/>
<id>urn:sha1:02116fcfd827fe17dbdb543f111cdd9b8b32f18e</id>
<content type='text'>
To pick up the changes in this cset:

  aefff51e1c2986e1 statmount: retrieve security mount options
  2f4d4503e9e5ab76 statmount: add flag to retrieve unescaped options
  44010543fc8bedad fs: add the ability for statmount() to report the sb_source
  ed9d95f691c29748 fs: add the ability for statmount() to report the fs_subtype

This addresses these perf build warnings:

  Warning: Kernel ABI header differences:
    diff -u tools/perf/trace/beauty/include/uapi/linux/mount.h include/uapi/linux/mount.h

Please see tools/include/uapi/README for further details.

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Cc: Christian Brauner &lt;brauner@kernel.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20241203035349.1901262-10-namhyung@kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools headers: Sync uapi/linux/fcntl.h with the kernel sources</title>
<updated>2024-12-04T22:34:50Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2024-12-03T03:53:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6d442c69cbe0f8ab47177b8af125e6c88b9e8cd0'/>
<id>urn:sha1:6d442c69cbe0f8ab47177b8af125e6c88b9e8cd0</id>
<content type='text'>
To pick up the changes in this cset:

  c374196b2b9f4b80 ("fs: name_to_handle_at() support for "explicit connectable" file handles")
  95f567f81e43a1bc ("fs: Simplify getattr interface function checking AT_GETATTR_NOSEC flag")

This addresses these perf build warnings:

  Warning: Kernel ABI header differences:
    diff -u tools/perf/trace/beauty/include/uapi/linux/fcntl.h include/uapi/linux/fcntl.h

Please see tools/include/uapi/README for further details.

Reviewed-by: James Clark &lt;james.clark@linaro.org&gt;
Cc: Jeff Layton &lt;jlayton@kernel.org&gt;
Cc: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Cc: Alexander Aring &lt;alex.aring@gmail.com&gt;
Cc: Christian Brauner &lt;brauner@kernel.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20241203035349.1901262-9-namhyung@kernel.org
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
</feed>
