Re: [PATCH V2] tools/perf/builtin-lock: Fix return code for functions in __cmd_contention

2025-01-13 Thread Namhyung Kim
code. Similarly set the > return code properly for two other functions in builtin-lock, namely > setup_output_field() and select_key(). > > Signed-off-by: Athira Rajeev Reviewed-by: Namhyung Kim Thanks, Namhyung > --- > Changelog: > v1 -> v2 > Fixed return code in functio

Re: Perf doesn't display kernel symbols anymore (bisected commit 659ad3492b91 ("perf maps: Switch from rbtree to lazily sorted array for addresses"))

2025-01-06 Thread Namhyung Kim
Hello, On Mon, Jan 06, 2025 at 01:38:52PM +0100, Christophe Leroy wrote: > > > Le 03/01/2025 à 17:26, Arnaldo Carvalho de Melo a écrit : > > On Fri, Jan 03, 2025 at 01:40:24PM +0100, Christophe Leroy wrote: > > > Le 03/01/2025 à 02:08, Arnaldo Carvalho de Melo a écrit : > > > > > PerfTop:

Re: [PATCH] tools/perf: Fix segfault during perf record --off-cpu when debuginfo is not enabled

2025-01-06 Thread Namhyung Kim
by_name_kind(btf, "btf_trace_sched_switch", > > BTF_KIND_TYPEDEF); > > > > btf__load_vmlinux_btf fails when CONFIG_DEBUG_INFO_BTF is not enabled. > > Here bpf__find_by_name_kind calls btf__type_cnt with NULL btf &g

Re: [PATCH] tools/perf: Fix return code for lock_contention_prepare

2025-01-06 Thread Namhyung Kim
Hello, On Mon, Dec 23, 2024 at 07:26:55PM +0530, Athira Rajeev wrote: > perf lock contention returns zero exit value even if the lock contention > BPF setup failed. > ># ./perf lock con -b true >libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was > CONFIG_DEBUG_INFO_BTF enabl

Re: [PATCH v1] perf test expr: Fix system_tsc_freq for only x86

2024-12-11 Thread Namhyung Kim
On Wed, 04 Dec 2024 18:23:05 -0800, Ian Rogers wrote: > 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 spec

Re: [PATCH v1] perf test expr: Fix system_tsc_freq for only x86

2024-12-11 Thread Namhyung Kim
On Tue, Dec 10, 2024 at 04:20:57PM -0300, Arnaldo Carvalho de Melo wrote: > On Wed, Dec 04, 2024 at 06:23:05PM -0800, Ian Rogers wrote: > > 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 sup

Re: [PATCH v1] perf test expr: Fix system_tsc_freq for only x86

2024-12-05 Thread Namhyung Kim
On Wed, Dec 04, 2024 at 11:09:50PM -0800, Ian Rogers wrote: > On Wed, Dec 4, 2024 at 10:33 PM Ian Rogers wrote: > > > > On Wed, Dec 4, 2024 at 9:47 PM Namhyung Kim wrote: > > > > > > Hi Ian, > > > > > > On Wed, Dec 04, 2024 at 06:23:05PM -0800

Re: [PATCH v1] perf test expr: Fix system_tsc_freq for only x86

2024-12-04 Thread Namhyung Kim
Hi Ian, On Wed, Dec 04, 2024 at 06:23:05PM -0800, Ian Rogers wrote: > 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 parsi

Re: [PATCH] fix: add safety check for OPTION_END and refactor code for consistency

2024-12-04 Thread Namhyung Kim
Hello, On Fri, Nov 29, 2024 at 04:13:53PM +0530, Atharva Tiwari wrote: > - Added a null check for 'o' before copying the last OPTION_END in > options__order function to prevent potential uninitialized usage. > - Refactored the parse_long_opt function for improved readability by aligning > functi

Re: [PATCH] tools/perf/tests/expr: Make the system_tsc_freq test only for intel

2024-12-03 Thread Namhyung Kim
Hello, On Fri, Nov 08, 2024 at 10:50:10AM +0530, Athira Rajeev wrote: > > > > On 7 Nov 2024, at 7:26 PM, Leo Yan wrote: > > > > Hi Athira, > > > > On Wed, Nov 06, 2024 at 03:04:57PM +0530, Athira Rajeev wrote: > > > > [...] > > > >>> Hi Athira, > >>> > >>> sorry for the breakage and thank

Re: [PATCH] tools/perf/tests/expr: Make the system_tsc_freq test only for intel

2024-12-03 Thread Namhyung Kim
On Tue, Dec 03, 2024 at 10:42:45AM -0800, Namhyung Kim wrote: > On Tue, Dec 03, 2024 at 10:16:06AM -0800, Namhyung Kim wrote: > > Hello, > > > > On Fri, Nov 08, 2024 at 10:50:10AM +0530, Athira Rajeev wrote: > > > > > > > > > > On 7 Nov 20

Re: [PATCH] tools/perf/tests/expr: Make the system_tsc_freq test only for intel

2024-12-03 Thread Namhyung Kim
On Tue, Dec 03, 2024 at 10:16:06AM -0800, Namhyung Kim wrote: > Hello, > > On Fri, Nov 08, 2024 at 10:50:10AM +0530, Athira Rajeev wrote: > > > > > > > On 7 Nov 2024, at 7:26 PM, Leo Yan wrote: > > > > > > Hi Athira, > > > > >

[PATCH 06/11] tools headers: Sync *xattrat syscall changes with the kernel sources

2024-12-02 Thread Namhyung Kim
the later cycle. Please see tools/include/uapi/README for further details. Cc: Arnd Bergmann Cc: Christian Brauner CC: x...@kernel.org CC: linux-m...@vger.kernel.org CC: linuxppc-dev@lists.ozlabs.org CC: linux-s...@vger.kernel.org Signed-off-by: Namhyung Kim --- tools/include/uapi/asm-g

