[PATCH V3 2/3] skiboot: Update IMC code to use dt_find_by_name_substr for checking dt nodes

2023-02-16 Thread Athira Rajeev
y using dt_find_by_name_substr. Also, update the char array to use correct node names. Signed-off-by: Athira Rajeev --- Changelog: v2 -> v3: - After review comments from Mahesh, fixed the code to consider string upto "@" for both input node name as well as child node name. V2 versio

[PATCH V3 1/3] core/device: Add function to return child node using name at substring "@"

2023-02-16 Thread Athira Rajeev
rmat and if the value of "addr" is not known, that node can't be matched with node name or addr. Hence matching with substring as node name will return the expected result. Patch adds dt_find_by_name_substr() function and testcase for the same in core/test/run-device.c Signed-off-by: Athira Rajeev

[PATCH] powerpc/perf: Add json metric events to present CPI stall cycles in powerpc

2023-02-15 Thread Athira Rajeev
up for more accuracy. Signed-off-by: Athira Rajeev --- tools/perf/pmu-events/arch/powerpc/power10/metrics.json | 8 tools/perf/pmu-events/arch/powerpc/power10/others.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/pmu-events/arch/powerpc/power10/metric

Re: [PATCH] tests/bpf: Fix the bpf test to check for libtraceevent support

2023-02-06 Thread Athira Rajeev
> On 06-Feb-2023, at 8:10 PM, Arnaldo Carvalho de Melo wrote: > > Em Mon, Feb 06, 2023 at 09:27:13AM +0530, Athira Rajeev escreveu: >>> On 02-Feb-2023, at 6:27 AM, Arnaldo Carvalho de Melo >>> wrote: >>> >>> Em Tue, Jan 31, 2023 at 07:20:01PM +0

Re: [PATCH 2/2] perf test bpf: Skip test if kernel-debuginfo is not present

2023-02-06 Thread Athira Rajeev
> On 05-Jan-2023, at 6:24 PM, Arnaldo Carvalho de Melo wrote: > > Em Thu, Jan 05, 2023 at 05:47:42PM +0530, Athira Rajeev escreveu: >> Perf BPF filter test fails in environment where "kernel-debuginfo" >> is not installed. > > I'll apply this to perf/co

Re: [PATCH] tools/perf/tests: Add system wide check for perf bench workload in all metric test

2023-02-05 Thread Athira Rajeev
t; may need bigger workload to get the data. And the added perf bench > workload in 'perf all metric test case' will not run for hv-24x7 without > -a option. > > Fix this issue by adding system wide check for perf bench workload. > > Result with the patch changes in powerpc

Re: [PATCH] tests/bpf: Fix the bpf test to check for libtraceevent support

2023-02-05 Thread Athira Rajeev
> On 02-Feb-2023, at 6:27 AM, Arnaldo Carvalho de Melo wrote: > > Em Tue, Jan 31, 2023 at 07:20:01PM +0530, Athira Rajeev escreveu: >> "bpf" tests fails in environment with missing libtraceevent >> support as below: >>

Re: [PATCH V2 1/3] core/device: Add function to return child node using name at substring "@"

2023-02-02 Thread Athira Rajeev
> On 30-Jan-2023, at 3:14 PM, Mahesh J Salgaonkar wrote: > > On 2023-01-18 11:14:50 Wed, Athira Rajeev wrote: >> Add a function dt_find_by_name_substr() that returns the child node if >> it matches till first occurence at "@" of a given name, otherwise NUL

Re: [PATCH] tools/perf: Fix usage of perf probe when libtraceevent is missing

2023-02-01 Thread Athira Rajeev
> On 02-Feb-2023, at 6:20 AM, Arnaldo Carvalho de Melo wrote: > > Em Tue, Jan 31, 2023 at 07:17:48PM +0530, Athira Rajeev escreveu: >> While parsing the tracepoint events in parse_events_add_tracepoint() >> function, code checks for HAVE_LIBTRACEEVENT support. Th

Re: [PATCH 1/2] tests/shell: Add check for perf data file in record+probe_libc_inet_pton test

2023-02-01 Thread Athira Rajeev
> On 02-Feb-2023, at 6:10 AM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Feb 01, 2023 at 11:34:20PM +0530, Athira Rajeev escreveu: >> "probe libc's inet_pton & backtrace it with ping" test >> installs a uprobe and uses perf record/script to check >> t

[PATCH 2/2] tests/shell: Fix perf test shell to check for libtracevent support

2023-02-01 Thread Athira Rajeev
id 305036 libtraceevent is necessary for tracepoint support test child finished with -2 end probe libc's inet_pton & backtrace it with ping: Skip Signed-off-by: Athira Rajeev --- tools/perf/tests/shell/lib/probe_vfs_getname.sh | 8 tools/perf/tests/shell/record+prob

[PATCH 1/2] tests/shell: Add check for perf data file in record+probe_libc_inet_pton test

2023-02-01 Thread Athira Rajeev
: --- start --- test child forked, pid 304358 FAIL: perf record failed to create "/tmp/perf.data.Uoi" test child finished with -1 ---- end ---- probe libc's inet_pton & backtrace it with ping: FAILED! Signed-off-by: Athira Rajeev --- tools/perf/tests/shell/record+probe_lib

