Re: [PATCH] perf vendor events power10: Update JSON/events

2024-08-01 Thread Arnaldo Carvalho de Melo
On Thu, Aug 01, 2024 at 01:03:44PM +0530, kajoljain wrote: > > > On 8/1/24 01:44, Arnaldo Carvalho de Melo wrote: > > On Wed, Jul 31, 2024 at 04:44:49PM -0300, Arnaldo Carvalho de Melo wrote: > >> On Fri, Jul 26, 2024 at 11:08:55AM -0300, Arnaldo Carvalho de Melo wro

Re: [PATCH] perf vendor events power10: Update JSON/events

2024-07-31 Thread Arnaldo Carvalho de Melo
On Wed, Jul 31, 2024 at 04:44:49PM -0300, Arnaldo Carvalho de Melo wrote: > On Fri, Jul 26, 2024 at 11:08:55AM -0300, Arnaldo Carvalho de Melo wrote: > > On Tue, Jul 23, 2024 at 09:02:23AM -0700, Ian Rogers wrote: > > > On Mon, Jul 22, 2024 at 10:27 PM Kajol Jain wrote: >

Re: [PATCH] perf vendor events power10: Update JSON/events

2024-07-31 Thread Arnaldo Carvalho de Melo
On Fri, Jul 26, 2024 at 11:08:55AM -0300, Arnaldo Carvalho de Melo wrote: > On Tue, Jul 23, 2024 at 09:02:23AM -0700, Ian Rogers wrote: > > On Mon, Jul 22, 2024 at 10:27 PM Kajol Jain wrote: > > > > > > Update JSON/events for power10 platform with additio

Re: [PATCH] perf vendor events power10: Update JSON/events

2024-07-26 Thread Arnaldo Carvalho de Melo
gt; > > > Signed-off-by: Kajol Jain > > Reviewed-by: Ian Rogers Thanks, applied to tmp.perf-tools-next, - Arnaldo > > --- > > .../arch/powerpc/power10/frontend.json| 5 + > > .../arch/powerpc/power10/others.json | 100 +- >

Re: [PATCH V8 14/15] tools/perf: Add support to use libcapstone in powerpc

2024-07-24 Thread Arnaldo Carvalho de Melo
uild-test Before asking for review. Please do that next time. I'm fixing this up this time so that we can make progress. Best regards, - Arnaldo > --- > tools/perf/util/disasm.c | 143 +++ > 1 file changed, 143 insertions(+) > > diff --g

Re: [PATCH V8 00/15] Add data type profiling support for powerpc

2024-07-23 Thread Arnaldo Carvalho de Melo
idely, hopefully finding and improving data structures in the kernel. We need to write about such cases so as to provide success stories on using perf for data-type profiling. Thanks for working on this! - Arnaldo > https://lore.kernel.org/all/6e09dc28-4a2e-49d8-a2b5-ffb3396a9...@csgroup.eu/T/

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