Re: [PATCH] tools/perf/tests/expr: Make the system_tsc_freq test only for intel

2024-10-29 Thread Namhyung Kim
Hello, On Tue, Oct 22, 2024 at 07:31:56PM +0530, Athira Rajeev wrote: > The "Simple expression parser" test fails on powerpc > as below: > > parsing metric: #system_tsc_freq > Unrecognized literal '#system_tsc_freq'literal: #system_tsc_freq = nan > syntax error > FAILED tests/expr.c:247 #syst

[PATCH v4 4/5] perf/powerpc: Count dropped samples in core-book3s PMU

2024-10-22 Thread Namhyung Kim
n Cc: Christophe Leroy Cc: Naveen N Rao Cc: Kajol Jain Cc: Athira Rajeev Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim --- arch/powerpc/perf/core-book3s.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf

Re: [PATCH V2 1/2] tools/perf/pmu-events/powerpc: Add support for compat events in json

2024-10-18 Thread Namhyung Kim
On Thu, 10 Oct 2024 20:21:06 +0530, Athira Rajeev wrote: > perf list picks the events supported for specific platform > from pmu-events/arch/powerpc/. Example power10 events > are in pmu-events/arch/powerpc/power10, power9 events are part > of pmu-events/arch/powerpc/power9. The decision of which

Re: [PATCH V2 1/2] tools/perf/pmu-events/powerpc: Add support for compat events in json

2024-10-16 Thread Namhyung Kim
Hello Athira, On Thu, Oct 10, 2024 at 08:21:06PM +0530, Athira Rajeev wrote: > perf list picks the events supported for specific platform > from pmu-events/arch/powerpc/. Example power10 events > are in pmu-events/arch/powerpc/power10, power9 events are part > of pmu-events/arch/powerpc/power9. Th

Re: [PATCH] tools/perf/tests: Remove duplicate evlist__delete in tests/tool_pmu.c

2024-10-14 Thread Namhyung Kim
On Sun, 13 Oct 2024 22:37:32 +0530, Athira Rajeev wrote: > The testcase for tool_pmu failed in powerpc as below: > > ./perf test -v "Parsing without PMU name" > 8: Tool PMU: > 8.1: Parsing without PMU name

Re: [PATCH] tools/perf/tests: Fix compilation error with strncpy in tests/tool_pmu

2024-10-14 Thread Namhyung Kim
On Sun, 13 Oct 2024 23:07:42 +0530, Athira Rajeev wrote: > perf fails to compile on systems with GCC version11 > as below: > > In file included from /usr/include/string.h:519, > from > /home/athir/perf-tools-next/tools/include/linux/bitmap.h:5, > from /home/athi

Re: [PATCH] tools/perf/tests: Fix compilation error with strncpy in tests/tool_pmu

2024-10-14 Thread Namhyung Kim
Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 14 Oct 2024 10:34:17 -0700 Subject: [PATCH] perf tools: Fix compiler error in util/tool_pmu.c util/tool_pmu.c: In function 'evsel__tool_pmu_read': util/tool_pmu.c:419:55: error: passing argument 2 of 'tool_pmu__read_event&

Re: [PATCH] tools/perf/tests: Fix compilation error with strncpy in tests/tool_pmu

2024-10-14 Thread Namhyung Kim
Hello Athira, On Sun, Oct 13, 2024 at 11:07:42PM +0530, Athira Rajeev wrote: > perf fails to compile on systems with GCC version11 > as below: > > In file included from /usr/include/string.h:519, > from > /home/athir/perf-tools-next/tools/include/linux/bitmap.h:5, >

[PATCH 4/5] perf/powerpc: Count dropped samples in core-book3s PMU

2024-09-04 Thread Namhyung Kim
o Cc: Kajol Jain Cc: Athira Rajeev Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim --- arch/powerpc/perf/core-book3s.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 42867469752

Re: [PATCHSET 00/10] perf tools: Sync tools and kernel headers for v6.11

2024-08-09 Thread Namhyung Kim
On Fri, Aug 9, 2024 at 8:39 AM Athira Rajeev wrote: > > > > > On 9 Aug 2024, at 12:14 AM, Namhyung Kim wrote: > > > > Hello, > > > > On Thu, Aug 08, 2024 at 12:14:12PM +0530, Athira Rajeev wrote: > >> > >> > >>> On

Re: [PATCHSET 00/10] perf tools: Sync tools and kernel headers for v6.11

2024-08-08 Thread Namhyung Kim
Hello, On Thu, Aug 08, 2024 at 12:14:12PM +0530, Athira Rajeev wrote: > > > > On 7 Aug 2024, at 11:42 PM, Namhyung Kim wrote: > > > > Hello folks, > > > > On Tue, Aug 06, 2024 at 03:50:03PM -0700, Namhyung Kim wrote: > >> Hello, > >> >

Re: [PATCHSET 00/10] perf tools: Sync tools and kernel headers for v6.11

2024-08-07 Thread Namhyung Kim
Hello folks, On Tue, Aug 06, 2024 at 03:50:03PM -0700, Namhyung Kim wrote: > Hello, > > This is the usual sync up in header files we keep in tools directory. > I put a file to give the reason of this work and not to repeat it in > every commit message. The changes will be carr

Re: [PATCH V7 00/18] Add data type profiling support for powerpc

