Re: [PATCH] perf, tools: Handle events including .c and .o

2016-09-18 Thread Wangnan (F)
On 2016/9/18 9:02, Andi Kleen wrote: From: Andi Kleen This is a generic bug fix, but it helps with Sukadev's JSON event tree where such events can happen. Any event inclduing a .c/.o/.bpf currently triggers BPF compilation or loading and then an error. This can happen

Re: [PATCH] perf, tools: Handle events including .c and .o

2016-09-18 Thread Wangnan (F)
On 2016/9/18 9:02, Andi Kleen wrote: From: Andi Kleen This is a generic bug fix, but it helps with Sukadev's JSON event tree where such events can happen. Any event inclduing a .c/.o/.bpf currently triggers BPF compilation or loading and then an error. This can happen for some Intel JSON

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-14 Thread Wangnan (F)
On 2016/9/14 18:46, Naveen N. Rao wrote: On 2016/09/14 06:23PM, Wang Nan wrote: On 2016/9/14 18:00, Naveen N. Rao wrote: On 2016/09/14 05:36PM, Wang Nan wrote: On 2016/9/14 17:28, Naveen N. Rao wrote: On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote: Em Mon, Sep 12, 2016 at

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-14 Thread Wangnan (F)
On 2016/9/14 18:46, Naveen N. Rao wrote: On 2016/09/14 06:23PM, Wang Nan wrote: On 2016/9/14 18:00, Naveen N. Rao wrote: On 2016/09/14 05:36PM, Wang Nan wrote: On 2016/9/14 17:28, Naveen N. Rao wrote: On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote: Em Mon, Sep 12, 2016 at

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-14 Thread Wangnan (F)
On 2016/9/14 18:00, Naveen N. Rao wrote: On 2016/09/14 05:36PM, Wang Nan wrote: On 2016/9/14 17:28, Naveen N. Rao wrote: On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote: Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo escreveu: Em Mon, Sep 12, 2016 at 12:54:29PM

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-14 Thread Wangnan (F)
On 2016/9/14 18:00, Naveen N. Rao wrote: On 2016/09/14 05:36PM, Wang Nan wrote: On 2016/9/14 17:28, Naveen N. Rao wrote: On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote: Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo escreveu: Em Mon, Sep 12, 2016 at 12:54:29PM

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-14 Thread Wangnan (F)
On 2016/9/14 17:28, Naveen N. Rao wrote: On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote: Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo escreveu: Em Mon, Sep 12, 2016 at 12:54:29PM +, Wang Nan escreveu: Some mmap related macros have different values for

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-14 Thread Wangnan (F)
On 2016/9/14 17:28, Naveen N. Rao wrote: On 2016/09/12 06:15PM, Arnaldo Carvalho de Melo wrote: Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo escreveu: Em Mon, Sep 12, 2016 at 12:54:29PM +, Wang Nan escreveu: Some mmap related macros have different values for

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-13 Thread Wangnan (F)
On 2016/9/13 5:15, Arnaldo Carvalho de Melo wrote: Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo escreveu: Em Mon, Sep 12, 2016 at 12:54:29PM +, Wang Nan escreveu: Some mmap related macros have different values for different architectures. This patch introduces uapi

Re: [PATCH 1/3] tools include: Add uapi mman.h for each architecture

2016-09-13 Thread Wangnan (F)
On 2016/9/13 5:15, Arnaldo Carvalho de Melo wrote: Em Mon, Sep 12, 2016 at 04:07:42PM -0300, Arnaldo Carvalho de Melo escreveu: Em Mon, Sep 12, 2016 at 12:54:29PM +, Wang Nan escreveu: Some mmap related macros have different values for different architectures. This patch introduces uapi

Re: [PATCH 1/2] perf tools: Introduce memory mapping macros in mman-fix.h

2016-09-06 Thread Wangnan (F)
On 2016/9/6 21:39, Arnaldo Carvalho de Melo wrote: Em Tue, Sep 06, 2016 at 09:25:47PM +0800, Wangnan (F) escreveu: On 2016/9/6 20:59, Arnaldo Carvalho de Melo wrote: Em Tue, Sep 06, 2016 at 05:48:51AM +, Wang Nan escreveu: tools/perf/trace/beauty/mmap.c, tools/perf/util/event.c

Re: [PATCH 1/2] perf tools: Introduce memory mapping macros in mman-fix.h

2016-09-06 Thread Wangnan (F)
On 2016/9/6 21:39, Arnaldo Carvalho de Melo wrote: Em Tue, Sep 06, 2016 at 09:25:47PM +0800, Wangnan (F) escreveu: On 2016/9/6 20:59, Arnaldo Carvalho de Melo wrote: Em Tue, Sep 06, 2016 at 05:48:51AM +, Wang Nan escreveu: tools/perf/trace/beauty/mmap.c, tools/perf/util/event.c

Re: [PATCH 1/2] perf tools: Introduce memory mapping macros in mman-fix.h

2016-09-06 Thread Wangnan (F)
On 2016/9/6 20:59, Arnaldo Carvalho de Melo wrote: Em Tue, Sep 06, 2016 at 05:48:51AM +, Wang Nan escreveu: tools/perf/trace/beauty/mmap.c, tools/perf/util/event.c and tools/perf/util/map.c depend on several macros in mman.h, which are lost on old systems like ubuntu 12.04. They are

Re: [PATCH 1/2] perf tools: Introduce memory mapping macros in mman-fix.h

