Re: [PATCH] perf report TUI: Fix segmentation fault in perf_evsel__hists_browse()

2020-07-03 Thread Arnaldo Carvalho de Melo
Em Fri, Jul 03, 2020 at 09:03:53AM +0800, liwei (GF) escreveu: > Ping... Thanks, applied and tested, added the Acked-by Jiri and Namhyung provided, - Arnaldo > On 2020/6/12 23:19, Namhyung Kim wrote: > > Hello, > > > > On Fri, Jun 12, 2020 at 6:58 PM Wei Li wrote: > >> > >> The segmentation

Re: [PATCH v2 01/15] tools lib traceevent: Add API to read time information from kbuffer

2020-07-03 Thread Arnaldo Carvalho de Melo
Em Thu, Jul 02, 2020 at 02:53:45PM -0400, Steven Rostedt escreveu: > From: "Steven Rostedt (Red Hat)" > > Add the functions kbuffer_subbuf_timestamp() and kbuffer_ptr_delta() to get > the timing data stored in the ring buffer that is used to produced the time > stamps of the records. > > This

Re: [PATCH 1/3] perf intel-pt: Fix recording PEBS-via-PT with registers

2020-07-03 Thread Arnaldo Carvalho de Melo
Em Fri, Jul 03, 2020 at 08:25:03AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Jun 30, 2020 at 04:39:33PM +0300, Adrian Hunter escreveu: > > When recording PEBS-via-PT, the kernel will not accept the intel_pt event > > with register sampling e.g. > > > > # perf

Re: [PATCH 1/3] perf intel-pt: Fix recording PEBS-via-PT with registers

2020-07-03 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 30, 2020 at 04:39:33PM +0300, Adrian Hunter escreveu: > When recording PEBS-via-PT, the kernel will not accept the intel_pt event > with register sampling e.g. > > # perf record --kcore -c 1 -e > '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -I -- ls -l > Error: >

Re: [PATCH 0/6] perf tools: Some Intel PT related fixes for v5.8

2020-07-03 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 29, 2020 at 12:19:49PM +0300, Adrian Hunter escreveu: > Hi > > Here are some Intel PT related fixes for v5.8. Thanks, applied. - Arnaldo > > Adrian Hunter (6): > perf scripts python: export-to-postgresql.py: Fix struct.pack() int > argument > perf record: Fix

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-27 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 26, 2020 at 02:57:59PM -0700, Andi Kleen escreveu: > > The name could be a metric or an event, the logic for each is quite > > I would say collisions are unlikely. Event names follow quite structured > patterns. And when introducing a new metric the build process can detect that

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-27 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 26, 2020 at 02:44:14PM -0700, Ian Rogers escreveu: > On Fri, Jun 26, 2020 at 2:25 PM Andi Kleen wrote: > > On Fri, Jun 26, 2020 at 09:47:10PM +0200, Jiri Olsa wrote: > > > this patchset is adding the support to reused metric in another > > > metric. The metric needs to be referenced

Re: [PATCH v8 03/13] perf evlist: implement control command handling functions