2024-07-17 Thread Namhyung Kim
On Wed, Jul 17, 2024 at 11:12 PM Athira Rajeev wrote: > > > > > On 18 Jul 2024, at 11:04 AM, Namhyung Kim wrote: > > > > Hello, > > > > On Sat, Jul 13, 2024 at 10:25:11PM +0530, Athira Rajeev wrote: > >> The patchset from Namhyung added support

Re: [PATCH V7 00/18] Add data type profiling support for powerpc

2024-07-17 Thread Namhyung Kim
paca_struct +48 (data_offset) > 1.43% long unsigned int long unsigned int +0 (no field) > 1.41% struct vm_fault struct vm_fault +0 (vma) > 1.29% struct task_struct struct task_struct +276 (flags) > 1.03% struct pt_regs struct pt_regs +264 (user_regs.msr) >

Re: [PATCH V7 16/18] tools/perf: Add support for global_die to capture name of variable in case of register defined variable

2024-07-17 Thread Namhyung Kim
On Sat, Jul 13, 2024 at 10:25:27PM +0530, Athira Rajeev wrote: > In case of register defined variable (found using > find_data_type_global_reg), if the type of variable happens to be base > type (example, long unsigned int), perf report captures it as: > > 12.85% long unsigned int long unsig

Re: [PATCH V7 15/18] tools/perf: Add support to find global register variables using find_data_type_global_reg

2024-07-17 Thread Namhyung Kim
Hello, On Sat, Jul 13, 2024 at 10:25:26PM +0530, Athira Rajeev wrote: > There are cases where define a global register variable and associate it > with a specified register. Example, in powerpc, two registers are > defined to represent variable: > 1. r13: represents local_paca > register struct pa

Re: [PATCH V6 17/18] tools/perf: Update data_type_cmp and sort__typeoff_sort function to include var_name in comparison

2024-07-13 Thread Namhyung Kim
On Sat, Jul 13, 2024 at 11:52:30AM +0530, Athira Rajeev wrote: > > > > On 13 Jul 2024, at 2:55 AM, Namhyung Kim wrote: > > > > On Sun, Jul 07, 2024 at 08:14:18PM +0530, Athira Rajeev wrote: > >> Currently data_type_cmp() only compares size and type name. >

Re: [PATCH V6 18/18] tools/perf: Set instruction name to be used with insn-stat when using raw instruction

2024-07-12 Thread Namhyung Kim
On Sun, Jul 07, 2024 at 08:14:19PM +0530, Athira Rajeev wrote: > Since the "ins.name" is not set while using raw instruction, > perf annotate with insn-stat gives wrong data: > > Result from "./perf annotate --data-type --insn-stat": > > Annotate Instruction stats > total 615, ok 419 (68.1%), bad

Re: [PATCH V6 17/18] tools/perf: Update data_type_cmp and sort__typeoff_sort function to include var_name in comparison

2024-07-12 Thread Namhyung Kim
On Sun, Jul 07, 2024 at 08:14:18PM +0530, Athira Rajeev wrote: > Currently data_type_cmp() only compares size and type name. > But in cases where the type name of two data type entries > is same, but var_name is different, the comparison can't distinguish > two different types. > > Consider there

Re: [PATCH V6 00/18] Add data type profiling support for powerpc

2024-07-11 Thread Namhyung Kim
Hello Athira, On Thu, Jul 11, 2024 at 8:45 PM Athira Rajeev wrote: > > > > > On 7 Jul 2024, at 8:14 PM, Athira Rajeev > > wrote: > > > > The patchset from Namhyung added support for data type profiling > > in perf tool. This enabled support to associate PMU samples to data > > types they refer

Re: [PATCH] perf report: Calling available function for stats printing

2024-07-03 Thread Namhyung Kim
On Fri, 28 Jun 2024 14:32:24 -0400, Abhishek Dubey wrote: > For printing dump_trace, just use existing stats_print() > function. > > Applied to perf-tools-next, thanks! Best regards, Namhyung

Re: [PATCH V5 16/17] tools/perf: Add support for global_die to capture name of variable in case of register defined variable

2024-07-02 Thread Namhyung Kim
On Mon, Jul 01, 2024 at 10:04:29AM +0530, Athira Rajeev wrote: > In case of register defined variable (found using > find_data_type_global_reg), if the type of variable happens to be base > type (example, long unsigned int), perf report captures it as: > > 12.85% long unsigned int long unsig

Re: [PATCH V5 15/17] tools/perf: Add support to find global register variables using find_data_type_global_reg

2024-07-02 Thread Namhyung Kim
On Mon, Jul 01, 2024 at 10:04:28AM +0530, Athira Rajeev wrote: > There are cases where define a global register variable and associate it > with a specified register. Example, in powerpc, two registers are > defined to represent variable: > 1. r13: represents local_paca > register struct paca_struc

Re: [PATCH V5 05/17] tools/perf: Add support to capture and parse raw instruction in powerpc using dso__data_read_offset utility

2024-07-02 Thread Namhyung Kim
On Mon, Jul 01, 2024 at 10:04:18AM +0530, Athira Rajeev wrote: > Add support to capture and parse raw instruction in powerpc. > Currently, the perf tool infrastructure uses two ways to disassemble > and understand the instruction. One is objdump and other option is > via libcapstone. > > Currently

Re: [PATCH V5 04/17] tools/perf: Add disasm_line__parse to parse raw instruction for powerpc

2024-07-02 Thread Namhyung Kim
On Mon, Jul 01, 2024 at 10:04:17AM +0530, Athira Rajeev wrote: > Currently, the perf tool infrastructure disasm_line__parse function to > parse disassembled line. > > Example snippet from objdump: > objdump --start-address= --stop-address= -d > --no-show-raw-insn -C > > c10224b4:

Re: [PATCH V5 03/17] tools/perf: Update TYPE_STATE_MAX_REGS to include max of regs in powerpc

