Re: linux-next: build warning after merge of the powerpc tree

2025-05-30 Thread Athira Rajeev
> On 30 May 2025, at 5:14 AM, Stephen Rothwell wrote: > > Hi all, > > On Tue, 13 May 2025 20:28:09 +1000 Stephen Rothwell > wrote: >> >> After merging the powerpc tree, today's linux-next build (htmldocs) >> produced this warning: >> >> Documentation/arch/powerpc/htm.rst: WARNING: documen

Re: [PATCH v3] docs: powerpc: Add htm.rst to table of contents

2025-05-28 Thread Athira Rajeev
powerpc/htm.rst: WARNING: document isn't included in any > toctree [toc.not_included] > > Fixes: ab1456c5aa7a ("powerpc/pseries/htmdump: Add documentation for H_HTM > debugfs interface") > Acked-by: Randy Dunlap > Tested-by: Randy Dunlap > Signed-off-by: Br

[PATCH] powerpc/pseries/htmdump: Include header file to get is_kvm_guest() definition

2025-05-06 Thread Athira Rajeev
disabled. Include header file explicitly to avoid the build error Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202505061324.elul4nju-...@intel.com/ Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 1 + 1 file changed, 1 insertion(+) diff

Re: [PATCH] tools/lib/perf: Fix -Werror=alloc-size-larger-than in cpumap.c

2025-04-25 Thread Athira Rajeev
> On 14 Apr 2025, at 7:08 AM, Madhavan Srinivasan wrote: > > > > On 4/7/25 5:38 PM, Venkat Rao Bagalkote wrote: >> >> On 07/04/25 12:10 am, Athira Rajeev wrote: >>> >>>> On 6 Apr 2025, at 10:04 PM, Likhitha Korrapati >>>> wro

Re: [PATCH] tools headers: Update the include/vdso/unaligned.h to sync headers

2025-04-25 Thread Athira Rajeev
> On 22 Apr 2025, at 2:41 PM, James Clark wrote: > > > > On 21/04/2025 4:41 am, Athira Rajeev wrote: >> To pick up the changes in: >> commit acea9943271b ("vdso: Address variable shadowing in macros") >> Addressing this perf tools build warning

Re: [PATCH] perf build: Add tools/arch/x86/include/asm/amd/ibs.h to sync the headers

2025-04-24 Thread Athira Rajeev
> On 24 Apr 2025, at 11:43 PM, Arnaldo Carvalho de Melo wrote: > > On Thu, Apr 24, 2025 at 10:00:33PM +0530, Athira Rajeev wrote: >> Headers sync up update for the patch that adds the original >> copy of the IBS header file in arch/x86/include/asm/amd/ibs.h > >

[PATCH] perf build: Add tools/arch/x86/include/asm/amd/ibs.h to sync the headers

2025-04-24 Thread Athira Rajeev
.h" And change the check-headers.sh entry to ignore this line when comparing with the original kernel header. Reported-by: Stephen Rothwell Reported-by: Shrikanth Hegde Reported-by: Venkat Rao Bagalkote Signed-off-by: Athira Rajeev --- tools/arch/x86/include

[PATCH] tools headers: Update the include/vdso/unaligned.h to sync headers

2025-04-20 Thread Athira Rajeev
To pick up the changes in: commit acea9943271b ("vdso: Address variable shadowing in macros") Addressing this perf tools build warning: diff -u tools/include/vdso/unaligned.h include/vdso/unaligned.h Reported-by: Venkat Rao Bagalkote Signed-off-by: Athira Rajeev

[PATCH V3 7/9] powerpc/pseries/htmdump: Add htm flags support to htmdump module

2025-04-20 Thread Athira Rajeev
Under debugfs folder, "/sys/kernel/debug/powerpc/htmdump", add file "htmflags". Currently supported flag value is to enable/disable HTM buffer wrap. wrap is used along with "configure" to prevent HTM buffer from wrapping. Writing 1 will set noWrap while configur

[PATCH V3 8/9] powerpc/pseries/htmdump: Add htm capabilities support to htmdump module

2025-04-20 Thread Athira Rajeev
uffer from the hcall. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote --- arch/powerpc/platforms/pseries/htmdump.c | 40 1 file changed, 40 insertions(+) diff --git a/arch/powerpc/platforms/pseries/htmdump.c b/arch/powerpc/platforms/pseries/htmdump.c index dc5cdc

[PATCH V3 9/9] powerpc/pseries/htmdump: Add documentation for H_HTM debugfs interface

2025-04-20 Thread Athira Rajeev
Documentation for HTM (Hardware Trace Macro) debugfs interface and how it can be used to configure/control the HTM operations. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote --- Documentation/arch/powerpc/htm.rst | 104 + 1 file changed, 104 insertions

[PATCH V3 6/9] powerpc/pseries/htmdump: Add htm setup support to htmdump module

2025-04-20 Thread Athira Rajeev
TM buffer by writing size of HTM buffer in power of 2 to the "htmsetup" file Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote --- arch/powerpc/platforms/pseries/htmdump.c | 38 1 file changed, 38 insertions(+) diff --git a/arch/powerpc/platforms/pse