[PATCH] tests/bpf: Fix the bpf test to check for libtraceevent support

2023-01-31 Thread Athira Rajeev
d in or missing libtraceevent support) Signed-off-by: Athira Rajeev --- tools/perf/tests/bpf.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 17c023823713..4af39528f611 100644 --- a/tools/perf

[PATCH] tools/perf: Fix usage of perf probe when libtraceevent is missing

2023-01-31 Thread Athira Rajeev
cd /sys/kernel/tracing/ echo 1 > events/pmu/myprobe/enable echo 1 > tracing_on cat trace_pipe Before removing the probe, echo 0 > events/pmu/myprobe/enable Signed-off-by: Athira Rajeev --- tools/perf/builtin-probe.c | 9 + 1 file changed, 9 inse

Re: [Skiboot] [PATCH V2 1/3] core/device: Add function to return child node using name at substring "@"

2023-01-29 Thread Athira Rajeev
> On 18-Jan-2023, at 11:14 AM, Athira Rajeev > wrote: > > Add a function dt_find_by_name_substr() that returns the child node if > it matches till first occurence at "@" of a given name, otherwise NULL. > This is helpful for cases with node name like: "name@

Re: [PATCH] tools/perf: Disable perf probe when libtraceevent is missing

2023-01-25 Thread Athira Rajeev
> On 20-Jan-2023, at 7:58 PM, Arnaldo Carvalho de Melo wrote: > > Em Fri, Jan 20, 2023 at 05:32:56PM +0530, Athira Rajeev escreveu: >> While parsing the tracepoint events in parse_events_add_tracepoint() >> function, code checks for HAVE_LIBTRACEEVENT support. Th

[PATCH] tools/perf: Disable perf probe when libtraceevent is missing

2023-01-20 Thread Athira Rajeev
etname' \___ unsupported tracepoint libtraceevent is necessary for tracepoint support Run 'perf list' for a list of valid events Fix this by wrapping "builtin-probe" compilation and "perf probe" usage under "CONFIG_LIBTRACEEVENT"

[PATCH V3] tools/perf/tests: Fix string substitutions in build id test

2023-01-19 Thread Athira Rajeev
o write data ] [ perf record: Captured and wrote 0.010 MB /tmp/perf.data.bFF ] <<>> Fix this by redirecting output instead of using “&” which starts the command in background. Signed-off-by: Athira Rajeev Acked-by: Ian Rogers --- Changelog: >From v2 -> v3 - Addressed review

Re: [PATCH V2] tools/perf/tests: Fix string substitutions in build id test

2023-01-19 Thread Athira Rajeev
> On 19-Jan-2023, at 5:32 PM, David Laight wrote: > > From: Athira Rajeev >> Sent: 19 January 2023 11:31 > ... >> diff --git a/tools/perf/tests/shell/buildid.sh >> b/tools/perf/tests/shell/buildid.sh >> index aaf851108ca3..43e43e131be7 100755 >&g

Re: [PATCH 1/2] tools/perf: Fix the file mode with copyfile while adding file to build-id cache

2023-01-19 Thread Athira Rajeev
> On 18-Jan-2023, at 7:20 PM, Arnaldo Carvalho de Melo wrote: > > Em Mon, Jan 16, 2023 at 10:31:30AM +0530, Athira Rajeev escreveu: >> The test "build id cache operations" fails on powerpc >> As below: >> >> Adding 5a0fd882b53084224ba47b

[PATCH V2] tools/perf/tests: Fix string substitutions in build id test

2023-01-19 Thread Athira Rajeev
: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.010 MB /tmp/perf.data.bFF ] <<>> Fix this by redirecting output instead of using “&” which starts the command in background. Signed-off-by: Athira Rajeev Acked-by: Ian Rogers --- Changelog: - Added Acked-by from Ian. -

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

2023-01-18 Thread Athira Rajeev
> Cc: linuxppc-dev@lists.ozlabs.org > Cc: x...@kernel.org > Suggested-by: Peter Zijlstra > Acked-by: Jiri Olsa > Tested-by: Jiri Olsa > Signed-off-by: Namhyung Kim Hi Namhyung, Changes looks good to me. Acked-by: Athira Rajeev Thanks Athira > --- > arch/powerpc/perf/core-boo

[PATCH V2 3/3] skiboot: Update IMC PMU node names for power10

2023-01-17 Thread Athira Rajeev
Patch implements all these change to handle nest_pmus_p10. Signed-off-by: Athira Rajeev --- Changelog: v1 -> v2: - Addressed review comment from Dan to update the utility funtion to search and compare upto "@". Renamed it as dt_find_by_name_substr. hw/imc.c | 195 +

[PATCH V2 2/3] skiboot: Update IMC code to use dt_find_by_name_substr for checking dt nodes

2023-01-17 Thread Athira Rajeev
y using dt_find_by_name_substr. Also, update the char array to use correct node names with suffix "@" Signed-off-by: Athira Rajeev --- Changelog: v1 -> v2: - Addressed review comment from Dan to update the utility funtion to search and compare upto "@". Renamed it as dt

[PATCH V2 1/3] core/device: Add function to return child node using name at substring "@"