2024-07-02 Thread Namhyung Kim
On Mon, Jul 01, 2024 at 10:04:16AM +0530, Athira Rajeev wrote: > Add TYPE_STATE_MAX_REGS_X86 and TYPE_STATE_MAX_REGS_PPC. Define > TYPE_STATE_MAX_REGS to be 32 which is max size of the array. While > checking if reg is valid using has_reg_type, use the max value > depending on the architecture. For

Re: [V4 05/16] tools/perf: Add disasm_line__parse to parse raw instruction for powerpc

2024-06-26 Thread Namhyung Kim
Hello, On Wed, Jun 26, 2024 at 09:38:28AM +0530, Athira Rajeev wrote: > > > > On 26 Jun 2024, at 12:15 AM, Namhyung Kim wrote: > > > > On Tue, Jun 25, 2024 at 06:12:51PM +0530, Athira Rajeev wrote: > >> > >> > >>> On 25 Jun 2024, at 11:0

Re: [PATCH V4 1/3] tools/perf: Fix the string match for "/tmp/perf-$PID.map" files in dso__load

2024-06-25 Thread Namhyung Kim
On Sun, 23 Jun 2024 12:18:48 +0530, Athira Rajeev wrote: > Perf test for perf probe of function from different CU fails > as below: > > ./perf test -vv "test perf probe of function from different CU" > 116: test perf probe of function from different CU: > --- start --- > t

Re: [V4 05/16] tools/perf: Add disasm_line__parse to parse raw instruction for powerpc

2024-06-25 Thread Namhyung Kim
On Tue, Jun 25, 2024 at 06:12:51PM +0530, Athira Rajeev wrote: > > > > On 25 Jun 2024, at 11:09 AM, Namhyung Kim wrote: > > > > On Fri, Jun 14, 2024 at 10:56:20PM +0530, Athira Rajeev wrote: > >> Currently, the perf tool infrastructure disasm_line__parse fu

Re: [V4 03/16] tools/perf: Add support to capture and parse raw instruction in powerpc using dso__data_read_offset utility

2024-06-25 Thread Namhyung Kim
On Tue, Jun 25, 2024 at 06:08:49PM +0530, Athira Rajeev wrote: > > > > On 25 Jun 2024, at 10:59 AM, Namhyung Kim wrote: > > > > On Fri, Jun 14, 2024 at 10:56:18PM +0530, Athira Rajeev wrote: > >> Add support to capture and parse raw instruction in power

Re: [PATCH V4 2/3] tools/perf: Use is_perf_pid_map_name helper function to check dso's of pattern /tmp/perf-%d.map

2024-06-25 Thread Namhyung Kim
On Tue, Jun 25, 2024 at 5:03 AM Adrian Hunter wrote: > > On 23/06/24 09:48, Athira Rajeev wrote: > > commit 80d496be89ed ("perf report: Add support for profiling JIT > > generated code") added support for profiling JIT generated code. > > This patch handles dso's of form "/tmp/perf-$PID.map". > >

Re: [PATCH V4 1/3] tools/perf: Fix the string match for "/tmp/perf-$PID.map" files in dso__load

2024-06-25 Thread Namhyung Kim
Hello, On Tue, Jun 25, 2024 at 5:02 AM Adrian Hunter wrote: > > On 25/06/24 14:57, Adrian Hunter wrote: > > On 23/06/24 09:48, Athira Rajeev wrote: > >> Perf test for perf probe of function from different CU fails > >> as below: > >> > >> ./perf test -vv "test perf probe of function from dif

Re: [V4 14/16] tools/perf: Add support to find global register variables using find_data_type_global_reg

2024-06-24 Thread Namhyung Kim
On Fri, Jun 14, 2024 at 10:56:29PM +0530, Athira Rajeev wrote: > There are cases where define a global register variable and associate it > with a specified register. Example, in powerpc, two registers are > defined to represent variable: > 1. r13: represents local_paca > register struct paca_struc

Re: [V4 13/16] tools/perf: Add support to use libcapstone in powerpc

2024-06-24 Thread Namhyung Kim
On Fri, Jun 14, 2024 at 10:56:28PM +0530, Athira Rajeev wrote: > Now perf uses the capstone library to disassemble the instructions in > x86. capstone is used (if available) for perf annotate to speed up. > Currently it only supports x86 architecture. Patch includes changes to > enable this in powe

Re: [V4 06/16] tools/perf: Update parameters for reg extract functions to use raw instruction on powerpc

2024-06-24 Thread Namhyung Kim
On Fri, Jun 14, 2024 at 10:56:21PM +0530, Athira Rajeev wrote: > Use the raw instruction code and macros to identify memory instructions, > extract register fields and also offset. The implementation addresses > the D-form, X-form, DS-form instructions. Two main functions are added. > New parse fun

Re: [V4 05/16] tools/perf: Add disasm_line__parse to parse raw instruction for powerpc

2024-06-24 Thread Namhyung Kim
On Fri, Jun 14, 2024 at 10:56:20PM +0530, Athira Rajeev wrote: > Currently, the perf tool infrastructure disasm_line__parse function to > parse disassembled line. > > Example snippet from objdump: > objdump --start-address= --stop-address= -d > --no-show-raw-insn -C > > c10224b4:

Re: [V4 04/16] tools/perf: Use sort keys to determine whether to pick objdump to disassemble

2024-06-24 Thread Namhyung Kim
On Fri, Jun 14, 2024 at 10:56:19PM +0530, Athira Rajeev wrote: > perf annotate can be done in different ways. One way is to directly use > "perf annotate" command, other way to annotate specific symbol is to do > "perf report" and press "a" on the sample in UI mode. The approach > preferred in powe