[PATCH V3 5/9] powerpc/pseries/htmdump: Add htm info support to htmdump module

2025-04-20 Thread Athira Rajeev
from the hcall. The 16th offset of HTM buffer has value for the number of entries for array of processors. Use this information to copy data to the debugfs file Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote --- arch/powerpc/platforms/pseries/htmdump.c | 51

[PATCH V3 4/9] powerpc/pseries/htmdump: Add htm status support to htmdump module

2025-04-20 Thread Athira Rajeev
. The 16th offset of HTM status buffer has value for the number of HTM entries in the status buffer. Each nest htm status entry is 0x6 bytes, where as core HTM status entry is 0x8 bytes. Calculate the number of bytes to read based on this detail. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao

[PATCH V3 3/9] powerpc/pseries/htmdump: Add htm start support to htmdump module

2025-04-20 Thread Athira Rajeev
g by writing value "0" to this file. Any other value returns -EINVAL. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote --- arch/powerpc/platforms/pseries/htmdump.c | 50 1 file changed, 50 insertions(+) diff --git a/arch/powerpc/platforms/pseries/htm

[PATCH V3 2/9] powerpc/pseries/htmdump: Add htm configure support to htmdump module

2025-04-20 Thread Athira Rajeev
via this file by writing value "0". Any other value returns -EINVAL. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote --- arch/powerpc/platforms/pseries/htmdump.c | 56 1 file changed, 56 insertions(+) diff --git a/arch/powerpc/platforms/pse

[PATCH V3 1/9] powerpc/pseries/htmdump: Add htm_hcall_wrapper to integrate other htm operations

2025-04-20 Thread Athira Rajeev
a separate function so that it can be reused for other option too. Add check to disable the interface in guest environment. Signed-off-by: Athira Rajeev Tested-by: Venkat Rao Bagalkote --- arch/powerpc/include/asm/plpar_wrappers.h | 18 +-- arch/powerpc/platforms/pseries/htmdu

[PATCH V3 0/9] Add support for configure and control of Hardware Trace Macro(HTM)

