Re: [PATCH v2 1/3] perf tools: Use offset instead of dwarfnum in register table.

2017-02-04 Thread Hekuang
hi 在 2017/2/3 21:00, Will Deacon 写道: On Fri, Feb 03, 2017 at 11:06:05AM +, He Kuang wrote: This patch changes the 'dwarfnum' to 'offset' in register table, so the index of array becomes the dwarfnum (the index of each register defined by DWARF) and the "offset" member means the byte-offset

Re: [PATCH v2 1/3] perf tools: Use offset instead of dwarfnum in register table.

2017-02-04 Thread Hekuang
hi 在 2017/2/3 21:00, Will Deacon 写道: On Fri, Feb 03, 2017 at 11:06:05AM +, He Kuang wrote: This patch changes the 'dwarfnum' to 'offset' in register table, so the index of array becomes the dwarfnum (the index of each register defined by DWARF) and the "offset" member means the byte-offset

Re: [PATCH 2/2 v2] perf tools: Enable bpf prologue for arm64

2017-02-03 Thread Hekuang
hi, 在 2017/1/27 3:31, Arnaldo Carvalho de Melo 写道: Em Thu, Jan 26, 2017 at 04:52:12PM +, Will Deacon escreveu: On Thu, Jan 26, 2017 at 10:49:16AM +0900, Masami Hiramatsu wrote: On Wed, 25 Jan 2017 13:32:01 + Will Deacon wrote: On Wed, Jan 25, 2017 at 07:23:11AM

Re: [PATCH 2/2 v2] perf tools: Enable bpf prologue for arm64

2017-02-03 Thread Hekuang
hi, 在 2017/1/27 3:31, Arnaldo Carvalho de Melo 写道: Em Thu, Jan 26, 2017 at 04:52:12PM +, Will Deacon escreveu: On Thu, Jan 26, 2017 at 10:49:16AM +0900, Masami Hiramatsu wrote: On Wed, 25 Jan 2017 13:32:01 + Will Deacon wrote: On Wed, Jan 25, 2017 at 07:23:11AM +, He Kuang

Re: [PATCH 2/2] perf tools: Introduce regs_query_register_offset() for arm64

2017-01-24 Thread Hekuang
hi 在 2017/1/25 3:09, Arnaldo Carvalho de Melo 写道: Em Tue, Jan 24, 2017 at 06:25:18PM +, Will Deacon escreveu: On Tue, Jan 24, 2017 at 10:30:15AM +, He Kuang wrote: Since HAVE_KPROBES can be enabled in arm64, this patch introduces regs_query_register_offset() to convert register name

Re: [PATCH 2/2] perf tools: Introduce regs_query_register_offset() for arm64

2017-01-24 Thread Hekuang
hi 在 2017/1/25 3:09, Arnaldo Carvalho de Melo 写道: Em Tue, Jan 24, 2017 at 06:25:18PM +, Will Deacon escreveu: On Tue, Jan 24, 2017 at 10:30:15AM +, He Kuang wrote: Since HAVE_KPROBES can be enabled in arm64, this patch introduces regs_query_register_offset() to convert register name

Re: [PATCH 2/2] perf script: Don't disable use_callchain if input is pipe

2016-08-15 Thread Hekuang
ping. 在 2016/8/4 19:25, He Kuang 写道: Because perf data from pipe do not have a header with evsel attr, we should not check that and disable symbol_conf.use_callchain. Otherwise, perf script won't show callchains even if the data stream contains callchain. Before: $ perf record -g -o - uname

Re: [PATCH 2/2] perf script: Don't disable use_callchain if input is pipe

2016-08-15 Thread Hekuang
ping. 在 2016/8/4 19:25, He Kuang 写道: Because perf data from pipe do not have a header with evsel attr, we should not check that and disable symbol_conf.use_callchain. Otherwise, perf script won't show callchains even if the data stream contains callchain. Before: $ perf record -g -o - uname

Re: perf unwind: Odd message about x86 unwind

2016-06-30 Thread Hekuang
hi 在 2016/6/30 20:06, Arnaldo Carvalho de Melo 写道: Hi He, While testing a patch by Peter Zijlstra to the --stdio annotation code I came accross these messages: [acme@jouet linux]$ perf annotate __vdso_gettimeofday 2>&1 | head -20 unwind: target platform=x86 is not supported unwind:

Re: perf unwind: Odd message about x86 unwind

2016-06-30 Thread Hekuang
hi 在 2016/6/30 20:06, Arnaldo Carvalho de Melo 写道: Hi He, While testing a patch by Peter Zijlstra to the --stdio annotation code I came accross these messages: [acme@jouet linux]$ perf annotate __vdso_gettimeofday 2>&1 | head -20 unwind: target platform=x86 is not supported unwind:

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

