Re: [BUG] perf cross-compile error dual to fixdep not host-exe

2015-10-08 Thread He Kuang
hi, Jirka On 2015/9/30 14:13, Jiri Olsa wrote: On Wed, Sep 30, 2015 at 11:18:20AM +0800, He Kuang wrote: Hi, perf cross-compile error dual to fixdep is not a host executable, first bad commit is 7c422f557266("tools build: Build fixdep helper from perf and basic libs") Cross-co

[PATCH] perf tools: Support bpf prologue for arm64

2015-08-28 Thread He Kuang
This patch implements arch_get_reg_info() for arm64 to enable HAVE_BPF_PROLOGUE feature. For arm64, structure pt_regs is not composed by fields of register names but an array of regs, so here we simply multiply fixed register size by index number to get the byte offset. Signed-off-by: He Kuang

Re: [PATCH] perf tools: Support bpf prologue for arm64

2015-08-31 Thread He Kuang
Hi, Arnaldo On 2015/9/1 4:16, Arnaldo Carvalho de Melo wrote: Em Sat, Aug 29, 2015 at 03:16:52AM +, He Kuang escreveu: This patch implements arch_get_reg_info() for arm64 to enable HAVE_BPF_PROLOGUE feature. For arm64, structure pt_regs is not composed by fields of register names but an

Re: [RFC PATCH 2/2] bpf: Implement bpf_perf_event_sample_enable/disable() helpers

2015-10-13 Thread He Kuang
hi, Alexei What about using similar implementation like PERF_EVENT_IOC_SET_OUTPUT, creating a new ioctl like PERF_EVENT_IOC_SET_ENABLER, then let perf to select an event as 'enabler', then BPF can still control one atomic variable to enable/disable a set of events. you lost me on that last sen

Re: [PATCH net-next 2/3] bpf: introduce bpf_perf_event_output() helper

2015-10-21 Thread He Kuang
hi, Alexei I've tested the sample in next patch and it works well. I think more work on the perf side needs to be done for parsing PERF_COUNT_SW_BPF_OUTPUT event type, are you working on that? Thank you. On 2015/10/21 11:02, Alexei Starovoitov wrote: This helper is used to send raw data from e

Re: [RFC PATCH] bpf: Add new bpf map type for timer

2015-10-21 Thread He Kuang
ping and add a...@plumgrid.com, what's your opinion on this? On 2015/10/19 13:34, He Kuang wrote: This patch implements a timer map type inherited from array map. eBPF programs can deloy a timer by updating an entry in timer map, and destroy that by deleting the entry. The timer delay ti

[RFC PATCH] bpf: Add new bpf map type for timer

2015-10-18 Thread He Kuang
when the timer is triggered, then eBPF programs can be attatched to this function and perfrom customized functions. Signed-off-by: He Kuang --- Here's a hypothetical scenario to illustrate the use of timer map. A video frame is updated between frame_refresh_start() and frame_refresh_end(

[PATCHv2] perf probe: Fix failure to add multiple probes without debuginfo

2015-03-19 Thread He Kuang
x27; Added new event: probe:sys_write (on sys_write) You can now use it in all perf tools, such as: perf record -e probe:sys_write -aR sleep 1 Added new event: probe:sys_open (on sys_open) You can now use it in all perf tools, such as: perf record -e p

[PATCH 2/2] perf trace: Fix segmentfault on perf trace

2015-04-07 Thread He Kuang
] ./perf() [0x434ea5] [(nil)] Signed-off-by: He Kuang --- tools/perf/util/evlist.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 76ef7ee..9d36433 100644 --- a/tools/perf/util/evlist.c +++ b/tools

[PATCH 1/2] perf evlist: Fix inverted logic in perf_mmap__empty

2015-04-07 Thread He Kuang
perf_evlist__mmap_consume() uses perf_mmap__empty() to judge whether perf_mmap is empty and can be released. But the result is inverted so fix it. Signed-off-by: He Kuang --- tools/perf/util/evlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/evlist.c b

[PATCH] perf probe: Fix bug in perf probe with global variables

2015-04-25 Thread He Kuang
c_perform_write _stext+1237464 global_variable_for_test=@global_variable_for_test+0:s32 probe:generic_perform_write (on generic_perform_write with global_variable_for_test) You can now use it in all perf tools, such as: perf record -e probe:generic_perform_write -aR sleep 1 Signed-off-by:

Re: [PATCH 2/2] perf trace: Fix segmentfault on perf trace

2015-04-07 Thread He Kuang
Hi, Arnaldo On 2015/4/7 20:36, Arnaldo Carvalho de Melo wrote: Em Tue, Apr 07, 2015 at 05:31:11PM +0800, He Kuang escreveu: After perf_evlist__filter_pollfd() filters out fds and releases perf_mmap by using perf_evlist__mmap_put(), refcnt of perf_mmap hits 1 then perf_evlist__mmap_consume