2025-04-20 Thread Athira Rajeev
1 and 0 to enable/disable HTM during some of the operations, use macro (ex: HTM_ENABLE, HTM_DISABLE for 1, 0 respectively 3. In code where htm return code gives negative, add a failure message V1 -> V2: V2: Venkat reported that patch 7 failed to apply on powerpc-next. Fixed that in

Re: [PATCH] tools/lib/perf: Fix -Werror=alloc-size-larger-than in cpumap.c

2025-04-06 Thread Athira Rajeev
> it "unsigned int" fixes the issues. > > After the fix: > > CC util/pmu-flex.o > CC util/expr-flex.o > LD util/perf-util-in.o > LD perf-util-in.o > AR libperf-util.a > LINKperf > GEN python/perf.cpython-312-powerpc64

[PATCH V2 5/9] powerpc/pseries/htmdump: Add htm info support to htmdump module

2025-04-05 Thread Athira Rajeev
the hcall. The 16th offset of HTM buffer has value for the number of entries for array of processors. Use this information to copy data to the debugfs file Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 49 1 file changed, 49 insertions(+

Re: [PATCH v5 6/6] powerpc/kvm-hv-pmu: Add perf-events for Hostwide counters

2025-04-05 Thread Athira Rajeev
date the 'struct perf_event's event-counter. > > Some minor updates to kvmppc_pmu_{add, del, read}() to remove some debug > scaffolding code. > > Signed-off-by: Vaibhav Jain Thanks Vaibhav for including the changes in V5. Changes looks good to me in patches for perf events.

Re: [PATCH 0/9] Add support for configure and control of Hardware Trace Macro(HTM)

2025-04-05 Thread Athira Rajeev
> On 20 Mar 2025, at 6:43 PM, Venkat Rao Bagalkote > wrote: > > On 14/03/25 7:25 pm, Athira Rajeev wrote: >> H_HTM (Hardware Trace Macro) hypervisor call is an HCALL to export >> data from Hardware Trace Macro (HTM) function. The debugfs interface >> to exp

Re: [PATCH] tools/perf/arch/powerpc/util: Fix is_compat_mode build break in ppc64

2025-03-22 Thread Athira Rajeev
dle > compatible mode PVR for perf json events") > Signed-off-by: Likhitha Korrapati Hi Likhitha, Thanks for the fix. Reviewed-by: Athira Rajeev Thanks Athira > --- > tools/perf/arch/powerpc/util/header.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >

[PATCH V2 6/9] powerpc/pseries/htmdump: Add htm setup support to htmdump module

2025-03-21 Thread Athira Rajeev
TM buffer by writing size of HTM buffer in power of 2 to the "htmsetup" file Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 36 1 file changed, 36 insertions(+) diff --git a/arch/powerpc/platforms/pseries/htmdump.c b/arch/powerpc/pla

[PATCH V2 7/9] powerpc/pseries/htmdump: Add htm flags support to htmdump module

2025-03-21 Thread Athira Rajeev
Under debugfs folder, "/sys/kernel/debug/powerpc/htmdump", add file "htmflags". Currently supported flag value is to enable/disable HTM buffer wrap. wrap is used along with "configure" to prevent HTM buffer from wrapping. Writing 1 will set noWrap while configur

[PATCH V2 9/9] powerpc/pseries/htmdump: Add documentation for H_HTM debugfs interface

2025-03-21 Thread Athira Rajeev
Documentation for HTM (Hardware Trace Macro) debugfs interface and how it can be used to configure/control the HTM operations. Signed-off-by: Athira Rajeev --- Documentation/arch/powerpc/htm.rst | 104 + 1 file changed, 104 insertions(+) create mode 100644

[PATCH V2 8/9] powerpc/pseries/htmdump: Add htm capabilities support to htmdump module

2025-03-21 Thread Athira Rajeev
from the hcall. Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 38 1 file changed, 38 insertions(+) diff --git a/arch/powerpc/platforms/pseries/htmdump.c b/arch/powerpc/platforms/pseries/htmdump.c index 45f8254fe322..f21d738ddecb 100644 ---

[PATCH V2 2/9] powerpc/pseries/htmdump: Add htm configure support to htmdump module

2025-03-21 Thread Athira Rajeev
via this file by writing value "0". Any other value returns -EINVAL. Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 52 1 file changed, 52 insertions(+) diff --git a/arch/powerpc/platforms/pseries/htmdump.c b/arch/powerpc/platfo

[PATCH V2 4/9] powerpc/pseries/htmdump: Add htm status support to htmdump module

2025-03-21 Thread Athira Rajeev
16th offset of HTM status buffer has value for the number of HTM entries in the status buffer. Each nest htm status entry is 0x6 bytes, where as core HTM status entry is 0x8 bytes. Calculate the number of bytes to read based on this detail. Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/ps

[PATCH V2 3/9] powerpc/pseries/htmdump: Add htm start support to htmdump module

2025-03-21 Thread Athira Rajeev
g by writing value "0" to this file. Any other value returns -EINVAL. Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 48 1 file changed, 48 insertions(+) diff --git a/arch/powerpc/platforms/pseries/htmdump.c b/arch/powerpc/platfo

[PATCH V2 1/9] powerpc/pseries/htmdump: Add htm_hcall_wrapper to integrate other htm operations

2025-03-21 Thread Athira Rajeev
a separate function so that it can be reused for other option too. Signed-off-by: Athira Rajeev --- arch/powerpc/include/asm/plpar_wrappers.h | 18 +--- arch/powerpc/platforms/pseries/htmdump.c | 55 +-- 2 files changed, 55 insertions(+), 18 deletions(-) diff --git a/arch/power

[PATCH V2 0/9] Add support for configure and control of Hardware Trace Macro(HTM)

2025-03-21 Thread Athira Rajeev
start # Stop the HTM # echo 0 > htmconfigure # Deconfigure the HTM # cat htmstatus # Dump the status of HTM entries as data Changelog: V2: Venkat reported that patch 7 failed to apply on powerpc-next. Fixed that in V2. Athira Rajeev (9): powerpc/pseries/htmdump: Add htm_hcall_wra

[PATCH 5/9] powerpc/pseries/htmdump: Add htm info support to htmdump module

2025-03-15 Thread Athira Rajeev
the hcall. The 16th offset of HTM buffer has value for the number of entries for array of processors. Use this information to copy data to the debugfs file Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 49 1 file changed, 49 insertions(+

[PATCH 8/9] powerpc/pseries/htmdump: Add htm capabilities support to htmdump module

2025-03-14 Thread Athira Rajeev
from the hcall. Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 38 1 file changed, 38 insertions(+) diff --git a/arch/powerpc/platforms/pseries/htmdump.c b/arch/powerpc/platforms/pseries/htmdump.c index 0b3bed738db5..3d30af0304d6 100644 ---

[PATCH 6/9] powerpc/pseries/htmdump: Add htm setup support to htmdump module

2025-03-14 Thread Athira Rajeev
TM buffer by writing size of HTM buffer in power of 2 to the "htmsetup" file Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 36 1 file changed, 36 insertions(+) diff --git a/arch/powerpc/platforms/pseries/htmdump.c b/arch/powerpc/pla

[PATCH 9/9] powerpc/pseries/htmdump: Add documentation for H_HTM debugfs interface

2025-03-14 Thread Athira Rajeev
Documentation for HTM (Hardware Trace Macro) debugfs interface and how it can be used to configure/control the HTM operations. Signed-off-by: Athira Rajeev --- Documentation/arch/powerpc/htm.rst | 104 + 1 file changed, 104 insertions(+) create mode 100644

[PATCH 7/9] powerpc/pseries/htmdump: Add htm flags support to htmdump module

2025-03-14 Thread Athira Rajeev
Under debugfs folder, "/sys/kernel/debug/powerpc/htmdump", add file "htmflags". Currently supported flag value is to enable/disable HTM buffer wrap. wrap is used along with "configure" to prevent HTM buffer from wrapping. Writing 1 will set noWrap while configur

[PATCH 4/9] powerpc/pseries/htmdump: Add htm status support to htmdump module

2025-03-14 Thread Athira Rajeev
16th offset of HTM status buffer has value for the number of HTM entries in the status buffer. Each nest htm status entry is 0x6 bytes, where as core HTM status entry is 0x8 bytes. Calculate the number of bytes to read based on this detail. Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/ps

[PATCH 1/9] powerpc/pseries/htmdump: Add htm_hcall_wrapper to integrate other htm operations

2025-03-14 Thread Athira Rajeev
a separate function so that it can be reused for other option too. Signed-off-by: Athira Rajeev --- arch/powerpc/include/asm/plpar_wrappers.h | 18 +--- arch/powerpc/platforms/pseries/htmdump.c | 55 +-- 2 files changed, 55 insertions(+), 18 deletions(-) diff --git a/arch/power

[PATCH 3/9] powerpc/pseries/htmdump: Add htm start support to htmdump module

2025-03-14 Thread Athira Rajeev
g by writing value "0" to this file. Any other value returns -EINVAL. Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 48 1 file changed, 48 insertions(+) diff --git a/arch/powerpc/platforms/pseries/htmdump.c b/arch/powerpc/platfo

[PATCH 2/9] powerpc/pseries/htmdump: Add htm configure support to htmdump module

2025-03-14 Thread Athira Rajeev
via this file by writing value "0". Any other value returns -EINVAL. Signed-off-by: Athira Rajeev --- arch/powerpc/platforms/pseries/htmdump.c | 52 1 file changed, 52 insertions(+) diff --git a/arch/powerpc/platforms/pseries/htmdump.c b/arch/powerpc/platfo

[PATCH 0/9] Add support for configure and control of Hardware Trace Macro(HTM)

2025-03-14 Thread Athira Rajeev
start # Stop the HTM # echo 0 > htmconfigure # Deconfigure the HTM # cat htmstatus # Dump the status of HTM entries as data Athira Rajeev (9): powerpc/pseries/htmdump: Add htm_hcall_wrapper to integrate other htm operations powerpc/pseries/htmdump: Add htm configure support

Re: [PATCH v4 4/6] kvm powerpc/book3s-apiv2: Introduce kvm-hv specific PMU

2025-03-11 Thread Athira Rajeev
> On 10 Mar 2025, at 12:42 PM, Vaibhav Jain wrote: > > Athira Rajeev writes: > >>> On 24 Feb 2025, at 6:45 PM, Vaibhav Jain wrote: >>> >>> Introduce a new PMU named 'kvm-hv' inside a new module named 'kvm-hv-pmu' >>> to

Re: [PATCH v4 6/6] powerpc/kvm-hv-pmu: Add perf-events for Hostwide counters

2025-03-11 Thread Athira Rajeev
> On 11 Mar 2025, at 3:02 PM, Vaibhav Jain wrote: > > Athira Rajeev writes: > >>> On 24 Feb 2025, at 6:45 PM, Vaibhav Jain wrote: >>> >>> Update 'kvm-hv-pmu.c' to add five new perf-events mapped to the five >>> Hostwide counte

Re: [PATCH v4 6/6] powerpc/kvm-hv-pmu: Add perf-events for Hostwide counters

2025-03-09 Thread Athira Rajeev
> On 24 Feb 2025, at 6:45 PM, Vaibhav Jain wrote: > > Update 'kvm-hv-pmu.c' to add five new perf-events mapped to the five > Hostwide counters. Since these newly introduced perf events are at system > wide scope and can be read from any L1-Lpar CPU, 'kvmppc_pmu' scope and > capabilities are up

Re: [PATCH v4 4/6] kvm powerpc/book3s-apiv2: Introduce kvm-hv specific PMU

2025-03-09 Thread Athira Rajeev
> On 24 Feb 2025, at 6:45 PM, Vaibhav Jain wrote: > > Introduce a new PMU named 'kvm-hv' inside a new module named 'kvm-hv-pmu' > to report Book3s kvm-hv specific performance counters. This will expose > KVM-HV specific performance attributes to user-space via kernel's PMU > infrastructure and

[PATCH 2/2] tools/perf/powerpc: Use return code from disasm_line__parse

2025-03-04 Thread Athira Rajeev
In disasm_line__parse_powerpc() , return code from function disasm_line__parse() is ignored. This will result in bad results if the disasm_line__parse fails to disasm the line. Use the return code to fix this. Signed-off-by: Athira Rajeev --- tools/perf/util/disasm.c | 5 +++-- 1 file changed

[PATCH 1/2] tools/perf: Add field to annotation options to determine disassembler used

2025-03-04 Thread Athira Rajeev
er used. Use this info to determine if disassembly is done while parsing the disasm line. Reported-by: Tejas Manhas Signed-off-by: Athira Rajeev --- tools/perf/util/annotate.h | 1 + tools/perf/util/disasm.c | 22 +- 2 files changed, 14 insertions(+), 9 deletions(-)

Re: [PATCH V2] tools/perf: Pick the correct dwarf die while adding probe point for a function

2025-02-26 Thread Athira Rajeev
> On 26 Feb 2025, at 6:35 PM, Masami Hiramatsu (Google) > wrote: > > On Tue, 25 Feb 2025 18:00:42 +0530 > Athira Rajeev wrote: > >> Perf probe on vfs_fstatat fails as below on a powerpc system >> >> ./perf probe -nf --max-probes=512 -a 'vfs_fst

Re: [PATCH] tools/perf: Use perf_tool__init() to initialize default values in builtin trace

2025-02-26 Thread Athira Rajeev
> On 27 Feb 2025, at 6:08 AM, Namhyung Kim wrote: > > On Tue, Feb 25, 2025 at 05:01:57PM +0530, Athira Rajeev wrote: >> Perf trace on perf.data fails as below: >> >> ./perf trace record -- sleep 1 >> ./perf trace -i perf.data >> perf: Segmentation f

Re: [PATCH V2] tools/perf: Pick the correct dwarf die while adding probe point for a function

2025-02-26 Thread Athira Rajeev
> On 25 Feb 2025, at 6:00 PM, Athira Rajeev wrote: > > Perf probe on vfs_fstatat fails as below on a powerpc system > > ./perf probe -nf --max-probes=512 -a 'vfs_fstatat $params' > Segmentation fault (core dumped) > > This is observed while running

[PATCH V2] tools/perf: Pick the correct dwarf die while adding probe point for a function

2025-02-25 Thread Athira Rajeev
the actual DW_TAG_subprogram as part of "struct probe_finder". In copy_variables_cb(), include check to make sure the DW_AT_abstract_origin points to the correct entry if the dwarf_haspc() matches the instruction address. Signed-off-by: Athira Rajeev --- Changelog: v1 -> v2: Ins

[PATCH] tools/perf: Use perf_tool__init() to initialize default values in builtin trace

2025-02-25 Thread Athira Rajeev
lts are not initialized. Use perf_tool__init() in perf trace to handle the initialization. Reported-by: Tejas Manhas Signed-off-by: Athira Rajeev --- tools/perf/builtin-trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index f55

Re: [PATCH] tools/perf: Pick the correct dwarf die while adding probe point for a function

2025-02-24 Thread Athira Rajeev
> On 19 Feb 2025, at 4:06 AM, Namhyung Kim wrote: > > Added Masami. > > On Wed, Feb 12, 2025 at 06:49:49PM +0530, Athira Rajeev wrote: >> Perf probe on vfs_fstatat fails as below on a powerpc system >> >> ./perf probe -nf --max-probes=512 -a 'vfs_fstata

Re: [PATCH] tools/perf: Add check to tool pmu tests to ensure if the event is valid

2025-02-17 Thread Athira Rajeev
> On 13 Feb 2025, at 9:04 AM, Namhyung Kim wrote: > > On Thu, Feb 13, 2025 at 12:24:38AM +0530, Athira Rajeev wrote: >> "Tool PMU" tests fails on powerpc as below: >> >> 12.1: Parsing without PMU name: >> --- start --- >> test ch

Re: [PATCH] tools/perf: Add check to tool pmu tests to ensure if the event is valid

2025-02-17 Thread Athira Rajeev
> On 13 Feb 2025, at 9:04 AM, Namhyung Kim wrote: > > On Thu, Feb 13, 2025 at 12:24:38AM +0530, Athira Rajeev wrote: >> "Tool PMU" tests fails on powerpc as below: >> >> 12.1: Parsing without PMU name: >> --- start --- >> test ch

[PATCH] tools/perf: Add check to tool pmu tests to ensure if the event is valid

2025-02-12 Thread Athira Rajeev
ent, the helper function helps to resolve the tool_pmu_event index to its mapping event name. Update the testcase to check for null event names before proceeding the test. Signed-off-by: Athira Rajeev --- tools/perf/tests/tool_pmu.c | 12 tools/perf/util/tool_pmu.c | 17 +++

[PATCH] tools/perf: Pick the correct dwarf die while adding probe point for a function

2025-02-12 Thread Athira Rajeev
the actual DW_TAG_subprogram as part of "struct probe_finder". In copy_variables_cb(), include check to make sure the DW_AT_abstract_origin points to the correct entry if the dwarf_haspc() matches the instruction address. Signed-off-by: Athira Rajeev --- tools/perf/util/probe-finde

Re: [PATCH v3 4/6] kvm powerpc/book3s-apiv2: Introduce kvm-hv specific PMU

2025-01-24 Thread Athira Rajeev
> On 23 Jan 2025, at 5:37 PM, Vaibhav Jain wrote: > > Introduce a new PMU named 'kvm-hv' to report Book3s kvm-hv specific > performance counters. This will expose KVM-HV specific performance > attributes to user-space via kernel's PMU infrastructure and would enable > users to monitor active k

[PATCH V3 2/2] arch/powerpc/perf: Update get_mem_data_src function to use saved values of sier and mmcra regs

2025-01-21 Thread Athira Rajeev
ster A) so that we only need to read these once on each interrupt. Update the isa207_get_mem_data_src function to use regs->dar instead of reading from SPRN_SIER again. Also use regs->dsisr to read the mmcra value Signed-off-by: Athira Rajeev --- arch/powerpc/perf/isa207-common.c | 14 +

[PATCH V3 1/2] arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src

2025-01-21 Thread Athira Rajeev
reserved. In ISA v3.1, value "7" has been used to indicate "larx/stcx". Drop the sample if instruction type has reserved values for this field with a ISA version check. Initialize data_src to zero in isa207_get_mem_data_src if the instruction type is not load/store. Rep

Re: [PATCH] tools/perf/tests: Update event_groups test to use instructions as one of the sibling event for hw type

2025-01-20 Thread Athira Rajeev
> On 20 Jan 2025, at 12:00 PM, Ravi Bangoria wrote: > > Hi Athira, > > On 10-Jan-25 3:16 PM, Athira Rajeev wrote: >> In some of the powerpc platforms, event group testcase fails as below: >> >> # perf test -v &#x

[PATCH V2 2/2] arch/powerpc/perf: Update get_mem_data_src function to use saved values of sier and mmcra regs

2025-01-18 Thread Athira Rajeev
ster A) so that we only need to read these once on each interrupt. Update the isa207_get_mem_data_src function to use regs->dar instead of reading from SPRN_SIER again. Also use regs->dsisr to read the mmcra value Signed-off-by: Athira Rajeev --- arch/powerpc/perf/isa207-common.c | 14 +

[PATCH V2 1/2] arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src

2025-01-18 Thread Athira Rajeev
reserved. In ISA v3.1, value "7" has been used to indicate "larx/stcx". Drop the sample if instruction type has reserved values for this field with a ISA version check. Initialize data_src to zero in isa207_get_mem_data_src if the instruction type is not load/store. Reported-by: D

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

2025-01-15 Thread Athira Rajeev
> On 14 Jan 2025, at 3:47 AM, Namhyung Kim wrote: > > On Fri, Jan 10, 2025 at 03:07:30PM +0530, Athira Rajeev wrote: >> perf lock contention returns zero exit value even if the lock contention >> BPF setup failed. >> >> # ./perf lock con -b true >>

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

2025-01-13 Thread Athira Rajeev
> On 13 Jan 2025, at 8:59 PM, Arnaldo Carvalho de Melo wrote: > > On Mon, Jan 06, 2025 at 01:25:32PM -0800, Namhyung Kim wrote: >> On Fri, Dec 27, 2024 at 04:18:32PM +0530, Athira Rajeev wrote: >>> >>> >>>> On 23 Dec 2024, at 7:28 PM, Athira R

Re: [PATCH V2] tools/perf/tests/base_probe: Fix check for the count of existing probes in test_adding_kernel

2025-01-13 Thread Athira Rajeev
> On 13 Jan 2025, at 8:36 PM, Arnaldo Carvalho de Melo wrote: > > On Mon, Jan 13, 2025 at 11:21:24AM +0100, Veronika Molnarova wrote: >> On 1/10/25 10:43, Athira Rajeev wrote: >>> But if there are other probes in the system, the log will >>> contain refe

Re: [PATCH v6 2/3] powerpc/pseries: Export hardware trace macro dump via debugfs

2025-01-13 Thread Athira Rajeev
-ma...@linux.ibm.com/ Please move the Changelog and v3 patch reference to below where it won’t come as part of git log > > Signed-off-by: Abhishek Dubey > Co-developed-by: Madhavan Srinivasan > Signed-off-by: Madhavan Srinivasan > — Here we can add the changelog. With that change, R

[PATCH V2 1/5] tools/testing/selftests/powerpc: Enable pmu selftests for power11

2025-01-13 Thread Athira Rajeev
platform specific bits from sampling registers. Signed-off-by: Athira Rajeev --- Changelog: v1 -> v2 No code changes. Rebased to latest upstream .../selftests/powerpc/pmu/sampling_tests/misc.c | 11 ++- .../selftests/powerpc/pmu/sampling_tests/misc.h | 10 ++ 2 fi

[PATCH V2 4/5] selftests/powerpc/pmu: Add interface test for extended reg support

2025-01-13 Thread Athira Rajeev
From: Kajol Jain The testcase uses check_extended_regs_support and perf_get_platform_reg_mask function to check if the platform has extended reg support. This will help to check if sampling pmu selftest is enabled or not for a given platform. Signed-off-by: Kajol Jain Signed-off-by: Athira

[PATCH V2 5/5] selftests/powerpc/pmu: Update comment with details to understand auxv_generic_compat_pmu() utility function

2025-01-12 Thread Athira Rajeev
auxv_generic_compat_pmu() utility function is to detect whether the system is having generic compat PMU. The check is based on base platform value from /proc/self/auxv. Update the comment with details on how auxv is used to detect the platform. Signed-off-by: Athira Rajeev --- Changelog: v1

[PATCH V2 2/5] tools/testing/selftests/powerpc: Add check for power11 pvr for pmu selfests

2025-01-12 Thread Athira Rajeev
bhrb filter to use - reserved_bits_mmcra_sample_elig_mode: randome sampling mode reserved bits is also varies based on platform Signed-off-by: Athira Rajeev --- Changelog: v1 -> v2 No code changes. Rebased to latest upstream .../pmu/event_code_tests/event_alternatives_tests_p10.c

[PATCH V2 3/5] tools/testing/selftests/powerpc/pmu: Update comment description to mention ISA v3.1 for power10 and above

2025-01-12 Thread Athira Rajeev
Updated the comments in the pmu selftests to include power11/ISA v3.1 where ever required. Signed-off-by: Athira Rajeev --- Changelog: v1 -> v2 No code changes. Rebased to latest upstream .../event_code_tests/group_constraint_l2l3_sel_test.c |

[PATCH 2/2] arch/powerpc/perf: Update get_mem_data_src function to use saved values of sier and mmcra regs

2025-01-12 Thread Athira Rajeev
ster A) so that we only need to read these once on each interrupt. Update the isa207_get_mem_data_src function to use regs->dar instead of reading from SPRN_SIER again. Also use regs->dsisr to read the mmcra value Reported-by: Disha Goel Signed-off-by: Athira Rajeev --- arch/powerpc