2016-09-06 Thread Wangnan (F)
On 2016/9/6 20:59, Arnaldo Carvalho de Melo wrote: Em Tue, Sep 06, 2016 at 05:48:51AM +, Wang Nan escreveu: tools/perf/trace/beauty/mmap.c, tools/perf/util/event.c and tools/perf/util/map.c depend on several macros in mman.h, which are lost on old systems like ubuntu 12.04. They are

Re: [PATCH 1/3 (fix commit message)] perf tools: Recognize hugetlb mapping as anon mapping

2016-09-05 Thread Wangnan (F)
On 2016/9/6 3:18, Arnaldo Carvalho de Melo wrote: Em Sun, Sep 04, 2016 at 05:04:38AM +, Wang Nan escreveu: Hugetlbfs mapping should be recognized as anon mapping so user has a chance to create /tmp/perf-.map file for symbol resolving. This patch utilizes MAP_HUGETLB to identify hugetlb

Re: [PATCH 1/3 (fix commit message)] perf tools: Recognize hugetlb mapping as anon mapping

2016-09-05 Thread Wangnan (F)
On 2016/9/6 3:18, Arnaldo Carvalho de Melo wrote: Em Sun, Sep 04, 2016 at 05:04:38AM +, Wang Nan escreveu: Hugetlbfs mapping should be recognized as anon mapping so user has a chance to create /tmp/perf-.map file for symbol resolving. This patch utilizes MAP_HUGETLB to identify hugetlb

Re: [PATCH v2] perf symbols: Fix annotation of objects with debuginfo files

2016-08-15 Thread Wangnan (F)
On 2016/8/13 9:55, Anton Blanchard wrote: From: Anton Blanchard Commit 73cdf0c6ea9c ("perf symbols: Record text offset in dso to calculate objdump address") started storing the offset of the text section for all DSOs: if (elf_section_by_name(elf, , , ".text", NULL))

Re: [PATCH v2] perf symbols: Fix annotation of objects with debuginfo files

2016-08-15 Thread Wangnan (F)
On 2016/8/13 9:55, Anton Blanchard wrote: From: Anton Blanchard Commit 73cdf0c6ea9c ("perf symbols: Record text offset in dso to calculate objdump address") started storing the offset of the text section for all DSOs: if (elf_section_by_name(elf, , , ".text", NULL))

Re: [BUG] perf: memory leak in perf top

2016-08-08 Thread Wangnan (F)
On 2016/8/5 22:12, Arnaldo Carvalho de Melo wrote: Em Fri, Aug 05, 2016 at 06:58:12PM +0800, Wangnan (F) escreveu: perf top comsumes too much memory than it need. Using following commands: # yes '' > /dev/null # perf top -e raw_syscalls:sys_enter System will quickly become unrespons

Re: [BUG] perf: memory leak in perf top

2016-08-08 Thread Wangnan (F)
On 2016/8/5 22:12, Arnaldo Carvalho de Melo wrote: Em Fri, Aug 05, 2016 at 06:58:12PM +0800, Wangnan (F) escreveu: perf top comsumes too much memory than it need. Using following commands: # yes '' > /dev/null # perf top -e raw_syscalls:sys_enter System will quickly become unrespons

[BUG] perf: memory leak in perf top

2016-08-05 Thread Wangnan (F)
perf top comsumes too much memory than it need. Using following commands: # yes '' > /dev/null # perf top -e raw_syscalls:sys_enter System will quickly become unresponsive because of out of memory. Using GDB I find two call stacks of malloc. See below. [call stack 1] #0 __GI___libc_malloc

[BUG] perf: memory leak in perf top

2016-08-05 Thread Wangnan (F)
perf top comsumes too much memory than it need. Using following commands: # yes '' > /dev/null # perf top -e raw_syscalls:sys_enter System will quickly become unresponsive because of out of memory. Using GDB I find two call stacks of malloc. See below. [call stack 1] #0 __GI___libc_malloc

Re: perf test BPF failing on f24: fix

2016-08-03 Thread Wangnan (F)
On 2016/8/4 7:08, Masami Hiramatsu wrote: On Wed, 3 Aug 2016 23:45:57 +0900 Masami Hiramatsu wrote: [root@jouet ~]# perf probe sys_epoll_wait Failed to find debug information for address bd295b50 Probe point 'sys_epoll_wait' not found. Error: Failed to add

Re: perf test BPF failing on f24: fix

2016-08-03 Thread Wangnan (F)
On 2016/8/4 7:08, Masami Hiramatsu wrote: On Wed, 3 Aug 2016 23:45:57 +0900 Masami Hiramatsu wrote: [root@jouet ~]# perf probe sys_epoll_wait Failed to find debug information for address bd295b50 Probe point 'sys_epoll_wait' not found. Error: Failed to add events. So, at least

Re: perf test BPF failing on f24: fix

2016-08-03 Thread Wangnan (F)
Add Masami to Cc list. He knowns debug info. Please see below... On 2016/8/3 3:51, Arnaldo Carvalho de Melo wrote: Hi Wang, Something changed and a function used in a perf test for BPF is not anymore appearing on vmlinux, albeit still available on /proc/kallsyms: # readelf -wi

Re: perf test BPF failing on f24: fix

2016-08-03 Thread Wangnan (F)
Add Masami to Cc list. He knowns debug info. Please see below... On 2016/8/3 3:51, Arnaldo Carvalho de Melo wrote: Hi Wang, Something changed and a function used in a perf test for BPF is not anymore appearing on vmlinux, albeit still available on /proc/kallsyms: # readelf -wi