2024-07-23 Thread Arnaldo Carvalho de Melo
atic int disasm_line__parse_powerpc(struct disasm_line *dl) > +{ > + char *line = dl->al.line; > + const char **namep = >ins.name; > + char **rawp = >ops.raw; > + char *tmp_raw_insn, *name_raw_insn = skip_spaces(line); > + char *name = skip_sp

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

2024-07-23 Thread Arnaldo Carvalho de Melo
at is needed for us to print them in a cross arch way, no? I see there is the FIXME there, ok. - Arnaldo > Reviewed-and-tested-by: Kajol Jain > Reviewed-by: Namhyung Kim > Signed-off-by: Athira Rajeev > --- > tools/perf/util/annotate-data.h | 4 > 1 file changed, 4 inserti

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

2024-05-10 Thread Arnaldo Carvalho de Melo
bin Du Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20240329215812.537846-5-namhy...@kernel.org Signed-off-by: Arnaldo Carvalho de Melo >From a quick look at http://www.capstone-engine.org/compile.html it seems PowerPC is supported

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

2024-05-07 Thread Arnaldo Carvalho de Melo
", the > > comment mistakenly referred to "dst_multi_regs = 0". Correct it to use > > "src_multi_regs = 0" > > > > Signed-off-by: Athira Rajeev > > Acked-by: Namhyung Kim Cherry picked this one into perf-tools-next. Thanks, - Arnaldo

Re: [PATCH] perf vendor events: Remove UTF-8 characters from cmn.json

2023-12-21 Thread Arnaldo Carvalho de Melo
s/perf/pmu-events/arch/arm64/arm/cmn/sys/cmn.json: text/plain; > charset=us-ascii Thanks, applied! - Arnaldo > Fixes: 0b4de7bdf46c5215 ("perf jevents: Add support for Arm CMN PMU aliasing") > Reported-by: Arnaldo Carvalho de Melo > Signed-off-by: Jing Zhang > --- > t

Re: perf tools arch Arm CMN PMU JSON files build breakage on ubuntu 18.04 cross build

2023-12-15 Thread Arnaldo Carvalho de Melo
Em Fri, Dec 15, 2023 at 11:41:19AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Dec 15, 2023 at 11:39:14AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Mar 27, 2023 at 09:52:11AM +0530, kajoljain escreveu: > > > > UnicodeDecodeError: 'ascii' codec can't decode

Re: perf tools arch Arm CMN PMU JSON files build breakage on ubuntu 18.04 cross build

2023-12-15 Thread Arnaldo Carvalho de Melo
Em Fri, Dec 15, 2023 at 11:39:14AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Mar 27, 2023 at 09:52:11AM +0530, kajoljain escreveu: > > On 3/23/23 18:41, Arnaldo Carvalho de Melo wrote: > > > Exception processing pmu-events/arch/powerpc/power9/other.json > > >

perf tools arch Arm CMN PMU JSON files build breakage on ubuntu 18.04 cross build

2023-12-15 Thread Arnaldo Carvalho de Melo
Em Mon, Mar 27, 2023 at 09:52:11AM +0530, kajoljain escreveu: > On 3/23/23 18:41, Arnaldo Carvalho de Melo wrote: > > Exception processing pmu-events/arch/powerpc/power9/other.json > > Traceback (most recent call last): > > File "pmu-events/jevents.py", line 997

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

2023-12-06 Thread Arnaldo Carvalho de Melo
Em Wed, Dec 06, 2023 at 10:15:06AM +0530, Athira Rajeev escreveu: > > > > On 06-Dec-2023, at 3:20 AM, Arnaldo Carvalho de Melo > > wrote: > > > > Em Mon, Nov 27, 2023 at 11:12:57AM +, James Clark escreveu: > >> On 23/11/2023 16:02, Athira Rajeev wrot

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

2023-12-06 Thread Arnaldo Carvalho de Melo
Em Tue, Dec 05, 2023 at 02:09:01PM -0800, Ian Rogers escreveu: > On Tue, Dec 5, 2023 at 1:50 PM Arnaldo Carvalho de Melo > wrote: > > > > Em Mon, Nov 27, 2023 at 11:12:57AM +, James Clark escreveu: > > > On 23/11/2023 16:02, Athira Rajeev wrote: > > &

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

2023-12-05 Thread Arnaldo Carvalho de Melo
erf-tools-next with torvalds/master I noticed that maybe we better have the above added line as: + $(call QUIET_CLEAN, tests) $(Q)$(MAKE) -f $(srctree)/tools/perf/tests/Makefile.tests clean No? Anyway I'm merging as-is, but it just hit my eye while merging, - Arnaldo

Re: [PATCH] perf vendor events: Update datasource event name to fix duplicate events

2023-12-04 Thread Arnaldo Carvalho de Melo
Em Mon, Dec 04, 2023 at 05:20:46PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Dec 04, 2023 at 12:12:54PM -0800, Ian Rogers escreveu: > > On Thu, Nov 23, 2023 at 8:01 AM Athira Rajeev > > wrote: > > > > > > Running "perf list" on

Re: [PATCH] perf vendor events: Update datasource event name to fix duplicate events

2023-12-04 Thread Arnaldo Carvalho de Melo
> Given duplicate events creates broken pmu-events.c we should capture > that as an exception in jevents.py. That way a JEVENTS_ARCH=all build > will fail if any vendor/architecture would break in this way. We > should also add JEVENTS_ARCH=all to tools/perf/tests/make. Athira, do > you want to look at doing this? Should I go ahead and remove this patch till this is sorted out? - Arnaldo

Re: [PATCH] perf vendor events: Update datasource event name to fix duplicate events

2023-12-04 Thread Arnaldo Carvalho de Melo
t; >> branch-instructions OR branches[Hardware event] > >> branch-misses [Hardware event] > >> Tested-by: Disha Goel > > Thanks Disha for testing > Hi Arnaldo, > Can we get this pulled in if the patch looks good ? Thanks, applied to perf-tools-next. - Arnaldo

Re: [PATCH] perf test record+probe_libc_inet_pton: Fix call chain match on powerpc

2023-11-29 Thread Arnaldo Carvalho de Melo
starting # with '#' will be ignored, and an empty message aborts the commit. # # Author:Likhitha Korrapati # Date: Sun Nov 26 02:09:14 2023 -0500 I'm copy and pasting from the original post, thanks! - Arnaldo > probe libc's inet_pton & backtrace it with ping: FAILED! > >

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

2023-11-27 Thread Arnaldo Carvalho de Melo
Seems to work really well. I also tested it on Ubuntu, and checked > NO_SHELLCHECK, cleaning and with and without shellcheck installed etc. > Reviewed-by: James Clark Tested on Fedora 38, works as advertised, applied. - Arnaldo

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

2023-11-08 Thread Arnaldo Carvalho de Melo
Em Tue, Nov 07, 2023 at 12:08:25PM +0530, Athira Rajeev escreveu: > > On 07-Nov-2023, at 3:14 AM, Arnaldo Carvalho de Melo > > wrote: > >>> Reviewed-by: James Clark > > Some are not applying, even after b4 picking up v2 &

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

2023-11-06 Thread Arnaldo Carvalho de Melo
Em Thu, Oct 05, 2023 at 02:24:15PM +0530, Athira Rajeev escreveu: > > On 05-Oct-2023, at 1:50 PM, James Clark wrote: > > On 29/09/2023 05:11, Athira Rajeev wrote: > >> Running shellcheck on tests/shell/test_arm_coresight.sh > >> throws below warnings: > >> > >> In

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

2023-09-25 Thread Arnaldo Carvalho de Melo
ajeev > >>> --- > >>> Changelog: > >>> v1 -> v2: > >>> Addressed review comments from Ian. Updated size of > >>> pmu event name variable and changed bool name which is > >>> used to skip the test. > >>> > >>

Re: [PATCH V3] tools/perf: Add includes for detected configs in Makefile.perf

2023-09-12 Thread Arnaldo Carvalho de Melo
s that > > could arise when other "CONFIG_*" checks are added to Makefile.perf > > in future as well. > > > > Signed-off-by: Athira Rajeev > > Reviewed-by: Ian Rogers Thanks, applied. - Arnaldo > Thanks, > Ian > > > --- > > Change

Re: [PATCH v2 1/3] perf vendor events: Update JSON/events for power10 platform

2023-09-06 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 05, 2023 at 05:10:37PM +0530, Kajol Jain escreveu: > Update JSON/Events list with data-source events for power10 platform. Thanks, applied the series. - Arnaldo > Signed-off-by: Kajol Jain > --- > .../arch/powerpc/power10/datasource.json | 1282 +

Re: [PATCH v2 2/3] perf vendor events: Update JSON/events for power10 platform

2023-09-06 Thread Arnaldo Carvalho de Melo
so when someone does a 'git log --oneline' it looks like a straight dup. Please try to provide descriptive subjects. - Arnaldo > Signed-off-by: Kajol Jain > --- > .../arch/powerpc/power10/datasource.json | 505 ++ > 1 file changed, 505 insertions(+) > >

Re: [PATCH v2 1/3] perf vendor events: Update JSON/events for power10 platform

2023-09-06 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 05, 2023 at 05:10:37PM +0530, Kajol Jain escreveu: > Update JSON/Events list with data-source events for power10 platform. Next time could you please provide some pointer to the document from where these metrics came if it is available online? - Arnaldo > Signed-off-by: Kajo

Re: [PATCH] perf test: Skip perf bench breakpoint run if no breakpoints available

2023-08-23 Thread Arnaldo Carvalho de Melo
thread > perf_event_open: No such device > > Result on power9 system after patch changes: > [command]# ./perf bench breakpoint thread > Skipping perf bench breakpoint thread: No hardware support > > Reported-by: Disha Goel > Signed-off-by: Kajol Jain Thanks,

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

2023-08-11 Thread Arnaldo Carvalho de Melo
sh_offset (Section file > offst) of the elf header for text. You're stating what this patch does, but not why. So far was not needed, why now? Probably the second patch will have the answer, but please try to add the reason on the patch that introduces the new field. Thanks, - Arnal

Re: [PATCH] tools/perf: Fix dso kernel load and symbol process to correctly map dso to its long_name, type and adjust_symbols

2023-08-11 Thread Arnaldo Carvalho de Melo
ymbols is used by > > function "map__rip_2objdump" which converts symbol start > > address to objdump address. Also set the dso long_name during > > dso__load_vmlinux function. > > > > Suggested-by: Adrian Hunter > > Signed-off-by: Athira Rajeev > &

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

2023-08-07 Thread Arnaldo Carvalho de Melo
testcase. I wonder if we shouldn't somehow check if the credentials needed to performing a test shouldn't be checked before trying it. This way we would check if the check that the tool or the kernel is doing is the appropriate one. I.e. the kernel refusal for doing something may be an error. -

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

2023-07-28 Thread Arnaldo Carvalho de Melo
a requirement here: > >>> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/Build?h=perf-tools-next#n30 > >>> I think we can translate: > >>> for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck > &

Re: [PATCH 1/1] perf tests task_analyzer: Check perf build options for libtraceevent support

2023-07-28 Thread Arnaldo Carvalho de Melo
Em Fri, Jul 28, 2023 at 09:01:11AM -0700, Ian Rogers escreveu: > On Fri, Jul 28, 2023 at 7:54 AM Arnaldo Carvalho de Melo > wrote: > > > > Em Tue, Jul 25, 2023 at 11:46:49AM +0530, Aditya Gupta escreveu: > > > Currently we depend on output of 'perf record -e "sche

Re: [PATCH 1/1] perf tests task_analyzer: Check perf build options for libtraceevent support

2023-07-28 Thread Arnaldo Carvalho de Melo
ing a: perf build --has libtraceevent subcommand to have that query made more compact and to avoid the two extra grep. BTW, I'll change that to: [acme@quaco perf-tools-next]$ perf version --build-options | grep " on .* HAVE_LIBTRACEEVENT" libtraceevent: [ on ] # HAVE_LIBTRACEEVENT [acme@quaco perf-tools-next]$ replacing "on" with OFF, so that we have just one grep. Thanks, - Arnaldo > } > > -- > 2.41.0 > -- - Arnaldo

Re: [PATCH] tools/perf: Fix addr location init during arch_skip_callchain_idx function

2023-07-24 Thread Arnaldo Carvalho de Melo
Em Mon, Jul 24, 2023 at 10:28:15PM +0530, Athira Rajeev escreveu: > perf record with callchain recording fails as below > in powerpc: > > ./perf record -a -gR sleep 10 > ./perf report > perf: Segmentation fault > > gdb trace points to thread__find_map > > 0 0x101df314

Re: [PATCH 01/17] perf: get rid of unused import

2023-06-13 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 14, 2023 at 09:59:14AM +0800, Leo Yan escreveu: > On Tue, Jun 13, 2023 at 04:54:08PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Tue, Jun 13, 2023 at 10:11:29PM +0530, Athira Rajeev escreveu: > > > From: Sourabh Jain > > > > > > Scrip

Re: [PATCH 06/17] tools/perf/tests: Fix shellcheck warnings for trace+probe_vfs_getname.sh

2023-06-13 Thread Arnaldo Carvalho de Melo
s/ /,/') [root@quaco ~]# echo $evts open,openat [root@quaco ~]# Then after: [root@quaco ~]# evts=$(echo "$(perf list syscalls:sys_enter_open* 2>/dev/null | grep -E 'open(at)? ' | sed -r 's/.*sys_enter_([a-z]+) +\[.*$/\1/')" | sed 's/ /,/') [root@quaco ~]# echo $evts open openat [root@

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

2023-06-13 Thread Arnaldo Carvalho de Melo
l scripts. Thanks, applied the series. - Arnaldo > Patches 1-14 fixes the issues found with shellcheck. Patch 15, 16 > and patch 17 address a fix in task_analyzer test. > > This cleanup is a pre-requisite to include a build option for shellcheck > discussed here: https://www.spin

Re: [PATCH 16/17] perf tests task_analyzer: print command on failure

2023-06-13 Thread Arnaldo Carvalho de Melo
sage, Thanks, applied. - Arnaldo > Signed-off-by: Athira Rajeev > Signed-off-by: Kajol Jain > Signed-off-by: Aditya Gupta > --- > tools/perf/tests/shell/test_task_analyzer.sh | 24 ++-- > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git

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

2023-06-13 Thread Arnaldo Carvalho de Melo
in this message. thanks! - Arnaldo > This issue due to ${$1} caused all function calls to give error in > `find_str_or_fail` line, and so no test runs completely. But > 'perf test "perf script task-analyzer tests"' wrongly reports > that tests passed with the status OK, which is

Re: [PATCH 01/17] perf: get rid of unused import

2023-06-13 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 13, 2023 at 10:11:29PM +0530, Athira Rajeev escreveu: > From: Sourabh Jain > > Script doesn't use sys library, so remove it. Please Cc the persons working on that file, I added Leo to the CC list of this message. Thanks, applied. - Arnaldo > Report by pylint: >

Re: [PATCH] perf vendor events power9: Remove UTF-8 characters from json files

2023-03-29 Thread Arnaldo Carvalho de Melo
ii > > pmu-events/arch/powerpc/power9/other.json: application/json; > > charset=us-ascii > > pmu-events/arch/powerpc/power9/pipeline.json: application/json; > > charset=us-ascii > > pmu-events/arch/powerpc/power9/pmc.json:application/json; >

perf tools power9 JSON files build breakage on ubuntu 18.04 cross build

2023-03-23 Thread Arnaldo Carvalho de Melo
ting for unfinished jobs Now jevents is an opt-out feature so I'm noticing these problems. A similar fix for s390 was accepted today: https://lore.kernel.org/r/20230323122532.2305847-1-tmri...@linux.ibm.com https://lore.kernel.org/r/ZBwkl77/I31AQk12@osiris -- - Arnaldo

Re: [PATCH v2] tools/perf/tests: Change true workload to sleep workload in all metric test for system wide check

2023-02-17 Thread Arnaldo Carvalho de Melo
ide monitoring to get the data. > > Fix this issue by changing current system wide check from true workload to > > sleep 0.01 workload. > > > > Result with the patch changes in powerpc: > > > > 98: perf all metrics test : Ok > > > > Reviewed-by: Athira Rajeev > > Tested-by: Disha Goel > > Suggested-by: Ian Rogers > > Signed-off-by: Kajol Jain > > Tested-by: Ian Rogers > > The mention of a4b8cfcabb1d can be moved to a Fixes tag so that this > is backported. Done, thanks, applied. - Arnaldo

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

2023-02-17 Thread Arnaldo Carvalho de Melo
93,916,546,654 PM_DISP_STALL_CYC > > 8,455,376,836,463 PM_EXEC_STALL > > > > "--metric-no-group" is used for forcing PM_RUN_INST_CMPL to be scheduled > > in all group for more accuracy. > > > > Signed-off-by: Athira Rajeev > > Acked-by: Ian Rogers Thanks, applied. - Arnaldo

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

2023-02-06 Thread Arnaldo Carvalho de Melo
Em Mon, Feb 06, 2023 at 07:28:49PM +0530, Athira Rajeev escreveu: > > > > 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

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

2023-02-06 Thread Arnaldo Carvalho de Melo
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 +0530, Athira Rajeev escreveu: > >> "bpf" tests fails in environment with

Re: [PATCH v5 15/15] perf jevents: Run metric_test.py at compile-time

2023-02-03 Thread Arnaldo Carvalho de Melo
Em Thu, Jan 26, 2023 at 03:36:45PM -0800, Ian Rogers escreveu: > Add a target that generates a log file for running metric_test.py and > make this a dependency on generating pmu-events.c. The log output is > displayed if the test fails like (the test was modified to make it > fail): > > ``` >

Re: [PATCH v1] perf pmu: Fix aarch64 build

2023-02-03 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 03, 2023 at 01:02:02PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu: > > I tried bisecting, but at this cset: > > > > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1 > > d22e569c

Re: [PATCH v1] perf pmu: Fix aarch64 build

2023-02-03 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu: > I tried bisecting, but at this cset: > > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1 > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no > jevents > acme@roc-rk

Re: [PATCH v1] perf pmu: Fix aarch64 build

2023-02-03 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 03, 2023 at 11:43:23AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Feb 03, 2023 at 11:36:30AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Fri, Feb 03, 2023 at 11:17:3

Re: [PATCH v1] perf pmu: Fix aarch64 build

2023-02-03 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 03, 2023 at 11:36:30AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Thu, Feb 02, 2023 at 05:41:22PM

Re: [PATCH v1] perf pmu: Fix aarch64 build

2023-02-03 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu: > > > On Thu, Feb 2, 2023 at 5:40 PM

Re: [PATCH v1] perf pmu: Fix aarch64 build

2023-02-03 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu: > > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers wrote: > > > > > > ARM64 overrides a weak function but a previous change

Re: [PATCH v1] perf pmu: Fix aarch64 build

2023-02-03 Thread Arnaldo Carvalho de Melo
t, I'll double check on my rk3399 board and on again on the cross-build container. - Arnaldo > > Thanks, > Ian > > > Signed-off-by: Ian Rogers > > --- > > tools/perf/arch/arm64/util/pmu.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --gi

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

2023-02-01 Thread Arnaldo Carvalho de Melo
> devel. Hence perf is compiled without libtraceevent support. Thanks, applied. - Arnaldo > Detailed logs: > ./perf test -v "Basic BPF filtering" > > Failed to add BPF event syscalls:sys_enter_epoll_pwait > bpf: tracepoint call back failed, stop iterate

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

2023-02-01 Thread Arnaldo Carvalho de Melo
oints, check for LIBTRACEEVENT is not done in case of perf probe. > Hence, in environment with missing libtraceevent-devel, it is > observed that adding a probe point shows below message though it > can't be used via perf record. Thanks, applied. - Arnaldo > Example: > Adding

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

2023-02-01 Thread Arnaldo Carvalho de Melo
patch and ends up chopped up when I use git-am. I'm fixing it now. - Arnaldo > test child forked, pid 304211 > failed to open /tmp/perf.data.Btf: No such file or directory > test child finished with 0 > end > probe libc's inet_pton & backtrace it with ping: Ok > > Fi

Re: [PATCH v4 11/12] perf jevents: Add model list option

2023-01-26 Thread Arnaldo Carvalho de Melo
only a set of models are possible. > > > > Signed-off-by: Ian Rogers > > Thanks for this: > > Reviewed-by: John Garry Thanks for reviewing the series John, I see there are a few patches for which you didn't provide your Reviewed-by, are you planning to review those as we

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

2023-01-20 Thread Arnaldo Carvalho de Melo
Em Fri, Jan 20, 2023 at 08:51:59AM +, David Laight escreveu: > From: Arnaldo Carvalho de Melo > > Sent: 19 January 2023 17:00 > > > > Em Thu, Jan 19, 2023 at 03:49:15PM +, David Laight escreveu: > > > From: Athira Rajeev > > > > Sent: 19 Jan

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

2023-01-20 Thread Arnaldo Carvalho de Melo
000.service/memory.stat" [root@quaco tracing]# So you could instead replace the suggestion from: " You can now use it in all perf tools, such as: perf record -e probe:vfs_getname -aR sleep 1 " To: " perf is not linked with libtraceevent, to use the new probe you

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

2023-01-19 Thread Arnaldo Carvalho de Melo
; > "sh" or other shells. Above error on line number 69 that reports > > "Bad substitution" is: > > Looks better - assuming it works :-) :-) Can I take this as an: Acked-by: David Laight ? - Arnaldo

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

2023-01-18 Thread Arnaldo Carvalho de Melo
n 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 mode also will > be same as original file. > > Signed-off-by: Athira Rajeev Thanks, applied bot

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

2023-01-05 Thread Arnaldo Carvalho de Melo
ails, we're just improving the user reporting to make that clear at first sight. - Arnaldo > Test failure logs: > <<>> > 42: BPF filter: > 42.1: Basic BPF filtering : Ok > 42.2: BPF pinning : Ok > 42.3

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

2023-01-05 Thread Arnaldo Carvalho de Melo
nc__null_lseek(void *ctx, int err, unsigned long _f_mode, >^ > 2 errors generated. Thanks for fixing this, I noticed the problem but didn't got around to investigate it. Tested and applied. - Arnaldo > The test code tes

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

2023-01-02 Thread Arnaldo Carvalho de Melo
Em Mon, Jan 02, 2023 at 07:12:50PM +0530, Athira Rajeev escreveu: > > 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, a

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

2022-12-14 Thread Arnaldo Carvalho de Melo
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 > > 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: >

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

2022-12-12 Thread Arnaldo Carvalho de Melo
t; > NULL); > > parse_events_error__exit(_error); > > + if (err == -ENOENT) { > > + pr_debug("Failed to add events selected by BPF, debuginfo > > package not installed\n"); > > + return TEST_SKIP; > > + } > > Hi Kajol, &g

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

2022-12-12 Thread Arnaldo Carvalho de Melo
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 > > > > Acked-by: Ravi Bangoria > > Thanks Ravi for checking the patch Thanks, applied. - Arnaldo

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

2022-12-05 Thread Arnaldo Carvalho de Melo
rinting os->prefix. > > # ./perf stat -x, --per-socket -a -C 1 ls > S0,1,82.11,msec,cpu-clock,82111626,100.00,1.000,CPUs utilized > S0,1,2,,context-switches,82109314,100.00,24.358,/sec > -- > > S0,1,,,1.71,stalled cycles per insn Thanks, tested and

Re: [PATCH] perf test: Skip watchpoint tests if no watchpoints available

2022-11-23 Thread Arnaldo Carvalho de Melo
perf_event_open_cloexec_flag()); > > > - if (fd < 0) > > > + if (fd < 0) { > > > + fd = -errno; > > > pr_debug("failed opening event %x\n", attr.bp_type); > > > + } > > > > Do you really need that ? > > > > Can't you directly check errno in the caller ? > > errno is very easily clobbered and not clearly set on success - ie, > it'd be better not to do that. > > Acked-by: Ian Rogers Thanks, applied. - Arnaldo

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

2022-11-08 Thread Arnaldo Carvalho de Melo
./perf stat -x, --per-socket -a -C 1 ls > > S0,1,1.92,msec,cpu-clock,1917648,100.00,1.010,CPUs utilized > > S0,1,54,,context-switches,1916762,100.00,28.176,K/sec > > --- > > S0,1,528693,,instructions,1908854,100.00,0.36,insn per cycle > > S0,1,

Re: [PATCH] powerpc/perf: Fix hv-24x7 metric events for power10

2022-10-18 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 18, 2022 at 09:24:44AM +0530, Madhavan Srinivasan escreveu: > > On 10/17/22 7:03 PM, Arnaldo Carvalho de Melo wrote: > > Em Fri, Oct 14, 2022 at 07:32:20PM +0530, Kajol Jain escreveu: > > > Testcase stat_all_metrics.sh fails in powerpc: > > > > >

Re: [PATCH] powerpc/perf: Fix hv-24x7 metric events for power10

2022-10-17 Thread Arnaldo Carvalho de Melo
inator, so adding 1 > to the denominator of the metric expression as a fix. > > Result in powerpc box after this patch changes: > > 90: perf all metrics test : Ok Looks ok, applied. Next time please try to ask others to provide a Reviewed-by or at least an Acked-by. - Arnaldo >

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

2022-10-14 Thread Arnaldo Carvalho de Melo
Em Thu, Oct 06, 2022 at 09:21:48PM +0530, Athira Rajeev escreveu: > Testcase stat+csv_output.sh fails in powerpc: > > 84: perf stat CSV output linter: FAILED! Thanks, applied both patches. - Arnaldo

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

2022-10-06 Thread Arnaldo Carvalho de Melo
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, Oct 05, 2022 at 09:28:52AM -0300, Arnaldo Carvalho de Melo escreveu: > >> Em Wed, Oct 05, 2022 at 1

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

2022-10-05 Thread Arnaldo Carvalho de Melo
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/perf/util/stat-display.c > > index b82844cb0ce7..cf28020798ec 100644 > >

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

2022-10-05 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 05, 2022 at 10:23:39AM +0530, Athira Rajeev escreveu: > > > > 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 a

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

2022-10-05 Thread Arnaldo Carvalho de Melo
Em Wed, Oct 05, 2022 at 10:23:39AM +0530, Athira Rajeev escreveu: > > > > 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 a

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

2022-10-04 Thread Arnaldo Carvalho de Melo
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 > > > Thanks for helping with testing. Can I add your Tested-by for the patch ? > &g

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

2022-10-04 Thread Arnaldo Carvalho de Melo
Em Tue, Oct 04, 2022 at 07:49:21AM -0700, Ian Rogers escreveu: > On Tue, Oct 4, 2022, 12:06 AM Athira Rajeev > > Thanks for helping with testing. Can I add your Tested-by for the patch ? > Yep. > Tested-by: Ian Rogers > Thanks, > Ian

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

2022-09-28 Thread Arnaldo Carvalho de Melo
type, any. if any > platform doesn't support the branch filters used in the test, the testcase > will fail. In powerpc, currently mutliple 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

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

2022-09-28 Thread Arnaldo Carvalho de Melo
Em Wed, Sep 28, 2022 at 10:22:18AM +0530, Athira Rajeev escreveu: > The testcase “vmlinux-kallsyms.c” fails in powerpc. > > vmlinux symtab matches kallsyms: FAILED! Thanks, applied. - Arnaldo > This test look at the symbols in the vmlinux DSO > and check if we f

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

2022-09-26 Thread Arnaldo Carvalho de Melo
gt; > 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

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

2022-09-22 Thread Arnaldo Carvalho de Melo
urgent]$ Opinions? - Arnaldo > <<>> > 78: build id cache operations : > test child forked, pid 01 > WARNING: wine not found. PE binaries will not be run. > test binaries: /tmp/perf.ex.SHA1.PKz /tmp/perf.ex.MD5.Gt3 > ./tests/sh

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

2022-09-06 Thread Arnaldo Carvalho de Melo
he set_bit could > access an array member which is out-of the array size. This > is because currently, there is no boundary check for the CPU. > This will result in seg fault: Thanks, tested, reproduced the problem before, and the fix after, applied. - Arnaldo > <<>> > ./pe

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

2022-06-14 Thread Arnaldo Carvalho de Melo
test session topology: Fix test to skip the test > > in guest environment") > > Reported-by: Thomas Richter > > Signed-off-by: Athira Rajeev > > Acked-by: Ian Rogers Thanks, applied. - Arnaldo > Thanks, > Ian > > > --- > > tools/perf/tests/topology.c

Re: [PATCH V2] tools/perf/tests: Fix session topology test to skip the test in guest environment

2022-05-21 Thread Arnaldo Carvalho de Melo
>> with the patch. > >> Tested-by: Disha Goel > > Acked-by: Ian Rogers > Thanks all for the review. Thanks, applied. - Arnaldo

Re: [PATCH V2] tools/perf/test: Fix perf all PMU test to skip hv_24x7/hv_gpci tests on powerpc

2022-05-20 Thread Arnaldo Carvalho de Melo
sts/shell/stat_all_pmu.sh > > +++ b/tools/perf/tests/shell/stat_all_pmu.sh > > @@ -5,6 +5,16 @@ > > set -e > > > > for p in $(perf list --raw-dump pmu); do > > + # In powerpc, skip the events for hv_24x7 and hv_gpci. > > + # These events needs input values to be f

Re: [PATCH V2 1/2] tools/perf: Add utility function to read /proc/cpuinfo for any field

2022-05-10 Thread Arnaldo Carvalho de Melo
Em Tue, May 10, 2022 at 07:08:47PM +0530, Athira Rajeev escreveu: > > > > On 06-May-2022, at 3:03 PM, Athira Rajeev > > wrote: > > > > > > > >> On 05-May-2022, at 10:54 PM, Arnaldo Carvalho de Melo > >> wrote: > >> > &

Re: [PATCH] tools/perf/tests: Skip perf BPF test if clang is not present

2022-05-10 Thread Arnaldo Carvalho de Melo
Em Fri, May 06, 2022 at 03:07:51PM +0530, Athira Rajeev escreveu: > > > > On 05-May-2022, at 10:51 PM, Arnaldo Carvalho de Melo > > wrote: > > > > Em Thu, May 05, 2022 at 03:30:39PM +0530, Athira Rajeev escreveu: > >> Perf BPF filter

Re: [PATCH V2 1/2] tools/perf: Add utility function to read /proc/cpuinfo for any field

2022-05-05 Thread Arnaldo Carvalho de Melo
ols/perf/util/header.h > index 0eb4bc29a5a4..b0f754364bd4 100644 > --- a/tools/perf/util/header.h > +++ b/tools/perf/util/header.h > @@ -166,4 +166,5 @@ int get_cpuid(char *buffer, size_t sz); > > char *get_cpuid_str(struct perf_pmu *pmu __maybe_unused); > int strcmp_cpuid_str(const char *s1, const char *s2); > +char *cpuinfo_field(const char *search); > #endif /* __PERF_HEADER_H */ > -- > 2.35.1 -- - Arnaldo

Re: [PATCH] tools/perf/tests: Skip perf BPF test if clang is not present

2022-05-05 Thread Arnaldo Carvalho de Melo
bpf_testcase_table[idx].prog_id, > -true, NULL); > +false, NULL); > if (ret != TEST_OK || !obj_buf || !obj_buf_sz) { > pr_debug("Unable to get BPF object, %s\n", >bpf_testcase_table[idx].msg_compile_fail); > - if (idx == 0) > + if ((idx == 0) || (ret == TEST_SKIP)) > return TEST_SKIP; > else > return TEST_FAIL; > -- > 2.35.1 -- - Arnaldo

Re: [PATCH 0/3] perf tools: Tidy up symbol end fixup (v3)

2022-04-28 Thread Arnaldo Carvalho de Melo
rnel to is_kallsyms > > * move the logic to generic function > > * remove arch-specific functions > > > > Thanks, > > Namhyung > > Thanks Namhyung! The series: > > Acked-by: Ian Rogers Thanks, applied to perf/urgent. - Arnaldo > > Namhyung Kim

Re: [PATCH V3 0/2] Fix perf bench numa to work with machines having #CPUs > 1K

2022-04-14 Thread Arnaldo Carvalho de Melo
with affinity. Thanks, applied. - Arnaldo > Example snippet from numa benchmark: > <<>> > perf: bench/numa.c:302: bind_to_node: Assertion `!(ret)' failed. > Aborted (core dumped) > <<>> > > bind_to_node function uses "sched_getaffinity&quo

Re: [PATCH v2 0/4] Fix perf bench numa, futex and epoll to work with machines having #CPUs > 1K

2022-04-09 Thread Arnaldo Carvalho de Melo
Em Sat, Apr 09, 2022 at 12:28:01PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Apr 06, 2022 at 11:21:09PM +0530, Athira Rajeev escreveu: > > The perf benchmark for collections: numa, futex and epoll > > hits failure in system configuration with CPU's more than 1024. >

Re: [PATCH v2 0/4] Fix perf bench numa, futex and epoll to work with machines having #CPUs > 1K

2022-04-09 Thread Arnaldo Carvalho de Melo
n the code to work with affinity. Applied 1-3, 4 needs some reworking and can wait for v5.19, the first 3 are fixes, so can go now. - Arnaldo

Re: [PATCH v2 4/4] tools/perf: Fix perf bench numa testcase to check if CPU used to bind task is online

2022-04-09 Thread Arnaldo Carvalho de Melo
ndex 6da12e522edc..3f5fcf5d4b3f 100644 > --- a/tools/perf/util/header.c > +++ b/tools/perf/util/header.c > @@ -983,6 +983,49 @@ static int write_dir_format(struct feat_fd *ff, > return do_write(ff, >dir.version, sizeof(data->dir.version)); > } > > +#define SYSFS "/sys/

  1   2   3   4   5   >