[PATCH 1/2] arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src

2025-01-12 Thread Athira Rajeev
reserved. In ISA v3.1, value "7" has been used to indicate "larx/stcx". Drop the sample if instruction type has reserved values for this field with a ISA version check. Initialize data_src to zero in isa207_get_mem_data_src if the instruction type is not load/store. Reported-by

[PATCH] tools/perf/tests: Update event_groups test to use instructions as one of the sibling event for hw type

2025-01-10 Thread Athira Rajeev
ons as one of the sibling event. Since PERF_COUNT_HW_INSTRUCTIONS is a generic hardware event and present in all architectures, use this as third event. Reported-by: Tejas Manhas Signed-off-by: Athira Rajeev --- tools/perf/tests/event_groups.c | 31 ++- 1 file cha

[PATCH V2] tools/perf/tests/base_probe: Fix check for the count of existing probes in test_adding_kernel

2025-01-10 Thread Athira Rajeev
ther probes in the system, the log will contain reference to other existing probe too. Hence change usage of check_all_lines_matched.pl to check_all_patterns_found.pl This will make sure expecting string comes in the result Signed-off-by: Athira Rajeev --- Changelog: v1 -> v2: No code changes. A

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

2025-01-10 Thread Athira Rajeev
led # echo $? 0 Fix this by saving the return code for lock_contention_prepare so that command exits with proper return 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 --- Changelog: v1 ->

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

