[PATCH v2 1/4] perf parse-events: Avoid scanning PMUs that can't contain events

2025-04-05 Thread Ian Rogers
Add perf_pmus__scan_for_event that only reads sysfs for pmus that could contain a given event. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 4 ++-- tools/perf/util/pmus.c | 35 ++ tools/perf/util/pmus.h | 1 + 3 files changed

[PATCH v3 0/4] Add support for a DRM tool like PMU

2025-04-05 Thread Ian Rogers
(exit 2) doesn't trigger the trap cleanup. v2: Add support to only scan hwmon and drm PMUs if the event or PMU wildcard can match. Add a test as requested by Namhyung. Add file comments. v1: https://lore.kernel.org/lkml/20250211071727.364389-1-irog...@google.com/ Ian Rogers (4): perf

[PATCH v6 10/13] perf build: Remove Makefile.syscalls

2025-04-05 Thread Ian Rogers
QGqUj@ghost/ Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/Makefile.perf | 1 - tools/perf/arch/alpha/entry/syscalls/Kbuild | 2 - .../alpha/entry/syscalls/Makefile.syscalls| 5 -- tools/perf/arch/arc/entry/syscalls/K

[PATCH v3 3/4] perf drm_pmu: Add a tool like PMU to expose DRM information

2025-04-05 Thread Ian Rogers
ot;perf pmus: Restructure pmu_read_sysfs to scan fewer PMUs") and later so that only if full wild carding is being done, the PMU starts with "drm_" or the event starts with "drm-" will /proc be scanned. That is there should be little to no cost in this PMU unless DRM events are

[PATCH v6 11/13] perf syscalltbl: Mask off ABI type for MIPS system calls

2025-04-04 Thread Ian Rogers
Signed-off-by: Ian Rogers --- tools/perf/util/syscalltbl.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/util/syscalltbl.c b/tools/perf/util/syscalltbl.c index 4e6018e2e0b3..67a8ec10e9e4 100644 --- a/tools/perf/util/syscalltbl.c +++ b/tools/perf/util/syscalltbl.c @@ -46,6

[PATCH v3 4/4] perf tests: Add a DRM PMU test

2025-04-03 Thread Ian Rogers
The test opens any DRM devices so that the shell has fdinfo files containing the DRM data. The test then uses perf stat to make sure the events can be read. Signed-off-by: Ian Rogers --- tools/perf/tests/shell/drm_pmu.sh | 78 +++ 1 file changed, 78 insertions

[PATCH v3 2/4] perf parse-events: Avoid scanning PMUs that can't match a wildcard

2025-04-03 Thread Ian Rogers
can't be a hwmon PMU wildcard, reading hwmon PMUs is avoided. On my laptop this reduces 'perf stat -e inst_retired.any true' from performing 253 openat system calls down to 234. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 2

[PATCH v3 1/4] perf parse-events: Avoid scanning PMUs that can't contain events

2025-04-03 Thread Ian Rogers
Add perf_pmus__scan_for_event that only reads sysfs for pmus that could contain a given event. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 4 ++-- tools/perf/util/pmus.c | 35 ++ tools/perf/util/pmus.h | 1 + 3 files changed

[PATCH v2 3/4] perf drm_pmu: Add a tool like PMU to expose DRM information

2025-03-25 Thread Ian Rogers
ot;perf pmus: Restructure pmu_read_sysfs to scan fewer PMUs") and later so that only if full wild carding is being done, the PMU starts with "drm_" or the event starts with "drm-" will /proc be scanned. That is there should be little to no cost in this PMU unless DRM events are

[PATCH v2 4/4] perf tests: Add a DRM PMU test

2025-03-25 Thread Ian Rogers
The test opens any DRM devices so that the shell has fdinfo files containing the DRM data. The test then uses perf stat to make sure the events can be read. Signed-off-by: Ian Rogers --- tools/perf/tests/shell/drm_pmu.sh | 77 +++ 1 file changed, 77 insertions

[PATCH v2 0/4] Add support for a DRM tool like PMU

2025-03-25 Thread Ian Rogers
PMUs if the event or PMU wildcard can match. Add a test as requested by Namhyung. Add file comments. v1: https://lore.kernel.org/lkml/20250211071727.364389-1-irog...@google.com/ Ian Rogers (4): perf parse-events: Avoid scanning PMUs that can't contain events perf parse-events: Avoid sca

[PATCH v2 2/4] perf parse-events: Avoid scanning PMUs that can't match a wildcard

2025-03-25 Thread Ian Rogers
can't be a hwmon PMU wildcard, reading hwmon PMUs is avoided. On my laptop this reduces 'perf stat -e inst_retired.any true' from performing 253 openat system calls down to 234. Signed-off-by: Ian Rogers --- tools/perf/util/parse-events.c | 2

[PATCH v7 07/14] perf thread: Add support for reading the e_machine type for a thread

2025-03-18 Thread Ian Rogers
that in later patches when syscalltbl can use the e_machine the system calls are specific to the architecture. Signed-off-by: Ian Rogers --- tools/perf/builtin-trace.c | 43 ++-- tools/perf/util/thread.c | 80 ++ tools/perf/util/thread.h