Re: [V4 03/16] tools/perf: Add support to capture and parse raw instruction in powerpc using dso__data_read_offset utility

2024-06-24 Thread Namhyung Kim
On Fri, Jun 14, 2024 at 10:56:18PM +0530, Athira Rajeev wrote: > Add support to capture and parse raw instruction in powerpc. > Currently, the perf tool infrastructure uses two ways to disassemble > and understand the instruction. One is objdump and other option is > via libcapstone. > > Currently

Re: [V4 01/16] tools/perf: Move the data structures related to register type to header file

2024-06-24 Thread Namhyung Kim
Hello, On Fri, Jun 14, 2024 at 10:56:16PM +0530, Athira Rajeev wrote: > Data type profiling uses instruction tracking by checking each > instruction and updating the register type state in some data > structures. This is useful to find the data type in cases when the > register state gets transfer

Re: [V4 00/16] Add data type profiling support for powerpc

2024-06-21 Thread Namhyung Kim
Hello, On Thu, Jun 20, 2024 at 09:01:01PM +0530, Athira Rajeev wrote: > > > > On 14 Jun 2024, at 10:56 PM, Athira Rajeev > > wrote: > > > > The patchset from Namhyung added support for data type profiling > > in perf tool. This enabled support to associate PMU samples to data > > types they r

Re: [PATCH] tools/perf: Handle perftool-testsuite_probe testcases fail when kernel debuginfo is not present

2024-06-21 Thread Namhyung Kim
On Mon, 17 Jun 2024 17:51:21 +0530, Athira Rajeev wrote: > Running "perftool-testsuite_probe" fails as below: > > ./perf test -v "perftool-testsuite_probe" > 83: perftool-testsuite_probe : FAILED > > There are three fails: > > [...] Applied to perf-tools-next, thanks! Best regard

Re: [PATCH] tools/perf: Handle perftool-testsuite_probe testcases fail when kernel debuginfo is not present

2024-06-19 Thread Namhyung Kim
Hello, Adding Veronika and Michael to CC. Thanks, Namhyung On Tue, Jun 18, 2024 at 6:44 AM James Clark wrote: > > > > On 17/06/2024 17:47, Athira Rajeev wrote: > > > > > >> On 17 Jun 2024, at 8:30 PM, James Clark wrote: > >> > >> > >> > >> On 17/06/2024 13:21, Athira Rajeev wrote: > >>> Runni

Re: [PATCH 1/3] tools/perf: Fix the nrcpus in perf bench futex to enable the run when all CPU's are not online

2024-06-14 Thread Namhyung Kim
On Fri, 07 Jun 2024 10:13:52 +0530, Athira Rajeev wrote: > Perf bench futex fails as below when attempted to run on > on a powerpc system: > > ./perf bench futex all > Running futex/hash benchmark... > Run summary [PID 626307]: 80 threads, each operating on 1024 [private] > futexes for 10 secs

Re: [PATCH V3 10/14] tools/perf: Update instruction tracking for powerpc

2024-06-05 Thread Namhyung Kim
On Sat, Jun 01, 2024 at 11:39:37AM +0530, Athira Rajeev wrote: > Add instruction tracking function "update_insn_state_powerpc" for > powerpc. Example sequence in powerpc: > > ld r10,264(r3) > mr r31,r3 > < > ld r9,312(r31) > > Consider ithe sample is pointing to: "ld r9,312(r31)".

Re: [PATCH V3 06/14] tools/perf: Update parameters for reg extract functions to use raw instruction on powerpc

2024-06-05 Thread Namhyung Kim
On Sat, Jun 01, 2024 at 11:39:33AM +0530, Athira Rajeev wrote: > Use the raw instruction code and macros to identify memory instructions, > extract register fields and also offset. The implementation addresses > the D-form, X-form, DS-form instructions. Two main functions are added. > New parse fun

Re: [PATCH V3 05/14] tools/perf: Add disasm_line__parse to parse raw instruction for powerpc

2024-06-05 Thread Namhyung Kim
Hello, On Sat, Jun 01, 2024 at 11:39:32AM +0530, Athira Rajeev wrote: > Currently, the perf tool infrastructure disasm_line__parse function to > parse disassembled line. > > Example snippet from objdump: > objdump --start-address= --stop-address= -d > --no-show-raw-insn -C > > c10224

Re: [PATCH V2 4/9] tools/perf: Add support to capture and parse raw instruction in objdump

2024-05-09 Thread Namhyung Kim
On Thu, May 9, 2024 at 10:27 AM Athira Rajeev wrote: > > > > > On 7 May 2024, at 3:05 PM, Christophe Leroy > > wrote: > > > > > > > > Le 06/05/2024 à 14:19, Athira Rajeev a écrit : > >> Add support to capture and parse raw instruction in objdump. > > > > What's the purpose of using 'objdump' for

Re: [PATCH V2 4/9] tools/perf: Add support to capture and parse raw instruction in objdump

2024-05-06 Thread Namhyung Kim
On Mon, May 6, 2024 at 5:21 AM Athira Rajeev wrote: > > Add support to capture and parse raw instruction in objdump. > Currently, the perf tool infrastructure uses "--no-show-raw-insn" option > with "objdump" while disassemble. Example from powerpc with this option > for an instruction address is:

Re: [PATCH V2 3/9] tools/perf: Fix a comment about multi_regs in extract_reg_offset function

2024-05-06 Thread Namhyung Kim
it to use > "src_multi_regs = 0" > > Signed-off-by: Athira Rajeev Acked-by: Namhyung Kim Thanks, Namhyung > --- > tools/perf/util/annotate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annot

Re: [PATCH V2 0/9] Add data type profiling support for powerpc

