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 ev

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 04:07:42P

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 +0

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 differe

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

2016-09-12 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 m

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 and

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 archit

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 map

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, &ehdr, &tshdr, ".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

[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 events. So, at least I

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 /lib/mo

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: [roo

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 c

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 the

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 perf

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, &sample_count, + err = do_test(evlist, aux_evlist, opts.mmap_pages, + &enter_sample_count, &exi

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 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),

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 error:

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 __perf_

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 bac

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 deletions(-) diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bp

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 wh

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 (perf_evlist

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 +record__toggle

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 --- a/tools/perf/tests

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

2016-06-20 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'

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 dat

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, r

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 raw_sysca

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 p

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 + tools/perf/util/unwind-li

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->ove

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 evl

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 pe

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 differently

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 v2 3/4] perf tools: Support reading from backward ring buffer

2016-05-08 Thread Wangnan (F)
On 2016/5/6 21:40, Wangnan (F) wrote: On 2016/5/6 4:07, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 27, 2016 at 02:19:22AM +, Wang Nan escreveu: perf_evlist__mmap_read_backward() is introduced for reading backward ring buffer. Different from reading forward, before reading, caller

Re: [PATCH v2 3/4] perf tools: Support reading from backward ring buffer

2016-05-06 Thread Wangnan (F)
On 2016/5/6 4:07, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 27, 2016 at 02:19:22AM +, Wang Nan escreveu: perf_evlist__mmap_read_backward() is introduced for reading backward ring buffer. Different from reading forward, before reading, caller needs to call perf_evlist__mmap_read_catchup()

Re: [PATCH v6 3/7] perf record: Split output into multiple files via '--switch-output'

2016-04-28 Thread Wangnan (F)
On 2016/4/28 5:32, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 20, 2016 at 06:59:50PM +, Wang Nan escreveu: Allow 'perf record' to split its output into multiple files. For example: I squashed: -> 360 T 04/20 Wang Nan(1.7K) ├─>[PATCH v6 6/7] perf record: Re-synthesize trackin

Re: [PATCH 1/2] bfp tools: Remove expression with no effect

2016-04-26 Thread Wangnan (F)
On 2016/4/25 10:34, Florian Fainelli wrote: Assigning "attr" to "attr" does not have any effect, but was caught by Coverity, so let's remove this. Reported-by: coverity (CID 1354720) Fixes: 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature check") Signed-off-by: Florian Fa

Re: [PATCH 2/2] bfp tools: Fix syscall argument

2016-04-26 Thread Wangnan (F)
On 2016/4/25 10:34, Florian Fainelli wrote: Coverity flagged this under CID 1354884 as a sizeof mismatch, it turns out that the argument "attr" passed to syscall should have been a pointer to attr in the first place. Reported-by: coverity (CID 1354884) Fixes: 8f9e05fb298f ("perf tools: Fix Pow

Re: [PATCH 0/2] bfp tools: Couple Coverity fixes

2016-04-26 Thread Wangnan (F)
On 2016/4/27 10:46, Florian Fainelli wrote: Le 24/04/2016 19:34, Florian Fainelli a écrit : Hi all, Two trivial patches that were flagged by Coverity. Thanks! Ping! Did I send this to the correct mailing-list? Sorry for the late. You are on the right list :)

Re: [RFC] perf probe: Fix offline module name missmatch issue

2016-04-26 Thread Wangnan (F)
On 2016/4/26 16:56, Ravi Bangoria wrote: Thanks Masami for reviewing. Please find my replies to your comment. On Tuesday 26 April 2016 02:54 AM, Masami Hiramatsu wrote: Hi Ravi, On Mon, 25 Apr 2016 16:08:27 +0530 Ravi Bangoria wrote: Perf can add a probe on kernel module which has not be

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

2016-04-21 Thread Wangnan (F)
On 2016/4/21 6:06, Alexei Starovoitov wrote: On Wed, Apr 20, 2016 at 06:01:40PM +, Wang Nan wrote: This patch set allows to perf invoke some user space BPF scripts on some point. uBPF scripts and kernel BPF scripts reside in one BPF object. They communicate with each other with BPF maps. u

Re: [PATCH v5 3/6] perf record: Force enable --timestamp-filename when --switch-output is provided

2016-04-20 Thread Wangnan (F)
On 2016/4/20 15:59, Jiri Olsa wrote: On Mon, Apr 18, 2016 at 02:55:29PM +, Wang Nan wrote: Without this patch, the last output doesn't have timestamp appended if --timestamp-filename is not explicitly provided. For example: # perf record -a --switch-output & [1] 11224 # kill -s S

Re: [PATCH v4 1/6] perf tools: Derive trigger class from auxtrace_snapshot

2016-04-18 Thread Wangnan (F)
On 2016/4/18 22:29, Jiri Olsa wrote: On Mon, Apr 18, 2016 at 10:20:23PM +0800, Wangnan (F) wrote: On 2016/4/18 21:45, Jiri Olsa wrote: On Mon, Apr 18, 2016 at 06:32:08AM +, Wang Nan wrote: Use 'trigger' to model operations which need to be executed when an event (a signal, f

Re: [PATCH v4 1/6] perf tools: Derive trigger class from auxtrace_snapshot

2016-04-18 Thread Wangnan (F)
On 2016/4/18 21:45, Jiri Olsa wrote: On Mon, Apr 18, 2016 at 06:32:08AM +, Wang Nan wrote: Use 'trigger' to model operations which need to be executed when an event (a signal, for example) is observed. States and transits: OFF--(on)--> READY --(toggle)--> TOGGLED --(process)--> PROCESS

Re: [PATCH v3 1/6] perf tools: Derive trigger class from auxtrace_snapshot

2016-04-17 Thread Wangnan (F)
On 2016/4/17 19:50, Jiri Olsa wrote: On Fri, Apr 15, 2016 at 06:20:15PM +, Wang Nan wrote: Create a new class named 'trigger' to model the state of a trigger and implement auxtrace_snapshot with it. auxtrace_record__snapshot_started and auxtrace_snapshot_err are absorbed. 'trigger' defin

Re: [PATCH 00/10] perf tools: Use SIGUSR2 control data dumpping

2016-04-15 Thread Wangnan (F)
On 2016/4/16 0:48, Wangnan (F) wrote: On 2016/4/16 0:26, Arnaldo Carvalho de Melo wrote: Em Fri, Apr 15, 2016 at 10:09:32AM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Apr 15, 2016 at 07:40:44PM +0800, Wangnan (F) escreveu: On 2016/4/15 18:45, Wangnan (F) wrote: On 2016/4/15 18:40

Re: [PATCH 00/10] perf tools: Use SIGUSR2 control data dumpping

2016-04-15 Thread Wangnan (F)
On 2016/4/16 0:26, Arnaldo Carvalho de Melo wrote: Em Fri, Apr 15, 2016 at 10:09:32AM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Apr 15, 2016 at 07:40:44PM +0800, Wangnan (F) escreveu: On 2016/4/15 18:45, Wangnan (F) wrote: On 2016/4/15 18:40, Jiri Olsa wrote: On Wed, Apr 13, 2016

Re: [PATCH v2 0/6] perf tools: Use SIGUSR2 control data dumpping

2016-04-15 Thread Wangnan (F)
On 2016/4/15 21:35, Arnaldo Carvalho de Melo wrote: Em Fri, Apr 15, 2016 at 04:14:26PM +0300, Adrian Hunter escreveu: On 15/04/16 03:19, Arnaldo Carvalho de Melo wrote: Em Thu, Apr 14, 2016 at 02:21:59PM +, Wang Nan escreveu: This patch set is based on perf/core. v1 -> v2: Fix a bug whi

Re: [PATCH 00/10] perf tools: Use SIGUSR2 control data dumpping

2016-04-15 Thread Wangnan (F)
On 2016/4/15 18:45, Wangnan (F) wrote: On 2016/4/15 18:40, Jiri Olsa wrote: On Wed, Apr 13, 2016 at 08:21:03AM +, Wang Nan wrote: [SNIP] I did not get 3/10 patch and the patchset did not apply cleanly, git am failed.. would you have it in a branch somewhere? Sorry, you are not in

Re: [PATCH 00/10] perf tools: Use SIGUSR2 control data dumpping

2016-04-15 Thread Wangnan (F)
On 2016/4/15 18:40, Jiri Olsa wrote: On Wed, Apr 13, 2016 at 08:21:03AM +, Wang Nan wrote: This patch set is a preparation to support overwritable ring buffer. However, even without the kernel side core patch [1] is accept this patch set is still useful. With this patch set, perf switches

Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3 states

2016-04-14 Thread Wangnan (F)
On 2016/4/14 16:30, Adrian Hunter wrote: On 14/04/16 10:50, Wangnan (F) wrote: On 2016/4/14 15:15, Adrian Hunter wrote: On 13/04/16 18:55, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 13, 2016 at 08:21:06AM +, Wang Nan escreveu: auxtrace_snapshot_enable has only two states (0/1). Turns

Re: [PATCH 03/10] perf record: Turns auxtrace_snapshot_enable into 3 states

2016-04-14 Thread Wangnan (F)
On 2016/4/14 15:15, Adrian Hunter wrote: On 13/04/16 18:55, Arnaldo Carvalho de Melo wrote: Em Wed, Apr 13, 2016 at 08:21:06AM +, Wang Nan escreveu: auxtrace_snapshot_enable has only two states (0/1). Turns it into a triple states enum so SIGUSR2 handler can safely do other works without

Re: [PATCH tip] perf core: Add backward attribute to perf event

2016-04-12 Thread Wangnan (F)
Hi Peter, When would you consider collection this patch? You have collected all dependencies, this is the last patch to enable the backward attribute. I have already posted a 'perf test' testcase for it so there will be some usable user space code. I will start posting my perf side code again

Re: [PATCH 1/4] perf trace: Improve error message when receive non-tracepoint events

2016-04-08 Thread Wangnan (F)
On 2016/4/8 23:22, Arnaldo Carvalho de Melo wrote: Em Fri, Apr 08, 2016 at 03:07:22PM +, Wang Nan escreveu: Before this patch, strange error message is provided if passed a non-tracepoint event to 'perf trace': # perf trace -a --ev cycles sleep 1 Failed to set filter "common_pid != 2

Re: [PATCH 2/4] perf trace: Print content of bpf-output event

2016-04-08 Thread Wangnan (F)
Sorry. This patch should be squash into patch 1/4. The commit message is wrong. The main part of described patch is already accepted and merged: 1d6c940 perf trace: Print content of bpf-output event Thank you. On 2016/4/8 23:07, Wang Nan wrote: With this patch the contend of BPF output event i

Re: [PATCH] scripts: Fallback to KBUILD_OUTPUT if O is not specified

2016-04-08 Thread Wangnan (F)
On 2016/4/8 22:58, Arnaldo Carvalho de Melo wrote: Em Fri, Apr 08, 2016 at 11:14:09AM +0200, Thierry Reding escreveu: From: Thierry Reding The KBUILD_OUTPUT environment can be used to set the build directory as an alternative to passing the O variable on the command-line. This works with reg

Re: [PATCH 17/19] perf tools: Build syscall table .c header from kernel's syscall_64.tbl

2016-04-07 Thread Wangnan (F)
On 2016/4/8 4:58, Arnaldo Carvalho de Melo wrote: From: Arnaldo Carvalho de Melo We used libaudit to map ids to syscall names and vice-versa, but that imposes a delay in supporting new syscalls, having to wait for libaudit to get those new syscalls on its tables. To remove that delay, for x8

[BUG] arm64 kprobe: Allow probing at rodata

2016-04-07 Thread Wangnan (F)
Hi, When testing kprobe v12 we find a bug # echo 'p:kprobes/mykprobe1 ftrace_enable_fops' > /sys/kernel/debug/tracing/kprobe_events # echo 1 > /sys/kernel/debug/tracing/events/kprobes/mykprobe1/enable Unable to handle kernel paging request at virtual address d42003f0 pgd = ffc009f64000 [d

Re: [PATCH 4/4] perf core: Add backward attribute to perf event

2016-04-07 Thread Wangnan (F)
On 2016/3/29 22:04, Peter Zijlstra wrote: On Mon, Mar 28, 2016 at 06:41:32AM +, Wang Nan wrote: Could you maybe write a perf/tests thingy for this so that _some_ userspace exists that exercises this new code? Yes. Please see: http://lkml.kernel.org/r/1460022180-61262-1-git-send-email-

Re: [PATCH 4/4] perf core: Add backward attribute to perf event

2016-04-05 Thread Wangnan (F)
On 2016/3/30 10:38, Wangnan (F) wrote: On 2016/3/30 10:28, Wangnan (F) wrote: On 2016/3/29 22:04, Peter Zijlstra wrote: On Mon, Mar 28, 2016 at 06:41:32AM +, Wang Nan wrote: Could you maybe write a perf/tests thingy for this so that _some_ userspace exists that exercises this new

Re: perf trace + BPF

2016-04-01 Thread Wangnan (F)
On 2016/4/1 2:08, Arnaldo Carvalho de Melo wrote: Hi Wang, Trying to get back at working with 'perf trace' + BPF and I'm noticing that the perf_event_attr->sample_type for the BPF events are different than the ones for the raw_syscalls:sys_{enter,exit} or to other tracepoint events we

Re: [PATCH 4/4] perf core: Add backward attribute to perf event

2016-03-29 Thread Wangnan (F)
On 2016/3/30 10:28, Wangnan (F) wrote: On 2016/3/29 22:04, Peter Zijlstra wrote: On Mon, Mar 28, 2016 at 06:41:32AM +, Wang Nan wrote: Could you maybe write a perf/tests thingy for this so that _some_ userspace exists that exercises this new code? int perf_output_begin(struct

Re: [PATCH 4/4] perf core: Add backward attribute to perf event

2016-03-29 Thread Wangnan (F)
On 2016/3/29 22:04, Peter Zijlstra wrote: On Mon, Mar 28, 2016 at 06:41:32AM +, Wang Nan wrote: Could you maybe write a perf/tests thingy for this so that _some_ userspace exists that exercises this new code? int perf_output_begin(struct perf_output_handle *handle,

Re: [PATCH 1/4] perf core: Introduce new ioctl options to pause and resume ring buffer

2016-03-29 Thread Wangnan (F)
On 2016/3/29 20:54, Peter Zijlstra wrote: On Mon, Mar 28, 2016 at 06:41:29AM +, Wang Nan wrote: Add new ioctl() to pause/resume ring-buffer output. In some situations we want to read from ring buffer only when we ensure nothing can write to the ring buffer during reading. Without this pat

Re: [PATCH 4/4] perf core: Add backward attribute to perf event

2016-03-28 Thread Wangnan (F)
On 2016/3/29 12:59, Alexei Starovoitov wrote: On Tue, Mar 29, 2016 at 10:01:24AM +0800, Wangnan (F) wrote: On 2016/3/28 14:41, Wang Nan wrote: [SNIP] To prevent this problem, we need to find a way to ensure the ring buffer is stable during reading. ioctl(PERF_EVENT_IOC_PAUSE_OUTPUT) is

Re: [PATCH 4/4] perf core: Add backward attribute to perf event

2016-03-28 Thread Wangnan (F)
On 2016/3/28 14:41, Wang Nan wrote: [SNIP] To prevent this problem, we need to find a way to ensure the ring buffer is stable during reading. ioctl(PERF_EVENT_IOC_PAUSE_OUTPUT) is suggested because its overhead is lower than ioctl(PERF_EVENT_IOC_ENABLE). Add comment: By carefully verifyi

Re: [PATCH 1/4] perf core: Introduce new ioctl options to pause and resume ring buffer

2016-03-28 Thread Wangnan (F)
On 2016/3/29 8:27, Alexei Starovoitov wrote: On Mon, Mar 28, 2016 at 06:41:29AM +, Wang Nan wrote: Add new ioctl() to pause/resume ring-buffer output. In some situations we want to read from ring buffer only when we ensure nothing can write to the ring buffer during reading. Without this

Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end

2016-03-27 Thread Wangnan (F)
On 2016/3/28 9:58, Wangnan (F) wrote: On 2016/3/28 9:07, Wangnan (F) wrote: On 2016/3/27 23:30, pi3orama wrote: 发自我的 iPhone 在 2016年3月27日,下午11:20,Peter Zijlstra 写道: On Fri, Mar 25, 2016 at 10:14:36PM +0800, Wangnan (F) wrote: I think you enabled some unusual config options? x86_64

Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end

2016-03-27 Thread Wangnan (F)
On 2016/3/28 9:07, Wangnan (F) wrote: On 2016/3/27 23:30, pi3orama wrote: 发自我的 iPhone 在 2016年3月27日,下午11:20,Peter Zijlstra 写道: On Fri, Mar 25, 2016 at 10:14:36PM +0800, Wangnan (F) wrote: I think you enabled some unusual config options? x86_64-defconfig You must enabled

Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end

2016-03-27 Thread Wangnan (F)
On 2016/3/27 23:30, pi3orama wrote: 发自我的 iPhone 在 2016年3月27日,下午11:20,Peter Zijlstra 写道: On Fri, Mar 25, 2016 at 10:14:36PM +0800, Wangnan (F) wrote: I think you enabled some unusual config options? x86_64-defconfig You must enabled CONFIG_OPTIMIZE_INLINING. Now I get similar result

Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end

2016-03-25 Thread Wangnan (F)
On 2016/3/25 20:36, Wangnan (F) wrote: On 2016/3/25 20:26, Wangnan (F) wrote: On 2016/3/23 17:50, Peter Zijlstra wrote: On Mon, Mar 14, 2016 at 09:59:43AM +, Wang Nan wrote: Convert perf_output_begin to __perf_output_begin and make the later function able to write records from the

Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end

2016-03-25 Thread Wangnan (F)
On 2016/3/25 20:26, Wangnan (F) wrote: On 2016/3/23 17:50, Peter Zijlstra wrote: On Mon, Mar 14, 2016 at 09:59:43AM +, Wang Nan wrote: Convert perf_output_begin to __perf_output_begin and make the later function able to write records from the end of the ring buffer. Following commits

Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end

2016-03-25 Thread Wangnan (F)
On 2016/3/23 17:50, Peter Zijlstra wrote: On Mon, Mar 14, 2016 at 09:59:43AM +, Wang Nan wrote: Convert perf_output_begin to __perf_output_begin and make the later function able to write records from the end of the ring buffer. Following commits will utilize the 'backward' flag. This patc

Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end

2016-03-23 Thread Wangnan (F)
On 2016/3/24 3:25, Alexei Starovoitov wrote: On Wed, Mar 23, 2016 at 06:08:41PM +0800, Wangnan (F) wrote: On 2016/3/23 17:50, Peter Zijlstra wrote: On Mon, Mar 14, 2016 at 09:59:43AM +, Wang Nan wrote: Convert perf_output_begin to __perf_output_begin and make the later function able to

Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end

2016-03-23 Thread Wangnan (F)
On 2016/3/23 17:50, Peter Zijlstra wrote: On Mon, Mar 14, 2016 at 09:59:43AM +, Wang Nan wrote: Convert perf_output_begin to __perf_output_begin and make the later function able to write records from the end of the ring buffer. Following commits will utilize the 'backward' flag. This patc

Re: [PATCH 1/5] perf core: Introduce new ioctl options to pause and resume ring buffer

2016-03-23 Thread Wangnan (F)
On 2016/3/23 17:16, Peter Zijlstra wrote: On Mon, Mar 14, 2016 at 09:59:41AM +, Wang Nan wrote: Add new ioctl() to pause/resume ring-buffer output. In some situations we want to read from ring buffer only when we ensure nothing can write to the ring buffer during reading. Without this pat

Re: [PATCH 2/2] arm64: Fix watchpoint recursion when single-step is wrongly triggered in irq

2016-03-21 Thread Wangnan (F)
On 2016/3/21 18:24, Pratyush Anand wrote: On 21/03/2016:08:37:50 AM, He Kuang wrote: On arm64, watchpoint handler enables single-step to bypass the next instruction for not recursive enter. If an irq is triggered right after the watchpoint, a single-step will be wrongly triggered in irq handle

Re: [PATCH 10/46] perf core: Introduce new ioctl options to pause and resume ring buffer

2016-03-02 Thread Wangnan (F)
Hi Peter, Patch 10/46 to 14/46 were sent separately to you and modified follow your suggestion. Do you have further comment on it? Thank you. On 2016/2/29 23:39, Arnaldo Carvalho de Melo wrote: Em Fri, Feb 26, 2016 at 09:31:58AM +, Wang Nan escreveu: Add new ioctl() to pause/resume ring-

Re: [RFC PATCH 2/2] perf script: Print bpf-output events in 'perf script'

2016-02-24 Thread Wangnan (F)
On 2016/2/24 23:19, Arnaldo Carvalho de Melo wrote: Em Wed, Feb 24, 2016 at 11:20:45AM +, Wang Nan escreveu: This patch allows 'perf script' output messages from BPF program. For example, use test_bpf_output_3.c at the end of this commit message, # ./perf record -e bpf-output/no-inherit

Re: [PATCH 10/48] perf tools: Introduce bpf-output event

2016-02-23 Thread Wangnan (F)
On 2016/2/24 12:03, Wangnan (F) wrote: On 2016/2/24 10:04, Wangnan (F) wrote: On 2016/2/24 9:58, Wangnan (F) wrote: [SNIP] So, there is something strange here: if (unlikely(event->oncpu != smp_processor_id())) return -EOPNOTSUPP; All failures h

Re: [PATCH 10/48] perf tools: Introduce bpf-output event

2016-02-23 Thread Wangnan (F)
On 2016/2/24 10:04, Wangnan (F) wrote: On 2016/2/24 9:58, Wangnan (F) wrote: On 2016/2/24 1:45, Arnaldo Carvalho de Melo wrote: Em Mon, Feb 22, 2016 at 09:10:37AM +, Wang Nan escreveu: Commit a43eec304259a6c637f4014a6d4767159b6a3aa3 (bpf: introduce bpf_perf_event_output() helper

Re: [PATCH 10/48] perf tools: Introduce bpf-output event

2016-02-23 Thread Wangnan (F)
On 2016/2/24 9:58, Wangnan (F) wrote: On 2016/2/24 1:45, Arnaldo Carvalho de Melo wrote: Em Mon, Feb 22, 2016 at 09:10:37AM +, Wang Nan escreveu: Commit a43eec304259a6c637f4014a6d4767159b6a3aa3 (bpf: introduce bpf_perf_event_output() helper) add a helper to enable BPF program output

Re: [PATCH 10/48] perf tools: Introduce bpf-output event

2016-02-23 Thread Wangnan (F)
On 2016/2/24 1:45, Arnaldo Carvalho de Melo wrote: Em Mon, Feb 22, 2016 at 09:10:37AM +, Wang Nan escreveu: Commit a43eec304259a6c637f4014a6d4767159b6a3aa3 (bpf: introduce bpf_perf_event_output() helper) add a helper to enable BPF program output data to perf ring buffer through a new type

<    1   2   3   4   5   6   >