[PATCH v7 09/14] perf syscalltbl: Use lookup table containing multiple architectures

2025-03-18 Thread Ian Rogers
= 3 0.255 ( 0.007 ms): a.out/442930 read(fd: 3, buf: 0xffbdb67c, count: 4096)= 1436 0.264 ( 0.018 ms): a.out/442930 write(fd: 1, buf: , count: 1436) = 1436 0.292 (1000.173 ms): a.out/442930 clock_nanosleep(rqtp: { .tv_sec: 1786654694037

[PATCH v7 13/14] perf trace: Fix BTF memory leak

2025-03-18 Thread Ian Rogers
Add missing btf__free in trace__exit. Signed-off-by: Ian Rogers --- tools/perf/builtin-trace.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index a5f31472980b..1d4ad5d19b10 100644 --- a/tools/perf/builtin-trace.c +++ b/tools

[PATCH v7 14/14] perf trace: Fix evlist memory leak

2025-03-18 Thread Ian Rogers
Leak sanitizer was reporting a memory leak in the "perf record and replay" test. Add evlist__delete to trace__exit, also ensure trace__exit is called after trace__record. Signed-off-by: Ian Rogers --- tools/perf/builtin-trace.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletion

[PATCH v7 12/14] perf trace: Make syscall table stable

2025-03-18 Thread Ian Rogers
don't move. Remove unnecessary copies and searches with this change. Signed-off-by: Ian Rogers --- tools/perf/builtin-trace.c | 87 +++--- 1 file changed, 53 insertions(+), 34 deletions(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c ind

[PATCH v7 11/14] perf syscalltbl: Mask off ABI type for MIPS system calls

2025-03-18 Thread Ian Rogers
Signed-off-by: Ian Rogers --- tools/perf/util/syscalltbl.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/util/syscalltbl.c b/tools/perf/util/syscalltbl.c index 4e6018e2e0b3..67a8ec10e9e4 100644 --- a/tools/perf/util/syscalltbl.c +++ b/tools/perf/util/syscalltbl.c @@ -46,6

[PATCH v7 10/14] perf build: Remove Makefile.syscalls

2025-03-18 Thread Ian Rogers
QGqUj@ghost/ Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/Makefile.perf | 1 - tools/perf/arch/alpha/entry/syscalls/Kbuild | 2 - .../alpha/entry/syscalls/Makefile.syscalls| 5 -- tools/perf/arch/arc/entry/syscalls/K

[PATCH v7 08/14] perf trace beauty: Add syscalltbl.sh generating all system call tables

2025-03-18 Thread Ian Rogers
ed by Arnd Bergmann: https://lore.kernel.org/lkml/d47c35dd-9c52-48e7-a00d-135572f11...@app.fastmail.com/ and added in commit 9142be9e6443 ("x86/syscall: Mark exit[_group] syscall handlers __noreturn"). Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tool

[PATCH v7 06/14] perf dso: Add support for reading the e_machine type for a dso

2025-03-18 Thread Ian Rogers
-by: Ian Rogers --- tools/perf/util/dso.c| 89 tools/perf/util/dso.h| 3 ++ tools/perf/util/symbol-elf.c | 27 --- 3 files changed, 92 insertions(+), 27 deletions(-) diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c in

[PATCH v7 05/14] perf syscalltbl: Remove struct syscalltbl

2025-03-18 Thread Ian Rogers
er of indices for a machine type is exposed as a new API. The arrays are computed in the syscalltbl.sh script and so no start-up time computation and storage is necessary. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c

[PATCH v7 04/14] perf trace: Reorganize syscalls

2025-03-18 Thread Ian Rogers
system call numbers would be too large, so maintain a sorted array of system calls as they are encountered. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c | 197 + 1 file changed, 132 insertions

[PATCH v7 03/14] perf syscalltbl: Remove syscall_table.h

2025-03-18 Thread Ian Rogers
ll cause a failure to include either syscalls_32.h or syscalls_64.h rather than a failure to include syscall_table.h. For architectures that only included one or other, the behavior matches BITS_PER_LONG as previously done on architectures supporting both syscalls_32.h and syscalls_64.h. Signed-o

[PATCH v7 02/14] perf dso: kernel-doc for enum dso_binary_type

2025-03-18 Thread Ian Rogers
There are many and non-obvious meanings to the dso_binary_type enum values. Add kernel-doc to speed interpretting their meanings. Acked-by: Arnaldo Carvalho de Melo Signed-off-by: Ian Rogers --- tools/perf/util/dso.h | 57 +++ 1 file changed, 57

[PATCH v7 01/14] perf dso: Move libunwind dso_data variables into ifdef

2025-03-18 Thread Ian Rogers
-off-by: Ian Rogers --- tools/perf/util/dso.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index 846b74510038..2cc1f6593f9e 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h @@ -155,10 +155,12 @@ struct dso_data { int

[PATCH v7 00/14] perf: Support multiple system call tables in the build

2025-03-18 Thread Ian Rogers
tps://lore.kernel.org/all/20250114-perf_syscall_arch_runtime-v1-1-5b304e408...@rivosinc.com/ After discussion on v1 and he agreed this patch series would be the better direction. Ian Rogers (14): perf dso: Move libunwind dso_data variables into ifdef perf dso: kernel-doc for enum dso_binary_type

[PATCH v6 00/13] perf: Support multiple system call tables in the build

2025-03-17 Thread Ian Rogers
#x27;s reviewed-by tags. Add a comment and apology to Charlie for not doing better in guiding: https://lore.kernel.org/all/20250114-perf_syscall_arch_runtime-v1-1-5b304e408...@rivosinc.com/ After discussion on v1 and he agreed this patch series would be the better direction. Ia

[PATCH v6 02/13] perf dso: kernel-doc for enum dso_binary_type

2025-03-17 Thread Ian Rogers
There are many and non-obvious meanings to the dso_binary_type enum values. Add kernel-doc to speed interpretting their meanings. Acked-by: Arnaldo Carvalho de Melo Signed-off-by: Ian Rogers --- tools/perf/util/dso.h | 57 +++ 1 file changed, 57

[PATCH v6 06/13] perf dso: Add support for reading the e_machine type for a dso

2025-03-17 Thread Ian Rogers
-by: Ian Rogers --- tools/perf/util/dso.c| 89 tools/perf/util/dso.h| 3 ++ tools/perf/util/symbol-elf.c | 27 --- 3 files changed, 92 insertions(+), 27 deletions(-) diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c in

[PATCH v6 07/13] perf thread: Add support for reading the e_machine type for a thread

2025-03-17 Thread Ian Rogers
that in later patches when syscalltbl can use the e_machine the system calls are specific to the architecture. Signed-off-by: Ian Rogers --- tools/perf/builtin-trace.c | 43 ++-- tools/perf/util/thread.c | 80 ++ tools/perf/util/thread.h

[PATCH v6 13/13] perf trace: Fix BTF memory leak

2025-03-17 Thread Ian Rogers
Add missing btf__free in trace__exit. Signed-off-by: Ian Rogers --- tools/perf/builtin-trace.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index a5f31472980b..d4bbb6a1e817 100644 --- a/tools/perf/builtin-trace.c +++ b/tools

[PATCH v6 12/13] perf trace: Make syscall table stable

2025-03-17 Thread Ian Rogers
don't move. Remove unnecessary copies and searches with this change. Signed-off-by: Ian Rogers --- tools/perf/builtin-trace.c | 87 +++--- 1 file changed, 53 insertions(+), 34 deletions(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c ind

[PATCH v6 09/13] perf syscalltbl: Use lookup table containing multiple architectures

2025-03-17 Thread Ian Rogers
= 3 0.255 ( 0.007 ms): a.out/442930 read(fd: 3, buf: 0xffbdb67c, count: 4096)= 1436 0.264 ( 0.018 ms): a.out/442930 write(fd: 1, buf: , count: 1436) = 1436 0.292 (1000.173 ms): a.out/442930 clock_nanosleep(rqtp: { .tv_sec: 1786654694037

[PATCH v6 08/13] perf trace beauty: Add syscalltbl.sh generating all system call tables

2025-03-17 Thread Ian Rogers
ed by Arnd Bergmann: https://lore.kernel.org/lkml/d47c35dd-9c52-48e7-a00d-135572f11...@app.fastmail.com/ and added in commit 9142be9e6443 ("x86/syscall: Mark exit[_group] syscall handlers __noreturn"). Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tool

[PATCH v6 05/13] perf syscalltbl: Remove struct syscalltbl

2025-03-17 Thread Ian Rogers
er of indices for a machine type is exposed as a new API. The arrays are computed in the syscalltbl.sh script and so no start-up time computation and storage is necessary. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c

[PATCH v6 04/13] perf trace: Reorganize syscalls

2025-03-17 Thread Ian Rogers
system call numbers would be too large, so maintain a sorted array of system calls as they are encountered. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c | 197 + 1 file changed, 132 insertions

[PATCH v6 03/13] perf syscalltbl: Remove syscall_table.h

2025-03-17 Thread Ian Rogers
ll cause a failure to include either syscalls_32.h or syscalls_64.h rather than a failure to include syscall_table.h. For architectures that only included one or other, the behavior matches BITS_PER_LONG as previously done on architectures supporting both syscalls_32.h and syscalls_64.h. Signed-o

[PATCH v6 01/13] perf dso: Move libunwind dso_data variables into ifdef

2025-03-17 Thread Ian Rogers
-off-by: Ian Rogers --- tools/perf/util/dso.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index 84d5aac666aa..14e4ac21a1d3 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h @@ -155,10 +155,12 @@ struct dso_data { int

Re: [PATCH v5 00/11] perf: Support multiple system call tables in the build

2025-03-17 Thread Ian Rogers
105: perf trace enum augmentation tests : Ok > > root@number:~# > > > > So its some sort of syncronization on the various new tables, sorted by > > name, etc that then when iterating over the syscalls ends up using a sc > > that is not initialized

[PATCH v5 03/11] perf syscalltbl: Remove syscall_table.h

2025-03-07 Thread Ian Rogers
ll cause a failure to include either syscalls_32.h or syscalls_64.h rather than a failure to include syscall_table.h. For architectures that only included one or other, the behavior matches BITS_PER_LONG as previously done on architectures supporting both syscalls_32.h and syscalls_64.h. Signed-o

[PATCH v5 10/11] perf build: Remove Makefile.syscalls

2025-03-07 Thread Ian Rogers
QGqUj@ghost/ Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/Makefile.perf | 1 - tools/perf/arch/alpha/entry/syscalls/Kbuild | 2 - .../alpha/entry/syscalls/Makefile.syscalls| 5 -- tools/perf/arch/arc/entry/syscalls/K

[PATCH v5 11/11] perf syscalltbl: Mask off ABI type for MIPS system calls

2025-03-07 Thread Ian Rogers
Signed-off-by: Ian Rogers --- tools/perf/util/syscalltbl.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/util/syscalltbl.c b/tools/perf/util/syscalltbl.c index db0d2b81aed1..ace66e69c1bc 100644 --- a/tools/perf/util/syscalltbl.c +++ b/tools/perf/util/syscalltbl.c @@ -46,6

[PATCH v5 09/11] perf syscalltbl: Use lookup table containing multiple architectures

2025-03-07 Thread Ian Rogers
= 3 0.255 ( 0.007 ms): a.out/442930 read(fd: 3, buf: 0xffbdb67c, count: 4096)= 1436 0.264 ( 0.018 ms): a.out/442930 write(fd: 1, buf: , count: 1436) = 1436 0.292 (1000.173 ms): a.out/442930 clock_nanosleep(rqtp: { .tv_sec: 1786654694037

[PATCH v5 06/11] perf dso: Add support for reading the e_machine type for a dso

2025-03-07 Thread Ian Rogers
-by: Ian Rogers --- tools/perf/util/dso.c| 88 tools/perf/util/dso.h| 3 ++ tools/perf/util/symbol-elf.c | 27 --- 3 files changed, 91 insertions(+), 27 deletions(-) diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c in

[PATCH v5 08/11] perf trace beauty: Add syscalltbl.sh generating all system call tables

2025-03-07 Thread Ian Rogers
ed by Arnd Bergmann: https://lore.kernel.org/lkml/d47c35dd-9c52-48e7-a00d-135572f11...@app.fastmail.com/ and added in commit 9142be9e6443 ("x86/syscall: Mark exit[_group] syscall handlers __noreturn"). Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tool

[PATCH v5 07/11] perf thread: Add support for reading the e_machine type for a thread

2025-03-07 Thread Ian Rogers
that in later patches when syscalltbl can use the e_machine the system calls are specific to the architecture. Signed-off-by: Ian Rogers --- tools/perf/builtin-trace.c | 43 ++-- tools/perf/util/thread.c | 80 ++ tools/perf/util/thread.h

[PATCH v5 05/11] perf syscalltbl: Remove struct syscalltbl

2025-03-07 Thread Ian Rogers
er of indices for a machine type is exposed as a new API. The arrays are computed in the syscalltbl.sh script and so no start-up time computation and storage is necessary. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c

[PATCH v5 04/11] perf trace: Reorganize syscalls

2025-03-07 Thread Ian Rogers
system call numbers would be too large, so maintain a sorted array of system calls as they are encountered. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c | 177 - 1 file changed, 118 insertions

[PATCH v5 02/11] perf dso: kernel-doc for enum dso_binary_type

2025-03-07 Thread Ian Rogers
There are many and non-obvious meanings to the dso_binary_type enum values. Add kernel-doc to speed interpretting their meanings. Acked-by: Arnaldo Carvalho de Melo Signed-off-by: Ian Rogers --- tools/perf/util/dso.h | 53 +++ 1 file changed, 53

[PATCH v5 01/11] perf dso: Move libunwind dso_data variables into ifdef

2025-03-07 Thread Ian Rogers
-off-by: Ian Rogers --- tools/perf/util/dso.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index bb8e8f444054..dfd763a0bd9d 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h @@ -154,10 +154,12 @@ struct dso_data { int

[PATCH v5 00/11] perf: Support multiple system call tables in the build

2025-03-07 Thread Ian Rogers
guiding: https://lore.kernel.org/all/20250114-perf_syscall_arch_runtime-v1-1-5b304e408...@rivosinc.com/ After discussion on v1 and he agreed this patch series would be the better direction. Ian Rogers (11): perf dso: Move libunwind dso_data variables into ifdef perf dso: kernel-doc

Re: [PATCH v4 06/11] perf dso: Add support for reading the e_machine type for a dso

2025-03-06 Thread Ian Rogers
On Thu, Mar 6, 2025 at 5:22 PM Namhyung Kim wrote: > > On Mon, Mar 03, 2025 at 09:03:00PM -0800, Ian Rogers wrote: > > For ELF file dsos read the e_machine from the ELF header. For kernel > > types assume the e_machine matches the perf tool. In other cases > > return EM_

Re: [PATCH v4 00/11] perf: Support multiple system call tables in the build

2025-03-03 Thread Ian Rogers
On Mon, Mar 3, 2025 at 9:04 PM Ian Rogers wrote: > > This work builds on the clean up of system call tables and removal of > libaudit by Charlie Jenkins . > > The system call table in perf trace is used to map system call numbers > to names and vice versa. Prior to these chang

[PATCH v4 09/11] perf syscalltbl: Use lookup table containing multiple architectures

2025-03-03 Thread Ian Rogers
= 3 0.255 ( 0.007 ms): a.out/442930 read(fd: 3, buf: 0xffbdb67c, count: 4096)= 1436 0.264 ( 0.018 ms): a.out/442930 write(fd: 1, buf: , count: 1436) = 1436 0.292 (1000.173 ms): a.out/442930 clock_nanosleep(rqtp: { .tv_sec: 1786654694037

[PATCH v4 04/11] perf trace: Reorganize syscalls

2025-03-03 Thread Ian Rogers
system call numbers would be too large, so maintain a sorted array of system calls as they are encountered. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c | 177 - 1 file changed, 118 insertions

[PATCH v4 06/11] perf dso: Add support for reading the e_machine type for a dso

2025-03-03 Thread Ian Rogers
For ELF file dsos read the e_machine from the ELF header. For kernel types assume the e_machine matches the perf tool. In other cases return EM_NONE. Signed-off-by: Ian Rogers --- tools/perf/util/dso.c | 54 +++ tools/perf/util/dso.h | 1 + 2 files

[PATCH v4 11/11] perf syscalltbl: Mask off ABI type for MIPS system calls

2025-03-03 Thread Ian Rogers
Signed-off-by: Ian Rogers --- tools/perf/util/syscalltbl.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/util/syscalltbl.c b/tools/perf/util/syscalltbl.c index db0d2b81aed1..ace66e69c1bc 100644 --- a/tools/perf/util/syscalltbl.c +++ b/tools/perf/util/syscalltbl.c @@ -46,6

[PATCH v4 10/11] perf build: Remove Makefile.syscalls

2025-03-03 Thread Ian Rogers
QGqUj@ghost/ Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/Makefile.perf | 1 - tools/perf/arch/alpha/entry/syscalls/Kbuild | 2 - .../alpha/entry/syscalls/Makefile.syscalls| 5 -- tools/perf/arch/arc/entry/syscalls/K

[PATCH v4 07/11] perf thread: Add support for reading the e_machine type for a thread

2025-03-03 Thread Ian Rogers
that in later patches when syscalltbl can use the e_machine the system calls are specific to the architecture. Signed-off-by: Ian Rogers --- tools/perf/builtin-trace.c | 43 ++-- tools/perf/util/thread.c | 80 ++ tools/perf/util/thread.h

[PATCH v4 08/11] perf trace beauty: Add syscalltbl.sh generating all system call tables

2025-03-03 Thread Ian Rogers
ed by Arnd Bergmann: https://lore.kernel.org/lkml/d47c35dd-9c52-48e7-a00d-135572f11...@app.fastmail.com/ and added in commit 9142be9e6443 ("x86/syscall: Mark exit[_group] syscall handlers __noreturn"). Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tool

[PATCH v4 05/11] perf syscalltbl: Remove struct syscalltbl

2025-03-03 Thread Ian Rogers
er of indices for a machine type is exposed as a new API. The arrays are computed in the syscalltbl.sh script and so no start-up time computation and storage is necessary. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c

[PATCH v4 02/11] perf dso: kernel-doc for enum dso_binary_type

2025-03-03 Thread Ian Rogers
There are many and non-obvious meanings to the dso_binary_type enum values. Add kernel-doc to speed interpretting their meanings. Signed-off-by: Ian Rogers --- tools/perf/util/dso.h | 53 +++ 1 file changed, 53 insertions(+) diff --git a/tools/perf/util

[PATCH v4 03/11] perf syscalltbl: Remove syscall_table.h

2025-03-03 Thread Ian Rogers
ll cause a failure to include either syscalls_32.h or syscalls_64.h rather than a failure to include syscall_table.h. For architectures that only included one or other, the behavior matches BITS_PER_LONG as previously done on architectures supporting both syscalls_32.h and syscalls_64.h. Signed-o

[PATCH v4 01/11] perf dso: Move libunwind dso_data variables into ifdef

2025-03-03 Thread Ian Rogers
The variables elf_base_addr, debug_frame_offset, eh_frame_hdr_addr and eh_frame_hdr_offset are only accessed in unwind-libunwind-local.c which is conditionally built on having libunwind support. Make the variables conditional on libunwind support too. Signed-off-by: Ian Rogers --- tools/perf

[PATCH v4 00/11] perf: Support multiple system call tables in the build

2025-03-03 Thread Ian Rogers
..@rivosinc.com/ After discussion on v1 and he agreed this patch series would be the better direction. Ian Rogers (11): perf dso: Move libunwind dso_data variables into ifdef perf dso: kernel-doc for enum dso_binary_type perf syscalltbl: Remove syscall_table.h perf trace: Reorganize sy

Re: [PATCH v3 0/8] perf: Support multiple system call tables in the build

2025-02-26 Thread Ian Rogers
On Wed, Feb 26, 2025 at 4:00 PM Namhyung Kim wrote: > > On Mon, Feb 24, 2025 at 08:22:50PM -0800, Ian Rogers wrote: > > On Mon, Feb 24, 2025 at 7:20 PM Namhyung Kim wrote: > > > > > > On Wed, Feb 19, 2025 at 10:56:49AM -0800, Ian Rogers wrote: > > > >

Re: [PATCH v3 0/8] perf: Support multiple system call tables in the build

2025-02-24 Thread Ian Rogers
On Mon, Feb 24, 2025 at 7:05 PM Namhyung Kim wrote: > > On Wed, Feb 19, 2025 at 10:56:49AM -0800, Ian Rogers wrote: > > This work builds on the clean up of system call tables and removal of > > libaudit by Charlie Jenkins . > > > > The system call table in perf tr

Re: [PATCH v3 0/8] perf: Support multiple system call tables in the build

2025-02-24 Thread Ian Rogers
On Mon, Feb 24, 2025 at 7:20 PM Namhyung Kim wrote: > > On Wed, Feb 19, 2025 at 10:56:49AM -0800, Ian Rogers wrote: > > This work builds on the clean up of system call tables and removal of > > libaudit by Charlie Jenkins . > > > > The system call table in perf tr

[PATCH v3 7/8] perf build: Remove Makefile.syscalls

2025-02-19 Thread Ian Rogers
QGqUj@ghost/ Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/Makefile.perf | 1 - tools/perf/arch/alpha/entry/syscalls/Kbuild | 2 - .../alpha/entry/syscalls/Makefile.syscalls| 5 -- tools/perf/arch/arc/entry/syscalls/K

[PATCH v3 8/8] perf syscalltbl: Mask off ABI type for MIPS system calls

2025-02-19 Thread Ian Rogers
Signed-off-by: Ian Rogers --- tools/perf/util/syscalltbl.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/util/syscalltbl.c b/tools/perf/util/syscalltbl.c index db0d2b81aed1..ace66e69c1bc 100644 --- a/tools/perf/util/syscalltbl.c +++ b/tools/perf/util/syscalltbl.c @@ -46,6

[PATCH v3 6/8] perf syscalltbl: Use lookup table containing multiple architectures

2025-02-19 Thread Ian Rogers
= 3 0.255 ( 0.007 ms): a.out/442930 read(fd: 3, buf: 0xffbdb67c, count: 4096)= 1436 0.264 ( 0.018 ms): a.out/442930 write(fd: 1, buf: , count: 1436) = 1436 0.292 (1000.173 ms): a.out/442930 clock_nanosleep(rqtp: { .tv_sec: 1786654694037

[PATCH v3 4/8] perf thread: Add support for reading the e_machine type for a thread

2025-02-19 Thread Ian Rogers
the architecture. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c | 43 tools/perf/util/thread.c | 50 ++ tools/perf/util/thread.h | 14 ++- 3 files

[PATCH v3 3/8] perf syscalltbl: Remove struct syscalltbl

2025-02-19 Thread Ian Rogers
er of indices for a machine type is exposed as a new API. The arrays are computed in the syscalltbl.sh script and so no start-up time computation and storage is necessary. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c

[PATCH v3 5/8] perf trace beauty: Add syscalltbl.sh generating all system call tables

2025-02-19 Thread Ian Rogers
ed by Arnd Bergmann: https://lore.kernel.org/lkml/d47c35dd-9c52-48e7-a00d-135572f11...@app.fastmail.com/ and added in commit 9142be9e6443 ("x86/syscall: Mark exit[_group] syscall handlers __noreturn"). Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tool

[PATCH v3 2/8] perf trace: Reorganize syscalls

2025-02-19 Thread Ian Rogers
system call numbers would be too large, so maintain a sorted array of system calls as they are encountered. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu Reviewed-by: Charlie Jenkins --- tools/perf/builtin-trace.c | 177 - 1 file changed, 118 insertions

[PATCH v3 1/8] perf syscalltble: Remove syscall_table.h

2025-02-19 Thread Ian Rogers
ll cause a failure to include either syscalls_32.h or syscalls_64.h rather than a failure to include syscall_table.h. For architectures that only included one or other, the behavior matches BITS_PER_LONG as previously done on architectures supporting both syscalls_32.h and syscalls_64.h. Signed-o

[PATCH v3 0/8] perf: Support multiple system call tables in the build

2025-02-19 Thread Ian Rogers
his patch series would be the better direction. Ian Rogers (8): perf syscalltble: Remove syscall_table.h perf trace: Reorganize syscalls perf syscalltbl: Remove struct syscalltbl perf thread: Add support for reading the e_machine type for a thread perf trace beauty: Add syscalltbl.sh

Re: [PATCH v2 5/7] perf trace beauty: Add syscalltbl.sh generating all system call tables

2025-02-11 Thread Ian Rogers
On Tue, Feb 11, 2025 at 9:53 AM Arnd Bergmann wrote: > > On Tue, Feb 11, 2025, at 18:24, Ian Rogers wrote: > > On Tue, Feb 11, 2025 at 12:09 AM Arnd Bergmann wrote: > >> On Mon, Feb 10, 2025, at 17:51, Ian Rogers wrote: > >> > "$tools_dir/perf/arch/arm64/en

Re: [PATCH v2 3/7] perf syscalltbl: Remove struct syscalltbl

2025-02-11 Thread Ian Rogers
On Tue, Feb 11, 2025 at 8:34 AM Arnd Bergmann wrote: > > On Tue, Feb 11, 2025, at 17:18, Ian Rogers wrote: > > On Mon, Feb 10, 2025 at 11:48 PM Arnd Bergmann wrote: > > >> The syscall numbers on mips (and previously on ia64) are offset by > >> a large number depe

Re: [PATCH v2 5/7] perf trace beauty: Add syscalltbl.sh generating all system call tables

2025-02-11 Thread Ian Rogers
On Tue, Feb 11, 2025 at 12:09 AM Arnd Bergmann wrote: > > On Mon, Feb 10, 2025, at 17:51, Ian Rogers wrote: > > > +# Each line of the syscall table should have the following format: > > +# > > +# NR ABI NAME [NATIVE] [COMPAT] > > +# > > +# NR

Re: [PATCH v2 3/7] perf syscalltbl: Remove struct syscalltbl

2025-02-11 Thread Ian Rogers
On Mon, Feb 10, 2025 at 11:48 PM Arnd Bergmann wrote: > > On Mon, Feb 10, 2025, at 17:51, Ian Rogers wrote: > > The syscalltbl held entries of system call name and number pairs, > > generated from a native syscalltbl at start up. As there are gaps in > > the system call

[PATCH v1] perf drm_pmu: Add a tool like PMU to expose DRM information

2025-02-10 Thread Ian Rogers
ot;perf pmus: Restructure pmu_read_sysfs to scan fewer PMUs") so that only if full wild carding is being done, that the drm PMUs will be read. Signed-off-by: Ian Rogers --- tools/perf/util/Build | 1 + tools/perf/util/drm_pmu.c | 688 ++ tools/perf/util/

Re: [PATCH v2 6/7] perf syscalltbl: Use lookup table containing multiple architectures

2025-02-10 Thread Ian Rogers
On Mon, Feb 10, 2025 at 3:39 PM Charlie Jenkins wrote: > > On Mon, Feb 10, 2025 at 08:51:07AM -0800, Ian Rogers wrote: > > Switch to use the lookup table containing all architectures rather > > than tables matching the perf binary. > > > > This fixes perf trace

Re: [PATCH v2 5/7] perf trace beauty: Add syscalltbl.sh generating all system call tables

2025-02-10 Thread Ian Rogers
On Mon, Feb 10, 2025 at 4:22 PM Charlie Jenkins wrote: > > On Mon, Feb 10, 2025 at 08:51:06AM -0800, Ian Rogers wrote: > > Rather than generating individual syscall header files generate a > > single trace/beauty/generated/syscalltbl.c. In a syscalltbls array > >

[PATCH v2 7/7] perf build: Remove Makefile.syscalls

2025-02-10 Thread Ian Rogers
QGqUj@ghost/ Signed-off-by: Ian Rogers Reviewed-by: Howard Chu --- tools/perf/Makefile.perf | 1 - tools/perf/arch/alpha/entry/syscalls/Kbuild | 2 - .../alpha/entry/syscalls/Makefile.syscalls| 5 -- tools/perf/arch/arc/entry/syscalls/Kbuild | 2 - .../arch/arc/

[PATCH v2 6/7] perf syscalltbl: Use lookup table containing multiple architectures

2025-02-10 Thread Ian Rogers
= 3 0.255 ( 0.007 ms): a.out/442930 read(fd: 3, buf: 0xffbdb67c, count: 4096)= 1436 0.264 ( 0.018 ms): a.out/442930 write(fd: 1, buf: , count: 1436) = 1436 0.292 (1000.173 ms): a.out/442930 clock_nanosleep(rqtp: { .tv_sec: 1786654694037

[PATCH v2 5/7] perf trace beauty: Add syscalltbl.sh generating all system call tables

2025-02-10 Thread Ian Rogers
. For ARM32 don't use the arm64 32-bit table which is smaller. EM_NONE is present for is no machine matches. Conditionally compile the tables, only having the appropriate 32 and 64-bit table. If ALL_SYSCALLTBL is defined all tables can be compiled. Signed-off-by: Ian Rogers Reviewed-by:

[PATCH v2 4/7] perf thread: Add support for reading the e_machine type for a thread

2025-02-10 Thread Ian Rogers
the architecture. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu --- tools/perf/builtin-trace.c | 41 --- tools/perf/util/thread.c | 50 ++ tools/perf/util/thread.h | 14 ++- 3 files changed, 85 insertions(+), 20

[PATCH v2 3/7] perf syscalltbl: Remove struct syscalltbl

2025-02-10 Thread Ian Rogers
er of indices for a machine type is exposed as a new API. The arrays are computed in the syscalltbl.sh script and so no start-up time computation and storage is necessary. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu --- tools/perf/builtin-trace.c | 88 +--- tools

[PATCH v2 0/7] perf: Support multiple system call tables in the build

2025-02-10 Thread Ian Rogers
his patch series would be the better direction. Ian Rogers (7): perf syscalltble: Remove syscall_table.h perf trace: Reorganize syscalls perf syscalltbl: Remove struct syscalltbl perf thread: Add support for reading the e_machine type for a thread perf trace beauty: Add syscalltbl.sh g

[PATCH v2 1/7] perf syscalltble: Remove syscall_table.h

2025-02-10 Thread Ian Rogers
ll cause a failure to include either syscalls_32.h or syscalls_64.h rather than a failure to include syscall_table.h. For architectures that only included one or other, the behavior matches BITS_PER_LONG as previously done on architectures supporting both syscalls_32.h and syscalls_64.h. Signed-o

[PATCH v2 2/7] perf trace: Reorganize syscalls

2025-02-10 Thread Ian Rogers
system call numbers would be too large, so maintain a sorted array of system calls as they are encountered. Signed-off-by: Ian Rogers Reviewed-by: Howard Chu --- tools/perf/builtin-trace.c | 178 + 1 file changed, 119 insertions(+), 59 deletions(-) diff --git a

Re: [PATCH v1 6/7] perf syscalltbl: Use lookup table containing multiple architectures

2025-02-04 Thread Ian Rogers
On Tue, Feb 4, 2025 at 4:24 PM Howard Chu wrote: > > Hello, > > On Fri, Jan 31, 2025 at 11:15 PM Ian Rogers wrote: > > > > Switch to use the lookup table containing all architectures rather > > than tables matching the perf binary. > > > > This fixes

Re: [PATCH v1 3/7] perf syscalltbl: Remove struct syscalltbl

2025-02-04 Thread Ian Rogers
On Tue, Feb 4, 2025 at 4:18 PM Howard Chu wrote: > > Hello Ian, > > On Fri, Jan 31, 2025 at 11:15 PM Ian Rogers wrote: > > > > The syscalltbl held entries of system call name and number pairs, > > generated from a native syscalltbl at start up. As there are gaps

Re: [PATCH v1 2/7] perf trace: Reorganize syscalls

2025-02-04 Thread Ian Rogers
On Tue, Feb 4, 2025 at 4:12 PM Howard Chu wrote: > > Hello Ian, > > Thanks for doing this. > > On Fri, Jan 31, 2025 at 11:15 PM Ian Rogers wrote: [snip] > > @@ -2104,11 +2123,12 @@ static int trace__read_syscall_info(struct trace > > *trace, int id) > >

Re: [PATCH v1 0/7] perf: Support multiple system call tables in the build

2025-02-04 Thread Ian Rogers
On Tue, Feb 4, 2025 at 11:05 AM Charlie Jenkins wrote: > > On Mon, Feb 03, 2025 at 05:58:29PM -0800, Ian Rogers wrote: > > On Mon, Feb 3, 2025 at 3:02 PM Charlie Jenkins wrote: > > > On Mon, Feb 03, 2025 at 12:54:59PM -0800, Ian Rogers wrote: > > [snip] > >

Re: [PATCH v1 0/7] perf: Support multiple system call tables in the build

2025-02-03 Thread Ian Rogers
On Mon, Feb 3, 2025 at 3:02 PM Charlie Jenkins wrote: > On Mon, Feb 03, 2025 at 12:54:59PM -0800, Ian Rogers wrote: [snip] > > I think it makes sense in the kernel, as the built binary doesn't have > > cross-platform concerns. This is probably also the reason why the perf

Re: [PATCH v1 0/7] perf: Support multiple system call tables in the build

2025-02-03 Thread Ian Rogers
On Mon, Feb 3, 2025 at 12:06 PM Charlie Jenkins wrote: > > On Mon, Feb 03, 2025 at 11:39:01AM -0800, Ian Rogers wrote: > > On Mon, Feb 3, 2025 at 11:15 AM Charlie Jenkins > > wrote: > > > > > > On Mon, Feb 03, 2025 at 11:10:49AM -0800, Ian Rogers wrote: >

Re: [PATCH v1 0/7] perf: Support multiple system call tables in the build

2025-02-03 Thread Ian Rogers
On Mon, Feb 3, 2025 at 11:15 AM Charlie Jenkins wrote: > > On Mon, Feb 03, 2025 at 11:10:49AM -0800, Ian Rogers wrote: > > On Mon, Feb 3, 2025 at 11:02 AM Charlie Jenkins > > wrote: > > > > > > On Fri, Jan 31, 2025 at 11:14:48PM -0800, Ian Rogers wrote: >

  1   2   3   4   5   6   7   8   9   10   >