[PATCH 2/2] perf data: Fix ctf_writer setupenv failure

2015-04-07 Thread He Kuang
ert: Converted and wrote 0.023 MB (596 samples) ] Signed-off-by: He Kuang --- tools/perf/util/data-convert-bt.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c index a5b89b9

[PATCH 1/2] perf data: Show error message when ctf setup failed

2015-04-07 Thread He Kuang
Show message when errors occurred during ctf conversion setup. Before this patch: $ ./perf data convert --to-ctf=ctf $ echo $? 255 After this patch: $ ./perf data convert --to-ctf=ctf Error during CTF convert setup. Signed-off-by: He Kuang --- tools/perf/util/data-convert-bt.c | 8

Re: [PATCH 2/2] perf data: Fix ctf_writer setupenv failure

2015-04-09 Thread He Kuang
On 2015/4/9 1:59, Jiri Olsa wrote: On Wed, Apr 08, 2015 at 12:49:20PM +0800, He Kuang wrote: Due to babeltrace commit: 7f800dc7c2a1 ("ir: make trace environment use bt_object") The trace->frozen flag is set in bt_ctf_trace_create_stream(), this flag is checked before addin

[PATCHv2 1/2] perf data: Show error message when conversion failed

2015-04-09 Thread He Kuang
Show message when errors occurred during conversion setup and conversion process. Before this patch: $ ./perf data convert --to-ctf=ctf $ echo $? 255 After this patch: $ ./perf data convert --to-ctf=ctf Error during conversion setup. Signed-off-by: He Kuang --- tools/perf/util/data

Re: [PATCH 1/2] perf data: Show error message when ctf setup failed

2015-04-09 Thread He Kuang
Hi, jirka On 2015/4/9 1:45, Jiri Olsa wrote: On Wed, Apr 08, 2015 at 12:49:19PM +0800, He Kuang wrote: Show message when errors occurred during ctf conversion setup. Before this patch: $ ./perf data convert --to-ctf=ctf $ echo $? 255 After this patch: $ ./perf data convert --to

[PATCH 2/3] perf probe: Make --source avaiable when probe with lazy_line

2015-04-13 Thread He Kuang
ch: $ perf probe -s ./kernel_src/ -k ./vmlinux --add='fs/super.c;s->s_count=1;' Added new events: probe:_stext (on @fs/super.c) probe:_stext_1 (on @fs/super.c) ... Signed-off-by: He Kuang --- tools/perf/util/probe-event.c | 2 +- tools/perf/util/probe-ev

[PATCH 3/3] perf probe: Fix segfault when probe with lazy_line to file

2015-04-13 Thread He Kuang
t;s_count=1;' Added new event: probe:_stext (on @fs/super.c) You can now use it in all perf tools, such as: perf record -e probe:_stext -aR sleep 1 Signed-off-by: He Kuang --- tools/perf/util/probe-finder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH 1/3] perf probe: Set retprobe flag when probe in address-based alternative mode

2015-04-13 Thread He Kuang
$ cat /sys/kernel/debug/tracing/kprobe_events r:probe/sys_write SyS_write Signed-off-by: He Kuang --- tools/perf/util/probe-event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 30545ce..5483d98 100644 --- a/tools/per

Re: [PATCH 1/3] perf probe: Set retprobe flag when probe in address-based alternative mode

2015-04-13 Thread He Kuang
On 04/13/2015 10:39 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Apr 13, 2015 at 07:41:28PM +0800, He Kuang escreveu: Perf probe misses to set retprobe flag back when falling back to address-based alternative mode. And when is that happens, can you explain? Because I tried to follow your

Re: [PATCH 1/3] perf probe: Set retprobe flag when probe in address-based alternative mode

2015-04-13 Thread He Kuang
Hi, Arnaldo On 04/13/2015 10:42 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Apr 13, 2015 at 11:39:03AM -0300, Arnaldo Carvalho de Melo escreveu: Em Mon, Apr 13, 2015 at 07:41:28PM +0800, He Kuang escreveu: Perf probe misses to set retprobe flag back when falling back to address-based

Re: [RFC PATCH v2 09/15] perf probe: Support $params without debuginfo

2015-05-26 Thread He Kuang
hi, Alexei On 2015/5/27 1:50, Alexei Starovoitov wrote: > On 5/25/15 1:33 AM, He Kuang wrote: >> Right, I learnt regparm(3) is mandatory in x86_32, according to rules, >> the first three args will go to regparm(ax, dx, cx). But we should not >> refer arg1~3 to ax, dx

Re: [RFC PATCH v2 09/15] perf probe: Support $params without debuginfo

2015-05-28 Thread He Kuang
On 2015/5/27 23:30, Alexei Starovoitov wrote: > On 5/26/15 7:27 PM, He Kuang wrote: >> hi, Alexei >> >> On 2015/5/27 1:50, Alexei Starovoitov wrote: >>> On 5/25/15 1:33 AM, He Kuang wrote: >>>> Right, I learnt regparm(3) is mandatory in x86_32, accordin