2023-01-17 Thread Athira Rajeev
rmat and if the value of "addr" is not known, that node can't be matched with node name or addr. Hence matching with substring as node name will return the expected result. Patch adds dt_find_by_name_substr() function and testcase for the same in core/test/run-device.c Signed-off-by: Athira Raje

Re: [PATCH 1/2] tools/perf/tests: Fix string substitutions in build id test

2023-01-17 Thread Athira Rajeev
> On 17-Jan-2023, at 3:30 AM, Ian Rogers wrote: > > On Mon, Jan 16, 2023 at 4:00 AM Athira Rajeev > wrote: >> >> >> >>> On 16-Jan-2023, at 11:47 AM, Ian Rogers wrote: >>> >>> On Sun, Jan 15, 2023 at 9:03 PM Athira Rajeev >&g

Re: [PATCH 1/2] tools/perf/tests: Fix string substitutions in build id test

2023-01-16 Thread Athira Rajeev
> On 16-Jan-2023, at 11:47 AM, Ian Rogers wrote: > > On Sun, Jan 15, 2023 at 9:03 PM Athira Rajeev > wrote: >> >> >> >>> On 28-Sep-2022, at 10:24 AM, Athira Rajeev >>> wrote: >>> >>> Hi All, >>> >>

Re: [PATCH 1/2] tools/perf/tests: Fix string substitutions in build id test

2023-01-15 Thread Athira Rajeev
> On 28-Sep-2022, at 10:24 AM, Athira Rajeev > wrote: > > Hi All, > > Looking for what direction we can take here. > Do we want to change all tests in tools/perf/tests/shell except > test_intel_pt.sh to use "bash" or go with > the approach in t

[PATCH 1/2] tools/perf: Fix the file mode with copyfile while adding file to build-id cache

2023-01-15 Thread Athira Rajeev
ce the testcase "tests/shell/buildid.sh" always looks for executable file, test fails in powerpc environment when test is run from /root. The patch adds a change in build_id_cache__add to use copyfile_mode which also passes the file’s original mode as argument. This way the destination file mod

[PATCH 2/2] tools/perf/tests: Fix build id test check for PE file

2023-01-15 Thread Athira Rajeev
/5a0fd882b53084224ba47b624c55a469/elf | xargs stat --printf "%n %A \n" /tmp/perf.debug.w0V/.build-id/5a/../../root//linux/tools/perf/tests/pe-file.exe/5a0fd882b53084224ba47b624c55a469/elf -rw-r--r-- Fix the test to match with the permission of original file in case of FE file. ie i

Re: [Skiboot] [PATCH 1/3] core/device: Add function to return child node using name and length

2023-01-09 Thread Athira Rajeev
> On 09-Jan-2023, at 8:59 PM, Dan Horák wrote: > > Hi Athira, > > On Thu, 5 Jan 2023 12:41:33 +0530 > Athira Rajeev wrote: > >> >> >>> On 05-Jan-2023, at 12:35 PM, Madhavan Srinivasan >>> wrote: >>> >>> >>&

Re: [PATCH 2/2] perf test bpf: Skip test if kernel-debuginfo is not present

2023-01-09 Thread Athira Rajeev
> On 05-Jan-2023, at 6:24 PM, Arnaldo Carvalho de Melo wrote: > > Em Thu, Jan 05, 2023 at 05:47:42PM +0530, Athira Rajeev escreveu: >> Perf BPF filter test fails in environment where "kernel-debuginfo" >> is not installed. > > I'll apply this to perf/co

Re: [PATCH] tools/perf: Fix bpf-script-test-prologue test compile issue with clang

2023-01-09 Thread Athira Rajeev
> On 05-Jan-2023, at 6:23 PM, Arnaldo Carvalho de Melo wrote: > > Em Thu, Jan 05, 2023 at 05:34:36PM +0530, Athira Rajeev escreveu: >> While running perf test for bpf, observed that "BPF prologue >> generation" test case fails to compile with clang. Logs belo

[PATCH 2/2] perf test bpf: Skip test if kernel-debuginfo is not present