2024-05-06 Thread Namhyung Kim
Hello, On Mon, May 6, 2024 at 5:19 AM Athira Rajeev wrote: > > The patchset from Namhyung added support for data type profiling > in perf tool. This enabled support to associate PMU samples to data > types they refer using DWARF debug information. With the upstream > perf, currently it possible t

Re: [PATCH 0/3] Add data type profiling support for powerpc

2024-04-01 Thread Namhyung Kim
Hello, Sorry for the super late reply. On Fri, Mar 8, 2024 at 11:25 PM Athira Rajeev wrote: > > The patchset from Namhyung added support for data type profiling > in perf tool. This enabled support to associate PMU samples to data > types they refer using DWARF debug information. With the upstr

Re: [PATCH 3/3] tools/perf/arch/powerc: Add get_arch_regnum for powerpc

2024-04-01 Thread Namhyung Kim
Hello, On Tue, Mar 26, 2024 at 2:35 AM Tiezhu Yang wrote: > > Hi Athira and Namhyung, > > On 03/09/2024 03:25 PM, Athira Rajeev wrote: > > The function get_dwarf_regnum() returns a DWARF register number > > from a register name string. This calls arch specific function > > get_arch_regnum to retu

Re: [PATCH] perf/pmu-events/powerpc: Update json mapfile with Power11 PVR

2024-02-06 Thread Namhyung Kim
On Mon, 29 Jan 2024 17:38:55 +0530, Madhavan Srinivasan wrote: > Update the Power11 PVR to json mapfile to enable > json events. Power11 is PowerISA v3.1 compliant > and support Power10 events. > > Applied to perf-tools-next, thanks! Best regards, -- Namhyung Kim

[PATCH 12/14] tools/perf: Update tools's copy of powerpc syscall table

2023-11-21 Thread Namhyung Kim
: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Namhyung Kim --- tools/perf/arch/powerpc/entry/syscalls/syscall.tbl | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl b/tool

Re: [PATCH] tools/perf/arch/powerpc: Fix the CPU ID const char* value by adding 0x prefix

2023-10-17 Thread Namhyung Kim
On Mon, 9 Oct 2023 10:30:52 +0530, Athira Rajeev wrote: > Simple expression parser test fails in powerpc as below: > > 4: Simple expression parser > test child forked, pid 170385 > Using CPUID 004e2102 > division by zero > syntax error > syntax error > FAILED tests/expr

Re: [PATCH V2 0/3] Fix for shellcheck issues with latest scripts in tests/shell

2023-10-17 Thread Namhyung Kim
On Fri, 13 Oct 2023 13:00:18 +0530, Athira Rajeev wrote: > shellcheck was run on perf tool shell scripts as a pre-requisite > to include a build option for shellcheck discussed here: > https://www.spinics.net/lists/linux-perf-users/msg25553.html > > And fixes were added for the coding/formatting i

Re: [PATCH V2 0/3] Fix for shellcheck issues with latest scripts in tests/shell

2023-10-16 Thread Namhyung Kim
cord_sideband.sh test > tools/perf/tests/shell: Fix shellcheck warning SC2112 with > stat_all_metricgroups For the series, Acked-by: Namhyung Kim Thanks, Namhyung

Re: [PATCH V5 1/3] tools/perf: Add text_end to "struct dso" to save .text section size

2023-10-08 Thread Namhyung Kim
On Mon, Oct 2, 2023 at 11:47 PM Athira Rajeev wrote: > > > > > On 03-Oct-2023, at 9:58 AM, Namhyung Kim wrote: > > > > Hello, > > > > On Thu, Sep 28, 2023 at 12:52 AM Athira Rajeev > > wrote: > >> > >> Update "struct dso"

Re: [PATCH V2] tools/perf: Add perf binary dependent rule for shellcheck log in Makefile.perf

2023-10-08 Thread Namhyung Kim
Hello, Sorry for the late reply. On Thu, Oct 5, 2023 at 8:27 AM Athira Rajeev wrote: > > > > > On 29-Sep-2023, at 12:19 PM, Athira Rajeev > > wrote: > > > > Add rule in new Makefile "tests/Makefile.tests" for running > > shellcheck on shell test scripts. This automates below shellcheck > > int

Re: [PATCH 3/3] tools/perf/tests: Fix shellcheck warning in record_sideband.sh test

2023-10-04 Thread Namhyung Kim
On Thu, Sep 28, 2023 at 9:11 PM Athira Rajeev wrote: > > Running shellcheck on record_sideband.sh throws below > warning: > > In tests/shell/record_sideband.sh line 25: > if ! perf record -o ${perfdata} -BN --no-bpf-event -C $1 true 2>&1 > >/dev/null > ^--^ SC2069: T

Re: [PATCH 1/3] perf tests test_arm_coresight: Fix the shellcheck warning in latest test_arm_coresight.sh

2023-10-04 Thread Namhyung Kim
On Thu, Sep 28, 2023 at 9:11 PM Athira Rajeev wrote: > > Running shellcheck on tests/shell/test_arm_coresight.sh > throws below warnings: > > In tests/shell/test_arm_coresight.sh line 15: > cs_etm_path=$(find /sys/bus/event_source/devices/cs_etm/ -name cpu* > -print -quit) >

Re: [PATCH V5 1/3] tools/perf: Add text_end to "struct dso" to save .text section size

2023-10-02 Thread Namhyung Kim
text > section and within module end, added the new field "text_end" to > "struct dso". > > Reported-by: Disha Goel > Signed-off-by: Athira Rajeev > Reviewed-by: Adrian Hunter > Reviewed-by: Kajol Jain For the series, Acked-by: Namhyung Kim Thanks, Na