[PATCH] perf record: Fix perf.data size in no-buildid mode

2015-05-28 Thread He Kuang
patch: $ perf.perf record -B -e syscalls:sys_enter_open uname Linux [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.001 MB perf.data ] Signed-off-by: He Kuang --- tools/perf/builtin-record.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH RESEND 2/2] tools lib traceevent: Ignore libtrace-dynamic-list file

2015-05-28 Thread He Kuang
The libtrace-dynamic-list file is used to export symbols used by traceevent plugins. Signed-off-by: He Kuang --- tools/lib/traceevent/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/lib/traceevent/.gitignore b/tools/lib/traceevent/.gitignore index 35f56be..3c60335 100644

[PATCH RESEND 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-28 Thread He Kuang
1049 [000] 9666.754487: ftrace:function: __set_task_comm :1049 1049 [000] 9666.754487: ftrace:function:_raw_spin_lock :1049 1049 [000] 9666.754487: ftrace:function: task_tgid_nr_ns ... Signed-off-by: He Kuang Acked-by: Jiri Olsa --- tools/lib/traceevent/Makef

Re: [RFC PATCH v2 09/15] perf probe: Support $params without debuginfo

2015-05-28 Thread He Kuang
hi, Alexei On 2015/5/29 2:10, Alexei Starovoitov wrote: > On 5/28/15 6:01 AM, He Kuang wrote: >>> I don't think you can break it down in two steps like this. >>>> There is no such thing as 'calling regs'. x86_32 with ax,dx,cx >>>> are not &#x

[PATCH] perf tools: Fix build failure on 32-bit arch

2015-06-11 Thread He Kuang
format strings in warning message with PRIu64 for u64 'total_lost_samples' to fix this problem. Signed-off-by: He Kuang --- tools/perf/builtin-report.c | 2 +- tools/perf/util/session.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-report

[PATCH] perf probe: Fix failure to probe events on arm

2015-06-15 Thread He Kuang
te' Added new event: probe:generic_perform_write (on generic_perform_write) You can now use it in all perf tools, such as: perf record -e probe:generic_perform_write -aR sleep 1 Signed-off-by: He Kuang --- tools/perf/util/probe-event.c | 16 +++- 1 file changed, 15 insertions(+), 1

Re: [PATCH] perf probe: Fix failure to probe events on arm

2015-06-17 Thread He Kuang
hi, Masami On 2015/6/17 16:52, Masami Hiramatsu wrote: On 2015/06/17 0:26, hekuang wrote: hi, Arnaldo On 06/15/2015 10:49 PM, Arnaldo Carvalho de Melo wrote: Em Mon, Jun 15, 2015 at 08:06:53AM +, He Kuang escreveu: Fix failure to probe events on arm, problem is introduced by commit

[PATCH v2] perf probe: Fix failure to probe events on arm

2015-06-17 Thread He Kuang
rite (on generic_perform_write) You can now use it in all perf tools, such as: perf record -e probe:generic_perform_write -aR sleep 1 Signed-off-by: He Kuang --- tools/perf/util/probe-event.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/probe-ev

Re: [PATCH RESEND 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-06-05 Thread He Kuang
hi, Arnaldo ping.. On 2015/5/28 21:28, He Kuang wrote: Traceevent plugins need dynamic symbols exported from libtraceevent.a, otherwise a dlopen error will occur during plugins loading. This patch uses dynamic-list-file to export dynamic symbols which will be used in plugins to perf

Re: [PATCH] perf record: Fix perf.data size in no-buildid mode

2015-06-05 Thread He Kuang
ping.. On 2015/5/28 21:17, He Kuang wrote: The size of perf.data is missing update in no-buildid mode, which gives wrong output result. Before this patch: $ perf.perf record -B -e syscalls:sys_enter_open uname Linux [ perf record: Woken up 1 times to write data ] [ perf record

Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event

2015-07-23 Thread He Kuang
Hi, Alexi Thank you for your guidence, and by referencing your last mail and other llvm backends, I found setting BPFMCAsmInfo::SupportsDebugInformation = true in BPFMCAsmInfo.h and fix some unhandeled switch can make llc output debug_info, but important information is missing in the result: bpf

Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event

2015-07-23 Thread He Kuang
Hi, Alexei On 2015/7/24 11:20, Alexei Starovoitov wrote: On 7/23/15 1:49 PM, Alexei Starovoitov wrote: On 7/23/15 4:54 AM, He Kuang wrote: trimmed cc-list, since it's not related to kernel. Thank you for your guidence, and by referencing your last mail and other llvm backends, I

Re: [LLVMdev] Cc llvmdev: Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event

2015-08-05 Thread He Kuang
Hi, Alexei On 2015/7/30 1:13, Alexei Starovoitov wrote: On 7/29/15 2:38 AM, He Kuang wrote: Hi, Alexei On 2015/7/28 10:18, Alexei Starovoitov wrote: On 7/25/15 3:04 AM, He Kuang wrote: I noticed that for 64-bit elf format, the reloc sections have 'Addend' in the entry, but

Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event

2015-07-29 Thread He Kuang
Hi, Alexei On 2015/7/28 10:18, Alexei Starovoitov wrote: On 7/25/15 3:04 AM, He Kuang wrote: I noticed that for 64-bit elf format, the reloc sections have 'Addend' in the entry, but there's no 'Addend' info in bpf elf file(64bit). I think there must be something w

Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event

2015-07-25 Thread He Kuang
Hi, Alexei On 2015/7/24 12:16, He Kuang wrote: Hi, Alexei On 2015/7/24 11:20, Alexei Starovoitov wrote: On 7/23/15 1:49 PM, Alexei Starovoitov wrote: On 7/23/15 4:54 AM, He Kuang wrote: trimmed cc-list, since it's not related to kernel. Thank you for your guidence, and by referencing

[PATCH] module: Fix missing to hold module_mutex lock in module_kallsyms_lookup_name

2015-07-27 Thread He Kuang
,unlock} and fix the bug. Signed-off-by: He Kuang --- kernel/module.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/module.c b/kernel/module.c index 4d2b82e..43d728b 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -3802,8 +3802,10 @@ unsigned long module_kallsyms_lookup_name

Re: [RFC PATCH v5 0/3] Make eBPF programs output data to perf

2015-07-16 Thread He Kuang
On 2015/7/14 21:35, Steven Rostedt wrote: On Mon, 13 Jul 2015 20:10:29 -0700 Alexei Starovoitov wrote: On 7/13/15 6:59 PM, He Kuang wrote: This version we output bpf trace events in a hex array, the results for three u64 integers in previous sample changed to this: dd 1042 [000

[PATCH 4/8] perf build: Add build-test for debug-frame on arm/arm64

2016-05-06 Thread He Kuang
Debug-frame for remote platforms is not related to the host platform, so we should test each platform separately. Signed-off-by: He Kuang --- tools/build/Makefile.feature | 3 ++- tools/build/feature/Makefile | 10 +++--- tools/build

[PATCH 0/8] Add support for remote unwind

2016-05-06 Thread He Kuang
bc-2.22.so) 804842e fib (/tmp/hello) 804849d main (/tmp/hello) b762546e __libc_start_main (/lib/libc-2.22.so) 8048341 _start (/tmp/hello) Thanks, discussion welcomed. He Kuang (8): perf tools: Omit DWARF judgement when

[PATCH 6/8] perf callchain: Add support for cross-platform unwind

2016-05-06 Thread He Kuang
this patch, we test for x86 platform and only show proper messages. The real unwind methods are not implemented, will be introduced in next patch. Signed-off-by: He Kuang --- tools/perf/config/Makefile| 19 -- tools/perf/util/Build | 3 +- tools/perf

[PATCH 1/8] perf tools: Omit DWARF judgement when recording dwarf callchain

2016-05-06 Thread He Kuang
There's no need for dwarf support when perf recording with callchain. Signed-off-by: He Kuang --- tools/perf/util/util.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index b7766c5..e5ebfd4 100644 --- a/tools/perf/util/util.c +++ b/

[PATCH 5/8] perf tools: Promote proper messages for cross-platform unwind

2016-05-06 Thread He Kuang
) on other machines. Same thing for other platforms will be added in next patches. Signed-off-by: He Kuang --- tools/perf/config/Makefile | 6 ++ tools/perf/util/symbol-elf.c | 16 +++ tools/perf/util/symbol.c | 49 tools/perf

[PATCH 8/8] perf callchain: Support aarch64 cross-platform

2016-05-06 Thread He Kuang
Support aarch64 cross platform callchain unwind. Signed-off-by: He Kuang --- .../perf/arch/arm64/include/libunwind/libunwind-arch.h | 18 ++ tools/perf/arch/arm64/util/unwind-libunwind.c | 5 - tools/perf/config/Makefile | 12

[PATCH 7/8] perf callchain: Support x86 target platform

2016-05-06 Thread He Kuang
Support x86(32bit) cross platform callchain unwind. Signed-off-by: He Kuang --- .../arch/x86/include/libunwind/libunwind-arch.h| 18 ++ tools/perf/arch/x86/util/unwind-libunwind.c| 42 ++ tools/perf/util/Build | 6 tools

[PATCH 3/8] perf build: Add build-test for libunwind cross-platforms support

2016-05-06 Thread He Kuang
Currently only test for local libunwind. We should check all supported platforms so we can use them to parse perf.data with callchain info on different machines. Signed-off-by: He Kuang --- tools/build/Makefile.feature | 8 tools/build/feature/Makefile

[PATCH 2/8] perf script: Add options for custom vdso name

2016-05-06 Thread He Kuang
When unwinding callchain on different machine, vdso info should be provided so the unwind process won't be interrupted if address fell into vdso region. Signed-off-by: He Kuang --- tools/perf/builtin-script.c | 2 ++ tools/perf/util/dso.c | 7 +++ tools/perf/util/dso.h

[PATCH v2 5/9] perf tools: Add methods to test dso is 64-bit or 32-bit

2016-05-10 Thread He Kuang
32-bit programs can be run on 64-bit machines, so we should choose unwind methods according to 'thread->map' instead of the host architecture. This patch adds methods to test whether a dso is 64-bit or 32-bit by the class info in elf. Signed-off-by: He Kuang --- tools/perf/util

[PATCH v2 6/9] perf tools: Promote proper messages for cross-platform unwind

2016-05-10 Thread He Kuang
-bit) on other machines. Same thing for other platforms will be added in next patches. Signed-off-by: He Kuang --- tools/perf/config/Makefile | 6 ++ tools/perf/util/thread.c | 2 ++ tools/perf/util/unwind-libunwind.c | 32 tools/perf/util

