Re: [PATCH 2/4] perf: jevents: Program to convert JSON file to C style file

2015-05-27 Thread Namhyung Kim
icenced too. As part of perf they become GPLv2. > > Signed-off-by: Andi Kleen > Signed-off-by: Sukadev Bhattiprolu > > v2: Address review feedback. Rename option to --event-files > v3: Add JSON example > v4: Update manpages. > v5: Don't remove dot in fixname. Fix compi

Re: [PATCH 4/4] perf: Add power8 PMU events in JSON format

2015-05-27 Thread Namhyung Kim
On Tue, May 19, 2015 at 05:02:10PM -0700, Sukadev Bhattiprolu wrote: > The power8.json and 004d0100.json files describe the PMU events in the > Power8 processor. > > The jevents program from the prior patches will use these JSON files > to create tables which will then be used in perf to build ali

Re: [PATCH 2/4] perf: jevents: Program to convert JSON file to C style file

2015-05-27 Thread Namhyung Kim
Hi Andi, On Wed, May 27, 2015 at 11:40 PM, Andi Kleen wrote: >> So we build tables of all models in the architecture, and choose >> matching one when compiling perf, right? Can't we do that when >> building the tables? IOW, why don't we check the VFM and discard >> non-matching tables? Those n

Re: [PATCH 4/4] perf: Add power8 PMU events in JSON format

2015-05-27 Thread Namhyung Kim
On Wed, May 27, 2015 at 11:41 PM, Andi Kleen wrote: >> > + { >> > +"EventCode": "0x2505e", >> > +"EventName": "PM_BACK_BR_CMPL", >> > +"BriefDescription": "Branch instruction completed with a target >> > address less than current instruction address,", >> > +"PublicDescription":

Re: [PATCH v5 07/45] CPU hotplug: Provide APIs to prevent CPU offline from atomic context

2013-01-29 Thread Namhyung Kim
Hi Srivatsa, On Tue, 22 Jan 2013 13:04:54 +0530, Srivatsa S. Bhat wrote: > @@ -246,15 +291,21 @@ struct take_cpu_down_param { > static int __ref take_cpu_down(void *_param) > { > struct take_cpu_down_param *param = _param; > - int err; > + unsigned long flags; > + int err = 0;

Re: [PATCH v5 04/45] percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks

2013-01-29 Thread Namhyung Kim
On Thu, 24 Jan 2013 10:00:04 +0530, Srivatsa S. Bhat wrote: > On 01/24/2013 01:27 AM, Tejun Heo wrote: >> On Thu, Jan 24, 2013 at 01:03:52AM +0530, Srivatsa S. Bhat wrote: >>> CPU 0 CPU 1 >>> >>> read_lock(&rwlock) >>> >>> write_lock(&rwlock) /

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2022-04-15 Thread Namhyung Kim
is_kernel to is_kallsyms * move the logic to generic function * remove arch-specific functions Thanks, Namhyung Namhyung Kim (3): perf symbol: Pass is_kallsyms to symbols__fixup_end() perf symbol: Update symbols__fixup_end() perf symbol: Remove arch__symbols__fixup_end() tools/perf/ar

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

2022-04-15 Thread Namhyung Kim
c function to handle kallsyms differently but currently it cannot distinguish kallsyms from others. Pass this information explicitly to handle it properly. Note that those arch functions will be moved to the generic function so I didn't added it to the arch-functions. Signed-off-by: Namhyung

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

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

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

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

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

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

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

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

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

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

Re: [PATCH 1/3] perf/core: Flush PMU internal buffers for per-CPU events

2020-11-20 Thread Namhyung Kim
Hi Peter and Kan, (Adding PPC folks) On Tue, Nov 17, 2020 at 2:01 PM Namhyung Kim wrote: > > Hello, > > On Thu, Nov 12, 2020 at 4:54 AM Liang, Kan wrote: > > > > > > > > On 11/11/2020 11:25 AM, Peter Zijlstra wrote: > > > On Mon, Nov 0

Re: [PATCH 1/3] perf/core: Flush PMU internal buffers for per-CPU events

2020-11-23 Thread Namhyung Kim
Hello, On Mon, Nov 23, 2020 at 8:00 PM Michael Ellerman wrote: > > Namhyung Kim writes: > > Hi Peter and Kan, > > > > (Adding PPC folks) > > > > On Tue, Nov 17, 2020 at 2:01 PM Namhyung Kim wrote: > >> > >> Hello, > >&g

Re: [PATCH] perf tools: Resolve symbols against debug file first

2021-01-13 Thread Namhyung Kim
gt; The correct result is now: > >> 0.38% main2libantlr4-runtime.so.4.8 [.] > >> antlr4::IntStream::~IntStream > >> > >> Note that these LTO symbols are properly skipped anyway as they belong > >> neither to *text* nor to *data* (is_labe

Re: [PATCH] perf tools: Resolve symbols against debug file first

2021-01-14 Thread Namhyung Kim
Hello, On Thu, Jan 14, 2021 at 8:17 PM Michael Ellerman wrote: > > Namhyung Kim writes: > > On Wed, Jan 13, 2021 at 8:43 PM Jiri Slaby wrote: > >> > >> On 13. 01. 21, 11:46, Jiri Olsa wrote: > >> > On Wed, Jan 13, 2021 at 09:01:28AM +0100, Jiri Slaby

Re: [PATCH 03/18] pstore: Avoid race in module unloading

2017-03-07 Thread Namhyung Kim
Hi Kees, On Tue, Mar 7, 2017 at 6:55 AM, Kees Cook wrote: > Technically, it might be possible for struct pstore_info to go out of > scope after the module_put(), so report the backend name first. But in that case, using pstore will crash the kernel anyway, right? If so, why pstore doesn't keep a

Re: [PATCH 06/18] pstore: Extract common arguments into structure

2017-03-07 Thread Namhyung Kim
On Tue, Mar 7, 2017 at 6:55 AM, Kees Cook wrote: > The read/mkfile pair pass the same arguments and should be cleared > between calls. Move to a structure and wipe it after every loop. > > Signed-off-by: Kees Cook > --- > fs/pstore/platform.c | 55 > +++

Re: [PATCH v6 2/7] perf annotate: Add cross arch annotate support

2016-08-22 Thread Namhyung Kim
Hello, On Tue, Aug 23, 2016 at 8:01 AM, Kim Phillips wrote: > On Fri, 19 Aug 2016 18:29:33 +0530 > Ravi Bangoria wrote: > >> Changes in v6: >> - Instead of adding only those instructions defined in #ifdef __arm__, >> add all instructions from default table to arm table. > .. >> +static str

Re: [PATCH v6 2/7] perf annotate: Add cross arch annotate support

2016-08-25 Thread Namhyung Kim
Hi, On Tue, Aug 23, 2016 at 03:36:17PM -0500, Kim Phillips wrote: > On Tue, 23 Aug 2016 11:17:16 +0900 > Namhyung Kim wrote: > > > On Tue, Aug 23, 2016 at 8:01 AM, Kim Phillips wrote: > > > On Fri, 19 Aug 2016 18:29:33 +0530 > > > Ravi Bangoria

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >