Re: [PATCH V2 1/3] tools/tracing: Use tools/build makefiles on latency-collector

2024-03-15 Thread Arnaldo Carvalho de Melo
On Fri, Mar 15, 2024 at 03:48:58PM +0100, Daniel Bristot de Oliveira wrote: > On 3/15/24 15:24, Daniel Bristot de Oliveira wrote: > > Use tools/build/ makefiles to build latency-collector, inheriting > > the benefits of it. For example: Before this patch, a missing > > tracefs/traceevents headers

Re: [PATCH v8 4/4] libperf: Add support for user space counter access

2021-04-20 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 14, 2021 at 11:07:39AM -0500, Rob Herring escreveu: > x86 and arm64 can both support direct access of event counters in > userspace. The access sequence is less than trivial and currently exists > in perf test code (tools/perf/arch/x86/tests/rdpmc.c) with copies in > projects such as

Re: [PATCH] objtool: prevent memory leak in error paths

2021-04-19 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 15, 2021 at 09:24:41AM +0200, Peter Zijlstra escreveu: > On Wed, Apr 14, 2021 at 11:47:09AM +0300, Dan Carpenter wrote: > > On Wed, Apr 14, 2021 at 01:45:11AM +0500, Muhammad Usama Anjum wrote: > > > Memory allocated by sym and sym->name isn't being freed if some error > > > occurs in

Re: [PATCH 1/1] perf data: Fix error return code in perf_data__create_dir()

2021-04-19 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 15, 2021 at 01:38:40PM +0200, Jiri Olsa escreveu: > On Thu, Apr 15, 2021 at 04:34:16PM +0800, Zhen Lei wrote: > > Although 'ret' has been initialized to -1, but it will be reassigned by > > the "ret = open(...)" statement in the for loop. So that, the value of > > 'ret' is unknown when

Re: [PATCH] perf arm64: Fix off-by-one directory paths.

2021-04-19 Thread Arnaldo Carvalho de Melo
Em Fri, Apr 16, 2021 at 02:41:13PM -0700, Ian Rogers escreveu: > Relative path include works in the regular build due to -I paths but may > break in other situations. Thanks, applied. - Arnaldo > Signed-off-by: Ian Rogers > --- > tools/perf/arch/arm64/util/kvm-stat.c | 4 ++-- >

Re: [PATCH] perf annotate: improve --stdio mode

2021-04-19 Thread Arnaldo Carvalho de Melo
Em Mon, Apr 19, 2021 at 09:39:37AM +0200, Martin Liška escreveu: > @Arnaldo: May I please ping this? Applied the refreshed version, - Arnaldo > Thanks, > Martin > > On 4/8/21 12:08 PM, Martin Liška wrote: > > On 4/7/21 10:25 PM, Arnaldo Carvalho de Melo wrote: > >&

Re: [RESEND PATCH v5 0/4] perf stat: Introduce iostat mode to provide I/O performance metrics

2021-04-19 Thread Arnaldo Carvalho de Melo
mode > 4. Renamed iiostat_delete_root_ports() to iiostat_release() and > iostat_show_root_ports() to iostat_list() > > The previous version can be found at: > v1: > https://lkml.kernel.org/r/20201210090340.14358-1-alexander.anto...@linux.intel.com > > Changes in

Re: [PATCH v2] perf vendor events: Initial json/events list for power10 platform

2021-04-19 Thread Arnaldo Carvalho de Melo
Em Mon, Apr 19, 2021 at 10:38:46PM +1000, Michael Ellerman escreveu: > Kajol Jain writes: > > Patch adds initial json/events for POWER10. > > Acked-by: Michael Ellerman Thanks, applied. - Arnaldo > cheers > > > Signed-off-by: Kajol Jain > > Tested-by: Paul A. Clarke > > Reviewed-by:

Re: [PATCH v2 0/2] perf cs-etm: Set time on synthesised samples to preserve ordering

2021-04-16 Thread Arnaldo Carvalho de Melo
Em Fri, Apr 16, 2021 at 09:07:09AM -0600, Mathieu Poirier escreveu: > Hi James, > > On Fri, Apr 16, 2021 at 01:56:30PM +0300, James Clark wrote: > > Changes since v1: > > * Improved variable name from etm_timestamp -> cs_timestamp > > * Fixed ordering of Signed-off-by > > > > You forgot to

Re: [QUESTION] Will the pahole tar source code with corresponding libbpf submodule codes be released as well in the future?

2021-04-15 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 15, 2021 at 12:01:23PM +0800, Tiezhu Yang escreveu: > (1) tools/bpf/bpftool build failed due to the following reason: > > Error: failed to load BTF from /boot/vmlinux-5.12.0-rc2: No such > file or directory > make: *** [Makefile:158: vmlinux.h] Error 2 > > (2) When set

Re: [PATCH v8 2/4] libperf: Add evsel mmap support

2021-04-15 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 15, 2021 at 03:09:28PM -0500, Rob Herring escreveu: > On Thu, Apr 15, 2021 at 2:37 PM Arnaldo Carvalho de Melo > wrote: > > Ok, b4 failed on it, probably some missing Reply to, so I'll apply it by > > hand: > > That's my fault. A duplicate message-id is t

Re: [PATCH] libperf: xyarray: Add bounds checks to xyarray__entry()

2021-04-15 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 15, 2021 at 04:48:34PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Apr 15, 2021 at 04:46:46PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Wed, Apr 14, 2021 at 03:53:36PM -0500, Rob Herring escreveu: > > > On Wed, Apr 14, 2021 at 3:25 PM N

