]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tools headers UAPI: Sync linux/prctl.h with the kernel sources
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 27 May 2024 15:15:27 +0000 (12:15 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 27 May 2024 15:20:02 +0000 (12:20 -0300)
commit0efc88e444d9d74f220f60a3e37143c8decf1bea
tree4ac04ff5337c75d197a20b24d1baa44f586def79
parente5c7bd4e5ca0f549108a7013ba77885926c6a56b
tools headers UAPI: Sync linux/prctl.h with the kernel sources

To pick the changes in:

  628d701f2de5b9a1 ("powerpc/dexcr: Add DEXCR prctl interface")
  6b9391b581fddd85 ("riscv: Include riscv_set_icache_flush_ctx prctl")

That adds some PowerPC and a RISC-V specific prctl options:

  $ tools/perf/trace/beauty/prctl_option.sh > before
  $ cp include/uapi/linux/prctl.h tools/perf/trace/beauty/include/uapi/linux/prctl.h
  $ tools/perf/trace/beauty/prctl_option.sh > after
  $ diff -u before after
  --- before 2024-05-27 12:14:21.358032781 -0300
  +++ after 2024-05-27 12:14:32.364530185 -0300
  @@ -65,6 +65,9 @@
    [68] = "GET_MEMORY_MERGE",
    [69] = "RISCV_V_SET_CONTROL",
    [70] = "RISCV_V_GET_CONTROL",
  + [71] = "RISCV_SET_ICACHE_FLUSH_CTX",
  + [72] = "PPC_GET_DEXCR",
  + [73] = "PPC_SET_DEXCR",
   };
   static const char *prctl_set_mm_options[] = {
    [1] = "START_CODE",
  $

That now will be used to decode the syscall option and also to compose
filters, for instance:

  [root@five ~]# perf trace -e syscalls:sys_enter_prctl --filter option==SET_NAME
       0.000 Isolated Servi/3474327 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23f13b7aee)
       0.032 DOM Worker/3474327 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23deb25670)
       7.920 :3474328/3474328 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24fbb10)
       7.935 StreamT~s #374/3474328 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24fb970)
       8.400 Isolated Servi/3474329 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24bab10)
       8.418 StreamT~s #374/3474329 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24ba970)
  ^C[root@five ~]#

This addresses this perf build warning:

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

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Benjamin Gray <bgray@linux.ibm.com>
Cc: Charlie Jenkins <charlie@rivosinc.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/lkml/ZlSklGWp--v_Ije7@x1
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/trace/beauty/include/uapi/linux/prctl.h