Re: [PATCH V3] perf test: Fix parse-events tests to skip parametrized events

2023-09-29 Thread Namhyung Kim
On Wed, Sep 27, 2023 at 11:17 AM Athira Rajeev wrote: > > Testcase "Parsing of all PMU events from sysfs" parse events for > all PMUs, and not just cpu. In case of powerpc, the PowerVM > environment supports events from hv_24x7 and hv_gpci PMU which > is of example format like below: > > - hv_24x7

Re: [PATCH 0/3] Fix for shellcheck issues with version "0.6"

2023-09-27 Thread Namhyung Kim
On Tue, Sep 26, 2023 at 9:29 PM Athira Rajeev wrote: > > > > > On 25-Sep-2023, at 1:34 PM, kajoljain wrote: > > > > > > > > On 9/7/23 22:45, Athira Rajeev wrote: > >> From: root > >> > >> shellcheck was run on perf tool shell scripts s a pre-requisite > >> to include a build option for shellchec

Re: [PATCH V4 2/2] tools/perf/tests: Fix object code reading to skip address that falls out of text section

2023-09-26 Thread Namhyung Kim
On Thu, Sep 14, 2023 at 10:40 PM Athira Rajeev wrote: > > The testcase "Object code reading" fails in somecases > for "fs_something" sub test as below: > > Reading object code for memory address: 0xc00807f0142c > File is: /lib/modules/6.5.0-rc3+/kernel/fs/xfs/xfs.ko > On file addre

Re: [PATCH 2/2] tools/perf: Add perf binary dependent rule for shellcheck log in Makefile.perf

2023-09-26 Thread Namhyung Kim
On Thu, Sep 14, 2023 at 10:18 AM Athira Rajeev wrote: > > Add rule in new Makefile "tests/Makefile.tests" for running > shellcheck on shell test scripts. This automates below shellcheck > into the build. > > $ for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do > shellcheck -S warni

Re: [PATCH 1/2] tools/perf: Add new CONFIG_SHELLCHECK for detecting shellcheck binary

2023-09-26 Thread Namhyung Kim
Hello, On Thu, Sep 14, 2023 at 10:18 AM Athira Rajeev wrote: > > shellcheck tool can detect coding/formatting issues on > shell scripts. In perf directory "tests/shell", there are lot > of shell test scripts and this tool can detect coding/formatting > issues on these scripts. > > Example to use

Re: [PATCH V2] perf test: Fix parse-events tests to skip parametrized events

2023-09-26 Thread Namhyung Kim
Hello, On Mon, Sep 25, 2023 at 10:37 AM Arnaldo Carvalho de Melo wrote: > > > > On Wed, Sep 13, 2023, 7:40 AM Athira Rajeev > wrote: >> >> >> >> > On 08-Sep-2023, at 7:48 PM, Athira Rajeev >> > wrote: >> > >> > >> > >> >> On 08-Sep-2023, at 11:04 AM, Sachin Sant wrote: >> >> >> >> >> >> >> >

Re: [PATCH 0/4] Introduce perf build subcommand

2023-08-25 Thread Namhyung Kim
Hello, On Thu, Aug 24, 2023 at 11:11 PM Aditya Gupta wrote: > > The Problem > === > > Currently the presence of a feature is checked with a combination of > perf version --build-options and greps, such as: > > perf version --build-options | grep " on .* HAVE_FEATURE" > > Proposed solu

Re: [PATCH v4 4/5] tools headers UAPI: Sync files changed by new fchmodat2 syscall

2023-07-11 Thread Namhyung Kim
Hello, On Tue, Jul 11, 2023 at 9:18 AM Alexey Gladkov wrote: > > From: Palmer Dabbelt > > That add support for this new syscall in tools such as 'perf trace'. > > Signed-off-by: Palmer Dabbelt > Signed-off-by: Alexey Gladkov > --- > tools/include/uapi/asm-generic/unistd.h | 5

Re: [PATCH 1/2] tools/perf/tests: perf all metrics test fails when perf_event access is restricted

2023-07-05 Thread Namhyung Kim
On Mon, Jul 3, 2023 at 10:04 PM Athira Rajeev wrote: > > > > > On 15-Jun-2023, at 1:08 PM, Athira Rajeev > > wrote: > > > > Perf all metrics test fails as below when perf_event access > > is restricted. > > > >./perf test -v "perf all metrics test" > >Metric 'Memory_RD_BW_Chip' not print

Re: [PATCH] tools/perf/tests: Fix objdump in Object code reading test to look for all sections

2023-07-05 Thread Namhyung Kim
On Mon, Jul 3, 2023 at 10:04 PM Athira Rajeev wrote: > > Object code reading test fails intermittently with below logs: > >Reading object code for memory address: 0xc00801dd34fc >File is: /lib/modules/6.3.0-rc7+/kernel/fs/xfs/xfs.ko >On file address is: 0x11359c >Objdump comman

Re: [PATCH] tools/perf/tests: Fix Basic BPF llvm compile to check for libbpf support

2023-07-05 Thread Namhyung Kim
Hello, On Mon, Jul 3, 2023 at 10:03 PM Athira Rajeev wrote: > > Basic BPF llvm compile fails in systems with libbpf > that doesn't support BTF. Log shows below information. > > libbpf: BTF is required, but is missing or corrupted. > Failed to parse test case 'Basic BPF llvm compil

Re: [PATCH] syscalls: Cleanup references to sys_lookup_dcookie()

2023-06-30 Thread Namhyung Kim
e tools/perf part since it can support old kernels. But if the syscall is only used for oprofile then probably perf doesn't need to care about it. :) For the perf part, Acked-by: Namhyung Kim Thanks, Namhyung