2025-01-10 Thread Athira Rajeev
> On 7 Jan 2025, at 2:45 AM, Namhyung Kim wrote: > > 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

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

2025-01-09 Thread Athira Rajeev
> On 7 Jan 2025, at 2:55 AM, Namhyung Kim wrote: > > On Fri, Dec 27, 2024 at 04:18:32PM +0530, Athira Rajeev wrote: >> >> >>> On 23 Dec 2024, at 7:28 PM, Athira Rajeev >>> wrote: >>> >>> When kernel is built without debuginfo, runn

Re: [PATCH 1/2] powerpc/vpa_dtl: Add interface to expose vpa dtl counters via perf

2025-01-05 Thread Athira Rajeev
h_stats), interface added code to use > "down_write_trylock" call to take the dtl_access_lock. The dtl_access_lock > is defined in dtl.h file. Also added global reference count variable called > "dtl_global_refc", to ensure dtl data can be captured per-cpu. Code also >

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

2024-12-27 Thread Athira Rajeev
> On 23 Dec 2024, at 7:26 PM, 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_

Re: [PATCH] tools/perf/tests/base_probe: Fix check for the count of existing probes in test_adding_kernel

2024-12-27 Thread Athira Rajeev
> On 17 Dec 2024, at 12:27 AM, Athira Rajeev > wrote: > > > >> On 5 Dec 2024, at 11:16 PM, Athira Rajeev >> wrote: >> >> >> >>> On 14 Nov 2024, at 3:35 PM, Michael Petlan wrote: >>> >>> On Sun, 3 Nov 2024, Athi

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