[PATCH v2 7/9] perf callchain: Add support for cross-platform unwind

2016-05-10 Thread He Kuang
this patch, we test for x86 platform and only show proper messages. The real unwind methods are not implemented, will be introduced in next patch. Common function used by both local unwind and remote unwind are separated into new file 'unwind-libunwind_common.c'. Signed-off-by: He Kuang

[PATCH v2 9/9] perf callchain: Support aarch64 cross-platform

2016-05-10 Thread He Kuang
Support aarch64 cross platform callchain unwind. Signed-off-by: He Kuang --- .../perf/arch/arm64/include/libunwind/libunwind-arch.h | 18 ++ tools/perf/arch/arm64/util/unwind-libunwind.c | 5 - tools/perf/config/Makefile | 12

[PATCH v2 8/9] perf callchain: Support x86 target platform

2016-05-10 Thread He Kuang
Support x86(32-bit) cross platform callchain unwind. Signed-off-by: He Kuang --- .../arch/x86/include/libunwind/libunwind-arch.h| 18 ++ tools/perf/arch/x86/util/unwind-libunwind.c| 42 ++ tools/perf/util/Build | 6

[PATCH v2 4/9] perf build: Add build-test for debug-frame on arm/arm64

2016-05-10 Thread He Kuang
Debug-frame for remote platforms is not related to the host platform, so we should test each platform separately. Signed-off-by: He Kuang --- tools/build/Makefile.feature | 4 +++- tools/build/feature/Makefile | 7 +++ tools/build