2023-01-05 Thread Athira Rajeev
: 42.1: Basic BPF filtering : Ok 42.2: BPF pinning : Ok 42.3: BPF prologue generation : Skip (clang/debuginfo isn't installed or environment missing BPF support) Fixes: ba1fae431e74 ("perf test: Add 'perf test BPF'") Signed-off-by: Athira Rajeev --- Note:

[PATCH 1/2] tools/perf: Update the exit error codes in function try_to_find_probe_trace_event

2023-01-05 Thread Athira Rajeev
re other exit points in this code path which returns ENOENT. This makes it difficult to understand the exact reason for exit. Patches changes the exit code from ENOENT to: - ENODATA when it fails to find debuginfo - ENODEV when it fails to find probe point Signed-off-by: Athira Rajeev --- tools/perf/ut

[PATCH] tools/perf: Fix bpf-script-test-prologue test compile issue with clang

2023-01-05 Thread Athira Rajeev
tion of -I/usr/include/ in the first line which is causing the error. Fix this by adding typedef for "fmode_t" in the testcase to solve the compile issue. Fixes: 14e4b9f4289a ("perf trace: Raw augmented syscalls fix libbpf 1.0+ compatibility") Signed-off-by: Athira Rajeev --- t

Re: [Skiboot] [PATCH 1/3] core/device: Add function to return child node using name and length

2023-01-04 Thread Athira Rajeev
> On 05-Jan-2023, at 12:35 PM, Madhavan Srinivasan wrote: > > > On Mon, 2 Jan 2023 08:45:22 +0530 > Athira Rajeev wrote: > >> Add a function dt_find_by_name_len() that returns the child node if >> it matches the first "n" characters of a given

Re: [PATCH] perf test bpf: Skip test if kernel-debuginfo is not present

2023-01-02 Thread Athira Rajeev
> On 14-Dec-2022, at 9:21 PM, Arnaldo Carvalho de Melo <mailto:a...@kernel.org>> wrote: > > Em Tue, Dec 13, 2022 at 03:21:03PM +0530, Athira Rajeev escreveu: >>> On 13-Dec-2022, at 12:27 AM, Arnaldo Carvalho de Melo >> <mailto:a...@kernel.org>> wro

[PATCH 1/3] core/device: Add function to return child node using name and length

2023-01-01 Thread Athira Rajeev
e value of "addr" is not known, that node can't be matched with node name or addr. Hence matching with substring as node name will return the expected result. Patch adds dt_find_by_name_len() function and testcase for the same in core/test/run-device.c Signed-off-by: Athira

[PATCH 3/3] skiboot: Update IMC PMU node names for power10

2023-01-01 Thread Athira Rajeev
e, 101b means X-Link is configured. Patch implements all these change to handle nest_pmus_p10. Signed-off-by: Athira Rajeev --- hw/imc.c | 195 --- 1 file changed, 185 insertions(+), 10 deletions(-) diff --git a/hw/imc.c b/hw/imc.c index 779e9

[PATCH 2/3] skiboot: Update IMC code to use dt_find_by_name_len for checking dt nodes

2023-01-01 Thread Athira Rajeev
sing dt_find_by_name_len. Also, instead of using char array, use a new "struct nest_pmus_struct" which saves the name as well as length parameter for dt_find_by_name_len. Signed-off-by: Athira Rajeev --- hw/imc.c | 112 +-- 1 file

Re: [PATCH] perf test bpf: Skip test if kernel-debuginfo is not present

2022-12-13 Thread Athira Rajeev
> On 13-Dec-2022, at 12:27 AM, Arnaldo Carvalho de Melo wrote: > > Em Thu, Nov 03, 2022 at 12:27:01PM +0530, Athira Rajeev escreveu: >>> On 28-Oct-2022, at 9:12 PM, Kajol Jain wrote: >>> >>> Perf BPF filter test fails in environment where &qu

Re: [PATCH] perf test: Update event group check for support of uncore event

2022-12-08 Thread Athira Rajeev
> On 08-Dec-2022, at 9:48 AM, Ravi Bangoria wrote: > > On 07-Dec-22 10:28 PM, Athira Rajeev wrote: >> Event group test checks group creation for combinations of >> hw, sw and uncore PMU events. Some of the uncore pmus may >> require additional permission to access t

[PATCH] perf test: Update event group check for support of uncore event

2022-12-07 Thread Athira Rajeev
will fail. Hence add a sanity check to see if event_open succeeds before proceeding with the test. Fixes: b20d9215a35f ("perf test: Add event group test for events in multiple PMUs") Signed-off-by: Athira Rajeev --- Note: The patch is based on tmp.perf/core branch of git://git.kernel.o

[V3] tools/perf: Fix printing field separator in CSV metrics output

2022-12-04 Thread Athira Rajeev
# ./perf stat -x, --per-socket -a -C 1 ls S0,1,79.08,msec,cpu-clock,79085956,100.00,1.000,CPUs utilized S0,1,7,,context-switches,79084176,100.00,88.514,/sec -- > S0,1,,0.81,stalled cycles per insn Fixes: 92a61f6412d3 ("perf stat: Implement CSV metrics output&q

Re: [PATCH V2] tools/perf: Fix printing field separator in CSV metrics output

2022-11-21 Thread Athira Rajeev
> On 14-Nov-2022, at 2:25 PM, Athira Rajeev wrote: > > In perf stat with CSV output option, number of fields > in metrics output is not matching with number of fields > in other event output lines. > > Sample output below after applying patch to fix > printing os->

Re: [PATCH 2/2] tools/perf: Fix printing field separator in CSV metrics output

2022-11-14 Thread Athira Rajeev
> On 09-Nov-2022, at 3:53 PM, Athira Rajeev wrote: > > > >> On 09-Nov-2022, at 2:27 AM, Arnaldo Carvalho de Melo wrote: >> >> Em Wed, Nov 02, 2022 at 02:07:06PM +0530, Athira Rajeev escreveu: >>> >>> >>>> On 18-Oct-2022, at

[PATCH V2] tools/perf: Fix printing field separator in CSV metrics output

2022-11-14 Thread Athira Rajeev
witches,1916762,100.00,28.176,K/sec --- S0,1,528693,,instructions,1908854,100.00,0.36,insn per cycle S0,1,,1.81,stalled cycles per insn Fixes: 92a61f6412d3 ("perf stat: Implement CSV metrics output") Reported-by: Disha Goel Reviewed-By: Kajol Jain Test

Re: [PATCH 2/2] tools/perf: Fix printing field separator in CSV metrics output

2022-11-09 Thread Athira Rajeev
> On 09-Nov-2022, at 2:27 AM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Nov 02, 2022 at 02:07:06PM +0530, Athira Rajeev escreveu: >> >> >>> On 18-Oct-2022, at 2:26 PM, Athira Rajeev >>> wrote: >>> >>> In perf stat with

Re: [PATCH 1/2] tools/perf: Fix printing os->prefix in CSV metrics output

2022-11-04 Thread Athira Rajeev
> On 03-Nov-2022, at 9:45 PM, Ian Rogers wrote: > > On Wed, Nov 2, 2022 at 1:36 AM Athira Rajeev > wrote: >> >> >> >>> On 18-Oct-2022, at 2:26 PM, Athira Rajeev >>> wrote: >>> >>> Perf stat with CSV output option prin

Re: [PATCH] perf test bpf: Skip test if kernel-debuginfo is not present

2022-11-03 Thread Athira Rajeev
> On 28-Oct-2022, at 9:12 PM, Kajol Jain wrote: > > Perf BPF filter test fails in environment where "kernel-debuginfo" > is not installed. > > Test failure logs: > <<>> > 42: BPF filter: > 42.1: Basic BPF filtering : Ok > 42.2: BPF pinning

Re: [PATCH v2] powerpc/hv-gpci: Fix hv_gpci event list

2022-11-03 Thread Athira Rajeev
ying plaform. > > Fixes: 97bf2640184f ("powerpc/perf/hv-gpci: add the remaining gpci requests") > Signed-off-by: Kajol Jain > Reviewed-by: Madhavan Srinivasan Reviewed-by: Athira Rajeev Thanks Athira > --- > Changelog: > > v1 -> v2 > - As suggested by

Re: [PATCH 2/2] tools/perf: Fix printing field separator in CSV metrics output

2022-11-02 Thread Athira Rajeev
> On 18-Oct-2022, at 2:26 PM, Athira Rajeev wrote: > > In perf stat with CSV output option, number of fields > in metrics output is not matching with number of fields > in other event output lines. > > Sample output below after applying patch to fix > printing os->

Re: [PATCH 1/2] tools/perf: Fix printing os->prefix in CSV metrics output

2022-11-02 Thread Athira Rajeev
> On 18-Oct-2022, at 2:26 PM, Athira Rajeev wrote: > > Perf stat with CSV output option prints an extra empty > string as first field in metrics output line. > Sample output below: > > # ./perf stat -x, --per-socket -a -C 1 ls > S0,1,1.78,msec,cpu-clock,1

Re: [PATCH] [perf/core: Update sample_flags for raw_data in perf_output_sample

2022-11-02 Thread Athira Rajeev
> On 20-Oct-2022, at 8:10 PM, Peter Zijlstra wrote: > > On Thu, Oct 20, 2022 at 12:36:56PM +0530, Athira Rajeev wrote: >> commit 838d9bb62d13 ("perf: Use sample_flags for raw_data") >> added check for PERF_SAMPLE_RAW in sample_flags in >> perf_prepare_s

[PATCH] [perf/core: Update sample_flags for raw_data in perf_output_sample

2022-10-20 Thread Athira Rajeev
ll. Fixes: 838d9bb62d13 ("perf: Use sample_flags for raw_data") Signed-off-by: Athira Rajeev --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 4ec3717003d5..daf387c75d33 100644 --- a/kernel/events

[PATCH] [perf/core: Update sample_flags for raw_data in perf_output_sample

2022-10-20 Thread Athira Rajeev
ll. Fixes: 838d9bb62d13 ("perf: Use sample_flags for raw_data") Signed-off-by: Athira Rajeev --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 4ec3717003d5..daf387c75d33 100644 --- a/kernel/events

[PATCH 2/2] tools/perf: Fix printing field separator in CSV metrics output

2022-10-18 Thread Athira Rajeev
witches,1916762,100.00,28.176,K/sec --- S0,1,528693,,instructions,1908854,100.00,0.36,insn per cycle S0,1,,1.81,stalled cycles per insn Fixes: 92a61f6412d3 ("perf stat: Implement CSV metrics output") Reported-by: Disha Goel Signed-off-by: Athira Rajeev

[PATCH 1/2] tools/perf: Fix printing os->prefix in CSV metrics output

2022-10-18 Thread Athira Rajeev
100.00,0.125,GHz S0,1,82481,,stalled-cycles-frontend,2032420,100.00,32.40,frontend cycles idle S0,1,113170,,stalled-cycles-backend,2031722,100.00,44.45,backend cycles idle S0,1,88766,,instructions,2030942,100.00,0.35,insn per cycle S0,1,,,1.27,stalled cycles per insn Fixes:

Re: [PATCH] powerpc/hv-gpci: Fix hv_gpci event list

2022-10-18 Thread Athira Rajeev
new attribute > group called "hv_gpci_event_attrs_v6" and a "EVENT_ENABLE" > macro to enable these events for platform firmware > that supports counter_info_version 0x6 or below. > > Fixes: 97bf2640184f4 ("powerpc/perf/hv-gpci: add the remaining gpci > requ

Re: [PATCH v2 0/2] Remove unused macros from asm-offset

2022-10-16 Thread Athira Rajeev
et macro definitions were missed to remove. This patchset > fixes by removing the unused macro definitions. > For the patchset, Reviewed-by: Athira Rajeev Thanks Athira > Patch1 removes a set of unused kvm vcpu and hstate macros from the > asm-offset.c > > Patch2 removes unused ho

[PATCH 1/2] tools/perf/tests/shell: Update stat+csv_output.sh to include sanity check for topology

2022-10-06 Thread Athira Rajeev
stat CSV output.") Reported-by: Disha Goel Signed-off-by: Athira Rajeev Suggested-by: James Clark Suggested-by: Ian Rogers --- tools/perf/tests/shell/stat+csv_output.sh | 43 --- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/tools/perf/tests/shell/sta

[PATCH 2/2] tools/perf/tests/shell: Update stat+json_output.sh to include sanity check for topology

2022-10-06 Thread Athira Rajeev
y files for some, only 6 fields are printed. Hence a testcase failure reported due to mismatch in number of fields in the output. Patch here adds a sanity check in the testcase for topology. Check will help to skip the test if -1 value found. Fixes: 0c343af2a2f8 ("perf test: JSON format ch

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-10-06 Thread Athira Rajeev
> On 06-Oct-2022, at 7:33 PM, Arnaldo Carvalho de Melo wrote: > > Em Thu, Oct 06, 2022 at 06:16:14PM +0530, Athira Rajeev escreveu: >> >> >>> On 05-Oct-2022, at 6:05 PM, Arnaldo Carvalho de Melo >>> wrote: >>> >>> Em Wed, O

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-10-06 Thread Athira Rajeev
> On 05-Oct-2022, at 6:05 PM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Oct 05, 2022 at 09:28:52AM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Wed, Oct 05, 2022 at 10:23:39AM +0530, Athira Rajeev escreveu: >>> diff --git a/tools/perf/util/stat-display.c b/tools/

[PATCH] tools/perf: Fix cpu check to use id.cpu.cpu in aggr_printout

2022-10-06 Thread Athira Rajeev
old code was using "id.cpu.cpu > -1" while the new code is using "id.core > -1". But since the value printed is id.cpu.cpu, fix this check to use cpu and not core. Suggested-by: James Clark Suggested-by: Ian Rogers Signed-off-by: Athira Rajeev Tested-by: Ian Rogers -

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-10-04 Thread Athira Rajeev
> On 04-Oct-2022, at 11:44 PM, Arnaldo Carvalho de Melo wrote: > > Em Tue, Oct 04, 2022 at 03:14:27PM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Tue, Oct 04, 2022 at 07:49:21AM -0700, Ian Rogers escreveu: >>> On Tue, Oct 4, 2022, 12:06 AM Athira Rajeev

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-10-04 Thread Athira Rajeev
> On 04-Oct-2022, at 12:21 AM, Ian Rogers wrote: > > On Mon, Oct 3, 2022 at 7:03 AM atrajeev wrote: >> >> On 2022-10-02 05:17, Ian Rogers wrote: >>> On Thu, Sep 29, 2022 at 5:56 AM James Clark >>> wrote: >>>> >&g

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-09-29 Thread Athira Rajeev
> On 28-Sep-2022, at 9:05 PM, James Clark wrote: > > > Hi James, Thanks for looking at the patch and sharing review comments. > On 13/09/2022 12:57, Athira Rajeev wrote: >> perf stat includes option to specify aggr_mode to display >> per-socket, per-core

Re: [PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-09-28 Thread Athira Rajeev
> On 16-Sep-2022, at 5:01 PM, Disha Goel wrote: > > This Message Is From an External Sender > This message came from outside your organization. > > > On 9/13/22 5:27 PM, Athira Rajeev wrote: >> perf stat includes option to specify aggr_mode to display >> p

Re: [PATCH V2 2/3] tools/perf/tests: Fix branch stack sampling test to include sanity check for branch filter

2022-09-28 Thread Athira Rajeev
> On 21-Sep-2022, at 8:22 PM, Athira Rajeev wrote: > > commit b55878c90ab9 ("perf test: Add test for branch stack sampling") > added test for branch stack sampling. There is a sanity check in the > beginning to skip the test if the hardware doesn't suppor

Re: [PATCH 1/2] tools/perf/tests: Fix string substitutions in build id test

2022-09-27 Thread Athira Rajeev
> > On 22/09/22 22:15, Arnaldo Carvalho de Melo wrote: >> Em Wed, Sep 21, 2022 at 10:38:38PM +0530, Athira Rajeev escreveu: >>> The perf test named “build id cache operations” skips with below >>> error on some distros: >> >> I wonder if we shouldn't i

[PATCH] tools/perf/tests: Update is_ignored_symbol function in vmlinux-kallsyms test

2022-09-27 Thread Athira Rajeev
w commits and will handle the symbols with “.L” commit d4c858643263 ("kallsyms: ignore all local labels prefixed by '.L'") commit 6ccf9cb557bd ("KVM: arm64: Symbolize the nVHE HYP addresses") Update the testcase function to include the new changes. Reported-by: Disha Goel S

[PATCH 2/2] tools/perf/tests: Fix build id test check for PE file

2022-09-21 Thread Athira Rajeev
e of FE file. ie if the "tests/pe-file.exe" file is not having exec permission, just check for existence of the buildid file using [ ! -e ] Signed-off-by: Athira Rajeev --- tools/perf/tests/shell/buildid.sh | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --

[PATCH 1/2] tools/perf/tests: Fix string substitutions in build id test

2022-09-21 Thread Athira Rajeev
: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.010 MB /tmp/perf.data.bFF ] <<>> Fix this by redirecting output instead of using “&” which starts the command in background. Signed-off-by: Athira Rajeev --- tools/perf/tests/shell/buildid.sh | 16 +--- 1 fi

[PATCH V2 2/3] tools/perf/tests: Fix branch stack sampling test to include sanity check for branch filter

2022-09-21 Thread Athira Rajeev
e branch filters are not supported and hence this test fails in powerpc. Fix the sanity check to look at the support for branch filters used in this test before proceeding with the test. Fixes: b55878c90ab9 ("perf test: Add test for branch stack sampling") Reported-by: Disha Goel Signed-off-

[PATCH V2 3/3] tools/testing/selftests/powerpc: Update the bhrb filter sampling test to test for multiple branch filters

2022-09-21 Thread Athira Rajeev
t sametime. Since powerpc doesn't support multiple filters at sametime, expect failure during perf_event_open. Reported-by: Disha Goel Signed-off-by: Athira Rajeev Reviewed-by: Kajol Jain --- Changelog: Fixed compile error for undefined branch sample type by using PERF_SAMPLE_BRANCH_ANY_CA

[PATCH V2 1/3] powerpc/perf: Fix branch_filter support for multiple filters in powerpc

2022-09-21 Thread Athira Rajeev
Try 'perf stat' Reported-by: Disha Goel Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan Tested-by: Disha Goel Reviewed-by: Kajol Jain --- Changelog: Addressed review comment from Michael Ellerman to do irq restore before returning EOPNOTSUPP arch/powerpc/perf/core-book3s.c |

[PATCH V2] tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo

2022-09-16 Thread Athira Rajeev
<>> The /lib/modules//build/vmlinux file has no debug information. Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo package. Error: Failed to add events. <<>> Update the skip_if_no_debuginfo function to include the above error, to skip the test in these scen

[PATCH] tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo

2022-09-13 Thread Athira Rajeev
<>> The /lib/modules//build/vmlinux file has no debug information. Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo package. Error: Failed to add events. <<>> Update the skip_if_no_debuginfo function to include the above error, to skip the test in these scen

[PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-09-13 Thread Athira Rajeev
70,478 instructions CPU-1 65,201 instructions CPU-1 63,704 instructions <<>> This is caught while running "perf test" for "stat+json_output.sh" and "stat+csv_output.sh". Reported-by: Disha Goel Signed-o

[PATCH 3/3] tools/testing/selftests/powerpc: Update the bhrb filter sampling test to test for multiple branch filters

2022-09-13 Thread Athira Rajeev
t sametime. Since powerpc doesn't support multiple filters at sametime, expect failure during perf_event_open. Reported-by: Disha Goel Signed-off-by: Athira Rajeev --- .../powerpc/pmu/sampling_tests/bhrb_filter_map_test.c| 9 + 1 file changed, 9 insertions(+) diff --git a/too

[PATCH 1/3] powerpc/perf: Fix branch_filter support for multiple filters in powerpc

2022-09-13 Thread Athira Rajeev
Try 'perf stat' Reported-by: Disha Goel Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/core-book3s.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 13919eb96931..2c2

[PATCH 2/3] tools/perf/tests: Fix branch stack sampling test to include sanity check for branch filter

2022-09-13 Thread Athira Rajeev
e branch filters are not supported and hence this test fails in powerpc. Fix the sanity check to look at the support for branch filters used in this test before proceeding with the test. Fixes: b55878c90ab9 ("perf test: Add test for branch stack sampling") Reported-by: Disha Goel Sig

[PATCH V2 1/2] tools/perf: Fix out of bound access to affinity "sched_cpus"

2022-09-05 Thread Athira Rajeev
nches branch-misses 0.001192373 seconds time elapsed <<>> Reported-by: Nageswara Sastry Tested-by: Nageswara Sastry Signed-off-by: Athira Rajeev --- Changelog: From v1 -> v2: Addressed review comment from Jiri Olsa by changing condition check to directly use &qu

[PATCH V2 2/2] tools/perf: Fix out of bound access to cpu mask array

2022-09-05 Thread Athira Rajeev
o initialize parallel data streaming masks <<>> With this fix, if -C is given a non-exsiting CPU, perf record will fail with: <<>> ./perf record -C 50 ls Failed to initialize parallel data streaming masks <<>> Reported-by: Nageswara Sastry Tested-by: Nageswara Sas

Re: [PATCH 1/2] tools/perf: Fix out of bound access to affinity "sched_cpus"

2022-09-05 Thread Athira Rajeev
> On 05-Sep-2022, at 3:30 PM, Jiri Olsa wrote: > > On Mon, Sep 05, 2022 at 10:24:40AM +0530, Athira Rajeev wrote: >> The affinity code in "affinity_set" function access array >> named "sched_cpus". The size for this array is allocated in >> aff

[PATCH 2/2] tools/perf: Fix out of bound access to cpu mask array

2022-09-04 Thread Athira Rajeev
o initialize parallel data streaming masks <<>> With this fix, if -C is given a non-exsiting CPU, perf record will fail with: <<>> ./perf record -C 50 ls Failed to initialize parallel data streaming masks <<>> Reported-by: Nageswara Sastry Signed-off-by: Athira R

[PATCH 1/2] tools/perf: Fix out of bound access to affinity "sched_cpus"

2022-09-04 Thread Athira Rajeev
nches branch-misses 0.001192373 seconds time elapsed <<>> Reported-by: Nageswara Sastry Signed-off-by: Athira Rajeev --- tools/perf/util/affinity.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/affinity.c b/tools/perf/util/af

[PATCH] powerpc/perf: Include caps feature for power10 DD1 version

2022-07-28 Thread Athira Rajeev
4bb4 3921 ^M [2.135305][T1] ---[ end trace ]---^M <<>> Patch fixes this by adding caps for dd1 attr_groups in power10 PMU driver. Fixes: 6320e693d98c ("powerpc/perf: Add support for caps under sysfs in powerpc") Signed-off-by: Athira Rajeev ---

Re: [PATCH] powerpc: perf: Fix refcount leak bug in imc-pmu.c

2022-06-27 Thread Athira Rajeev
> On 18-Jun-2022, at 12:43 PM, Liang He wrote: > > In update_events_in_group(), of_find_node_by_phandle() will return > a node pointer with refcount incremented. We should use of_node_put() > in fail path or when it is not used anymore. > > Signed-off-by: Liang He

[PATCH] tools/perf/tests: Fix session topology test comparison check

2022-06-10 Thread Athira Rajeev
orm. Patch fixes this condition check. Fixes: cfd7092c31ae ("perf test session topology: Fix test to skip the test in guest environment") Reported-by: Thomas Richter Signed-off-by: Athira Rajeev --- tools/perf/tests/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH V3 35/35] selftest/powerpc/pmu: Add test for hardware cache events

2022-06-10 Thread Athira Rajeev
From: Kajol Jain The testcase checks if the transalation of a generic hardware cache event is done properly via perf interface. The hardware cache events has type as PERF_TYPE_HW_CACHE and each event points to raw event code id. Testcase checks different combination of cache level, cache event

[PATCH V3 34/35] selftest/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_sel field

2022-06-10 Thread Athira Rajeev
From: Kajol Jain Thresh select bits in the event code is used to program thresh_sel field in Monitor Mode Control Register A (MMCRA: 45-47). When scheduling events as a group, all events in that group should match value in these bits. Otherwise event open for the sibling events will fail.

[PATCH V3 33/35] selftest/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_ctl field

2022-06-10 Thread Athira Rajeev
From: Kajol Jain Thresh control bits in the event code is used to program thresh_ctl field in Monitor Mode Control Register A (MMCRA: 48-55). When scheduling events as a group, all events in that group should match value in these bits. Otherwise event open for the sibling events will fail.

[PATCH V3 32/35] selftest/powerpc/pmu: Add selftest for group constraint for unit and pmc field in p9

2022-06-10 Thread Athira Rajeev
From: Kajol Jain Unit and pmu bits in the event code is used to program unit and pmc fields in Monitor Mode Control Register 1 (MMCR1). For power9 platform, incase unit field value is within 6 to 9, one of the event in the group should use PMC4. Otherwise event_open should fail for that group.

[PATCH V3 31/35] selftest/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_cmp field

2022-06-10 Thread Athira Rajeev
From: Kajol Jain Thresh compare bits for a event is used to program thresh compare field in Monitor Mode Control Register A (MMCRA: 9-18 bits for power9 and MMCRA: 8-18 bits for power10). When scheduling events as a group, all events in that group should match value in thresh compare bits.

[PATCH V3 30/35] selftest/powerpc/pmu: Add selftest for group constraint check for MMCR1 cache bits

2022-06-10 Thread Athira Rajeev
From: Kajol Jain Data and instruction cache qualifier bits in the event code is used to program cache select field in Monitor Mode Control Register 1 (MMCR1: 16-17). When scheduling events as a group, all events in that group should match value in these bits. Otherwise event open for the sibling

[PATCH V3 29/35] selftest/powerpc/pmu: Add selftest for group constraint check for MMCR0 l2l3_sel bits

2022-06-10 Thread Athira Rajeev
From: Kajol Jain In power10, L2L3 select bits in the event code is used to program l2l3_sel field in Monitor Mode Control Register 0 (MMCR0: 56-60). When scheduling events as a group, all events in that group should match value in these bits. Otherwise event open for the sibling events will

[PATCH V3 28/35] selftest/powerpc/pmu: Add selftest for PERF_TYPE_HARDWARE events valid check

2022-06-10 Thread Athira Rajeev
in power9 are: - PERF_COUNT_HW_BUS_CYCLES - PERF_COUNT_HW_REF_CPU_CYCLES Testcase does event open for valid and invalid generic events to ensure event open works for all valid events and fails for invalid events. Signed-off-by: Athira Rajeev --- .../powerpc/pmu/event_code_tests/Makefile | 2

<    1   2   3   4   5   6   7   8   >