Re: perf test BPF failing on f24: fix

2016-08-02 Thread Wangnan (F)
On 2016/8/3 10:41, Wangnan (F) wrote: On 2016/8/3 3:51, Arnaldo Carvalho de Melo wrote: Hi Wang, Something changed and a function used in a perf test for BPF is not anymore appearing on vmlinux, albeit still available on /proc/kallsyms: # readelf -wi /lib/modules/4.7.0+/build/vmlinux

Re: perf test BPF failing on f24: fix

2016-08-02 Thread Wangnan (F)
On 2016/8/3 10:41, Wangnan (F) wrote: On 2016/8/3 3:51, Arnaldo Carvalho de Melo wrote: Hi Wang, Something changed and a function used in a perf test for BPF is not anymore appearing on vmlinux, albeit still available on /proc/kallsyms: # readelf -wi /lib/modules/4.7.0+/build/vmlinux

Re: perf test BPF failing on f24: fix

2016-08-02 Thread Wangnan (F)
On 2016/8/3 3:51, Arnaldo Carvalho de Melo wrote: Hi Wang, Something changed and a function used in a perf test for BPF is not anymore appearing on vmlinux, albeit still available on /proc/kallsyms: # readelf -wi /lib/modules/4.7.0+/build/vmlinux | grep -w sys_epoll_wait # But:

Re: perf test BPF failing on f24: fix

2016-08-02 Thread Wangnan (F)
On 2016/8/3 3:51, Arnaldo Carvalho de Melo wrote: Hi Wang, Something changed and a function used in a perf test for BPF is not anymore appearing on vmlinux, albeit still available on /proc/kallsyms: # readelf -wi /lib/modules/4.7.0+/build/vmlinux | grep -w sys_epoll_wait # But:

Re: [PATCH] perf/core: Add a tracepoint for perf sampling

2016-07-29 Thread Wangnan (F)
On 2016/7/30 2:05, Brendan Gregg wrote: On Tue, Jul 19, 2016 at 4:20 PM, Brendan Gregg wrote: When perf is performing hrtimer-based sampling, this tracepoint can be used by BPF to run additional logic on each sample. For example, BPF can fetch stack traces and frequency

Re: [PATCH] perf/core: Add a tracepoint for perf sampling

2016-07-29 Thread Wangnan (F)
On 2016/7/30 2:05, Brendan Gregg wrote: On Tue, Jul 19, 2016 at 4:20 PM, Brendan Gregg wrote: When perf is performing hrtimer-based sampling, this tracepoint can be used by BPF to run additional logic on each sample. For example, BPF can fetch stack traces and frequency count them in kernel

Re: [PATCH] tools lib bpf: Use official ELF e_machine value

2016-07-25 Thread Wangnan (F)
Hi Arnaldo, Please don't forget this patch. Thank you. On 2016/7/19 5:37, Alexei Starovoitov wrote: On Mon, Jul 18, 2016 at 06:01:08AM +, Wang Nan wrote: New LLVM will issue newly assigned EM_BPF machine code. The new code will be propogated to glibc and libelf. This patch introduces

Re: [PATCH] tools lib bpf: Use official ELF e_machine value

2016-07-25 Thread Wangnan (F)
Hi Arnaldo, Please don't forget this patch. Thank you. On 2016/7/19 5:37, Alexei Starovoitov wrote: On Mon, Jul 18, 2016 at 06:01:08AM +, Wang Nan wrote: New LLVM will issue newly assigned EM_BPF machine code. The new code will be propogated to glibc and libelf. This patch introduces

Re: [PATCH v15 03/12] perf tools: Update perf evlist mmap related APIs and helpers