[PATCH v2 1/9] perf tools: Omit DWARF judgement when recording dwarf callchain

2016-05-10 Thread He Kuang
Signed-off-by: He Kuang Acked-by: Jiri Olsa --- tools/perf/util/util.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index b7766c5..e5ebfd4 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -471,7 +471,6 @@ int parse_callch

[PATCH v2 0/9] Add support for remote unwind

2016-05-10 Thread He Kuang
in .c file. Thanks. He Kuang (9): perf tools: Omit DWARF judgement when recording dwarf callchain perf script: Add options for custom vdso path perf build: Add build-test for libunwind cross-platforms support perf build: Add build-test for debug-frame on arm/arm64 perf tools: Add methods t

[PATCH v2 2/9] perf script: Add options for custom vdso path

2016-05-10 Thread He Kuang
ndomly based on VDSO__TEMP_FILE_NAME template, such a filename is not reliable and users need a way to provide the path of their own vdso binary file. Signed-off-by: He Kuang --- tools/perf/builtin-script.c | 2 ++ tools/perf/util/dso.c | 7 +++ tools/perf/util/dso.h | 1 + tools/perf/util/

[PATCH v2 3/9] perf build: Add build-test for libunwind cross-platforms support

2016-05-10 Thread He Kuang
Currently only test for local libunwind. We should check all supported platforms so we can use them to parse perf.data with callchain info on different machines. Signed-off-by: He Kuang --- tools/build/Makefile.feature | 4 tools/build/feature/Makefile | 16

[PATCH v3 1/7] perf tools: Set vdso name to vdso[64,32] depending on platform