2024-12-27 Thread Athira Rajeev
> On 23 Dec 2024, at 7:28 PM, Athira Rajeev wrote: > > When kernel is built without debuginfo, running perf record with > --off-cpu results in segfault as below: > > ./perf record --off-cpu -e dummy sleep 1 > libbpf: kernel BTF is missing at '/sy

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

2024-12-23 Thread Athira Rajeev
f__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 value and results in segfault. To fix this, add a check to see if btf is not NULL before invoking bpf__find_by_name_kind Signed-off-by: Athira Rajeev --- tools/perf/util/bpf_off_cpu.

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

2024-12-23 Thread Athira Rajeev
d # echo $? 0 Fix this by saving the return code for lock_contention_prepare so that command exits with proper return code Signed-off-by: Athira Rajeev --- tools/perf/builtin-lock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-lock.c b/tools/perf/

[PATCH 4/4] selftests/powerpc/pmu: Add interface test for extended reg support

2024-12-20 Thread Athira Rajeev
From: Kajol Jain The testcase uses check_extended_regs_support and perf_get_platform_reg_mask function to check if the platform has extended reg support. This will help to check if sampling pmu selftest is enabled or not for a given platform. Signed-off-by: Kajol Jain Signed-off-by: Athira

[PATCH 3/4] tools/testing/selftests/powerpc/pmu: Update comment description to mention ISA v3.1 for power10 and above