2016-07-13 Thread Wangnan (F)
On 2016/7/13 22:06, Jiri Olsa wrote: On Tue, Jul 12, 2016 at 10:00:03AM +, Wang Nan wrote: SNIP -union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int idx) +union perf_event *perf_mmap__read_forward(struct perf_mmap *md, bool overwrite) { - struct

Re: [PATCH v15 03/12] perf tools: Update perf evlist mmap related APIs and helpers

2016-07-13 Thread Wangnan (F)
On 2016/7/13 22:06, Jiri Olsa wrote: On Tue, Jul 12, 2016 at 10:00:03AM +, Wang Nan wrote: SNIP -union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int idx) +union perf_event *perf_mmap__read_forward(struct perf_mmap *md, bool overwrite) { - struct

Re: [PATCH v13 2/8] perf evlist: Introduce aux evlist

2016-07-11 Thread Wangnan (F)
On 2016/7/8 22:46, Jiri Olsa wrote: On Wed, Jul 06, 2016 at 08:16:52PM +0800, Wangnan (F) wrote: On 2016/7/6 19:36, Jiri Olsa wrote: On Mon, Jul 04, 2016 at 06:20:03AM +, Wang Nan wrote: SNIP +struct perf_evlist *perf_evlist__new_aux(struct perf_evlist *parent) +{ + struct

Re: [PATCH v13 2/8] perf evlist: Introduce aux evlist

2016-07-11 Thread Wangnan (F)
On 2016/7/8 22:46, Jiri Olsa wrote: On Wed, Jul 06, 2016 at 08:16:52PM +0800, Wangnan (F) wrote: On 2016/7/6 19:36, Jiri Olsa wrote: On Mon, Jul 04, 2016 at 06:20:03AM +, Wang Nan wrote: SNIP +struct perf_evlist *perf_evlist__new_aux(struct perf_evlist *parent) +{ + struct

Re: [PATCH v14 3/8] perf tests: Add testcase for auxiliary evlist

2016-07-10 Thread Wangnan (F)
On 2016/7/8 22:48, Jiri Olsa wrote: On Thu, Jul 07, 2016 at 05:34:44AM +, Wang Nan wrote: SNIP ret = TEST_FAIL; - err = do_test(evlist, opts.mmap_pages, _count, + err = do_test(evlist, aux_evlist, opts.mmap_pages, + _sample_count, _sample_count,

Re: [PATCH v14 3/8] perf tests: Add testcase for auxiliary evlist

2016-07-10 Thread Wangnan (F)
On 2016/7/8 22:48, Jiri Olsa wrote: On Thu, Jul 07, 2016 at 05:34:44AM +, Wang Nan wrote: SNIP ret = TEST_FAIL; - err = do_test(evlist, opts.mmap_pages, _count, + err = do_test(evlist, aux_evlist, opts.mmap_pages, + _sample_count, _sample_count,

Re: perf bpf examples

2016-07-08 Thread Wangnan (F)
On 2016/7/8 15:57, Brendan Gregg wrote: On Thu, Jul 7, 2016 at 9:18 PM, Wangnan (F) <wangn...@huawei.com> wrote: On 2016/7/8 1:58, Brendan Gregg wrote: On Thu, Jul 7, 2016 at 10:54 AM, Brendan Gregg <brendan.d.gr...@gmail.com> wrote: On Wed, Jul 6, 2016 at 6:49 PM, Wangna

Re: perf bpf examples

2016-07-08 Thread Wangnan (F)
On 2016/7/8 15:57, Brendan Gregg wrote: On Thu, Jul 7, 2016 at 9:18 PM, Wangnan (F) wrote: On 2016/7/8 1:58, Brendan Gregg wrote: On Thu, Jul 7, 2016 at 10:54 AM, Brendan Gregg wrote: On Wed, Jul 6, 2016 at 6:49 PM, Wangnan (F) wrote: [...] ... Also, has anyone looked into perf

Re: perf bpf examples

2016-07-07 Thread Wangnan (F)
On 2016/7/8 1:58, Brendan Gregg wrote: On Thu, Jul 7, 2016 at 10:54 AM, Brendan Gregg <brendan.d.gr...@gmail.com> wrote: On Wed, Jul 6, 2016 at 6:49 PM, Wangnan (F) <wangn...@huawei.com> wrote: On 2016/7/7 4:29, Brendan Gregg wrote: G'Day, Are perf bpf examples shared anywher

Re: perf bpf examples

2016-07-07 Thread Wangnan (F)
On 2016/7/8 1:58, Brendan Gregg wrote: On Thu, Jul 7, 2016 at 10:54 AM, Brendan Gregg wrote: On Wed, Jul 6, 2016 at 6:49 PM, Wangnan (F) wrote: On 2016/7/7 4:29, Brendan Gregg wrote: G'Day, Are perf bpf examples shared anywhere? I've seen many posted to lkml (by Wang Nan), but don't

Re: [PATCH v13 5/8] perf record: Read from overwritable ring buffer

2016-07-06 Thread Wangnan (F)
On 2016/7/6 20:34, Jiri Olsa wrote: On Wed, Jul 06, 2016 at 08:03:28PM +0800, Wangnan (F) wrote: On 2016/7/6 19:38, Jiri Olsa wrote: On Mon, Jul 04, 2016 at 06:20:06AM +, Wang Nan wrote: SNIP +static void +record__toggle_overwrite_evsels(struct record *rec

Re: [PATCH v13 5/8] perf record: Read from overwritable ring buffer

2016-07-06 Thread Wangnan (F)
On 2016/7/6 20:34, Jiri Olsa wrote: On Wed, Jul 06, 2016 at 08:03:28PM +0800, Wangnan (F) wrote: On 2016/7/6 19:38, Jiri Olsa wrote: On Mon, Jul 04, 2016 at 06:20:06AM +, Wang Nan wrote: SNIP +static void +record__toggle_overwrite_evsels(struct record *rec

Re: [PATCH v13 2/8] perf evlist: Introduce aux evlist

2016-07-06 Thread Wangnan (F)
On 2016/7/6 19:36, Jiri Olsa wrote: On Mon, Jul 04, 2016 at 06:20:03AM +, Wang Nan wrote: SNIP +struct perf_evlist *perf_evlist__new_aux(struct perf_evlist *parent) +{ + struct perf_evlist *evlist; + + if (perf_evlist__is_aux(parent)) { + pr_err("Internal

Re: [PATCH v13 2/8] perf evlist: Introduce aux evlist

2016-07-06 Thread Wangnan (F)
On 2016/7/6 19:36, Jiri Olsa wrote: On Mon, Jul 04, 2016 at 06:20:03AM +, Wang Nan wrote: SNIP +struct perf_evlist *perf_evlist__new_aux(struct perf_evlist *parent) +{ + struct perf_evlist *evlist; + + if (perf_evlist__is_aux(parent)) { + pr_err("Internal

Re: [PATCH v13 5/8] perf record: Read from overwritable ring buffer

2016-07-06 Thread Wangnan (F)
On 2016/7/6 19:38, Jiri Olsa wrote: On Mon, Jul 04, 2016 at 06:20:06AM +, Wang Nan wrote: SNIP +static void +record__toggle_overwrite_evsels(struct record *rec, + enum overwrite_evt_state state) +{ + struct perf_evlist *evlist = rec->overwrite_evlist;

Re: [PATCH v13 5/8] perf record: Read from overwritable ring buffer

2016-07-06 Thread Wangnan (F)
On 2016/7/6 19:38, Jiri Olsa wrote: On Mon, Jul 04, 2016 at 06:20:06AM +, Wang Nan wrote: SNIP +static void +record__toggle_overwrite_evsels(struct record *rec, + enum overwrite_evt_state state) +{ + struct perf_evlist *evlist = rec->overwrite_evlist;

Re: [PATCH v13 1/8] perf tools: Drop redundant evsel->overwrite indicator

2016-07-06 Thread Wangnan (F)
On 2016/7/6 18:53, Jiri Olsa wrote: On Mon, Jul 04, 2016 at 06:20:02AM +, Wang Nan wrote: SNIP diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 0fea724..3abe519 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1359,6 +1359,9 @@ static int

Re: [PATCH v13 1/8] perf tools: Drop redundant evsel->overwrite indicator

2016-07-06 Thread Wangnan (F)
On 2016/7/6 18:53, Jiri Olsa wrote: On Mon, Jul 04, 2016 at 06:20:02AM +, Wang Nan wrote: SNIP diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 0fea724..3abe519 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1359,6 +1359,9 @@ static int

Re: 'perf test backward' failing with older kernels, should Skip

2016-06-30 Thread Wangnan (F)
On 2016/7/1 5:00, Arnaldo Carvalho de Melo wrote: Hi Wang, I booted a machine with the f24 distro kernel and the backward ring buffer test started FAILing, when it should've noticed that the kernel doesn't support it and Skip instead: [root@jouet ~]# perf test -v backward 45: Test

Re: 'perf test backward' failing with older kernels, should Skip

2016-06-30 Thread Wangnan (F)
On 2016/7/1 5:00, Arnaldo Carvalho de Melo wrote: Hi Wang, I booted a machine with the f24 distro kernel and the backward ring buffer test started FAILing, when it should've noticed that the kernel doesn't support it and Skip instead: [root@jouet ~]# perf test -v backward 45: Test

Re: [RFC PATCH v2 00/26] perf tools: Support uBPF script

2016-06-29 Thread Wangnan (F)
On 2016/6/29 18:15, Hekuang wrote: hi 在 2016/6/28 22:57, Alexei Starovoitov 写道: return 0; } @@ -465,7 +465,7 @@ EXPORT_SYMBOL_GPL(__bpf_call_base); * * Decode and execute eBPF instructions. */ -static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn)

Re: [RFC PATCH v2 00/26] perf tools: Support uBPF script

2016-06-29 Thread Wangnan (F)
On 2016/6/29 18:15, Hekuang wrote: hi 在 2016/6/28 22:57, Alexei Starovoitov 写道: return 0; } @@ -465,7 +465,7 @@ EXPORT_SYMBOL_GPL(__bpf_call_base); * * Decode and execute eBPF instructions. */ -static unsigned int __bpf_prog_run(void *ctx, const struct bpf_insn *insn)

Re: [PATCH] tools lib bpf: fix spelling mistake: "missmatch" -> "mismatch"

2016-06-28 Thread Wangnan (F)
On 2016/6/28 20:23, Colin King wrote: From: Colin Ian King trivial fix to spelling mistake Signed-off-by: Colin Ian King --- tools/lib/bpf/libbpf.c | 2 +- tools/lib/bpf/libbpf.h | 2 +- 2 files changed, 2 insertions(+), 2

Re: [PATCH] tools lib bpf: fix spelling mistake: "missmatch" -> "mismatch"

2016-06-28 Thread Wangnan (F)
On 2016/6/28 20:23, Colin King wrote: From: Colin Ian King trivial fix to spelling mistake Signed-off-by: Colin Ian King --- tools/lib/bpf/libbpf.c | 2 +- tools/lib/bpf/libbpf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/bpf/libbpf.c

Re: [PATCH 1/2] perf data convert: Include config.h header

2016-06-24 Thread Wangnan (F)
You can add: Fixes: 41840d211c51 ("perf config: Move config declarations from util/cache.h to util/config.h") Thank you. On 2016/6/24 20:40, Jiri Olsa wrote: otherwise some compiler might scream: $ make LIBBABELTRACE_DIR=/opt/libbabeltrace/ LIBBABELTRACE=1 BUILD: Doing 'make -j4'

Re: [PATCH 1/2] perf data convert: Include config.h header

2016-06-24 Thread Wangnan (F)
You can add: Fixes: 41840d211c51 ("perf config: Move config declarations from util/cache.h to util/config.h") Thank you. On 2016/6/24 20:40, Jiri Olsa wrote: otherwise some compiler might scream: $ make LIBBABELTRACE_DIR=/opt/libbabeltrace/ LIBBABELTRACE=1 BUILD: Doing 'make -j4'

Re: [PATCH 5/5] perf tools: Fix NULL pointer deference when vdso not found

2016-06-22 Thread Wangnan (F)
Hi, This patch fixes a real crash problem when we do 'perf report' on an arm64 platform with arm32 program. It is introduced by commit f9b2bdf228 ("perf tools: Find vdso with the consider of cross-platform"). From dmesg report, perf crashes in dso__type() because dso is NULL. Still don't know

Re: [PATCH 5/5] perf tools: Fix NULL pointer deference when vdso not found

2016-06-22 Thread Wangnan (F)
Hi, This patch fixes a real crash problem when we do 'perf report' on an arm64 platform with arm32 program. It is introduced by commit f9b2bdf228 ("perf tools: Find vdso with the consider of cross-platform"). From dmesg report, perf crashes in dso__type() because dso is NULL. Still don't know

Re: [PATCH v9 1/8] perf evlist: Introduce aux evlist

2016-06-22 Thread Wangnan (F)
On 2016/6/22 21:40, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 22, 2016 at 08:17:02AM -0500, Nilay Vaish escreveu: On 22 June 2016 at 04:08, Wang Nan wrote: +struct perf_evlist *perf_evlist__new_aux(struct perf_evlist *parent) +{ + struct perf_evlist *evlist; + +

Re: [PATCH v9 1/8] perf evlist: Introduce aux evlist

2016-06-22 Thread Wangnan (F)
On 2016/6/22 21:40, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 22, 2016 at 08:17:02AM -0500, Nilay Vaish escreveu: On 22 June 2016 at 04:08, Wang Nan wrote: +struct perf_evlist *perf_evlist__new_aux(struct perf_evlist *parent) +{ + struct perf_evlist *evlist; + + if

Re: [PATCH v9 5/8] perf record: Toggle overwrite ring buffer for reading

2016-06-22 Thread Wangnan (F)
On 2016/6/22 22:33, Nilay Vaish wrote: On 22 June 2016 at 04:08, Wang Nan wrote: @@ -549,17 +573,72 @@ static struct perf_event_header finished_round_event = { .type = PERF_RECORD_FINISHED_ROUND, }; -static int record__mmap_read_all(struct record *rec)

Re: [PATCH v9 5/8] perf record: Toggle overwrite ring buffer for reading

2016-06-22 Thread Wangnan (F)
On 2016/6/22 22:33, Nilay Vaish wrote: On 22 June 2016 at 04:08, Wang Nan wrote: @@ -549,17 +573,72 @@ static struct perf_event_header finished_round_event = { .type = PERF_RECORD_FINISHED_ROUND, }; -static int record__mmap_read_all(struct record *rec) +static void

Re: [PATCH v8 3/8] perf tests: Add testcase for auxiliary evlist

2016-06-21 Thread Wangnan (F)
On 2016/6/22 5:05, Arnaldo Carvalho de Melo wrote: Em Mon, Jun 20, 2016 at 10:47:20AM +, Wang Nan escreveu: Improve test backward [SNIP] diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c index d9ba991..76e34c0 100644 ---

Re: [PATCH v8 3/8] perf tests: Add testcase for auxiliary evlist

2016-06-21 Thread Wangnan (F)
On 2016/6/22 5:05, Arnaldo Carvalho de Melo wrote: Em Mon, Jun 20, 2016 at 10:47:20AM +, Wang Nan escreveu: Improve test backward [SNIP] diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c index d9ba991..76e34c0 100644 ---

Re: [PATCH 2/2] perf record: Add --dry-run option to check cmdline options

2016-06-21 Thread Wangnan (F)
On 2016/6/21 0:22, Alexei Starovoitov wrote: On Mon, Jun 20, 2016 at 11:38:18AM -0300, Arnaldo Carvalho de Melo wrote: Em Mon, Jun 20, 2016 at 11:29:13AM +0800, Wangnan (F) escreveu: On 2016/6/17 0:48, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 16, 2016 at 08:02:41AM +, Wang Nan

Re: [PATCH 2/2] perf record: Add --dry-run option to check cmdline options

2016-06-21 Thread Wangnan (F)
On 2016/6/21 0:22, Alexei Starovoitov wrote: On Mon, Jun 20, 2016 at 11:38:18AM -0300, Arnaldo Carvalho de Melo wrote: Em Mon, Jun 20, 2016 at 11:29:13AM +0800, Wangnan (F) escreveu: On 2016/6/17 0:48, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 16, 2016 at 08:02:41AM +, Wang Nan

Re: [PATCH 2/2] perf record: Add --dry-run option to check cmdline options

2016-06-20 Thread Wangnan (F)
On 2016/6/20 22:38, Arnaldo Carvalho de Melo wrote: Em Mon, Jun 20, 2016 at 11:29:13AM +0800, Wangnan (F) escreveu: On 2016/6/17 0:48, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 16, 2016 at 08:02:41AM +, Wang Nan escreveu: [SNIP] About fallback, if user explicitly uses '.o' or '.bpf

Re: [PATCH 2/2] perf record: Add --dry-run option to check cmdline options

2016-06-20 Thread Wangnan (F)
On 2016/6/20 22:38, Arnaldo Carvalho de Melo wrote: Em Mon, Jun 20, 2016 at 11:29:13AM +0800, Wangnan (F) escreveu: On 2016/6/17 0:48, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 16, 2016 at 08:02:41AM +, Wang Nan escreveu: [SNIP] About fallback, if user explicitly uses '.o' or '.bpf

Re: [PATCH v8 2/8] perf evlist: Introduce aux evlist

2016-06-20 Thread Wangnan (F)
On 2016/6/21 4:36, Arnaldo Carvalho de Melo wrote: Em Mon, Jun 20, 2016 at 10:47:19AM +, Wang Nan escreveu: An auxiliary evlist is created by perf_evlist__new_aux() using an existing evlist as its parent. An auxiliary evlist can have its own 'struct perf_mmap', but can't have any other

Re: [PATCH v8 2/8] perf evlist: Introduce aux evlist

2016-06-20 Thread Wangnan (F)
On 2016/6/21 4:36, Arnaldo Carvalho de Melo wrote: Em Mon, Jun 20, 2016 at 10:47:19AM +, Wang Nan escreveu: An auxiliary evlist is created by perf_evlist__new_aux() using an existing evlist as its parent. An auxiliary evlist can have its own 'struct perf_mmap', but can't have any other

Re: [PATCH v2] tools/perf: Fix the mask in regs_dump__printf and

2016-06-20 Thread Wangnan (F)
On 2016/6/20 17:18, Jiri Olsa wrote: On Mon, Jun 20, 2016 at 02:14:01PM +0530, Madhavan Srinivasan wrote: When decoding the perf_regs mask in regs_dump__printf(), we loop through the mask using find_first_bit and find_next_bit functions. "mask" is of type "u64", but sent as a "unsigned long

Re: [PATCH v2] tools/perf: Fix the mask in regs_dump__printf and

2016-06-20 Thread Wangnan (F)
On 2016/6/20 17:18, Jiri Olsa wrote: On Mon, Jun 20, 2016 at 02:14:01PM +0530, Madhavan Srinivasan wrote: When decoding the perf_regs mask in regs_dump__printf(), we loop through the mask using find_first_bit and find_next_bit functions. "mask" is of type "u64", but sent as a "unsigned long

Re: [PATCH v7 8/8] perf record: Unmap overwrite evlist when event terminate

2016-06-20 Thread Wangnan (F)
On 2016/6/17 4:59, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 15, 2016 at 02:23:35AM +, Wang Nan escreveu: When see POLLERR or POLLHUP, unmap ring buffer from both the main evlist and overwrite evlist. When you use an auxiliary evlist this makes evlist->parent be different than evlist,

Re: [PATCH v7 8/8] perf record: Unmap overwrite evlist when event terminate

2016-06-20 Thread Wangnan (F)
On 2016/6/17 4:59, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 15, 2016 at 02:23:35AM +, Wang Nan escreveu: When see POLLERR or POLLHUP, unmap ring buffer from both the main evlist and overwrite evlist. When you use an auxiliary evlist this makes evlist->parent be different than evlist,

Re: [PATCH v7 7/8] perf tools: Check write_backward during evlist config

2016-06-19 Thread Wangnan (F)
On 2016/6/17 5:47, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 15, 2016 at 02:23:34AM +, Wang Nan escreveu: Before this patch, when using overwritable ring buffer on an old kernel, error message is misleading: # ~/perf record -m 1 -e raw_syscalls:*/overwrite/ -a Error: The

Re: [PATCH v7 7/8] perf tools: Check write_backward during evlist config

2016-06-19 Thread Wangnan (F)
On 2016/6/17 5:47, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 15, 2016 at 02:23:34AM +, Wang Nan escreveu: Before this patch, when using overwritable ring buffer on an old kernel, error message is misleading: # ~/perf record -m 1 -e raw_syscalls:*/overwrite/ -a Error: The

Re: [PATCH 2/2] perf record: Add --dry-run option to check cmdline options

2016-06-19 Thread Wangnan (F)
On 2016/6/17 0:48, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 16, 2016 at 08:02:41AM +, Wang Nan escreveu: With '--dry-run', 'perf record' doesn't do reall recording. Combine with llvm.dump-obj option, --dry-run can be used to help compile BPF objects for embedded platform. So these are

Re: [PATCH 2/2] perf record: Add --dry-run option to check cmdline options

2016-06-19 Thread Wangnan (F)
On 2016/6/17 0:48, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 16, 2016 at 08:02:41AM +, Wang Nan escreveu: With '--dry-run', 'perf record' doesn't do reall recording. Combine with llvm.dump-obj option, --dry-run can be used to help compile BPF objects for embedded platform. So these are

Re: [PATCH] perf script: Fix display inconsitency when call-graph config is used

2016-06-03 Thread Wangnan (F)
Hi, Arnaldo and David, Could you please have a look at this patch? It solves a perf script problem when dealing with mixed call-graph and no-call-graph events. Thank you. On 2016/5/16 12:51, He Kuang wrote: There's a display inconsistency when 'call-graph' config event appears in different

Re: [PATCH] perf script: Fix display inconsitency when call-graph config is used

2016-06-03 Thread Wangnan (F)
Hi, Arnaldo and David, Could you please have a look at this patch? It solves a perf script problem when dealing with mixed call-graph and no-call-graph events. Thank you. On 2016/5/16 12:51, He Kuang wrote: There's a display inconsistency when 'call-graph' config event appears in different

Re: [PATCH v6 06/11] perf tools: Extract local libunwind code out of unwind-libunwind.c

2016-05-28 Thread Wangnan (F)
On 2016/5/28 19:59, He Kuang wrote: This patch extracts codes related to specific arithecture out of unwind-libunwind.c. The extrated part are only built if local libunwind is supported. Signed-off-by: He Kuang --- tools/perf/util/Build| 1 +

Re: [PATCH v6 06/11] perf tools: Extract local libunwind code out of unwind-libunwind.c

2016-05-28 Thread Wangnan (F)
On 2016/5/28 19:59, He Kuang wrote: This patch extracts codes related to specific arithecture out of unwind-libunwind.c. The extrated part are only built if local libunwind is supported. Signed-off-by: He Kuang --- tools/perf/util/Build| 1 +

Re: [RESEND PATCH] perf tools: Add arch/*/include/generated/ to .gitignore

2016-05-27 Thread Wangnan (F)
On 2016/5/27 17:15, Taeung Song wrote: Hi, Arnaldo If you have a little time, could you check this simple patch ? This patch is minor but everytime I build tools/perf code, untracked file(arch/*/include/generated/) is always generated.. like below taeung ~/git/linux-perf/tools/perf :> make

Re: [RESEND PATCH] perf tools: Add arch/*/include/generated/ to .gitignore

2016-05-27 Thread Wangnan (F)
On 2016/5/27 17:15, Taeung Song wrote: Hi, Arnaldo If you have a little time, could you check this simple patch ? This patch is minor but everytime I build tools/perf code, untracked file(arch/*/include/generated/) is always generated.. like below taeung ~/git/linux-perf/tools/perf :> make

Re: [PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events

2016-05-25 Thread Wangnan (F)
On 2016/5/25 18:16, Wangnan (F) wrote: On 2016/5/25 13:03, Wang Nan wrote: Create an auxiliary evlist for overwritable events. Before mmap, build this evlist and set 'overwrite' and 'backward' attribute. Since perf_evlist__mmap_ex() only maps events when evsel->overwrite matches evlis

Re: [PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events

2016-05-25 Thread Wangnan (F)
On 2016/5/25 18:16, Wangnan (F) wrote: On 2016/5/25 13:03, Wang Nan wrote: Create an auxiliary evlist for overwritable events. Before mmap, build this evlist and set 'overwrite' and 'backward' attribute. Since perf_evlist__mmap_ex() only maps events when evsel->overwrite matches evlis

Re: [PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events

2016-05-25 Thread Wangnan (F)
On 2016/5/25 13:03, Wang Nan wrote: Create an auxiliary evlist for overwritable events. Before mmap, build this evlist and set 'overwrite' and 'backward' attribute. Since perf_evlist__mmap_ex() only maps events when evsel->overwrite matches evlist's corresponding attributes, with these two

Re: [PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events

2016-05-25 Thread Wangnan (F)
On 2016/5/25 13:03, Wang Nan wrote: Create an auxiliary evlist for overwritable events. Before mmap, build this evlist and set 'overwrite' and 'backward' attribute. Since perf_evlist__mmap_ex() only maps events when evsel->overwrite matches evlist's corresponding attributes, with these two

Re: [PATCH v4 3/7] perf tools: Enable overwrite settings

2016-05-24 Thread Wangnan (F)
On 2016/5/25 2:40, Arnaldo Carvalho de Melo wrote: Em Tue, May 24, 2016 at 02:29:00AM +, Wang Nan escreveu: This patch allows following config terms and option: Globally setting events to overwrite; # perf record --overwrite ... Set specific events to be overwrite or no-overwrite.

Re: [PATCH v4 3/7] perf tools: Enable overwrite settings

2016-05-24 Thread Wangnan (F)
On 2016/5/25 2:40, Arnaldo Carvalho de Melo wrote: Em Tue, May 24, 2016 at 02:29:00AM +, Wang Nan escreveu: This patch allows following config terms and option: Globally setting events to overwrite; # perf record --overwrite ... Set specific events to be overwrite or no-overwrite.

Re: [PATCH 09/17] perf tools: Detect avalibility of write_backward

2016-05-20 Thread Wangnan (F)
On 2016/5/13 21:08, Arnaldo Carvalho de Melo wrote: Em Fri, May 13, 2016 at 07:56:06AM +, Wang Nan escreveu: Detect avalibility of write_backward and save the result into record_opts. With write_backward the start pointer of a ring buffer mapped read only can be found reliably. We have

Re: [PATCH 09/17] perf tools: Detect avalibility of write_backward

2016-05-20 Thread Wangnan (F)
On 2016/5/13 21:08, Arnaldo Carvalho de Melo wrote: Em Fri, May 13, 2016 at 07:56:06AM +, Wang Nan escreveu: Detect avalibility of write_backward and save the result into record_opts. With write_backward the start pointer of a ring buffer mapped read only can be found reliably. We have

Re: [PATCH 02/17] perf tools: Add evlist channel helpers

2016-05-17 Thread Wangnan (F)
On 2016/5/13 21:05, Arnaldo Carvalho de Melo wrote: Em Fri, May 13, 2016 at 07:55:59AM +, Wang Nan escreveu: In this commit sereval helpers are introduced to support the principle several of channel. Channels hold different groups of evsels which configured

Re: [PATCH 02/17] perf tools: Add evlist channel helpers

2016-05-17 Thread Wangnan (F)
On 2016/5/13 21:05, Arnaldo Carvalho de Melo wrote: Em Fri, May 13, 2016 at 07:55:59AM +, Wang Nan escreveu: In this commit sereval helpers are introduced to support the principle several of channel. Channels hold different groups of evsels which configured

Re: [PATCH 08/17] perf record: Don't poll on overwrite channel

2016-05-15 Thread Wangnan (F)
On 2016/5/13 21:12, Arnaldo Carvalho de Melo wrote: Em Fri, May 13, 2016 at 07:56:05AM +, Wang Nan escreveu: There's no need to receive events from overwritable ring buffer. Instead, perf should make them run background until something happen. This patch makes normal events from overwrite

Re: [PATCH 08/17] perf record: Don't poll on overwrite channel

2016-05-15 Thread Wangnan (F)
On 2016/5/13 21:12, Arnaldo Carvalho de Melo wrote: Em Fri, May 13, 2016 at 07:56:05AM +, Wang Nan escreveu: There's no need to receive events from overwritable ring buffer. Instead, perf should make them run background until something happen. This patch makes normal events from overwrite

<    1   2   3   4   5   6   7   8   9   10   >