2016-05-12 Thread He Kuang
amed as 'vdso32' and get failed. This patch uses different names when storing the buildid, i.e. vdso64 for 64-bit machine and vdso32 for 32-bit machine, and eliminates this naming confusion. Signed-off-by: He Kuang --- tools/perf/util/vdso.h | 7 ++- 1 file changed, 6 insertions(+

[PATCH v3 6/7] perf callchain: Support x86 target platform

2016-05-12 Thread He Kuang
Support x86(32-bit) cross platform callchain unwind. Signed-off-by: He Kuang --- .../arch/x86/include/libunwind/libunwind-arch.h| 18 ++ tools/perf/arch/x86/util/unwind-libunwind.c| 42 ++ tools/perf/util/Build | 6

[PATCH v3 3/7] perf tools: Remove the logical that skip buildid cache if symfs is given

2016-05-12 Thread He Kuang
indexed by buildid do not cause ambiguity, this patch simply removes that logical. Signed-off-by: He Kuang --- tools/perf/util/dso.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index b39b80c..a07166c5 100644 --- a/tools/perf

[PATCH v3 7/7] perf callchain: Support aarch64 cross-platform

2016-05-12 Thread He Kuang
Support aarch64 cross platform callchain unwind. Signed-off-by: He Kuang --- .../perf/arch/arm64/include/libunwind/libunwind-arch.h | 18 ++ tools/perf/arch/arm64/util/unwind-libunwind.c | 5 - tools/perf/config/Makefile | 12

[PATCH v3 2/7] perf tools: Store vdso buildid unconditionally

2016-05-12 Thread He Kuang
ata. This patch stores vdso buildid regardless of whether the vdso is hit or not. Signed-off-by: He Kuang --- tools/perf/util/build-id.c | 2 +- tools/perf/util/dso.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-

[PATCH v3 0/7] Add support for remote unwind

2016-05-12 Thread He Kuang
ross platform unwind. - Keep generic version of libunwind-debug-frame test. - Put 32/64-bit test functions into separate patch. - Extract unwind related functions to unwind-libunwind.c and add new file for common parts used by both local and remote unwind. - Eliminate most of the ifdefs in .

[PATCH v3 5/7] perf callchain: Add support for cross-platform unwind

2016-05-12 Thread He Kuang
this patch, we test for x86 platform and only show proper messages. The real unwind methods are not implemented, will be introduced in next patch. Common function used by both local unwind and remote unwind are separated into new file 'unwind-libunwind_common.c'. Signed-off-by: He Kuang

[PATCH v3 4/7] perf tools: Promote proper messages for cross-platform unwind

2016-05-12 Thread He Kuang
-bit) on other machines. Same thing for other platforms will be added in next patches. Signed-off-by: He Kuang --- tools/perf/config/Makefile | 6 ++ tools/perf/util/thread.c | 2 ++ tools/perf/util/unwind-libunwind.c | 33 + tools/perf/util

[PATCH v5 3/5] perf callchain: Add support for cross-platform unwind

2016-05-24 Thread He Kuang
both unwind are supported and NO_LIBUNWIND means neither local nor remote libunwind are supported. Signed-off-by: He Kuang --- tools/perf/arch/x86/util/Build| 2 +- tools/perf/config/Makefile| 23 +- tools/perf/util/Build | 2 +- tools

[PATCH v5 5/5] perf callchain: Support aarch64 cross-platform

2016-05-24 Thread He Kuang
Support aarch64 cross platform callchain unwind. Signed-off-by: He Kuang --- .../perf/arch/arm64/include/libunwind/libunwind-arch.h | 18 ++ tools/perf/arch/arm64/util/unwind-libunwind.c | 5 - tools/perf/config/Makefile | 12

[PATCH v5 4/5] perf callchain: Support x86 target platform

2016-05-24 Thread He Kuang
Support x86(32-bit) cross platform callchain unwind. Signed-off-by: He Kuang --- .../perf/arch/x86/include/libunwind/libunwind-arch.h | 18 ++ tools/perf/arch/x86/util/unwind-libunwind.c | 19 ++- tools/perf/util/Build

[PATCH v5 0/5] Add support for remote unwind

2016-05-24 Thread He Kuang
d tests status for cross platform unwind. - Keep generic version of libunwind-debug-frame test. - Put 32/64-bit test functions into separate patch. - Extract unwind related functions to unwind-libunwind.c and add new file for common parts used by both local and remote unwind. - Eliminate mos

[PATCH v5 1/5] perf tools: Use LIBUNWIND_DIR for remote libunwind feature check

2016-05-24 Thread He Kuang
Pass LIBUNWIND_DIR to feature check flags for remote libunwind tests. So perf can be able to detect remote libunwind libraries from arbitrary directory. Signed-off-by: He Kuang --- tools/perf/config/Makefile | 9 + 1 file changed, 9 insertions(+) diff --git a/tools/perf/config/Makefile

[PATCH v5 2/5] perf tools: Show warnings for unsupported cross-platform unwind

2016-05-24 Thread He Kuang
-bit) on other machines. Same thing for other platforms will be added in next patches. Common functions which will be used by both local unwind and remote unwind are separated into new file 'unwind-libunwind_common.c'. Signed-off-by: He Kuang --- tools/perf/arch/common.c

[PATCH v3 1/7 UPDATE2] perf tools: Find vdso with the consider of cross-platform