2024-12-20 Thread Athira Rajeev
Updated the comments in the pmu selftests to include power11/ISA v3.1 where ever required. Signed-off-by: Athira Rajeev --- .../event_code_tests/group_constraint_l2l3_sel_test.c | 2 +- .../group_constraint_radix_scope_qual_test.c | 2 +- .../group_constraint_thresh_cmp_test.c

[PATCH 1/4] tools/testing/selftests/powerpc: Enable pmu selftests for power11

2024-12-20 Thread Athira Rajeev
platform specific bits from sampling registers. Signed-off-by: Athira Rajeev --- .../selftests/powerpc/pmu/sampling_tests/misc.c | 11 ++- .../selftests/powerpc/pmu/sampling_tests/misc.h | 10 ++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/tools/testing

[PATCH 2/4] tools/testing/selftests/powerpc: Add check for power11 pvr for pmu selfests

2024-12-20 Thread Athira Rajeev
bhrb filter to use - reserved_bits_mmcra_sample_elig_mode: randome sampling mode reserved bits is also varies based on platform Signed-off-by: Athira Rajeev --- .../pmu/event_code_tests/event_alternatives_tests_p10.c| 3 ++- .../pmu/event_code_tests/generic_events_valid_test.c | 3

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

2024-12-16 Thread Athira Rajeev
> On 12 Dec 2024, at 12:37 PM, Namhyung Kim wrote: > > 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