Re: [PATCH] libperf: xyarray: Add bounds checks to xyarray__entry()

2021-04-15 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 15, 2021 at 04:46:46PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Apr 14, 2021 at 03:53:36PM -0500, Rob Herring escreveu: > > On Wed, Apr 14, 2021 at 3:25 PM Namhyung Kim wrote: > > > > > > On Thu, Apr 15, 2021 at 4:58 AM Rob Herring wrote: >

Re: [PATCH] libperf: xyarray: Add bounds checks to xyarray__entry()

2021-04-15 Thread Arnaldo Carvalho de Melo
t; > > parameters come from external callers. Add bounds checks and an > > > unchecked __xyarray__entry(). > > > > > > Cc: Peter Zijlstra > > > Cc: Ingo Molnar > > > Cc: Arnaldo Carvalho de Melo > > > Cc: Mark Rutland > > &

Re: [PATCH v8 2/4] libperf: Add evsel mmap support

2021-04-15 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 15, 2021 at 04:14:31AM +0900, Namhyung Kim escreveu: > On Thu, Apr 15, 2021 at 3:23 AM Arnaldo Carvalho de Melo > wrote: > > > > Em Wed, Apr 14, 2021 at 03:02:08PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Thu, Apr 15, 2021 at 01:41:35AM +

Re: [PATCH 1/1] perf map: Fix error return code in maps__clone()

2021-04-15 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 15, 2021 at 05:27:44PM +0800, Zhen Lei escreveu: > Although 'err' has been initialized to -ENOMEM, but it will be reassigned > by the "err = unwind__prepare_access(...)" statement in the for loop. So > that, the value of 'err' is unknown when map__clone() failed. You forgot to

Re: [PATCH v2] perf beauty: Fix fsconfig generator

2021-04-14 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 14, 2021 at 04:08:12PM -0300, Arnaldo Carvalho de Melo escreveu: > [root@6db6d5ad9661 perf]# tools/perf/trace/beauty/fsconfig.sh > static const char *fsconfig_cmds[] = { > [0] = "SET_FLAG", > [1] = "SET_STRING", > [2] = &q

Re: [PATCH v2] perf beauty: Fix fsconfig generator

2021-04-14 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 14, 2021 at 09:27:23PM +0300, Vitaly Chikunov escreveu: > After gnulib update sed stopped matching `[[:space:]]*+' as before, > causing the following compilation error: > > In file included from builtin-trace.c:719: > trace/beauty/generated/fsconfig_arrays.c:2:3: error: expected

Re: [PATCH v8 2/4] libperf: Add evsel mmap support

2021-04-14 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 14, 2021 at 03:02:08PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Apr 15, 2021 at 01:41:35AM +0900, Namhyung Kim escreveu: > > Hello, > > > > On Thu, Apr 15, 2021 at 1:07 AM Rob Herring wrote: > > > +void *perf_evsel__mmap_base(struct p

Re: [PATCH] perf beauty: Fix fsconfig generator

2021-04-14 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 14, 2021 at 07:29:42PM +0300, Vitaly Chikunov escreveu: > After gnulib update sed stopped matching `[[:space:]]*+' as before, > causing the following compilation error: > > In file included from builtin-trace.c:719: > trace/beauty/generated/fsconfig_arrays.c:2:3: error: expected

Re: [PATCH v8 2/4] libperf: Add evsel mmap support