2016-05-17 Thread He Kuang
, then it tries 'vdso' which indicates that the thread was run on 32-bit machine when recording. Signed-off-by: He Kuang --- tools/perf/util/vdso.c | 40 +--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/vdso.c b/t

[PATCH v4 6/6] perf callchain: Support aarch64 cross-platform

2016-05-19 Thread He Kuang
Support aarch64 cross platform callchain unwind. Signed-off-by: He Kuang --- .../perf/arch/arm64/include/libunwind/libunwind-arch.h | 18 ++ tools/perf/arch/arm64/util/unwind-libunwind.c | 5 - tools/perf/config/Makefile | 12

[PATCH v4 0/6] Add support for remote unwind

2016-05-19 Thread He Kuang
s into separate patch. - Extract unwind related functions to unwind-libunwind.c and add new file for common parts used by both local and remote unwind. - Eliminate most of the ifdefs in .c file. Thanks. He Kuang (6): perf tools: Set buildid dir under symfs when --symfs is provided perf

[PATCH v4 1/6] perf tools: Set buildid dir under symfs when --symfs is provided

2016-05-19 Thread He Kuang
This patch moves the reference of buildid dir to 'symfs/.debug' and skips the local buildid dir when '--symfs' is given, so that every single file opened by perf is relateive to symfs directory now. Signed-off-by: He Kuang --- tools/perf/builtin-annotate.c | 5 +++-- tools

[PATCH v4 4/6] perf callchain: Add support for cross-platform unwind

2016-05-19 Thread He Kuang
this patch, we test for x86 platform and only show proper messages. The real unwind methods are not implemented, will be introduced in next patch. Signed-off-by: He Kuang --- tools/perf/util/thread.c | 5 +-- tools/perf/util/thread.h | 14 +- tools/perf/util

[PATCH v4 3/6] perf tools: Separate local and remote unwind support detection

2016-05-19 Thread He Kuang
. Signed-off-by: He Kuang --- tools/perf/config/Makefile | 21 ++--- tools/perf/util/Build | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index a86b864..3035dbf 100644 --- a/tools/perf/config/Makefile

[PATCH v4 5/6] perf callchain: Support x86 target platform

2016-05-19 Thread He Kuang
Support x86(32-bit) cross platform callchain unwind. Signed-off-by: He Kuang --- tools/perf/arch/x86/include/libunwind/libunwind-arch.h | 18 ++ tools/perf/arch/x86/util/unwind-libunwind.c| 12 +--- tools/perf/util/Build | 6

[PATCH v4 2/6] perf tools: Promote proper messages for cross-platform unwind

2016-05-19 Thread He Kuang
-bit) on other machines. Same thing for other platforms will be added in next patches. Common functions which will be used by both local unwind and remote unwind are separated into new file 'unwind-libunwind_common.c'. Signed-off-by: He Kuang --- tools/perf/arch/common.c

[PATCH v6 11/11] perf callchain: Support aarch64 cross-platform

2016-05-28 Thread He Kuang
Support aarch64 cross platform callchain unwind. Signed-off-by: He Kuang --- tools/perf/arch/Build | 1 + tools/perf/arch/arm64/util/unwind-libunwind.c | 4 +++- .../perf/arch/arm64/util/unwind-libunwind_arm64.c | 22 ++ tools/perf/config

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

2016-05-28 Thread He Kuang
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-libunwind-local.c | 677

[PATCH v6 07/11] perf tools: Export normalize_arch() function

2016-05-28 Thread He Kuang
Export normalize_arch() function, so other part of perf can get normalized form of arch string. Signed-off-by: He Kuang --- tools/perf/arch/common.c | 2 +- tools/perf/arch/common.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/arch/common.c b/tools/perf/arch

[PATCH v6 04/11] perf tools: Move unwind__prepare_access from thread_new into thread__insert_map

2016-05-28 Thread He Kuang
-off-by: He Kuang --- tools/perf/util/thread.c | 7 ++- tools/perf/util/unwind-libunwind.c | 7 +++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 6d3900c..045477d 100644 --- a/tools/perf/util/thread.c

[PATCH v6 02/11] perf tools: Decouple thread->address_space on libunwind

2016-05-28 Thread He Kuang
void *' instead to decouple the dependence on libunwind. Signed-off-by: He Kuang --- tools/perf/util/thread.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index 45fba13..aa3a8ff 100644 --- a/tools/perf/util/thread.

[PATCH v6 10/11] perf callchain: Support x86 target platform

2016-05-28 Thread He Kuang
Support x86(32-bit) cross platform callchain unwind. Signed-off-by: He Kuang --- tools/perf/arch/Build | 1 + tools/perf/arch/x86/util/unwind-libunwind.c| 7 --- tools/perf/arch/x86/util/unwind-libunwind_x86_32.c | 21 + tools/perf