Re: [PATCH] tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs

2024-12-16 Thread Athira Rajeev
> On 16 Dec 2024, at 10:15 PM, Arnaldo Carvalho de Melo wrote: > > On Mon, Dec 16, 2024 at 03:32:12PM +0530, Athira Rajeev wrote: >>> On 11 Dec 2024, at 5:32 PM, kajoljain wrote: >>> On 12/6/24 19:26, Athira Rajeev wrote: >>>> Perf tools side use

Re: [PATCH] tools/perf/tests/base_probe: Fix check for the count of existing probes in test_adding_kernel

2024-12-16 Thread Athira Rajeev
> On 5 Dec 2024, at 11:16 PM, Athira Rajeev wrote: > > > >> On 14 Nov 2024, at 3:35 PM, Michael Petlan wrote: >> >> On Sun, 3 Nov 2024, Athira Rajeev wrote: >>>> On 17 Oct 2024, at 3:44 PM, Michael Petlan wrote: >>>> >>>&g

Re: [PATCH] tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs

2024-12-16 Thread Athira Rajeev
> On 11 Dec 2024, at 5:32 PM, kajoljain wrote: > > > > On 12/6/24 19:26, Athira Rajeev wrote: >> Perf tools side uses extended mask to display the platform >> supported register names (with -I? option) to the user >> and also send this mask to the kernel

[PATCH] tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs

2024-12-06 Thread Athira Rajeev
for power11 to enable capturing the extended regs as part of sample in power11. Signed-off-by: Athira Rajeev --- tools/perf/arch/powerpc/util/perf_regs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/arch/powerpc/util/perf_regs.c b/tools/perf/arch/powerpc/util

[PATCH V3] tools/perf/tests/shell/base_probe: Enhance print_overall_results to print summary information

2024-12-06 Thread Athira Rajeev
Use the check for presence of dwarf with "perf check feature" and append the hint message based on the result. With the change: ## [ FAIL ] ## perf_probe :: test_invalid_options SUMMARY :: 11 failures found :: Some of the tests need DWARF to run Signed-off-by: Athira Rajeev --- Chan

Re: [PATCH] tools/perf/tests/base_probe: Fix check for the count of existing probes in test_adding_kernel

2024-12-05 Thread Athira Rajeev
> On 14 Nov 2024, at 3:35 PM, Michael Petlan wrote: > > On Sun, 3 Nov 2024, Athira Rajeev wrote: >>> On 17 Oct 2024, at 3:44 PM, Michael Petlan wrote: >>> >>> On Mon, 14 Oct 2024, Athira Rajeev wrote: > [...] >>> >>> I am wonderin

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

2024-12-05 Thread Athira Rajeev
the parsing is x86 specific and only yields a non-zero value on > Intel. > > Fixes: 609aa2667f67 ("perf tool_pmu: Switch to standard pmu functions and > json descriptions") > Reported-by: Athira Rajeev > Closes: > https://lore.kernel.org/linux-perf-users/2024102

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

2024-12-05 Thread Athira Rajeev
> On 3 Dec 2024, at 11:46 PM, 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, >>> &g

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

2024-11-07 Thread Athira Rajeev
> 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 you for the detailed explanation. As &g

  1   2   3   4   5   6   7   8   9   10   >