2020-06-23 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 23, 2020 at 04:56:01PM +0200, Jiri Olsa escreveu: > On Wed, Jun 17, 2020 at 11:36:46AM +0300, Alexey Budankov wrote: > > SNIP > > > + memset(cmd_data, 0, data_size--); > > + > > + do { > > + err = read(evlist->ctl_fd.fd, , 1); > > + if (err > 0) { > > +

Re: [PATCH v2] perf flamegraph: explicitly set utf-8 encoding

2020-06-22 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 19, 2020 at 05:32:31PM +0200, Andreas Gerstmayr escreveu: > on some platforms the default encoding is not utf-8, > which causes an UnicodeDecodeError when reading the flamegraph template > and writing the flamegraph Thanks, applied. - Arnaldo > Signed-off-by: Andreas Gerstmayr >

Re: [PATCH -v2] x86/msr: Move the F15h MSRs where they belong

2020-06-22 Thread Arnaldo Carvalho de Melo
ources affects tooling, and act upon it, simply updating the copy or doing that + extra tooling adjustments, perhaps a new feature, etc. Acked-by: Arnaldo Carvalho de Melo - Arnaldo > Thx. > > --- > From c1c1a26bc631fafb68ed30c5164d0231acc500ee Mon Sep 17 00:00:00 2001 > From: Boris

Re: [PATCH v2] s390: fix build error for sys_call_table_emu

2020-06-19 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 19, 2020 at 04:17:17PM +0200, Heiko Carstens escreveu: > On Thu, Jun 18, 2020 at 10:14:26PM +0800, Xiaoming Ni wrote: > > Build error on s390: > > arch/s390/kernel/entry.o: in function `sys_call_table_emu': > > >> (.rodata+0x1288): undefined reference to `__s390_' > > > > In

Re: [PATCH v2 00/10] perf parse-events: enable more flex/bison warnings

2020-06-19 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 19, 2020 at 09:15:57AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Jun 18, 2020 at 09:33:46PM -0700, Ian Rogers escreveu: > > All C compiler warnings are disabled are disabled by -w. This change > > removes the -w from flex and bison targets. To avoid implicit &

Re: [PATCH v2 00/10] perf parse-events: enable more flex/bison warnings

2020-06-19 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 18, 2020 at 09:33:46PM -0700, Ian Rogers escreveu: > All C compiler warnings are disabled are disabled by -w. This change > removes the -w from flex and bison targets. To avoid implicit > declarations header files are declared as targets and included. > > Tested with GCC 9.3.0 and

Re: [PATCH v2 00/10] perf parse-events: enable more flex/bison warnings

2020-06-19 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 18, 2020 at 09:33:46PM -0700, Ian Rogers escreveu: > All C compiler warnings are disabled are disabled by -w. This change > removes the -w from flex and bison targets. To avoid implicit > declarations header files are declared as targets and included. > > Tested with GCC 9.3.0 and

[GIT PULL] perf tooling fixes for v5.8

2020-06-18 Thread Arnaldo Carvalho de Melo
=address without required libraries. Signed-off-by: Arnaldo Carvalho de Melo Arnaldo Carvalho de Melo (11): tools headers API: Update faccessat2 affected files tools arch x86 uapi: Synch asm/unistd.h with the kernel

Re: [PATCH v4] perf tools: Check libasan and libubsan in Makefile.config

2020-06-18 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 18, 2020 at 02:57:46PM +0200, Jiri Olsa escreveu: > On Thu, Jun 18, 2020 at 10:06:01AM +0800, Tiezhu Yang wrote: > > When build perf with ASan or UBSan, if libasan or libubsan can not find, > > the feature-glibc is 0 and there exists the following error log which is > > wrong, because

Re: [PATCH 0/3] tool lib traceevent: Fix some parsing errors

2020-06-18 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 17, 2020 at 07:55:29PM -0300, Arnaldo Carvalho de Melo escreveu: > > > On June 17, 2020 6:28:04 PM GMT-03:00, Steven Rostedt > wrote: > >Hi Arnaldo, > > > >I guess these patches were missed. > > I'll pick those tomorrow, > > Thanks

Re: [PATCH 0/3] tool lib traceevent: Fix some parsing errors

2020-06-17 Thread Arnaldo Carvalho de Melo
On June 17, 2020 6:28:04 PM GMT-03:00, Steven Rostedt wrote: >Hi Arnaldo, > >I guess these patches were missed. I'll pick those tomorrow, Thanks for the reminder, - Arnaldo > >-- Steve > > >On Tue, 24 Mar 2020 16:08:45 -0400 >Steven Rostedt wrote: > >> Arnaldo, >> >> Here's a few

Re: [PATCH v2 2/2] perf pmu: Improve CPU core PMU HW event list ordering

2020-06-17 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 17, 2020 at 08:31:02PM +0900, Namhyung Kim escreveu: > On Wed, Jun 17, 2020 at 6:06 PM John Garry wrote: > > > > For perf list, the CPU core PMU HW event ordering is such that not all > > events may will be listed adjacent - consider this example: > > cstate_pkg/c6-residency/

Re: [PATCH 0/2] Update CascadelakeX and SkylakeX events list

2020-06-16 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 16, 2020 at 02:27:40PM +0800, Jin, Yao escreveu: > On 6/16/2020 2:16 PM, Ian Rogers wrote: > > On Mon, Jun 15, 2020 at 6:00 PM Jin, Yao wrote: > > > Can I get an ACK for this patchset? > > > On 6/3/2020 10:18 AM, Jin Yao wrote: > > > > This patchset updates CascadelakeX events to

Re: [PATCH v2] tools build: Check libasan and libubsan in Makefile.feature

2020-06-16 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 15, 2020 at 10:20:10AM +0800, Tiezhu Yang escreveu: > On 06/03/2020 07:32 PM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Jun 03, 2020 at 02:10:04PM +0800, Tiezhu Yang escreveu: > > > When build perf with ASan or UBSan, if libasan or libubsan can not find, > >

Re: [PATCH 00/10] perf parse-events: enable more flex/bison warnings

2020-06-11 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 11, 2020 at 10:40:38AM -0300, Arnaldo Carvalho de Melo escreveu: > > > debian:10 is going well so far, some of the builds passed 25 debian:10 : Ok gcc (Debian 8.3.0-6) 8.3.0, clang version 7.0.1-8 (tags/RELEASE_701/final)

Re: [PATCH 00/10] perf parse-events: enable more flex/bison warnings

2020-06-11 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 11, 2020 at 10:38:54AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Jun 11, 2020 at 10:07:58AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Thu, Jun 11, 2020 at 11:02:49AM +0200, Jiri Olsa escreveu: > > > On Wed, Jun 10, 2020 at 02:50:50PM -0700

Re: [PATCH 00/10] perf parse-events: enable more flex/bison warnings

2020-06-11 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 11, 2020 at 10:07:58AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Jun 11, 2020 at 11:02:49AM +0200, Jiri Olsa escreveu: > > On Wed, Jun 10, 2020 at 02:50:50PM -0700, Ian Rogers wrote: > > > All C compiler warnings are disabled are disabled by -w. This ch

Re: [PATCH next] perf tools: fix potential memleak in perf events parser

2020-06-11 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 11, 2020 at 09:42:34AM +0800, Chen Wandun escreveu: > Fix potential memory leak in function parse_events_term__sym_hw() > and parse_events_term__clone(). > > 1. Free memory when errors occur. > 2. Function new_term may return error, so it is need to free memory >when the return

Re: [PATCH 00/10] perf parse-events: enable more flex/bison warnings

2020-06-11 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 11, 2020 at 11:02:49AM +0200, Jiri Olsa escreveu: > On Wed, Jun 10, 2020 at 02:50:50PM -0700, Ian Rogers wrote: > > All C compiler warnings are disabled are disabled by -w. This change > > removes the -w from flex and bison targets. To avoid implicit > > declarations header files are

Re: [PATCH v2 1/2] perf expr: Add d_ratio operation

2020-06-11 Thread Arnaldo Carvalho de Melo
Em Thu, Jun 11, 2020 at 10:38:46AM +0200, Jiri Olsa escreveu: > On Wed, Jun 10, 2020 at 04:58:22PM -0700, Ian Rogers wrote: > > d_ratio avoids division by 0 yielding infinity, such as when a counter > > doesn't get scheduled. An example usage is: > > > > { > > "BriefDescription": "DCache L1

Re: [PATCH 1/2] perf expr: Add d_ratio operation

2020-06-10 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 10, 2020 at 05:41:29PM +0200, Jiri Olsa escreveu: > On Tue, Jun 09, 2020 at 10:17:15PM -0700, Ian Rogers wrote: > > This simplifies computing ratios in json expressions. > > please put in the comment some usage example and add > a test for this to tests/expr.c > > same for the '<>'

Re: [PATCH 2/2] perf expr: Add < and > operators

2020-06-10 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 09, 2020 at 10:17:16PM -0700, Ian Rogers escreveu: > These are broadly useful and necessary for Intel's top-down analysis. Ditto. - Arnaldo > Signed-off-by: Ian Rogers > --- > tools/perf/util/expr.l | 2 ++ > tools/perf/util/expr.y | 5 - > 2 files changed, 6 insertions(+), 1

Re: [PATCH 1/2] perf expr: Add d_ratio operation

2020-06-10 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 09, 2020 at 10:17:15PM -0700, Ian Rogers escreveu: > This simplifies computing ratios in json expressions. Appling to my local branch, Jiri, can I have your acked-by? - Arnaldo > Signed-off-by: Ian Rogers > --- > tools/perf/util/expr.l | 1 + > tools/perf/util/expr.y | 14

Re: [PATCH 2/2] perf parse-events: enable more flex/yacc warnings

2020-06-10 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 10, 2020 at 11:09:56AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Jun 10, 2020 at 11:05:26AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Jun 09, 2020 at 04:43:44PM -0700, Ian Rogers escreveu: > > > All C compiler warnings are disabled are disabled

Re: [PATCH 2/2] perf parse-events: enable more flex/yacc warnings

2020-06-10 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 10, 2020 at 11:05:26AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Jun 09, 2020 at 04:43:44PM -0700, Ian Rogers escreveu: > > All C compiler warnings are disabled are disabled by -w. This change > > removes the -w from flex and bison targets. To avoid implicit &

Re: [PATCH 2/2] perf parse-events: enable more flex/yacc warnings

2020-06-10 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 09, 2020 at 04:43:44PM -0700, Ian Rogers escreveu: > All C compiler warnings are disabled are disabled by -w. This change > removes the -w from flex and bison targets. To avoid implicit > declarations header files are declared as targets and included. > > Tested with GCC 9.3.0 and

Re: [PATCH 1/2] perf pmu: remove unused declaration

2020-06-10 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 09, 2020 at 04:43:43PM -0700, Ian Rogers escreveu: > This avoids multiple declarations if the flex header is included. Thanks, applied, - Arnaldo > Signed-off-by: Ian Rogers > --- > tools/perf/util/pmu.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git

Re: [PATCH] libbpf: Define __WORDSIZE if not available

2020-06-09 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 09, 2020 at 10:37:48PM +0200, Daniel Borkmann escreveu: > Hey Arnaldo, > > On 6/9/20 5:34 PM, Arnaldo Carvalho de Melo wrote: > > Some systems, such as Android, don't have a define for __WORDSIZE, do it > > in terms of __SIZEOF_LONG__, as done in perf since 2

Re: [PATCH 2/2] perf parse-events: fix an old style declaration

2020-06-09 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 08, 2020 at 10:36:10PM -0700, Ian Rogers escreveu: > Fixes: a26e47162d76 (perf tools: Move ALLOC_LIST into a function) > Signed-off-by: Ian Rogers > --- > tools/perf/util/parse-events.y | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 1/2] perf parse-events: fix an incompatible pointer

2020-06-09 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 08, 2020 at 10:36:09PM -0700, Ian Rogers escreveu: > Arrays are pointer types and don't need their address taking. > Fixes: 8255718f4bed (perf pmu: Expand PMU events by prefix match) Thanks, applied. - Arnaldo > Signed-off-by: Ian Rogers > --- > tools/perf/util/parse-events.y | 2

[PATCH] libbpf: Define __WORDSIZE if not available

2020-06-09 Thread Arnaldo Carvalho de Melo
and Andrii did some Travis CI build tests too. Acked-by: Andrii Nakryiko Signed-off-by: Arnaldo Carvalho de Melo

Re: [PATCH v2 2/2] perf: Fix bpf prologue generation

2020-06-09 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 09, 2020 at 10:10:19AM +0200, Sumanth Korikkar escreveu: > Issue: > bpf_probe_read is no longer available for architecture which has > overlapping address space. Hence bpf prologue generation fails > > Fix: > Use bpf_probe_read_kernel for kernel member access. For user > attribute

Re: [PATCH v2 1/2] perf: Fix user attribute access in kprobes

2020-06-09 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 09, 2020 at 12:09:31PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Jun 09, 2020 at 10:10:18AM +0200, Sumanth Korikkar escreveu: > > Issue: > > perf probe -a 'do_sched_setscheduler pid policy > > param->sched_priority@user' did not work before. >

Re: [PATCH] perf headers: fix processing of pmu_mappings

2020-06-09 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 08, 2020 at 09:52:43AM -0700, Ian Rogers escreveu: > On Mon, Jun 8, 2020 at 9:18 AM Stephane Eranian wrote: > > This patch fixes a bug in process_pmu_mappings() where the code > > would not produce an env->pmu_mappings string that was easily parsable. > > The function parses the

Re: [PATCH] perf headers: fix processing of pmu_mappings

2020-06-09 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 08, 2020 at 09:52:43AM -0700, Ian Rogers escreveu: > On Mon, Jun 8, 2020 at 9:18 AM Stephane Eranian wrote: > A lot of the complexity in this code came from strbuf not \0 > terminating strings. Would a strbuf that always \0 terminated be a > useful change? In general there's a lack of

Re: libbpf's hashmap use of __WORDSIZE

2020-06-08 Thread Arnaldo Carvalho de Melo
Mi On June 8, 2020 2:32:16 PM GMT-03:00, Andrii Nakryiko wrote: >On Mon, Jun 8, 2020 at 9:11 AM Arnaldo Carvalho de Melo > wrote: >> >> Hi Andrii, >> >> We've got that hashmap.[ch] copy from libbpf so that we can >> build perf in systems where

Re: [PATCH] perf util: Fix null pointer dereference

2020-06-08 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 05, 2020 at 05:17:40PM +0800, Hongbo Yao escreveu: > If config->aggr_map is Null and config->aggr_get_id is not Null, > the function print_aggr() will still calling arrg_update_shadow(), > which can result in accessing the invalid pointer. Looks legit, but you forgot to add this: Cc:

Re: [PATCH] Fix null pointer dereference in hists__fprintf_nr_sample_events

2020-06-08 Thread Arnaldo Carvalho de Melo
Em Sat, Jun 06, 2020 at 06:44:45PM -0400, gaurav singh escreveu: > Hi, > > evname is assigned if condition (evsel__is_group_event(evsel)) is true . It > is checked for nullnuess here: > > if (evname != NULL) { > ret += fprintf(fp, " of event%s '%s'", >

libbpf's hashmap use of __WORDSIZE

2020-06-08 Thread Arnaldo Carvalho de Melo
Hi Andrii, We've got that hashmap.[ch] copy from libbpf so that we can build perf in systems where libbpf isn't available, and to make it build in all the containers I regularly test build perf I had to add the patch below, I test build with many versions of both gcc and clang and

Re: [PATCH v2] tools build: Check libasan and libubsan in Makefile.feature

2020-06-03 Thread Arnaldo Carvalho de Melo
Em Wed, Jun 03, 2020 at 02:10:04PM +0800, Tiezhu Yang escreveu: > When build perf with ASan or UBSan, if libasan or libubsan can not find, > the feature-glibc is 0 and there exists the following error log which is > wrong, because we can find gnu/libc-version.h in /usr/include, glibc-devel > is

[GIT PULL] perf tooling changes for v5.8

2020-06-02 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Hi Linus, These are additional changes to the perf tools, on top of what Ingo has already submitted and you merged, please let me know if I made any mistake, Available from: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf

Re: [PATCHv3] perf stat: Ensure group is defined on top of the same cpu mask

2020-06-02 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 02, 2020 at 04:05:08PM +0200, Jiri Olsa escreveu: > On Tue, Jun 02, 2020 at 10:42:56AM -0300, Arnaldo Carvalho de Melo wrote: > > Em Tue, Jun 02, 2020 at 12:17:36PM +0200, Jiri Olsa escreveu: > > > Jin Yao reported the issue (and posted first versions of this change)

Re: [PATCH 1/2] perf tools: check libasan and libubsan in Makefile.config

2020-06-02 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 02, 2020 at 12:15:03PM +0800, Tiezhu Yang escreveu: > When build perf with ASan or UBSan, if libasan or libubsan can not find, > the feature-glibc is 0 and there exists the following error log which is > wrong, because we can find gnu/libc-version.h in /usr/include, glibc-devel > is

Re: [PATCH 2/2] perf tools: Remove some duplicated includes

2020-06-02 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 02, 2020 at 12:15:04PM +0800, Tiezhu Yang escreveu: > There exists some duplicated includes in tools/perf, remove them. Applied, thanks. - Arnaldo > Signed-off-by: Tiezhu Yang > --- > tools/perf/builtin-report.c | 1 - > tools/perf/util/annotate.c | 1 - >

Re: [PATCH] perf tools: Fix kernel maps for kcore and eBPF

2020-06-02 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 02, 2020 at 02:25:05PM +0300, Adrian Hunter escreveu: > Adjust pgoff also when moving a map's start address. > > Example with v5.4.34 based kernel: > > Before: > > $ sudo tools/perf/perf record -a --kcore -e intel_pt//k sleep 1 > [ perf record: Woken up 1 times to write

Re: [PATCHv3] perf stat: Ensure group is defined on top of the same cpu mask

2020-06-02 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 02, 2020 at 12:17:36PM +0200, Jiri Olsa escreveu: > Jin Yao reported the issue (and posted first versions of this change) > with groups being defined over events with different cpu mask. > This causes assert aborts in get_group_fd, like: > # perf stat -M "C2_Pkg_Residency" -a --

Re: [PATCHv2] perf stat: Ensure group is defined on top of the same cpu mask

2020-06-02 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 02, 2020 at 02:10:17PM +0200, Jiri Olsa escreveu: > On Tue, Jun 02, 2020 at 08:50:17PM +0900, Namhyung Kim wrote: > > Hi Jiri, > > > > On Tue, Jun 2, 2020 at 5:16 PM Jiri Olsa wrote: > > > > > > On Tue, Jun 02, 2020 at 11:47:19AM +0900, Namhyung Kim wrote: > > > > On Tue, Jun 2, 2020

Re: [PATCH 13/14] perf tests: Add parse metric test for ipc metric

2020-06-01 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 01, 2020 at 12:55:44AM -0700, Ian Rogers escreveu: > On Sun, May 24, 2020 at 3:43 PM Jiri Olsa wrote: > > > > Adding new test that process metrics code and checks > > the expected results. Starting with easy ipc metric. > > > > Signed-off-by: Jiri Olsa > > Acked-by: Ian Rogers > >

Re: [PATCH 14/14] perf tests: Add parse metric test for frontend metric

2020-06-01 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 01, 2020 at 01:06:01AM -0700, Ian Rogers escreveu: > On Sun, May 24, 2020 at 3:43 PM Jiri Olsa wrote: > > > > Adding new metri test for frontend metric. It's stolen > > s/metri/metric/ > > > from x86 pmu events. > > > > Signed-off-by: Jiri Olsa > > Acked-by: Ian Rogers Ditto. -

Re: [PATCH v8 2/3] perf auxtrace: Add four itrace options

2020-06-01 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 01, 2020 at 10:24:00AM +0300, Adrian Hunter escreveu: > On 30/05/20 3:24 pm, Leo Yan wrote: > > From: Tan Xiaojun > > > > This patch is to add four options to synthesize events which are > > described as below: > > > > 'f': synthesize first level cache events > > 'm': synthesize

Re: [PATCH 05/14] perf tools: Add parse_events_fake interface

2020-06-01 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 01, 2020 at 11:08:50AM +0200, Jiri Olsa escreveu: > On Mon, Jun 01, 2020 at 12:28:31AM -0700, Ian Rogers wrote: > > On Sun, May 24, 2020 at 3:42 PM Jiri Olsa wrote: > > > > > > Adding parse_events_fake interface to parse events > > > and use fake pmu event in case pmu event is parsed.

Re: [RFC PATCH 0/2] Add basic support for PE binary format

2020-06-01 Thread Arnaldo Carvalho de Melo
Em Mon, Jun 01, 2020 at 01:19:13PM +0200, RĂ©mi Bernon escreveu: > Hi, > > I'm currently trying to improve compatibility between Wine and perf, and > I would like to have you opinion on this approach. Interesting! > The main problem is that Wine uses PE binary format for most of its code > (and

Re: [PATCH 1/3] tools compiler.h: Add attribute to disable tail calls

2020-06-01 Thread Arnaldo Carvalho de Melo
Em Sat, May 30, 2020 at 01:20:13AM -0700, Ian Rogers escreveu: > Tail call optimizations can remove stack frames that are used in > unwinding tests. Add an attribute that can be used to disable the tail > call optimization. Tested on clang and GCC. > > Signed-off-by: Ian Rogers > --- >

Re: [PATCH] perf libdw: Fix off-by 1 relative directory includes

2020-06-01 Thread Arnaldo Carvalho de Melo
Em Sun, May 31, 2020 at 05:06:08PM -0700, Ian Rogers escreveu: > On Sun, May 31, 2020 at 7:29 AM Namhyung Kim wrote: > > > > Hi Ian, > > > > On Sat, May 30, 2020 at 7:53 AM Ian Rogers wrote: > > > > > > This is currently working due to extra include paths in the build. > > > > > > Before: > > >

Re: [PATCH v8 0/3] perf arm-spe: Add support for synthetic events

2020-05-31 Thread Arnaldo Carvalho de Melo
Em Sat, May 30, 2020 at 08:24:39PM +0800, Leo Yan escreveu: > This patch set is to support synthetic events with enabling Arm SPE > decoder. This patch set is based Xiaojun Tan (Hisilicon) and > James Clark (Arm)'s previous patches who have contributed much for > the related task. Applied, will

Re: [PATCH 0/3] perf test: Unwind fixes

2020-05-31 Thread Arnaldo Carvalho de Melo
Em Sat, May 30, 2020 at 01:20:12AM -0700, Ian Rogers escreveu: > Fix stack frame count and memory sanitizer issues when running the > dwarf unwinding test with the elfutils/libdw unwinder (libunwind > disabled). Thanks, applied. > Ian Rogers (3): > tools compiler.h: Add attribute to disable

Re: [PATCH 1/2] perf build: Group the NO_SYSCALL_TABLE logic

2020-05-29 Thread Arnaldo Carvalho de Melo
Em Fri, May 29, 2020 at 12:55:51PM -0300, Arnaldo Carvalho de Melo escreveu: > From: Arnaldo Carvalho de Melo > > To help in allowing to disable it from the make command line. > > Cc: Adrian Hunter > Cc: Jiri Olsa > Cc: Namhyung Kim > Signed-off-by: Arnaldo Carvalho

Re: [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable

2020-05-29 Thread Arnaldo Carvalho de Melo
Em Fri, May 29, 2020 at 08:07:17PM +0200, Jiri Olsa escreveu: > On Fri, May 29, 2020 at 12:55:52PM -0300, Arnaldo Carvalho de Melo wrote: > > From: Arnaldo Carvalho de Melo > > > > This is useful to see if, on x86, the legacy libaudit still works, as it > > is used

Re: [PATCH v14 1/1] perf tools: add support for libpfm4

2020-05-29 Thread Arnaldo Carvalho de Melo
Em Fri, May 29, 2020 at 02:23:10PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, May 29, 2020 at 10:03:51AM -0700, Ian Rogers escreveu: > > On Tue, May 5, 2020 at 11:29 AM Ian Rogers wrote: > > > > > > From: Stephane Eranian > > > > > > T

Re: [PATCH v14 1/1] perf tools: add support for libpfm4

2020-05-29 Thread Arnaldo Carvalho de Melo
Em Fri, May 29, 2020 at 10:03:51AM -0700, Ian Rogers escreveu: > On Tue, May 5, 2020 at 11:29 AM Ian Rogers wrote: > > > > From: Stephane Eranian > > > > This patch links perf with the libpfm4 library if it is available > > and LIBPFM4 is passed to the build. The libpfm4 library > > contains

Re: [PATCH v7 0/3] perf arm-spe: Add support for synthetic events

2020-05-29 Thread Arnaldo Carvalho de Melo
Em Fri, May 29, 2020 at 11:28:01PM +0800, Leo Yan escreveu: > Hi James, > > On Fri, May 29, 2020 at 03:58:23PM +0100, James Clark wrote: > > Hi Will and Leo, > > > > I've tested this on an Arm N1 machine and it looks good to me. > > This is great! Will respin the new patch set with adding your

Re: [RESEND PATCH v2] perf tools: correct license on jsmn json parser

2020-05-29 Thread Arnaldo Carvalho de Melo
Em Thu, May 28, 2020 at 05:08:59PM +, Ed Maste escreveu: > From: Ed Maste > > This header is part of the jsmn json parser, introduced in 867a979a83. > Correct the SPDX tag to indicate that it is under the MIT license. Thanks, applied. - Arnaldo > Signed-off-by: Ed Maste > Acked-by: Andi

Re: [PATCH] perf jit: Fix inaccurate DWARF line table

2020-05-29 Thread Arnaldo Carvalho de Melo
Em Thu, May 28, 2020 at 12:44:56AM -0700, Ian Rogers escreveu: > On Wed, May 27, 2020 at 10:19 PM Nick Gasson wrote: > > > > Fix an issue where addresses in the DWARF line table are offset by > > -0x40 (GEN_ELF_TEXT_OFFSET). This can be seen with `objdump -S` on the > > ELF files after perf

Re: [PATCH v2] perf jvmti: Remove redundant jitdump line table entries

2020-05-29 Thread Arnaldo Carvalho de Melo
Em Thu, May 28, 2020 at 12:31:31AM -0700, Ian Rogers escreveu: > On Wed, May 27, 2020 at 10:41 PM Nick Gasson wrote: > > + */ > > Thanks! > > Acked-by: Ian Rogers Thanks, applied. - Arnaldo

[PATCH 1/2] perf build: Group the NO_SYSCALL_TABLE logic

2020-05-29 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo To help in allowing to disable it from the make command line. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Makefile.config | 23 +++ 1 file changed, 15 insertions(+), 8 deletions

[RFC 0/2] tools/build/ patches to allow setting NO_SYSCALL_TABLE=1 from make command line

2020-05-29 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo Hi Jiri, Can you please take a look if these are ok? I've tested it extensively, but being Makefiles, I may be missing something... There are more patches on top of these in the tmp.perf/core branch in my tree, if you could take a quick look on those

[PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable

2020-05-29 Thread Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo This is useful to see if, on x86, the legacy libaudit still works, as it is used in architectures that don't have the SYSCALL_TABLE logic and we want to have it tested in 'make -C tools/perf/ build-test'. E.g.: Without having audit-libs-devel installed: $ make

Re: [PATCH 2/2] perf intel-pt: Refine kernel decoding only warning message

2020-05-28 Thread Arnaldo Carvalho de Melo
Em Thu, May 28, 2020 at 03:08:59PM +0300, Adrian Hunter escreveu: > Stop the message displaying when user space is not being traced. > > Example: > > Prerequisites: > > sudo setcap > "cap_sys_rawio,cap_sys_admin,cap_sys_ptrace,cap_syslog,cap_ipc_lock=ep" > ~/bin/perf > sudo chmod +r

Re: [PATCH 1/2] perf record: Respect --no-switch-events

2020-05-28 Thread Arnaldo Carvalho de Melo
Em Thu, May 28, 2020 at 03:08:58PM +0300, Adrian Hunter escreveu: > Context switch events are added automatically by Intel PT and Coresight. > Make it possible to suppress them. That is useful for tracing the > scheduler without the disturbance that the switch event processing > creates. > >

Re: [PATCH] perf script: Fix --call-trace for Intel PT

2020-05-28 Thread Arnaldo Carvalho de Melo
Em Wed, May 27, 2020 at 09:02:50PM +0300, Adrian Hunter escreveu: > Make process_attr() respect -F-ip, noting also that the condition in > process_attr() (callchain_param.record_mode != CALLCHAIN_NONE) is always > true so test the sample type directly. > > Example: > > Before: > > $ perf

Re: [PATCH 3/3] perf jvmti: Fix demangling Java symbols

2020-05-27 Thread Arnaldo Carvalho de Melo
Em Wed, May 27, 2020 at 01:23:00PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, May 27, 2020 at 11:20:57AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Apr 27, 2020 at 02:15:16PM +0800, Nick Gasson escreveu: > > > For a Java method signature like: > >

Re: [PATCH 3/3] perf jvmti: Fix demangling Java symbols

2020-05-27 Thread Arnaldo Carvalho de Melo
Em Wed, May 27, 2020 at 11:20:57AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Apr 27, 2020 at 02:15:16PM +0800, Nick Gasson escreveu: > > For a Java method signature like: > > > > Ljava/lang/AbstractStringBuilder;appendChars(Ljava/lang/String;II)V > >

Re: [PATCH V7 00/15] perf/x86: Add perf text poke events

2020-05-27 Thread Arnaldo Carvalho de Melo
Em Wed, May 20, 2020 at 05:56:34PM +0200, Peter Zijlstra escreveu: > On Tue, May 19, 2020 at 10:40:01PM -0300, Arnaldo Carvalho de Melo wrote: > > PeterZ, from what we discussed for the next merge Window, perhaps we > > should route the kernel bits via the tip tree wh

Re: [PATCH V7 09/15] perf kcore_copy: Fix module map when there are no modules loaded

2020-05-27 Thread Arnaldo Carvalho de Melo
Em Tue, May 12, 2020 at 03:19:16PM +0300, Adrian Hunter escreveu: > In the absence of any modules, no "modules" map is created, but there are > other executable pages to map, due to eBPF JIT, kprobe or ftrace. Map them > by recognizing that the first "module" symbol is not necessarily from a >

Re: [PATCH V7 10/15] perf evlist: Disable 'immediate' events last

2020-05-27 Thread Arnaldo Carvalho de Melo
Em Tue, May 12, 2020 at 03:19:17PM +0300, Adrian Hunter escreveu: > Events marked as 'immediate' are started before other events to ensure > that there is context at the start of the main tracing events. The same > is true at the end of tracing, so disable 'immediate' events after other > events.

Re: [PATCH 3/3] perf jvmti: Fix demangling Java symbols

2020-05-27 Thread Arnaldo Carvalho de Melo
65: Demangle Java : Ok $ Signed-off-by: Nick Gasson Reviewed-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Tested-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc

Re: [PATCH 3/3] perf jvmti: Fix demangling Java symbols

2020-05-27 Thread Arnaldo Carvalho de Melo
Em Mon, Apr 27, 2020 at 02:15:16PM +0800, Nick Gasson escreveu: > For a Java method signature like: > > Ljava/lang/AbstractStringBuilder;appendChars(Ljava/lang/String;II)V > > The demangler produces: > > void class java.lang.AbstractStringBuilder.appendChars(class java.lang., >

Re: [PATCH 2/3] perf jvmti: Do not report error when missing debug information

2020-05-27 Thread Arnaldo Carvalho de Melo
Em Wed, May 27, 2020 at 11:07:53AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Apr 27, 2020 at 02:15:15PM +0800, Nick Gasson escreveu: > > If the Java sources are compiled with -g:none to disable debug > > information the perf JVMTI plugin reports a lot of errors like:

Re: [PATCH 2/3] perf jvmti: Do not report error when missing debug information

2020-05-27 Thread Arnaldo Carvalho de Melo
Em Mon, Apr 27, 2020 at 02:15:15PM +0800, Nick Gasson escreveu: > If the Java sources are compiled with -g:none to disable debug > information the perf JVMTI plugin reports a lot of errors like: > > java: GetLineNumberTable failed with JVMTI_ERROR_ABSENT_INFORMATION > java: GetLineNumberTable

Re: [PATCH] perf jvmti: remove redundant jitdump line table entries

2020-05-27 Thread Arnaldo Carvalho de Melo
On May 27, 2020 2:29:05 AM GMT-03:00, Nick Gasson wrote: >On 05/26/20 19:55 PM, Jiri Olsa wrote: >> On Fri, May 22, 2020 at 02:53:30PM +0800, Nick Gasson wrote: >>> For each PC/BCI pair in the JVMTI compiler inlining record table, >the >>> jitdump plugin emits debug line table entries for

Re: [PATCH v7 0/3] perf arm-spe: Add support for synthetic events

2020-05-26 Thread Arnaldo Carvalho de Melo
On May 26, 2020 4:54:39 PM GMT-03:00, Will Deacon wrote: >On Tue, May 26, 2020 at 06:43:37PM +0800, Leo Yan wrote: >> On Tue, May 26, 2020 at 11:26:03AM +0100, Will Deacon wrote: >> > On Fri, May 22, 2020 at 11:09:19AM +0800, Leo Yan wrote: >> > > On Mon, May 04, 2020 at 07:56:22PM +0800, Leo

Re: [PATCH V2] perf tools: Fix debuginfo search for Ubuntu

2020-05-26 Thread Arnaldo Carvalho de Melo
Em Tue, May 26, 2020 at 06:52:07PM +0300, Adrian Hunter escreveu: > Reportedly, from 19.10 Ubuntu has begun mixing up the location of some > debug symbol files, putting files expected to be in > /usr/lib/debug/usr/lib into /usr/lib/debug/lib instead. Fix by adding > another dso_binary_type. > >

Re: [PATCH v2] perf ordered_events: Optimise event object reuse

2020-05-26 Thread Arnaldo Carvalho de Melo
Adding a few more folks that worked on the ordering of events over the years. Some minor nits at the end of the message. Thanks! - Arnaldo Em Tue, May 26, 2020 at 02:59:28PM +0100, Matt Fleming escreveu: > ordered_event objects can be placed on the free event list in any order > which means

Re: [RFC 00/14] perf tests: Check on subtest for user specified test

2020-05-25 Thread Arnaldo Carvalho de Melo
Em Mon, May 25, 2020 at 12:42:05AM +0200, Jiri Olsa escreveu: > hi, > changes for using metric result in another metric seem > to change lot of core metric code, so it's better we > have some more tests before we do that. > > Sending as RFC as it's still alive and you guys might > have some other

Re: [PATCH v2 0/7] Share events between metrics

2020-05-25 Thread Arnaldo Carvalho de Melo
Em Sun, May 24, 2020 at 12:19:36AM +0200, Jiri Olsa escreveu: > On Fri, May 22, 2020 at 10:56:59AM -0700, Ian Rogers wrote: > > SNIP > > > >> > #11 0x004b6911 in cmd_test (argc=1, argv=0x7fffd7f0) > > >> > at tests/builtin-test.c:772 > > >> > #12 0x004e977b in

Re: [PATCH v2 0/7] Share events between metrics

2020-05-22 Thread Arnaldo Carvalho de Melo
Em Fri, May 22, 2020 at 12:13:11PM +0200, Jiri Olsa escreveu: > On Thu, May 21, 2020 at 02:22:35PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Thu, May 21, 2020 at 01:43:25PM +0200, Jiri Olsa escreveu: > > > On Wed, May 20, 2020 at 11:20:04AM -0700, Ian Rogers wrote:

Re: [PATCH] perf list: Add metrics to command line usage

2020-05-22 Thread Arnaldo Carvalho de Melo
Em Thu, May 21, 2020 at 11:45:46PM -0700, Ian Rogers escreveu: > Before: > Usage: perf list [] [hw|sw|cache|tracepoint|pmu|sdt|event_glob] > After: > Usage: perf list [] > [hw|sw|cache|tracepoint|pmu|sdt|metric|metricgroup|event_glob] > Signed-off-by: Ian Rogers > --- >

Re: [PATCH v2 0/7] Share events between metrics

2020-05-22 Thread Arnaldo Carvalho de Melo
Em Fri, May 22, 2020 at 02:55:46PM +0530, kajoljain escreveu: > On 5/20/20 11:50 PM, Ian Rogers wrote: > > Metric groups contain metrics. Metrics create groups of events to > > ideally be scheduled together. Often metrics refer to the same events, > > for example, a cache hit and cache miss rate.

Re: [PATCH 5/7] perf metricgroup: Remove duped metric group events

2020-05-21 Thread Arnaldo Carvalho de Melo
Em Thu, May 21, 2020 at 10:26:02AM -0700, Ian Rogers escreveu: > On Thu, May 21, 2020 at 3:54 AM Jiri Olsa wrote: > > ok, I misunderstood and thought you would colaps also M3 to > > have A,B computed via M1 group and with separate D ... > > > > thanks a lot for the explanation, it might be great

Re: [PATCH v2 0/7] Share events between metrics

2020-05-21 Thread Arnaldo Carvalho de Melo
Em Thu, May 21, 2020 at 01:43:25PM +0200, Jiri Olsa escreveu: > On Wed, May 20, 2020 at 11:20:04AM -0700, Ian Rogers wrote: > > SNIP > > > There are 5 out of 12 metric groups where no events are shared, such > > as Power, however, disabling grouping of events always reduces the > > number of

Re: [RFC PATCH v3 09/14] perf metricgroup: free metric_events on error

2020-05-21 Thread Arnaldo Carvalho de Melo
Em Thu, May 07, 2020 at 10:36:24PM -0700, Ian Rogers escreveu: > Avoid a simple memory leak. Thanks, applied. - Arnaldo > Signed-off-by: Ian Rogers > --- > tools/perf/util/metricgroup.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/perf/util/metricgroup.c

Re: [PATCH 1/4] perf metrictroup: Fix memory leak of metric_events

2020-05-21 Thread Arnaldo Carvalho de Melo
Em Thu, May 21, 2020 at 09:32:15PM +0800, Wei Li escreveu: > From: Hongbo Yao > > Fix memory leak of metric_events in function metricgroup__setup_events() The leak is there but this code has changed a lot recently, please take a look at my perf/core branch and keep Ian Rogers in the loop, -

Re: [PATCH 3/4] perf util: Fix memory leak of prefix_if_not_in

2020-05-21 Thread Arnaldo Carvalho de Melo
Em Thu, May 21, 2020 at 09:32:17PM +0800, Wei Li escreveu: > From: Xie XiuQi > > Need to free "str" before return when asprintf() failed > to avoid memory leak. Thanks, applied. - Arnaldo > Signed-off-by: Xie XiuQi > --- > tools/perf/util/sort.c | 2 +- > 1 file changed, 1 insertion(+), 1

<    4   5   6   7   8   9   10   11   12   13   >