Re: [PATCH 00/22] tools/perf: Fix shellcheck coding/formatting issues of perf tool shell scripts

2023-06-23 Thread Namhyung Kim
Hello, On Wed, Jun 21, 2023 at 1:30 AM Athira Rajeev wrote: > > Patchset covers a set of fixes for coding/formatting issues observed while > running shellcheck tool on the perf shell scripts. > > This cleanup is a pre-requisite to include a build option for shellcheck > discussed here: https://ww

Re: [PATCH 15/17] perf tests task_analyzer: fix bad substitution ${$1}

2023-06-23 Thread Namhyung Kim
Hello Aditya, On Fri, Jun 23, 2023 at 11:19 AM Aditya Gupta wrote: > > Hello, Namhyung, > > On 23/06/23 04:55, Namhyung Kim wrote: > > Ok, I found two problems. > > > > ... > > > > The first one is related to this message. It couldn't

Re: [PATCH 15/17] perf tests task_analyzer: fix bad substitution ${$1}

2023-06-22 Thread Namhyung Kim
Ok, I found two problems. On Thu, Jun 22, 2023 at 2:33 PM Namhyung Kim wrote: > > Hello Aditya, > > On Wed, Jun 21, 2023 at 11:43 AM Aditya Gupta wrote: > > > > Hello Namhyung, > > > > On 21/06/23 20:53, Namhyung Kim wrote: > > > Hello Aditya, >

Re: [PATCH 15/17] perf tests task_analyzer: fix bad substitution ${$1}

2023-06-22 Thread Namhyung Kim
Hello Aditya, On Wed, Jun 21, 2023 at 11:43 AM Aditya Gupta wrote: > > Hello Namhyung, > > On 21/06/23 20:53, Namhyung Kim wrote: > > Hello Aditya, > > > > On Wed, Jun 21, 2023 at 3:05 AM Aditya Gupta wrote: > >> Hello Namhyung, > >

Re: [PATCH 15/17] perf tests task_analyzer: fix bad substitution ${$1}

2023-06-21 Thread Namhyung Kim
Hello Aditya, On Wed, Jun 21, 2023 at 3:05 AM Aditya Gupta wrote: > > Hello Namhyung, > > On 21/06/23 06:18, Namhyung Kim wrote: > > Hello, > > > > On Tue, Jun 13, 2023 at 1:06 PM Arnaldo Carvalho de Melo > > wrote: > >> Em Tue, Jun 13, 202

Re: [PATCH 15/17] perf tests task_analyzer: fix bad substitution ${$1}

2023-06-20 Thread Namhyung Kim
Hello, On Tue, Jun 13, 2023 at 1:06 PM Arnaldo Carvalho de Melo wrote: > > Em Tue, Jun 13, 2023 at 10:11:43PM +0530, Athira Rajeev escreveu: > > From: Aditya Gupta > > > > ${$1} gives bad substitution error on sh, bash, and zsh. This seems like > > a typo, and this patch modifies it to $1, since

[PATCH 4/8] perf/core: Add perf_sample_save_brstack() helper

2023-01-17 Thread Namhyung Kim
: Jiri Olsa Tested-by: Jiri Olsa Signed-off-by: Namhyung Kim --- arch/powerpc/perf/core-book3s.c | 3 +- arch/x86/events/amd/core.c | 6 +-- arch/x86/events/intel/core.c| 6 +-- arch/x86/events/intel/ds.c | 9 ++--- include/linux/perf_event.h | 66

[PATCH 4/8] perf/core: Add perf_sample_save_brstack() helper

2023-01-12 Thread Namhyung Kim
-off-by: Namhyung Kim --- arch/powerpc/perf/core-book3s.c | 3 +- arch/x86/events/amd/core.c | 6 +-- arch/x86/events/intel/core.c| 6 +-- arch/x86/events/intel/ds.c | 9 ++--- include/linux/perf_event.h | 66 - kernel/events/core.c

[PATCH for v5.10] perf symbol: Remove arch__symbols__fixup_end()

2022-05-02 Thread Namhyung Kim
Now the generic code can handle kallsyms fixup properly so no need to keep the arch-functions anymore. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Heiko Carstens Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Mathieu Poirier

[PATCH for v5.15] perf symbol: Remove arch__symbols__fixup_end()

2022-05-02 Thread Namhyung Kim
Now the generic code can handle kallsyms fixup properly so no need to keep the arch-functions anymore. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Heiko Carstens Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Mathieu Poirier

Re: [PATCH 1/3] perf symbol: Pass is_kallsyms to symbols__fixup_end()

2022-04-25 Thread Namhyung Kim
Hi Ian, On Sat, Apr 16, 2022 at 7:59 AM Ian Rogers wrote: > > On Fri, Apr 15, 2022 at 8:40 PM Namhyung Kim wrote: > > > > The symbol fixup is necessary for symbols in kallsyms since they don't > > have size info. So we use the next symbol's address to calc

[PATCH 3/3] perf symbol: Remove arch__symbols__fixup_end()

2022-04-15 Thread Namhyung Kim
Now the generic code can handle kallsyms fixup properly so no need to keep the arch-functions anymore. Signed-off-by: Namhyung Kim --- tools/perf/arch/arm64/util/machine.c | 21 - tools/perf/arch/powerpc/util/Build | 1 - tools/perf/arch/powerpc/util/machine.c | 25

[PATCH 2/3] perf symbol: Update symbols__fixup_end()

2022-04-15 Thread Namhyung Kim
(4096) and rounds it up like the last symbol. Signed-off-by: Namhyung Kim --- tools/perf/util/symbol.c | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 1b85cc1422a9..623094e866fd 100644

  1   2   >