[PATCH v6 01/11] perf tools: Use LIBUNWIND_DIR for remote libunwind feature check

2016-05-28 Thread He Kuang
Pass LIBUNWIND_DIR to feature check flags for remote libunwind tests. So perf can be able to detect remote libunwind libraries from arbitrary directory. Signed-off-by: He Kuang --- tools/perf/config/Makefile | 9 + 1 file changed, 9 insertions(+) diff --git a/tools/perf/config/Makefile

[PATCH v6 09/11] perf tools: Change fixed name of libunwind__arch_reg_id to macro

2016-05-28 Thread He Kuang
. Signed-off-by: He Kuang --- tools/perf/util/unwind-libunwind-local.c | 2 +- tools/perf/util/unwind.h | 5 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c index 5599adc

[PATCH v6 05/11] perf tools: Separate local/remote libunwind config

2016-05-28 Thread He Kuang
CONFIG_LIBUNWIND/NO_LIBUNWIND are changed to CONFIG_LOCAL_LIBUNWIND/NO_LOCAL_LIBUNWIND for retaining local unwind features. The new CONFIG_LIBUNWIND stands for either local or remote or both unwind are supported. Signed-off-by: He Kuang --- tools/perf/arch/arm/util/Build | 2 +- tools/perf

[PATCH v6 00/11] Add support for remote unwind

2016-05-28 Thread He Kuang
v6: By following the advises from Jiri Olsa: - Introducing struct unwind_libunwind_ops for local unwind - Move unwind__prepare_access from thread_new into thread__insert_map - Extract local libunwind code out of unwind-libunwind.c - Other changes mentioned in v5 mails. Thanks. He Kuan

[PATCH v6 03/11] perf tools: Introducing struct unwind_libunwind_ops for local unwind

2016-05-28 Thread He Kuang
methods of libunwind operations to thread/map related, and each thread can have indivadual libunwind operations. Local libunwind methods are registered as default value. Signed-off-by: He Kuang --- tools/perf/util/thread.c | 2 ++ tools/perf/util/thread.h | 14 +- tools

[PATCH v6 08/11] perf tools: Show warnings for unsupported cross-platform unwind

2016-05-28 Thread He Kuang
-bit) on other machines. Same thing for other platforms will be added in next patches. Signed-off-by: He Kuang --- tools/perf/config/Makefile | 8 tools/perf/util/thread.c | 2 +- tools/perf/util/unwind-libunwind.c | 30 +- tools/perf/util

[PATCH v3 1/7 UPDATE] perf tools: Find vdso with the consider of cross-platform

2016-05-13 Thread He Kuang
, then it tries 'vdso' which indicates that the thread was run on 32-bit machine when recording. Signed-off-by: He Kuang --- tools/perf/util/vdso.c | 40 +--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/vdso.c b/t

[PATCH v3 3/7 UPDATE] perf tools: Add option for the path of buildid dsos under symfs

2016-05-14 Thread He Kuang
buildid dir under symfs if '--symfs' is used, and adds new option '--dso-prefix' to specify the subdir path in symfs which contains the buildid dsos. Signed-off-by: He Kuang --- tools/perf/builtin-script.c | 2 ++ tools/perf/util/config.c| 10 ++ tools/perf/u

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

2016-05-15 Thread He Kuang
+0x80007f0023a4 ([kernel.kallsyms]) 7fffe358 do_signal+0x80007f002028 ([kernel.kallsyms]) 7fffa5e8 exit_to_usermode_loop+0x80007f002053 ([kernel.kallsyms]) ... Signed-off-by: He Kuang --- tools/perf/builtin-script.c | 23 +-- 1 file changed

[RFC PATCH v6 2/2] bpf: Introduce function for outputing data to perf event

2015-07-20 Thread He Kuang
ility to output data as perf sample event. This helper simple call the new trace event and userspace perf tools can record the BPF ftrace event to collect those records. Signed-off-by: He Kuang Acked-by: Alexei Starovoitov --- include/trace/events/bpf.h | 30 ++ in

[RFC PATCH v6 1/2] tools lib traceevent: Support function __get_dynamic_array_len

2015-07-20 Thread He Kuang
top half of __data_loc_##item field. This patch adds new arg type PRINT_DYNAMIC_ARRAY_LEN to return the length to eval_num_arg(), Signed-off-by: He Kuang --- tools/lib/traceevent/event-parse.c | 56 +- tools/lib/traceevent/event-parse.h | 1

[RFC PATCH v6 0/2] Make eBPF programs output data to perf

2015-07-20 Thread He Kuang
array. For we print the bpf output data in byte array from patch v5, that problem does not affect our patch any more, but some comments in patch 1/2 is updated. Patch 2/2 is acked by Alexei. Thank you. He Kuang (2): tools lib traceevent: Support function __get_dynamic_array_len bpf: Introduce

  1   2   3   4   5   >