2016-06-29 Thread Hekuang
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) +unsigned int __bpf_prog_run(void *ctx,

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

2016-06-29 Thread Hekuang
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) +unsigned int __bpf_prog_run(void *ctx,

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

2016-06-28 Thread Hekuang
在 2016/6/27 4:48, Alexei Starovoitov 写道: On Sun, Jun 26, 2016 at 11:20:52AM +, He Kuang wrote: bounds check just like ubpf library does. hmm. I don't think I suggested to hack bpf/core.c into separate file and compile it for userspace... Maybe I misunderstood your suggestion. Now I

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

2016-06-28 Thread Hekuang
在 2016/6/27 4:48, Alexei Starovoitov 写道: On Sun, Jun 26, 2016 at 11:20:52AM +, He Kuang wrote: bounds check just like ubpf library does. hmm. I don't think I suggested to hack bpf/core.c into separate file and compile it for userspace... Maybe I misunderstood your suggestion. Now I

Re: [RFC PATCH v2 05/26] tools include: Sync math64.h and div64.h

2016-06-26 Thread Hekuang
hi 在 2016/6/27 5:08, Nilay Vaish 写道: On 26 June 2016 at 06:20, He Kuang wrote: From: Wang Nan This patch copies "include/linux/math64.h" into "tools/include/linux/math64.h" and copies "include/asm-generic/div64.h" into

Re: [RFC PATCH v2 05/26] tools include: Sync math64.h and div64.h

2016-06-26 Thread Hekuang
hi 在 2016/6/27 5:08, Nilay Vaish 写道: On 26 June 2016 at 06:20, He Kuang wrote: From: Wang Nan This patch copies "include/linux/math64.h" into "tools/include/linux/math64.h" and copies "include/asm-generic/div64.h" into "tools/include/asm-generic/div64.h", to enable other libraries use

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

2016-06-26 Thread Hekuang
hi 在 2016/6/27 4:48, Alexei Starovoitov 写道: On Sun, Jun 26, 2016 at 11:20:52AM +, He Kuang wrote: This patchset is based on Wang Nan's v1: http://thread.gmane.org/gmane.linux.kernel/2203717/focus=2203707 """ This patch set allows to perf invoke some user space BPF scripts on

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

2016-06-26 Thread Hekuang
hi 在 2016/6/27 4:48, Alexei Starovoitov 写道: On Sun, Jun 26, 2016 at 11:20:52AM +, He Kuang wrote: This patchset is based on Wang Nan's v1: http://thread.gmane.org/gmane.linux.kernel/2203717/focus=2203707 """ This patch set allows to perf invoke some user space BPF scripts on

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

2016-06-22 Thread Hekuang
在 2016/6/23 10:02, 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()

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

2016-06-22 Thread Hekuang
在 2016/6/23 10:02, 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()

Re: [PATCH 0/3] Fixes on remote unwind

2016-06-20 Thread Hekuang
在 2016/6/8 18:15, He Kuang 写道: The remote unwind can supported scenario where we collect on a x86_64 machine and want to do analysis on a ARM64 or x86-32 machine. Though this is not tested, after Arnaldo questioned the above issue, I tested and found a bug. In util/unwind-libunwind-local.c,

Re: [PATCH 0/3] Fixes on remote unwind

2016-06-20 Thread Hekuang
在 2016/6/8 18:15, He Kuang 写道: The remote unwind can supported scenario where we collect on a x86_64 machine and want to do analysis on a ARM64 or x86-32 machine. Though this is not tested, after Arnaldo questioned the above issue, I tested and found a bug. In util/unwind-libunwind-local.c,

Re: [PATCH v2 1/2] tools include: Adopt byte ordering macros from byteorder/generic.h

2016-06-16 Thread Hekuang
在 2016/6/16 19:36, Jiri Olsa 写道: On Thu, Jun 16, 2016 at 10:41:31AM +, He Kuang wrote: From: Wang Nan This patch adopts the macros for byte order conversion from "include/linux/byteorder/generic.h" to "tools/include/linux/byteorder/generic.h" tools/perf/MANIFEST is

Re: [PATCH v2 1/2] tools include: Adopt byte ordering macros from byteorder/generic.h

2016-06-16 Thread Hekuang
在 2016/6/16 19:36, Jiri Olsa 写道: On Thu, Jun 16, 2016 at 10:41:31AM +, He Kuang wrote: From: Wang Nan This patch adopts the macros for byte order conversion from "include/linux/byteorder/generic.h" to "tools/include/linux/byteorder/generic.h" tools/perf/MANIFEST is also updated for

Re: [PATCH] tools/perf: fix the word selected in find_*_bit

2016-06-15 Thread Hekuang
在 2016/6/16 5:29, Arnaldo Carvalho de Melo 写道: Em Thu, Jun 16, 2016 at 12:11:04AM +0300, Yury Norov escreveu: On Wed, Jun 15, 2016 at 10:51:27PM +0300, Yury Norov wrote: Maybe there already is some macro doing the conversion for you... yes it is, cpu_to_le64() is what you want Beware that

Re: [PATCH] tools/perf: fix the word selected in find_*_bit

2016-06-15 Thread Hekuang
在 2016/6/16 5:29, Arnaldo Carvalho de Melo 写道: Em Thu, Jun 16, 2016 at 12:11:04AM +0300, Yury Norov escreveu: On Wed, Jun 15, 2016 at 10:51:27PM +0300, Yury Norov wrote: Maybe there already is some macro doing the conversion for you... yes it is, cpu_to_le64() is what you want Beware that

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

2016-06-15 Thread Hekuang
hi 在 2016/6/15 21:34, Arnaldo Carvalho de Melo 写道: Em Tue, May 17, 2016 at 09:04:54AM +, He Kuang escreveu: There's a problem in machine__findnew_vdso(), vdso buildid generated by a 32-bit machine stores it with the name 'vdso', but when processing buildid on a 64-bit machine with the same

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

2016-06-15 Thread Hekuang
hi 在 2016/6/15 21:34, Arnaldo Carvalho de Melo 写道: Em Tue, May 17, 2016 at 09:04:54AM +, He Kuang escreveu: There's a problem in machine__findnew_vdso(), vdso buildid generated by a 32-bit machine stores it with the name 'vdso', but when processing buildid on a 64-bit machine with the same

Re: [PATCH 0/3] Fixes on remote unwind

2016-06-12 Thread Hekuang
在 2016/6/8 18:15, He Kuang 写道: The remote unwind can supported scenario where we collect on a x86_64 machine and want to do analysis on a ARM64 or x86-32 machine. Though this is not tested, after Arnaldo questioned the above issue, I tested and found a bug. In util/unwind-libunwind-local.c,

Re: [PATCH 0/3] Fixes on remote unwind

2016-06-12 Thread Hekuang
在 2016/6/8 18:15, He Kuang 写道: The remote unwind can supported scenario where we collect on a x86_64 machine and want to do analysis on a ARM64 or x86-32 machine. Though this is not tested, after Arnaldo questioned the above issue, I tested and found a bug. In util/unwind-libunwind-local.c,

Re: [PATCH v9 00/14] Add support for remote unwind

2016-06-08 Thread Hekuang
hi 在 2016/6/8 3:44, Arnaldo Carvalho de Melo 写道: Em Fri, Jun 03, 2016 at 09:06:29AM +0200, Jiri Olsa escreveu: On Fri, Jun 03, 2016 at 03:33:09AM +, He Kuang wrote: SNIP For using remote libunwind libraries, reference this: http://thread.gmane.org/gmane.linux.kernel/2224430 and now

Re: [PATCH v9 00/14] Add support for remote unwind

2016-06-08 Thread Hekuang
hi 在 2016/6/8 3:44, Arnaldo Carvalho de Melo 写道: Em Fri, Jun 03, 2016 at 09:06:29AM +0200, Jiri Olsa escreveu: On Fri, Jun 03, 2016 at 03:33:09AM +, He Kuang wrote: SNIP For using remote libunwind libraries, reference this: http://thread.gmane.org/gmane.linux.kernel/2224430 and now

Re: [PATCH v9 00/14] Add support for remote unwind

2016-06-03 Thread Hekuang
在 2016/6/4 5:09, Arnaldo Carvalho de Melo 写道: Em Fri, Jun 03, 2016 at 06:06:02PM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Jun 03, 2016 at 04:42:05PM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Jun 03, 2016 at 09:06:29AM +0200, Jiri Olsa escreveu: On Fri, Jun 03, 2016 at

Re: [PATCH v9 00/14] Add support for remote unwind

2016-06-03 Thread Hekuang
在 2016/6/4 5:09, Arnaldo Carvalho de Melo 写道: Em Fri, Jun 03, 2016 at 06:06:02PM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Jun 03, 2016 at 04:42:05PM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Jun 03, 2016 at 09:06:29AM +0200, Jiri Olsa escreveu: On Fri, Jun 03, 2016 at

Re: [PATCH v7 10/14] perf tools: Check the target platform before assigning unwind methods

2016-06-01 Thread Hekuang
在 2016/6/1 16:40, Jiri Olsa 写道: On Tue, May 31, 2016 at 11:19:08AM +, He Kuang wrote: SNIP -int unwind__prepare_access(struct thread *thread) +int unwind__prepare_access(struct thread *thread, struct map *map) { - unwind__register_ops(thread, local_unwind_libunwind_ops); +

Re: [PATCH v7 10/14] perf tools: Check the target platform before assigning unwind methods

2016-06-01 Thread Hekuang
在 2016/6/1 16:40, Jiri Olsa 写道: On Tue, May 31, 2016 at 11:19:08AM +, He Kuang wrote: SNIP -int unwind__prepare_access(struct thread *thread) +int unwind__prepare_access(struct thread *thread, struct map *map) { - unwind__register_ops(thread, local_unwind_libunwind_ops); +

Re: [PATCH v7 14/14] perf callchain: Support aarch64 cross-platform

2016-06-01 Thread Hekuang
在 2016/6/1 16:40, Jiri Olsa 写道: On Tue, May 31, 2016 at 11:19:12AM +, He Kuang wrote: SNIP diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 7746e09..fced833 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -102,6 +102,7 @@

Re: [PATCH v7 14/14] perf callchain: Support aarch64 cross-platform

2016-06-01 Thread Hekuang
在 2016/6/1 16:40, Jiri Olsa 写道: On Tue, May 31, 2016 at 11:19:12AM +, He Kuang wrote: SNIP diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 7746e09..fced833 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -102,6 +102,7 @@

Re: [PATCH v7 13/14] perf callchain: Support x86 target platform

2016-06-01 Thread Hekuang
在 2016/6/1 16:40, Jiri Olsa 写道: On Tue, May 31, 2016 at 11:19:11AM +, He Kuang wrote: SNIP diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c index e183390..5774317 100644 --- a/tools/perf/util/unwind-libunwind.c +++

Re: [PATCH v7 13/14] perf callchain: Support x86 target platform

2016-06-01 Thread Hekuang
在 2016/6/1 16:40, Jiri Olsa 写道: On Tue, May 31, 2016 at 11:19:11AM +, He Kuang wrote: SNIP diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c index e183390..5774317 100644 --- a/tools/perf/util/unwind-libunwind.c +++

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

2016-05-30 Thread Hekuang
在 2016/5/30 17:30, Jiri Olsa 写道: On Mon, May 30, 2016 at 05:11:35PM +0800, Hekuang wrote: hi 在 2016/5/30 16:53, Jiri Olsa 写道: On Sat, May 28, 2016 at 11:59:59AM +, He Kuang wrote: Support x86(32-bit) cross platform callchain unwind. Signed-off-by: He Kuang <heku...@huawei.

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

2016-05-30 Thread Hekuang
在 2016/5/30 17:30, Jiri Olsa 写道: On Mon, May 30, 2016 at 05:11:35PM +0800, Hekuang wrote: hi 在 2016/5/30 16:53, Jiri Olsa 写道: On Sat, May 28, 2016 at 11:59:59AM +, He Kuang wrote: Support x86(32-bit) cross platform callchain unwind. Signed-off-by: He Kuang --- tools/perf/arch

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

2016-05-30 Thread Hekuang
hi 在 2016/5/30 16:53, Jiri Olsa 写道: On Sat, May 28, 2016 at 11:59:59AM +, He Kuang wrote: Support x86(32-bit) cross platform callchain unwind. Signed-off-by: He Kuang --- tools/perf/arch/Build | 1 +

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

2016-05-30 Thread Hekuang
hi 在 2016/5/30 16:53, Jiri Olsa 写道: On Sat, May 28, 2016 at 11:59:59AM +, He Kuang wrote: 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

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

2016-05-29 Thread Hekuang
在 2016/5/28 20:10, 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 ---

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

2016-05-29 Thread Hekuang
在 2016/5/28 20:10, 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

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

2016-05-27 Thread Hekuang
在 2016/5/27 15:38, Jiri Olsa 写道: On Fri, May 27, 2016 at 03:13:04PM +0800, Hekuang wrote: SNIP - I understand we need to compile 3 objects from unwind-libunwind.c, how about we create 3 files like: util/unwind-libunwind-local.c util/unwind-libunwind-x86_32.c

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

2016-05-27 Thread Hekuang
在 2016/5/27 15:38, Jiri Olsa 写道: On Fri, May 27, 2016 at 03:13:04PM +0800, Hekuang wrote: SNIP - I understand we need to compile 3 objects from unwind-libunwind.c, how about we create 3 files like: util/unwind-libunwind-local.c util/unwind-libunwind-x86_32.c

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

2016-05-27 Thread Hekuang
hi 在 2016/5/27 1:42, Jiri Olsa 写道: On Tue, May 24, 2016 at 09:20:27AM +, He Kuang wrote: Use thread specific unwind ops to unwind cross-platform callchains. Currently, unwind methods is suitable for local unwind, this patch changes the fixed methods to thread/map related. Each time a map

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

2016-05-27 Thread Hekuang
hi 在 2016/5/27 1:42, Jiri Olsa 写道: On Tue, May 24, 2016 at 09:20:27AM +, He Kuang wrote: Use thread specific unwind ops to unwind cross-platform callchains. Currently, unwind methods is suitable for local unwind, this patch changes the fixed methods to thread/map related. Each time a map

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

2016-05-26 Thread Hekuang
ping.. 在 2016/5/16 12:51, He Kuang 写道: There's a display inconsistency when 'call-graph' config event appears in different position. The problem can be reproduced like this: We record signal_deliver with call-graph and signal_generate without it. $ perf record -g -a -e

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

2016-05-26 Thread Hekuang
ping.. 在 2016/5/16 12:51, He Kuang 写道: There's a display inconsistency when 'call-graph' config event appears in different position. The problem can be reproduced like this: We record signal_deliver with call-graph and signal_generate without it. $ perf record -g -a -e

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

2016-05-19 Thread Hekuang
在 2016/5/20 0:19, Jiri Olsa 写道: On Thu, May 19, 2016 at 11:50:10AM -0300, Arnaldo Carvalho de Melo wrote: Em Thu, May 19, 2016 at 11:47:38AM +, He Kuang escreveu: Currently, perf script uses host unwind methods to parse perf.data callchain info regardless of the target architecture. So

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

2016-05-19 Thread Hekuang
在 2016/5/20 0:19, Jiri Olsa 写道: On Thu, May 19, 2016 at 11:50:10AM -0300, Arnaldo Carvalho de Melo wrote: Em Thu, May 19, 2016 at 11:47:38AM +, He Kuang escreveu: Currently, perf script uses host unwind methods to parse perf.data callchain info regardless of the target architecture. So

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

2016-05-19 Thread Hekuang
hi 在 2016/5/20 0:46, Jiri Olsa 写道: On Thu, May 19, 2016 at 11:47:38AM +, He Kuang wrote: SNIP #endif /* ARCH_PERF_COMMON_H */ diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 1e46277..a86b864 100644 --- a/tools/perf/config/Makefile +++

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

2016-05-19 Thread Hekuang
hi 在 2016/5/20 0:46, Jiri Olsa 写道: On Thu, May 19, 2016 at 11:47:38AM +, He Kuang wrote: SNIP #endif /* ARCH_PERF_COMMON_H */ diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 1e46277..a86b864 100644 --- a/tools/perf/config/Makefile +++

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

2016-05-17 Thread Hekuang
在 2016/5/18 9:51, David Ahern 写道: On 5/17/16 7:47 PM, Hekuang wrote: 在 2016/5/16 10:50, David Ahern 写道: On 5/15/16 7:30 PM, Hekuang wrote: In previous patch, I use 'perf buildid-cache -a' to add vdso binary into the HOST buildid dir. So 'perf buildid-cache' needs the symfs option

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

2016-05-17 Thread Hekuang
在 2016/5/18 9:51, David Ahern 写道: On 5/17/16 7:47 PM, Hekuang wrote: 在 2016/5/16 10:50, David Ahern 写道: On 5/15/16 7:30 PM, Hekuang wrote: In previous patch, I use 'perf buildid-cache -a' to add vdso binary into the HOST buildid dir. So 'perf buildid-cache' needs the symfs option

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

2016-05-17 Thread Hekuang
在 2016/5/16 10:50, David Ahern 写道: On 5/15/16 7:30 PM, Hekuang wrote: In previous patch, I use 'perf buildid-cache -a' to add vdso binary into the HOST buildid dir. So 'perf buildid-cache' needs the symfs option? With this patch 'PATCH v3 3/7 UPDATE', the tree of symfs dir is like

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

2016-05-17 Thread Hekuang
在 2016/5/16 10:50, David Ahern 写道: On 5/15/16 7:30 PM, Hekuang wrote: In previous patch, I use 'perf buildid-cache -a' to add vdso binary into the HOST buildid dir. So 'perf buildid-cache' needs the symfs option? With this patch 'PATCH v3 3/7 UPDATE', the tree of symfs dir is like

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

2016-05-17 Thread Hekuang
在 2016/5/17 15:33, Adrian Hunter 写道: On 13/05/16 11:51, He Kuang wrote: There's a problem in machine__findnew_vdso(), vdso buildid generated by a 32-bit machine stores it with the name 'vdso', but when processing buildid on a 64-bit machine with the same 'perf.data', perf will search for vdso

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

2016-05-17 Thread Hekuang
在 2016/5/17 15:33, Adrian Hunter 写道: On 13/05/16 11:51, He Kuang wrote: There's a problem in machine__findnew_vdso(), vdso buildid generated by a 32-bit machine stores it with the name 'vdso', but when processing buildid on a 64-bit machine with the same 'perf.data', perf will search for vdso

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

2016-05-16 Thread Hekuang
在 2016/5/16 10:50, David Ahern 写道: On 5/15/16 7:30 PM, Hekuang wrote: In previous patch, I use 'perf buildid-cache -a' to add vdso binary into the HOST buildid dir. So 'perf buildid-cache' needs the symfs option? No, for the host, we don't reference any files in buildid-cache if symfs

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

2016-05-16 Thread Hekuang
在 2016/5/16 10:50, David Ahern 写道: On 5/15/16 7:30 PM, Hekuang wrote: In previous patch, I use 'perf buildid-cache -a' to add vdso binary into the HOST buildid dir. So 'perf buildid-cache' needs the symfs option? No, for the host, we don't reference any files in buildid-cache if symfs

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

2016-05-15 Thread Hekuang
在 2016/5/14 22:43, David Ahern 写道: On 5/14/16 2:19 AM, He Kuang wrote: In the cross-platform perf record/script scenario, we need vdsos in buildid-cache dir and other libs in symfs dir at the same time. For the reason that to have every single file opened by perf is relative to symfs

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

2016-05-15 Thread Hekuang
在 2016/5/14 22:43, David Ahern 写道: On 5/14/16 2:19 AM, He Kuang wrote: In the cross-platform perf record/script scenario, we need vdsos in buildid-cache dir and other libs in symfs dir at the same time. For the reason that to have every single file opened by perf is relative to symfs

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

2016-05-13 Thread Hekuang
在 2016/5/12 18:06, Adrian Hunter 写道: On 12/05/16 11:43, He Kuang wrote: This is a preparation for cross-platform vdso lookup. There is a naming confusion about vdso name, vdso buildid generated by a 32-bit machine stores it with the name 'vdso', but when processing buildid on a 64-bit

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

2016-05-13 Thread Hekuang
在 2016/5/12 18:06, Adrian Hunter 写道: On 12/05/16 11:43, He Kuang wrote: This is a preparation for cross-platform vdso lookup. There is a naming confusion about vdso name, vdso buildid generated by a 32-bit machine stores it with the name 'vdso', but when processing buildid on a 64-bit

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

2016-05-13 Thread Hekuang
hi 在 2016/5/13 4:23, David Ahern 写道: On 5/12/16 7:09 AM, Arnaldo Carvalho de Melo wrote: Em Thu, May 12, 2016 at 08:43:12AM +, He Kuang escreveu: Symfs dir and buildid dir are two places that perf looks into for symbols, currently, if symfs dir is given, buildid-cache is skipped. In the

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

2016-05-13 Thread Hekuang
hi 在 2016/5/13 4:23, David Ahern 写道: On 5/12/16 7:09 AM, Arnaldo Carvalho de Melo wrote: Em Thu, May 12, 2016 at 08:43:12AM +, He Kuang escreveu: Symfs dir and buildid dir are two places that perf looks into for symbols, currently, if symfs dir is given, buildid-cache is skipped. In the

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

2016-05-10 Thread Hekuang
在 2016/5/10 21:44, Arnaldo Carvalho de Melo 写道: Em Tue, May 10, 2016 at 07:40:30AM +, He Kuang escreveu: When unwinding callchains on a different machine, vdso info should be provided so the unwind process won't be interrupted if address falls into vdso region. Currently, perf does try

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

2016-05-10 Thread Hekuang
在 2016/5/10 21:44, Arnaldo Carvalho de Melo 写道: Em Tue, May 10, 2016 at 07:40:30AM +, He Kuang escreveu: When unwinding callchains on a different machine, vdso info should be provided so the unwind process won't be interrupted if address falls into vdso region. Currently, perf does try

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

2016-05-10 Thread Hekuang
在 2016/5/10 19:59, Adrian Hunter 写道: On 10/05/16 14:38, Hekuang wrote: 在 2016/5/10 18:34, Adrian Hunter 写道: On 10/05/16 12:49, Hekuang wrote: hi 在 2016/5/10 16:08, Adrian Hunter 写道: On 10/05/16 10:40, He Kuang wrote: 32-bit programs can be run on 64-bit machines, so we should choose

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

2016-05-10 Thread Hekuang
在 2016/5/10 19:59, Adrian Hunter 写道: On 10/05/16 14:38, Hekuang wrote: 在 2016/5/10 18:34, Adrian Hunter 写道: On 10/05/16 12:49, Hekuang wrote: hi 在 2016/5/10 16:08, Adrian Hunter 写道: On 10/05/16 10:40, He Kuang wrote: 32-bit programs can be run on 64-bit machines, so we should choose

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

2016-05-10 Thread Hekuang
在 2016/5/10 18:34, Adrian Hunter 写道: On 10/05/16 12:49, Hekuang wrote: hi 在 2016/5/10 16:08, Adrian Hunter 写道: On 10/05/16 10:40, He Kuang wrote: 32-bit programs can be run on 64-bit machines, so we should choose unwind methods according to 'thread->map' instead of the host architect

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

2016-05-10 Thread Hekuang
在 2016/5/10 18:34, Adrian Hunter 写道: On 10/05/16 12:49, Hekuang wrote: hi 在 2016/5/10 16:08, Adrian Hunter 写道: On 10/05/16 10:40, He Kuang wrote: 32-bit programs can be run on 64-bit machines, so we should choose unwind methods according to 'thread->map' instead of the host architect

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

2016-05-10 Thread Hekuang
hi 在 2016/5/10 16:08, Adrian Hunter 写道: On 10/05/16 10:40, He Kuang wrote: 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

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

2016-05-10 Thread Hekuang
hi 在 2016/5/10 16:08, Adrian Hunter 写道: On 10/05/16 10:40, He Kuang wrote: 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

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

2016-05-09 Thread Hekuang
ok 在 2016/5/10 0:16, Arnaldo Carvalho de Melo 写道: Em Sat, May 07, 2016 at 08:03:46PM +0200, Jiri Olsa escreveu: On Fri, May 06, 2016 at 08:59:07AM +, He Kuang wrote: There's no need for dwarf support when perf recording with callchain. Signed-off-by: He Kuang

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

2016-05-09 Thread Hekuang
ok 在 2016/5/10 0:16, Arnaldo Carvalho de Melo 写道: Em Sat, May 07, 2016 at 08:03:46PM +0200, Jiri Olsa escreveu: On Fri, May 06, 2016 at 08:59:07AM +, He Kuang wrote: There's no need for dwarf support when perf recording with callchain. Signed-off-by: He Kuang Acked-by: Jiri Olsa Ok,

Re: [PATCH] perf tools: Fix build errors on tsc functions for archs other than x86

2016-04-01 Thread Hekuang
hi, 在 2016/4/1 21:13, Arnaldo Carvalho de Melo 写道: Em Fri, Apr 01, 2016 at 03:49:32AM +, He Kuang escreveu: Build errors on aarch64: libperf.a(libperf-in.o): In function `convert_timestamp': util/jitdump.c:356: undefined reference to `tsc_to_perf_time' collect2: error: ld

Re: [PATCH] perf tools: Fix build errors on tsc functions for archs other than x86

2016-04-01 Thread Hekuang
hi, 在 2016/4/1 21:13, Arnaldo Carvalho de Melo 写道: Em Fri, Apr 01, 2016 at 03:49:32AM +, He Kuang escreveu: Build errors on aarch64: libperf.a(libperf-in.o): In function `convert_timestamp': util/jitdump.c:356: undefined reference to `tsc_to_perf_time' collect2: error: ld

Re: [PATCH] Revert "mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE"

2016-03-30 Thread Hekuang
hi 在 2016/3/31 9:39, Zefan Li 写道: On 2016/3/31 9:14, Hekuang wrote: Hi 在 2016/3/30 19:10, Michal Hocko 写道: On Wed 30-03-16 18:51:12, Hekuang wrote: hi 在 2016/3/30 18:38, Mel Gorman 写道: On Wed, Mar 30, 2016 at 10:22:07AM +, He Kuang wrote: This reverts commit

Re: [PATCH] Revert "mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE"

2016-03-30 Thread Hekuang
hi 在 2016/3/31 9:39, Zefan Li 写道: On 2016/3/31 9:14, Hekuang wrote: Hi 在 2016/3/30 19:10, Michal Hocko 写道: On Wed 30-03-16 18:51:12, Hekuang wrote: hi 在 2016/3/30 18:38, Mel Gorman 写道: On Wed, Mar 30, 2016 at 10:22:07AM +, He Kuang wrote: This reverts commit

Re: [PATCH] Revert "mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE"

2016-03-30 Thread Hekuang
Hi 在 2016/3/30 19:10, Michal Hocko 写道: On Wed 30-03-16 18:51:12, Hekuang wrote: hi 在 2016/3/30 18:38, Mel Gorman 写道: On Wed, Mar 30, 2016 at 10:22:07AM +, He Kuang wrote: This reverts commit 998d39cb236fe464af86a3492a24d2f67ee1efc2. When local irq is disabled, a percpu variable does

Re: [PATCH] Revert "mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE"

2016-03-30 Thread Hekuang
Hi 在 2016/3/30 19:10, Michal Hocko 写道: On Wed 30-03-16 18:51:12, Hekuang wrote: hi 在 2016/3/30 18:38, Mel Gorman 写道: On Wed, Mar 30, 2016 at 10:22:07AM +, He Kuang wrote: This reverts commit 998d39cb236fe464af86a3492a24d2f67ee1efc2. When local irq is disabled, a percpu variable does

Re: [PATCH] Revert "mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE"

2016-03-30 Thread Hekuang
hi 在 2016/3/30 18:38, Mel Gorman 写道: On Wed, Mar 30, 2016 at 10:22:07AM +, He Kuang wrote: This reverts commit 998d39cb236fe464af86a3492a24d2f67ee1efc2. When local irq is disabled, a percpu variable does not change, so we can remove the access macros and let the compiler optimize the code

Re: [PATCH] Revert "mm/page_alloc: protect pcp->batch accesses with ACCESS_ONCE"

2016-03-30 Thread Hekuang
hi 在 2016/3/30 18:38, Mel Gorman 写道: On Wed, Mar 30, 2016 at 10:22:07AM +, He Kuang wrote: This reverts commit 998d39cb236fe464af86a3492a24d2f67ee1efc2. When local irq is disabled, a percpu variable does not change, so we can remove the access macros and let the compiler optimize the code

[BUG ARM64/perf] Perf record on hardware breakpoint causes application to hang

2016-03-03 Thread Hekuang
This problem can be reproduced as follows: We know cat /proc/version will read the memory of symbol linux_proc_banner, then we make a hardware memory access breakpoint on that address. on terminal 1: $ perf record -e mem:0x$(cat /proc/kallsyms|grep linux_proc_banner|cut -d " " -f 1):rw

[BUG ARM64/perf] Perf record on hardware breakpoint causes application to hang

2016-03-03 Thread Hekuang
This problem can be reproduced as follows: We know cat /proc/version will read the memory of symbol linux_proc_banner, then we make a hardware memory access breakpoint on that address. on terminal 1: $ perf record -e mem:0x$(cat /proc/kallsyms|grep linux_proc_banner|cut -d " " -f 1):rw

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

2015-06-16 Thread hekuang
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 5a51fcd1f30c ("perf probe: Skip kernel symbols which is out of .text"). For some architectures,

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

2015-06-16 Thread hekuang
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 5a51fcd1f30c (perf probe: Skip kernel symbols which is out of .text). For some architectures,

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

2015-05-12 Thread hekuang
Hi, jirka On 05/12/2015 08:37 PM, Jiri Olsa wrote: On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP $(Q)$(MAKE) $(build)=perf -$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) - $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(PERF_IN) $(LIBS) -o $@ +LD_LIBTRACEEVENT_FLAGS +=

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

2015-05-12 Thread hekuang
Hi, jirka On 05/12/2015 08:37 PM, Jiri Olsa wrote: On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP $(Q)$(MAKE) $(build)=perf -$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) - $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(PERF_IN) $(LIBS) -o $@ +LD_LIBTRACEEVENT_FLAGS +=

Re: [PATCH v4 2/3] perf probe: Add --range option to show variable location range

2015-05-11 Thread hekuang
hi, Arnaldo On 05/11/2015 09:58 PM, Arnaldo Carvalho de Melo wrote: Em Mon, May 11, 2015 at 01:10:03PM +, He Kuang escreveu: It is not easy for users to get the accurate byte offset or the line number where a local variable can be probed. With '--range' option, local variables in scope of

Re: [PATCH v4 2/3] perf probe: Add --range option to show variable location range

2015-05-11 Thread hekuang
hi, Arnaldo On 05/11/2015 09:58 PM, Arnaldo Carvalho de Melo wrote: Em Mon, May 11, 2015 at 01:10:03PM +, He Kuang escreveu: It is not easy for users to get the accurate byte offset or the line number where a local variable can be probed. With '--range' option, local variables in scope of

Re: [PATCH] perf: fix building error in x86_64

2015-02-12 Thread Hekuang
在 2015/2/12 16:07, Namhyung Kim 写道: Hi, On Wed, Feb 11, 2015 at 10:01:08AM +0800, He Kuang wrote: When build with ARCH=x86_64, perf failed to compile with following error: tests/builtin-test.o:(.data+0x158): undefined reference to `test__perf_time_to_tsc' collect2: error: ld returned 1 exit

Re: [PATCH] perf: fix building error in x86_64

2015-02-12 Thread Hekuang
在 2015/2/12 16:07, Namhyung Kim 写道: Hi, On Wed, Feb 11, 2015 at 10:01:08AM +0800, He Kuang wrote: When build with ARCH=x86_64, perf failed to compile with following error: tests/builtin-test.o:(.data+0x158): undefined reference to `test__perf_time_to_tsc' collect2: error: ld returned 1 exit

Re: [PATCH v3 linux-trace 1/8] tracing: attach eBPF programs to tracepoints and syscalls

2015-02-11 Thread Hekuang
eBPF is very flexible, which means it is bound to have someone use it in a way you never dreamed of, and that will be what bites you in the end (pun intended). understood :) let's start slow then with bpf+syscall and bpf+kprobe only. I think BPF + system calls/kprobes can meet our use case

Re: [PATCH v3 linux-trace 1/8] tracing: attach eBPF programs to tracepoints and syscalls

2015-02-11 Thread Hekuang
eBPF is very flexible, which means it is bound to have someone use it in a way you never dreamed of, and that will be what bites you in the end (pun intended). understood :) let's start slow then with bpf+syscall and bpf+kprobe only. I think BPF + system calls/kprobes can meet our use case

  1   2   >