2021-04-14 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 15, 2021 at 01:41:35AM +0900, Namhyung Kim escreveu: > Hello, > > On Thu, Apr 15, 2021 at 1:07 AM Rob Herring wrote: > > +void *perf_evsel__mmap_base(struct perf_evsel *evsel, int cpu, int thread) > > +{ > > + if (FD(evsel, cpu, thread) < 0 || MMAP(evsel, cpu, thread) == NULL)

[RFC] Improve workload error in 'perf record'

2021-04-14 Thread Arnaldo Carvalho de Melo
Hi, Please take a look, Best regards, - Arnaldo Arnaldo Carvalho de Melo (2): perf evlist: Add a method to return the list of evsels as a string perf record: Improve 'Workload failed' message printing events + what was exec'ed tools/perf/builtin-record.c | 8 ++-- tools

[PATCH 2/2] perf record: Improve 'Workload failed' message printing events + what was exec'ed

2021-04-14 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Before: # perf record -a cycles,instructions,cache-misses Workload failed: No such file or directory # After: # perf record -a cycles,instructions,cache-misses Failed to collect 'cycles' for the 'cycles,instructions,cache-misses' workload

[PATCH 1/2] perf evlist: Add a method to return the list of evsels as a string

2021-04-14 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Add a 'scnprintf' method to obtain the list of evsels in a evlist as a string, excluding the "dummy" event used for things like receiving metadata events (PERF_RECORD_FORK, MMAP, etc) when synthesizing preexisting threads. Will be used to improve the err

Re: [PATCH v7] perf annotate: Fix sample events lost in stdio mode

2021-04-14 Thread Arnaldo Carvalho de Melo
Em Mon, Apr 12, 2021 at 03:22:29PM +0800, Yang Jihong escreveu: > On 2021/3/31 10:18, Yang Jihong wrote: > > On 2021/3/30 15:26, Namhyung Kim wrote: > > > On Sat, Mar 27, 2021 at 11:16 AM Yang Jihong > > > wrote: > > > > On 2021/3/26 20:06, Arnaldo Carval

Re: [PATCH v7 2/4] libperf: Add evsel mmap support

2021-04-14 Thread Arnaldo Carvalho de Melo
Em Tue, Apr 13, 2021 at 02:07:57PM -0500, Rob Herring escreveu: > On Tue, Apr 13, 2021 at 1:39 PM Arnaldo Carvalho de Melo > wrote: > > > --- a/tools/lib/perf/evsel.c > > > +int perf_evsel__mmap(struct perf_evsel *evsel, int pages) > > > +{ > >

Re: [PATCH v7 3/4] libperf: tests: Add support for verbose printing

2021-04-13 Thread Arnaldo Carvalho de Melo
Em Tue, Apr 13, 2021 at 03:49:31PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Apr 13, 2021 at 12:16:05PM -0500, Rob Herring escreveu: > > Add __T_VERBOSE() so tests can add verbose output. The verbose output is > > enabled with the '-v' command line option. > > Y

Re: [PATCH v7 3/4] libperf: tests: Add support for verbose printing

2021-04-13 Thread Arnaldo Carvalho de Melo
Em Tue, Apr 13, 2021 at 12:16:05PM -0500, Rob Herring escreveu: > Add __T_VERBOSE() so tests can add verbose output. The verbose output is > enabled with the '-v' command line option. You forgot to show how this is used, I'm trying: # cd tools/lib/perf # sudo make tests So how from the

Re: [PATCH v7 2/4] libperf: Add evsel mmap support

2021-04-13 Thread Arnaldo Carvalho de Melo
Em Tue, Apr 13, 2021 at 12:16:04PM -0500, Rob Herring escreveu: > In order to support usersapce access, an event must be mmapped. While > there's already mmap support for evlist, the usecase is a bit different > than the self monitoring with userspace access. So let's add a new >

ANNOUNCE: pahole v1.21 (clang's LTO edition, BTF floats)

2021-04-12 Thread Arnaldo Carvalho de Melo
enumerations. Signed-off-by: Arnaldo Carvalho de Melo

[GIT PULL] perf tools fixes for v5.12: 3rd batch

2021-04-09 Thread Arnaldo Carvalho de Melo
Carvalho de Melo Adrian Hunter (1): perf inject: Fix repipe usage Ian Rogers (1): perf arm-spe: Avoid potential buffer overrun Jin Yao (1): perf report: Fix wrong LBR block sorting tools/perf/builtin-inject.c

Re: [PATCH v2 3/3] perf-stat: introduce config stat.bpf-counter-events

2021-04-08 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 08, 2021 at 08:24:47PM +0200, Jiri Olsa escreveu: > On Thu, Apr 08, 2021 at 06:08:20PM +, Song Liu wrote: > > > > > > > On Apr 8, 2021, at 10:45 AM, Jiri Olsa wrote: > > > > > > On Thu, Apr 08, 2021 at 05:28:10PM +, Song Liu wrote: > > >> > > >> > > >>> On Apr 8, 2021, at

Re: [PATCH v2 3/3] perf-stat: introduce config stat.bpf-counter-events

2021-04-08 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 08, 2021 at 04:39:33PM +, Song Liu escreveu: > > On Apr 8, 2021, at 4:47 AM, Jiri Olsa wrote: > > On Tue, Apr 06, 2021 at 05:36:01PM -0700, Song Liu wrote: > >> Currently, to use BPF to aggregate perf event counters, the user uses > >> --bpf-counters option. Enable "use bpf by

Re: [PATCH] perf annotate: improve --stdio mode

2021-04-07 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 07, 2021 at 04:30:46PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Feb 26, 2021 at 10:24:00AM +0100, Martin Liška escreveu: > > On 2/23/21 8:47 PM, Arnaldo Carvalho de Melo wrote: > > Sure. But I think the current format provides quite broken visual layout: >

Re: [PATCH] perf annotate: improve --stdio mode

2021-04-07 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 26, 2021 at 10:24:00AM +0100, Martin Liška escreveu: > On 2/23/21 8:47 PM, Arnaldo Carvalho de Melo wrote: > > Em Sun, Feb 21, 2021 at 01:46:36PM +0100, Martin Liška escreveu: > > > The patch changes the output format in 2 ways: > > > - line number is dis

Re: [PATCH] perf annotate: improve --stdio mode

2021-04-07 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 19, 2021 at 10:38:26AM +0100, Martin Liška escreveu: > PING Can you please try to refresh the patch? It isn't applying, probably my bad for not having processed it already :-\ - Arnaldo > On 2/26/21 10:24 AM, Martin Liška wrote: > > On 2/23/21 8:47 PM, Arnaldo Carv

Re: [PATCH] perf arm-spe: Avoid potential buffer overrun.

2021-04-07 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 07, 2021 at 08:39:55AM -0700, Ian Rogers escreveu: > SPE extended headers are >1 byte so ensure the buffer contains at > least this before reading. This issue was detected by fuzzing. Thanks, applied. - Arnaldo > Signed-off-by: Ian Rogers > --- >

Re: [PATCH] perf report: Fix wrong LBR block sorting

2021-04-07 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 07, 2021 at 06:49:57AM -0700, Andi Kleen escreveu: > > Now the hottest block is reported at the top of output. > > > > Fixes: b65a7d372b1a ("perf hist: Support block formats with > > compare/sort/display") > > Signed-off-by: Jin Yao > > > Reviewed-by: Andi Kleen Thanks, applied.

Re: [PATCH 0/4] perf events vendor amd: Fixes, cleanups and updates for AMD Zen cores

2021-04-07 Thread Arnaldo Carvalho de Melo
mended event. > > The second and third patches addresses the inconsistency by defaulting all > event codes and umask values to use lower cases and 0x%02x as their > format. > > The final patch adds Zen3 events. Thanks, applied. - Arnaldo > Cc: Peter Zijlstra > Cc: Ingo Mo

Re: [PATCH v3 0/6] perf arm64 metricgroup support

2021-04-07 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 07, 2021 at 06:32:44PM +0800, John Garry escreveu: > This series contains support to get basic metricgroups working for > arm64 CPUs. > > Initial support is added for HiSilicon hip08 platform. > > Some sample usage on Huawei D06 board: > > $ ./perf list metric Thanks, applied.

Re: [PATCH-next] perf daemon: Remove duplicate header file

2021-04-07 Thread Arnaldo Carvalho de Melo
Em Wed, Apr 07, 2021 at 05:49:02PM +0800, johnny.che...@huawei.com escreveu: > From: Chen Yi > > Delete one of the header files that are included twice. Thanks, but I got a patch merged for this already. - Arnaldo > Signed-off-by: Chen Yi > --- > tools/perf/builtin-daemon.c | 1 - > 1

Re: [PATCH] perf: util/mem-events.h: Remove unnecessary struct declaration

2021-04-06 Thread Arnaldo Carvalho de Melo
Em Tue, Apr 06, 2021 at 06:51:02PM +0800, Wan Jiabing escreveu: > struct mem_info is defined at 22nd line. > The declaration here is unnecessary. Remove it. Thanks, applied. - Arnaldo > Signed-off-by: Wan Jiabing > --- > tools/perf/util/mem-events.h | 1 - > 1 file changed, 1 deletion(-) >

Re: [PATCH] perf record: Disallow -c and -F option at the same time

2021-04-03 Thread Arnaldo Carvalho de Melo
ome (more) discussion would be in order. Are you sure that potentially breaking existing scripts is ok in this case? Up to you, frankly. - Arnaldo > On Fri, Apr 2, 2021 at 6:37 AM Arnaldo Carvalho de Melo > wrote: > > > Em Fri, Apr 02, 2021 at 06:40:20PM +0900, Namhyung Kim escrev

Re: [PATCH] tools: perf: util: Remove duplicate struct declaration

2021-04-02 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 01, 2021 at 04:19:38PM +0900, Namhyung Kim escreveu: > Hello, > > On Thu, Apr 1, 2021 at 3:25 PM Wan Jiabing wrote: > > > > struct target is declared twice. One has been declared > > at 21st line. Remove the duplicate. > > > > Signed-off-by: Wan Jiabing > > Acked-by: Namhyung Kim

Re: [PATCH] perf record: Disallow -c and -F option at the same time

2021-04-02 Thread Arnaldo Carvalho de Melo
Em Fri, Apr 02, 2021 at 06:40:20PM +0900, Namhyung Kim escreveu: > It's confusing which one is effective when the both options are given. > The current code happens to use -c in this case but users might not be > aware of it. We can change it to complain about that instead of > relying on the

Re: [PATCH] perf inject: Fix repipe usage

2021-04-02 Thread Arnaldo Carvalho de Melo
Em Thu, Apr 01, 2021 at 04:05:13PM +0200, Jiri Olsa escreveu: > On Thu, Apr 01, 2021 at 01:36:05PM +0300, Adrian Hunter wrote: > > Since commit 14d3d5405253 ("perf session: Try to read pipe data from file") > > perf inject has started printing "PERFILE2h" when not processing pipes. > > > > The

Re: [PATCH] perf annotate: add --demangle and --demangle-kernel

2021-03-30 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 30, 2021 at 08:19:10PM +0200, Martin Liška escreveu: > On 3/30/21 5:42 PM, Arnaldo Carvalho de Melo wrote: > > Trying to find V2 You said you would resend fixing up this: + OPT_BOOLEAN(0, "demangle", _conf.demangle, + "D

Re: [PATCH] perf tools: Preserve identifier id in OCaml demangler

2021-03-30 Thread Arnaldo Carvalho de Melo
Em Fri, Feb 26, 2021 at 02:52:23AM -0500, Fabian Hemmer escreveu: > Some OCaml developers reported that this bit of information is sometimes > useful for disambiguating functions for which the OCaml compiler assigns > the same name, e.g. nested or inlined functions. Sorry for the delay in

Re: [PATCH] perf annotate: add --demangle and --demangle-kernel

2021-03-30 Thread Arnaldo Carvalho de Melo
c6bd9aec7859a0503581312834fb197f1 > > (in tmp.perf/core branch), but we miss setting the same via options. > > > > Thank you, > > Martin > > > > On 2/26/21 11:01 AM, Martin Liška wrote: > > > On 2/23/21 8:49 PM, Arnaldo Carvalho de Melo wrote: > > > >

[GIT PULL] perf tools changes for v5.12: 2nd batch

2021-03-28 Thread Arnaldo Carvalho de Melo
ation checker". - Fix auxtrace queue conflict. - Sync linux/kvm.h with the kernel sources. Signed-off-by: Arnaldo Carvalho de Melo Adrian Hunter (1): perf auxtrace: Fix auxtrace queue conflict Arnaldo Carvalho

Re: [PATCH v7] perf annotate: Fix sample events lost in stdio mode

2021-03-26 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 26, 2021 at 12:25:37PM +0900, Namhyung Kim escreveu: > On Fri, Mar 26, 2021 at 11:24 AM Yang Jihong wrote: > > On 2021/3/19 20:35, Yang Jihong wrote: > > > In hist__find_annotations function, since different hist_entry may point > > > to same > > > symbol, we free notes->src to

Re: [PATCH V2 1/5] powerpc/perf: Expose processor pipeline stage cycles using PERF_SAMPLE_WEIGHT_STRUCT

2021-03-25 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 24, 2021 at 10:05:23AM +0530, Madhavan Srinivasan escreveu: > > On 3/22/21 8:27 PM, Athira Rajeev wrote: > > Performance Monitoring Unit (PMU) registers in powerpc provides > > information on cycles elapsed between different stages in the > > pipeline. This can be used for application

Re: [PATCH V2 1/5] powerpc/perf: Expose processor pipeline stage cycles using PERF_SAMPLE_WEIGHT_STRUCT

2021-03-25 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 24, 2021 at 10:05:23AM +0530, Madhavan Srinivasan escreveu: > > On 3/22/21 8:27 PM, Athira Rajeev wrote: > > Performance Monitoring Unit (PMU) registers in powerpc provides > > information on cycles elapsed between different stages in the > > pipeline. This can be used for application

Re: [PATCH] tools: perf: Remove duplicate includes

2021-03-25 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 23, 2021 at 01:01:39PM +0800, Wan Jiabing escreveu: > sys/stat.h has been included at line 23, so remove the > duplicate one at line 27. > linux/string.h has been included at line 7, so remove the > duplicate one at line 9. > time.h has been included at line 14, so remove the >

Re: [PATCH 1/2] perf/core: Share an event with multiple cgroups

2021-03-25 Thread Arnaldo Carvalho de Melo
Em Thu, Mar 25, 2021 at 12:55:50AM +, Song Liu escreveu: > > On Mar 23, 2021, at 9:21 AM, Namhyung Kim wrote: > > #ifdef CONFIG_SECURITY > > @@ -780,6 +792,14 @@ struct perf_event { > > #endif /* CONFIG_PERF_EVENTS */ > > }; > > +struct perf_cgroup_node { > > + struct hlist_node

Re: [PATCH] tools: perf: util: Remove duplicate declaration

2021-03-25 Thread Arnaldo Carvalho de Melo
Em Thu, Mar 25, 2021 at 12:39:34PM +0800, Wan Jiabing escreveu: > struct evlist has been declared at 10th line. > struct comm has been declared at 15th line. > Remove the duplicate. Thanks, applied. - Arnaldo > Signed-off-by: Wan Jiabing > --- > tools/perf/util/metricgroup.h | 1 - >

Re: [PATCH v3 04/21] x86/insn: Add an insn_decode() API

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 24, 2021 at 11:21:19AM -0700, Ian Rogers escreveu: > On Wed, Mar 24, 2021 at 6:54 AM Borislav Petkov wrote: > > > > On Wed, Mar 24, 2021 at 10:43:20AM -0300, Arnaldo Carvalho de Melo wrote: > > > Borislav, was this addressed? Ian? > > > > Yap

Re: [PATCH] perf test: Change to use bash for daemon test

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 24, 2021 at 10:45:22AM +0900, Namhyung Kim escreveu: > On Sat, Mar 20, 2021 at 7:46 PM Leo Yan wrote: > > [1] https://bugs.launchpad.net/ubuntu/+source/dash/+bug/139097 > > > > Fixes: 2291bb915b55 ("perf tests: Add daemon 'list' command test") > > Signed-off-by: Leo Yan > >

Re: [PATCH v3 04/21] x86/insn: Add an insn_decode() API

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 16, 2021 at 06:14:54PM -0700, Ian Rogers escreveu: > On Thu, Mar 4, 2021 at 9:56 AM Borislav Petkov wrote: > > From: Borislav Petkov > > > > Users of the instruction decoder should use this to decode instruction > > bytes. For that, have insn*() helpers return an int value to denote

Re: [PATCH] MAINTAINERS: Add Mailing list and Web-page for PERFORMANCE EVENTS SUBSYSTEM

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Mon, Mar 15, 2021 at 11:56:32AM +0800, Tiezhu Yang escreveu: > Add entry "L: linux-perf-us...@vger.kernel.org" to archive the > related mail on https://lore.kernel.org/linux-perf-users/, add > entry "W: https://perf.wiki.kernel.org/; so that newbies could > get some useful materials. Thanks,

Re: [PATCH] perf record: Fix memory leak in vDSO

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 16, 2021 at 02:50:48PM +0100, Jiri Olsa escreveu: > On Tue, Mar 16, 2021 at 09:56:26AM -0300, Arnaldo Carvalho de Melo wrote: > > Em Tue, Mar 16, 2021 at 11:28:12AM +0900, Namhyung Kim escreveu: > > > On Mon, Mar 15, 2021 at 10:28 PM Jiri Olsa wrote: > > &g

Re: [PATCH] perf test: Remove perf sub test 42.4 BPF relocation checker

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 24, 2021 at 09:37:34AM +0100, Thomas Richter escreveu: > For some time now the perf test 42: BPF filter returns an error > on bpf relocation subtest, at least on x86 and s390. This is caused by > > commit d859900c4c56 ("bpf, libbpf: support global data/bss/rodata sections") > > which

Re: [PATCH] perf data: export to JSON

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 24, 2021 at 09:06:50AM -0400, Nicholas Fraser escreveu: > This adds preliminary support to dump the contents of a perf.data file to > human-readable JSON. > > The "perf data" command currently only supports exporting to Common Trace > Format and it doesn't do symbol resolution among

Re: [PATCH 1/2] perf daemon: Force waipid for all session on SIGCHLD delivery

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Sat, Mar 20, 2021 at 11:10:12PM +0100, Jiri Olsa escreveu: > If we don't process SIGCHLD before another comes, we will > see just one SIGCHLD as a result. In this case current code > will miss exit notification for a session and wait forever. > > Adding extra waitpid check for all sessions

Re: [PATCH v3 1/2] perf stat: Align CSV output for summary mode

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Mon, Mar 22, 2021 at 10:15:48PM +0100, Jiri Olsa escreveu: > On Fri, Mar 19, 2021 at 03:01:55PM +0800, Jin Yao wrote: > > SNIP > > > 102107,,branch-misses,8012781751,100.00,4.15,of all branches > > > > This option can be enabled in perf config by setting the variable > >

Re: [PATCH v3 2/2] perf test: Add CVS summary test

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 24, 2021 at 10:12:43AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Mar 24, 2021 at 10:05:18AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Fri, Mar 19, 2021 at 03:01:56PM +0800, Jin Yao escreveu: > > > The patch "perf stat: Align CSV output fo

Re: [PATCH v3 2/2] perf test: Add CVS summary test

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 24, 2021 at 10:05:18AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Mar 19, 2021 at 03:01:56PM +0800, Jin Yao escreveu: > > The patch "perf stat: Align CSV output for summary mode" aligned > > CVS output and added "summary" to the first column

Re: [PATCH v3 2/2] perf test: Add CVS summary test

2021-03-24 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 19, 2021 at 03:01:56PM +0800, Jin Yao escreveu: > The patch "perf stat: Align CSV output for summary mode" aligned > CVS output and added "summary" to the first column of summary > lines. > > Now we check if the "summary" string is added to the CVS output. > > If we set

Re: [PATCH v2 0/3] perf-stat: share hardware PMCs with BPF

2021-03-23 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 19, 2021 at 04:14:42PM +, Song Liu escreveu: > > On Mar 19, 2021, at 8:58 AM, Namhyung Kim wrote: > > On Sat, Mar 20, 2021 at 12:35 AM Arnaldo Carvalho de Melo > > wrote: > >> Em Fri, Mar 19, 2021 at 09:54:59AM +0900, Namhyung Kim escreveu: > >&

Re: [PATCH] perf tools: Fix various typos in comments

2021-03-23 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 23, 2021 at 02:59:57PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Mar 23, 2021 at 05:10:10PM +0100, Ingo Molnar escreveu: > > > > Here's the delta between -v1 and -v2, in case you already have -v1 or > > want to review the changes only: > > I

Re: [PATCH v2 1/3] perf-stat: introduce bperf, share hardware PMCs with BPF

2021-03-23 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 23, 2021 at 09:37:42AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Mar 23, 2021 at 09:25:52AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Fri, Mar 19, 2021 at 03:41:57PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Thu, Mar 18, 2021 at 10:15:13P

Re: [PATCH] perf test: Fix perf test 42

2021-03-23 Thread Arnaldo Carvalho de Melo
Em Mon, Mar 22, 2021 at 01:53:39PM +0100, Thomas Richter escreveu: > For some time now the perf test 42: BPF filter returns an error > on bpf relocation subtest, at least on x86 and s390. This is caused by > > commit d859900c4c56 ("bpf, libbpf: support global data/bss/rodata sections") > > which

Re: [PATCH] perf tools: Fix various typos in comments

2021-03-23 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 23, 2021 at 05:10:10PM +0100, Ingo Molnar escreveu: > > Here's the delta between -v1 and -v2, in case you already have -v1 or > want to review the changes only: I had not pushed out it, so I just replaced v1 with v2, thanks. - Arnaldo > --- > tools/perf/arch/arm64/util/machine.c

Re: [PATCH] perf tools: Fix various typos in comments

2021-03-23 Thread Arnaldo Carvalho de Melo
Em Sun, Mar 21, 2021 at 12:37:34PM +0100, Ingo Molnar escreveu: > > Fix ~81 single-word typos in the perf tooling code - accumulated over the > years. Thanks, applied. - Arnaldo > Signed-off-by: Ingo Molnar > --- > tools/perf/Documentation/perf-buildid-cache.txt | 2 +- >

Re: [PATCH v2 1/3] perf-stat: introduce bperf, share hardware PMCs with BPF

2021-03-23 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 23, 2021 at 09:25:52AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Mar 19, 2021 at 03:41:57PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Thu, Mar 18, 2021 at 10:15:13PM +0100, Jiri Olsa escreveu: > > > On Tue, Mar 16, 2021 at 02:18:35PM -07

Re: [PATCH v2 1/3] perf-stat: introduce bperf, share hardware PMCs with BPF

2021-03-23 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 19, 2021 at 03:41:57PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Mar 18, 2021 at 10:15:13PM +0100, Jiri Olsa escreveu: > > On Tue, Mar 16, 2021 at 02:18:35PM -0700, Song Liu wrote: > > > bperf is off by default. To enable it, pass --bpf-counters option

Re: [PATCH v2 1/3] perf-stat: introduce bperf, share hardware PMCs with BPF

2021-03-19 Thread Arnaldo Carvalho de Melo
Em Thu, Mar 18, 2021 at 10:15:13PM +0100, Jiri Olsa escreveu: > On Tue, Mar 16, 2021 at 02:18:35PM -0700, Song Liu wrote: > > bperf is off by default. To enable it, pass --bpf-counters option to > > perf-stat. bperf uses a BPF hashmap to share information about BPF > > programs and maps used by

Re: [PATCH] Tools: lib: string: Fix isspace() parameter to avoid undefined behavior

2021-03-19 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 19, 2021 at 09:14:15AM +0900, hyunji-Hong escreveu: > isspace() could be vulnerable in terms of unpredictable results. So, the > parameter of the isspace() should be cast with 'unsigned int'. We found out > that information through these sites. (Microsoft, Stack Overflow) > url:

Re: [PATCH v2 0/3] perf-stat: share hardware PMCs with BPF

2021-03-19 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 19, 2021 at 09:54:59AM +0900, Namhyung Kim escreveu: > On Fri, Mar 19, 2021 at 9:22 AM Song Liu wrote: > > > On Mar 18, 2021, at 5:09 PM, Arnaldo wrote: > > > On March 18, 2021 6:14:34 PM GMT-03:00, Jiri Olsa > > > wrote: > > >> On Thu, Mar 18, 2021 at 03:52:51AM +, Song Liu

Re: [PATCH v2 11/27] perf parse-events: Support hardware events inside PMU

2021-03-18 Thread Arnaldo Carvalho de Melo
Em Thu, Mar 18, 2021 at 01:16:37PM +0100, Jiri Olsa escreveu: > On Wed, Mar 17, 2021 at 10:42:45AM -0300, Arnaldo Carvalho de Melo wrote: > > Em Wed, Mar 17, 2021 at 08:17:52PM +0800, Jin, Yao escreveu: > > > I'm OK to only support 'cpu_core/cpu-cycles/' or 'c

Re: [PATCH v2 1/3] perf test: Remove unused argument

2021-03-18 Thread Arnaldo Carvalho de Melo
Em Thu, Mar 18, 2021 at 02:01:49PM +0100, Jiri Olsa escreveu: > On Tue, Mar 16, 2021 at 05:55:03PM -0700, Ian Rogers wrote: > > Remove unused argument from daemon_exit. > > > > Signed-off-by: Ian Rogers > > for the patchset > > Acked-by: Jiri Olsa Thanks, added to the csets I had applied

Re: [PATCH v2] perf stat: Align CSV output for summary mode

2021-03-18 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 17, 2021 at 02:51:42PM -0700, Andi Kleen escreveu: > > If you care about not breaking existing scripts, then the output they > > get with what they use as command line options must continue to produce > > the same output. > > It's not clear there are any useful ones (except for tools

Re: [PATCH v2 11/27] perf parse-events: Support hardware events inside PMU

2021-03-17 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 17, 2021 at 08:17:52PM +0800, Jin, Yao escreveu: > Hi Jiri, > > On 3/17/2021 6:06 PM, Jiri Olsa wrote: > > On Wed, Mar 17, 2021 at 10:12:03AM +0800, Jin, Yao wrote: > > > > > > > > > On 3/16/2021 10:04 PM, Jiri Olsa wrote: > > > > On Tue, Mar 16, 2021 at 09:49:42AM +0800, Jin, Yao

Re: unknown NMI on AMD Rome

2021-03-17 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 17, 2021 at 04:32:17PM +0300, Alexander Monakov escreveu: > On Wed, 17 Mar 2021, Peter Zijlstra wrote: > > On Wed, Mar 17, 2021 at 09:48:29AM +0100, Ingo Molnar wrote: > > > > https://developer.amd.com/wp-content/resources/56323-PUB_0.78.pdf > > > 1215 IBS (Instruction Based

Re: [PATCH v2] perf stat: Align CSV output for summary mode

2021-03-17 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 17, 2021 at 03:02:05PM +0800, Jin Yao escreveu: > perf-stat has supported the summary mode. But the summary > lines break the CSV output so it's hard for scripts to parse > the result. > > Before: > > # perf stat -x, -I1000 --interval-count 1 --summary >

Re: [PATCH v2 0/3] perf-stat: share hardware PMCs with BPF

2021-03-17 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 17, 2021 at 02:29:28PM +0900, Namhyung Kim escreveu: > Hi Song, > > On Wed, Mar 17, 2021 at 6:18 AM Song Liu wrote: > > > > perf uses performance monitoring counters (PMCs) to monitor system > > performance. The PMCs are limited hardware resources. For example, > > Intel CPUs have 3x

Re: [PATCH] perf stat: Align CSV output for summary mode

2021-03-16 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 16, 2021 at 09:34:21AM -0700, Andi Kleen escreveu: > > looks ok, but maybe make the option more related to CVS, like: > > > > --x-summary, --cvs-summary ...? > > Actually I don't think it should be a new option. I doubt > anyone could parse the previous mess. So just make it

Re: [PATCH v4] perf tools: perf_event_paranoid and kptr_restrict may crash on 'perf top'

2021-03-16 Thread Arnaldo Carvalho de Melo
ds to info->jited_ksyms == NULL. In order to solve this problem, Add a check before use. Also plug some leaks on the error path. > Suggested-by: Jiri Olsa > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Arnaldo Carvalho de Melo > Cc: Mark Rutland > Cc: A

Re: [PATCH v5] perf annotate: Fix sample events lost in stdio mode

2021-03-16 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 16, 2021 at 10:17:59AM +0800, Yang Jihong escreveu: > In hist__find_annotations function, since different hist_entry may point to > same > symbol, we free notes->src to signal already processed this symbol in stdio > mode; > when annotate, entry will skipped if notes->src is NULL to

Re: [PATCH] perf record: Fix memory leak in vDSO

2021-03-16 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 16, 2021 at 11:28:12AM +0900, Namhyung Kim escreveu: > On Mon, Mar 15, 2021 at 10:28 PM Jiri Olsa wrote: > > > > On Mon, Mar 15, 2021 at 01:56:41PM +0900, Namhyung Kim wrote: > > > I got several memory leak reports from Asan with a simple command. It > > > was because VDSO is not

Re: [PATCH v9 2/2] perf vendor events arm64: Add Fujitsu A64FX pmu event

2021-03-15 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 09, 2021 at 11:59:18AM -0500, Masayoshi Mizuma escreveu: > On Mon, Mar 08, 2021 at 07:53:41PM +0900, Shunsuke Nakamura wrote: > > Add pmu events for A64FX. > > > > Documentation source: > > https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_PMU_Events_v1.2.pdf > > The PMU events

Re: [PATCH v4] perf pmu: Validate raw event with sysfs exported format bits

2021-03-15 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 10, 2021 at 12:38:02PM +0100, Jiri Olsa escreveu: > On Wed, Mar 10, 2021 at 01:11:38PM +0800, Jin Yao wrote: > > Warnings are reported for invalid bits. > > > > Co-developed-by: Jiri Olsa > > Signed-off-by: Jin Yao > > Reviewed-by: Jiri Olsa Thanks, applied. - Arnaldo

Re: [PATCH] perf-stat: introduce bperf, share hardware PMCs with BPF

2021-03-15 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 12, 2021 at 06:52:39PM +, Song Liu escreveu: > > On Mar 12, 2021, at 6:24 AM, Arnaldo Carvalho de Melo > > wrote: > > Em Thu, Mar 11, 2021 at 06:02:57PM -0800, Song Liu escreveu: > >> perf uses performance monitoring counters (PMCs) to monitor system

Re: [PATCH] perf-stat: introduce bperf, share hardware PMCs with BPF

2021-03-12 Thread Arnaldo Carvalho de Melo
Em Fri, Mar 12, 2021 at 04:07:42PM +, Song Liu escreveu: > > > > On Mar 12, 2021, at 6:24 AM, Arnaldo Carvalho de Melo > > wrote: > > > > Em Thu, Mar 11, 2021 at 06:02:57PM -0800, Song Liu escreveu: > >> perf uses performance monitoring counters (P

Re: [PATCH] perf-stat: introduce bperf, share hardware PMCs with BPF

2021-03-12 Thread Arnaldo Carvalho de Melo
Em Thu, Mar 11, 2021 at 06:02:57PM -0800, Song Liu escreveu: > perf uses performance monitoring counters (PMCs) to monitor system > performance. The PMCs are limited hardware resources. For example, > Intel CPUs have 3x fixed PMCs and 4x programmable PMCs per cpu. > > Modern data center systems

Re: [PATCH] perf synthetic events: Avoid write of uninitialized memory.

2021-03-10 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 10, 2021 at 12:48:36PM +0100, Jiri Olsa escreveu: > On Tue, Mar 09, 2021 at 03:49:45PM -0800, Ian Rogers wrote: > > Account for alignment bytes in the zero-ing memset. > > > > Signed-off-by: Ian Rogers > > --- > > tools/perf/util/synthetic-events.c | 9 + > > 1 file changed,

Re: [PATCH] tool/perf: Perf build fails on 5.12.0rc2 on s390

2021-03-09 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 09, 2021 at 12:04:47PM +0100, Thomas Richter escreveu: > perf build fails on 5.12.0rc2 on s390 with this error message: > > util/synthetic-events.c: In function > ‘__event__synthesize_thread.part.0.isra’: > util/synthetic-events.c:787:19: error:

Re: [PATCH] perf auxtrace: Fix auxtrace queue conflict

2021-03-09 Thread Arnaldo Carvalho de Melo
Em Mon, Mar 08, 2021 at 08:54:37AM -0800, Andi Kleen escreveu: > On Mon, Mar 08, 2021 at 05:11:43PM +0200, Adrian Hunter wrote: > > The only requirement of an auxtrace queue is that the buffers are in > > time order. That is achieved by making separate queues for separate > > perf buffer or AUX

Re: [PATCH] perf machine: Assign boolean values to a bool variable

2021-03-09 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 09, 2021 at 06:11:09PM +0800, Jiapeng Chong escreveu: > Fix the following coccicheck warnings: > > ./tools/perf/util/machine.c:2041:9-10: WARNING: return of 0/1 in > function 'symbol__match_regex' with return type bool. Thanks, applied. - Arnaldo > Reported-by: Abaci Robot >

Re: [PATCH] perf tools: use ARRAY_SIZE

2021-03-09 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 09, 2021 at 05:12:25PM +0800, Jiapeng Chong escreveu: > Fix the following cppcheck warnings: > > ./tools/perf/tests/demangle-ocaml-test.c:29:34-35: WARNING: Use > ARRAY_SIZE. Thanks, applied. - Arnaldo > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- >

  1   2   3   4   5   6   7   8   9   10   >