[tip:perf/core] perf report: Don't shadow inlined symbol with different addr range

2019-02-27 Thread tip-bot for He Kuang
Commit-ID: 7346195e8643482968f547483e0d823ec1982fab Gitweb: https://git.kernel.org/tip/7346195e8643482968f547483e0d823ec1982fab Author: He Kuang AuthorDate: Tue, 19 Feb 2019 21:05:31 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 19 Feb 2019 12:30:12 -0300 perf report

[PATCH] perf report: Don't shadow inlined symbol with different addr range

2019-02-19 Thread He Kuang
hould be within the range of [sym.start, sym.end]. The error message is like: "0x36aea60 [0x8]: failed to process type: 68". The second parameter of symbol__new() is the length of the fake symbol for the inline frame, which is the subtraction of the end and start address of base_sym. Si

[tip:perf/urgent] perf top: Fix wrong hottest instruction highlighted

2019-01-22 Thread tip-bot for He Kuang
Commit-ID: da06d568386877809532e8ec678f4a5e300f0951 Gitweb: https://git.kernel.org/tip/da06d568386877809532e8ec678f4a5e300f0951 Author: He Kuang AuthorDate: Mon, 21 Jan 2019 00:05:22 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 21 Jan 2019 11:29:07 -0300 perf top: Fix

[PATCH] perf top: Fix wrong hottest instruction highlighted

2019-01-20 Thread He Kuang
e and makes things right. The problem can be reproduced by pressing 'H' in perf top annotation view. It should highlight the instruction line which has the highest sampling percentage. Signed-off-by: He Kuang --- tools/perf/ui/browsers/annotate.c | 16 ++-- 1 file changed, 1

[tip:perf/core] perf tools arm64: Add support for generating bpf prologue

2017-02-09 Thread tip-bot for He Kuang
Commit-ID: 3bb53c9f124bd9297f18d58a395cff59dfaf8541 Gitweb: http://git.kernel.org/tip/3bb53c9f124bd9297f18d58a395cff59dfaf8541 Author: He Kuang AuthorDate: Tue, 7 Feb 2017 07:34:11 + Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 8 Feb 2017 08:55:01 -0300 perf tools arm64

[PATCH v4 2/2] perf tools: Add missing newline in debug messages

2017-02-06 Thread He Kuang
These two debug messages are missing the trailing newline. Signed-off-by: He Kuang --- tools/perf/util/bpf-loader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c index 36c8611..bc6bc70 100644 --- a/tools/perf

[PATCH v4 1/2] perf tools arm64: Add support for generating bpf prologue

2017-02-06 Thread He Kuang
Since HAVE_KPROBES can be enabled in arm64, this patch introduces regs_query_register_offset() to convert register name to offset for arm64, so the BPF prologue feature is ready to use. Signed-off-by: He Kuang --- tools/perf/arch/arm64/Makefile | 1 + tools/perf/arch/arm64/util/dwarf

[PATCH v3] perf tools arm64: Add support for generating bpf prologue

2017-02-04 Thread He Kuang
Since HAVE_KPROBES can be enabled in arm64, this patch introduces regs_query_register_offset() to convert register name to offset for arm64, so the BPF prologue feature is ready to use. Signed-off-by: He Kuang --- tools/perf/arch/arm64/Makefile | 1 + tools/perf/arch/arm64/util/dwarf

[PATCH v2 3/3] perf tools: Add missing newline in debug messages

2017-02-03 Thread He Kuang
These two debug messages are missing the trailing newline. Signed-off-by: He Kuang --- tools/perf/util/bpf-loader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c index 36c8611..bc6bc70 100644 --- a/tools/perf

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

2017-02-03 Thread He Kuang
consistent with x86. Acked-by: Masami Hiramatsu Signed-off-by: He Kuang --- tools/perf/arch/arm64/util/dwarf-regs.c | 107 1 file changed, 52 insertions(+), 55 deletions(-) diff --git a/tools/perf/arch/arm64/util/dwarf-regs.c b/tools/perf/arch/arm64/util/dwarf-regs.c

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

2017-02-03 Thread He Kuang
Since HAVE_KPROBES can be enabled in arm64, this patch introduces regs_query_register_offset() to convert register name to offset for arm64, so the BPF prologue feature is ready to use. Acked-by: Masami Hiramatsu Signed-off-by: He Kuang --- tools/perf/arch/arm64/Makefile | 1 + tools

[tip:perf/core] perf probe: Fix wrong register name for arm64

2017-01-26 Thread tip-bot for He Kuang
Commit-ID: 1b29dfbba124be5077a24996a272205baec1c008 Gitweb: http://git.kernel.org/tip/1b29dfbba124be5077a24996a272205baec1c008 Author: He Kuang AuthorDate: Tue, 24 Jan 2017 10:30:14 + Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 26 Jan 2017 11:42:43 -0300 perf probe: Fix

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

2017-01-24 Thread He Kuang
tions are consistent with x86. Signed-off-by: He Kuang --- tools/perf/arch/arm64/Makefile | 1 + tools/perf/arch/arm64/util/dwarf-regs.c | 124 ++-- 2 files changed, 72 insertions(+), 53 deletions(-) diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf

[PATCH 1/2] perf probe: Fix wrong register name for arm64

2017-01-24 Thread He Kuang
.358653: sys_write: (SyS_write+0x0/0xc8) count=86 Signed-off-by: He Kuang --- tools/perf/arch/arm64/include/dwarf-regs-table.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/arch/arm64/include/dwarf-regs-table.h b/tools/perf/arch/arm64/include/dwarf

[PATCH 0/2] Support bpf prologue for arm64

2017-01-24 Thread He Kuang
Two patches here makes bpf prologue available for arm64. He Kuang (2): perf probe: Fix wrong register name for arm64 perf tools: Introduce regs_query_register_offset() for arm64 tools/perf/arch/arm64/Makefile | 1 + tools/perf/arch/arm64/include/dwarf-regs-table.h | 12

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

2017-01-24 Thread He Kuang
tions are consistent with x86. Signed-off-by: He Kuang --- tools/perf/arch/arm64/Makefile | 1 + tools/perf/arch/arm64/util/dwarf-regs.c | 123 ++-- 2 files changed, 71 insertions(+), 53 deletions(-) diff --git a/tools/perf/arch/arm64/Makefile b/tools/perf

[tip:perf/urgent] perf script: Don't disable use_callchain if input is pipe

2016-08-16 Thread tip-bot for He Kuang
Commit-ID: 71ac899b5ed7edfd8fa2a4e075194380b1de2d7f Gitweb: http://git.kernel.org/tip/71ac899b5ed7edfd8fa2a4e075194380b1de2d7f Author: He Kuang AuthorDate: Thu, 4 Aug 2016 11:25:43 + Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 15 Aug 2016 13:23:49 -0300 perf script: Don&#

[tip:perf/urgent] perf script: Show proper message when failed list scripts

2016-08-16 Thread tip-bot for He Kuang
Commit-ID: 88ded4d8d94a550624e1827478e13fecf97a7b0a Gitweb: http://git.kernel.org/tip/88ded4d8d94a550624e1827478e13fecf97a7b0a Author: He Kuang AuthorDate: Thu, 4 Aug 2016 11:25:42 + Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 15 Aug 2016 13:17:10 -0300 perf script: Show

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

2016-08-04 Thread He Kuang
igned-off-by: He Kuang --- tools/perf/builtin-script.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index d47aef9..ec8df8f 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -371,14 +3

[PATCH 1/2] perf script: Show proper message when failed list scripts

2016-08-04 Thread He Kuang
Perf shows the usage message when perf scripts folder failed to open, which misleads users to let them think the command is mistyped. This patch shows proper message and guide the users to check PERF_EXEC_PATH environment in that case. Before: $ perf script --list Usage: perf script [] or:

[RFC PATCH v2 04/26] bpf: extract jmp and default handler and introduce UBPF_BUILD flag

2016-06-26 Thread He Kuang
This patch is a preparation for compiling bpf vm into external libraries. Parts of the instruction handlers are wrapped into macros or functions so that userspace libraries can override them. There's no functionality change without UBPF_BUILD flag. Signed-off-by: He Kuang Signed-off-by: Wan

[RFC PATCH v2 01/26] tools include: Adopt byte ordering macros from byteorder/generic.h

2016-06-26 Thread He Kuang
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 'make perf-*-src-pkg'. Signed-off-by: Wang Nan Signed-off-by: He K

[RFC PATCH v2 03/26] bpf: split __bpf_prog_run code into new file

2016-06-26 Thread He Kuang
From: Wang Nan Split out function __bpf_prog_run() and related macros from bpf/core.c into bpf/vm.c. Signed-off-by: Wang Nan Signed-off-by: He Kuang --- include/linux/filter.h | 1 + kernel/bpf/Makefile| 2 +- kernel/bpf/core.c | 487

[RFC PATCH v2 02/26] tools include: Fix wrong macro definitions for cpu_to_le* for big endian

2016-06-26 Thread He Kuang
From: Wang Nan The cpu_to_le* macros in kernel.h are defined without considering endianese. This patch includes "byteoder/generic.h" instead to fix the bug, and removes redundant definitions of those macros in intel-bts.c and intel-pt-pkt-decoder.c. Signed-off-by: Wang Nan Signed-

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

2016-06-26 Thread He Kuang
t samples) +struct perf_record_end_ctx { + int samples; + int dummy; +}; +int perf_record_end(struct perf_record_end_ctx *ctx) And the argument 'samples' should be referenced as 'ctx->samples'. Thank you. He Kuang (17): bpf: extract jmp and default handler and introduce

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

2016-06-26 Thread He Kuang
/MANIFEST is also updated for 'make perf-*-src-pkg'. Signed-off-by: Wang Nan Signed-off-by: He Kuang --- tools/include/asm-generic/div64.h | 234 tools/include/linux/math64.h | 247 ++ tools/perf/MA

[RFC PATCH v2 10/26] perf bpf: Remove unused code in libbpf

2016-06-26 Thread He Kuang
Clean up unnecessary assignments to local variable 'result.pfd', and remove 'pfd' field in 'struct bpf_prog_prep_result' since no one else uses it. Signed-off-by: He Kuang --- tools/lib/bpf/libbpf.c | 4 tools/lib/bpf/libbpf.h | 3 --- tools/p

[RFC PATCH v2 13/26] perf bpf: Add abstraction for bpf program methods

2016-06-26 Thread He Kuang
Supporting different bpf program types loaded into kernel and userspace, this patch abstracts the operations to related to bpf program into bpf_engine. The methods set for bpf loaded into kernel are included in engine-kbpf.c, which is used as the default value. Signed-off-by: He Kuang Signed-off

[RFC PATCH v2 17/26] perf bpf: Add methods to set/check ubpf engine for bpf programs

2016-06-26 Thread He Kuang
Add methods to set ubpf engine for a bpf program and to check whether a program's engine is ubpf. Signed-off-by: He Kuang Signed-off-by: Wang Nan --- tools/lib/bpf/engine-ubpf.c | 12 tools/lib/bpf/libbpf.h | 17 + 2 files changed, 29 insertions(+) diff

[RFC PATCH v2 12/26] perf bpf: Add libbpf-internal.h header file

2016-06-26 Thread He Kuang
Split part of codes in libbpf.c out for internal usage, debug print functions are changed to non-static for other files to use. Signed-off-by: He Kuang --- tools/lib/bpf/libbpf-internal.h | 65 +++ tools/lib/bpf/libbpf.c | 68

[RFC PATCH v2 25/26] perf bpf: Implement run_ubpf_program

2016-06-26 Thread He Kuang
Fill up the run_ubpf_program slot by fetching the ubpf entry and call __bpf_prog_run(). Signed-off-by: He Kuang Signed-off-by: Wang Nan --- tools/perf/util/ubpf-hooks.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/ubpf-hooks.c b/tools

[RFC PATCH v2 21/26] bpf: Support bpf load/store boundary check for ubpf

2016-06-26 Thread He Kuang
A boundary check is added before each store/load instruction, since we don't have a verifier in userspace bpf. There's no functionality change without UBPF_BUILD flag. Signed-off-by: He Kuang --- kernel/bpf/vm.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) di

[RFC PATCH v2 24/26] perf bpf: Fillup bpf jmp_call handler

2016-06-26 Thread He Kuang
Let ubpf invoke function calls. The function index is stored in insns->imm, use it to fetch the corresponding functions in libbpf and make the function call. Signed-off-by: He Kuang --- tools/perf/util/bpf-vm.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deleti

[RFC PATCH v2 19/26] perf tools: Register basic uBPF helpers

2016-06-26 Thread He Kuang
From: Wang Nan Reigster basic extern functions for uBPF programs. Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Brendan Gregg Cc: Jiri Olsa Cc: Li Zefan Signed-off-by: He Kuang --- tools/perf/perf.c | 3 ++ tools/perf/util/Build

[RFC PATCH v2 15/26] perf bpf: Introduce the entity and engine for userspace bpf

2016-06-26 Thread He Kuang
ned-off-by: He Kuang Signed-off-by: Wang Nan --- tools/lib/bpf/Build | 1 + tools/lib/bpf/engine-ubpf.c | 97 + tools/lib/bpf/libbpf.c | 1 + tools/lib/bpf/libbpf.h | 6 +++ 4 files changed, 105 insertions(+) create mode 100644 too

[RFC PATCH v2 22/26] perf bpf: Implement boundary check code in ubpf

2016-06-26 Thread He Kuang
Make sure that ubpf load/store instructions only access the context and stack region. Signed-off-by: He Kuang --- tools/perf/util/bpf-vm.c | 35 +++ tools/perf/util/bpf-vm.h | 3 ++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/tools/perf/util

[RFC PATCH v2 08/26] perf bpf: Add UBPF flags and makefile options

2016-06-26 Thread He Kuang
From: Wang Nan UBPF are not built by default, unless user explicitly build perf with UBPF defined. Signed-off-by: Wang Nan Signed-off-by: He Kuang --- tools/lib/bpf/Makefile | 4 tools/perf/Makefile.perf | 2 ++ tools/perf/config/Makefile | 4 3 files changed, 10 insertions

[RFC PATCH v2 14/26] perf bpf: Add -Wextra to cflags for more warnings and fix them

2016-06-26 Thread He Kuang
Since -Wextra is used in perf tools, this patch adopts this cflags into lib/bpf. It also fixes 'comparison between signed and unsigned integer' errors reported afterward. Signed-off-by: He Kuang --- tools/lib/bpf/Makefile | 2 +- tools/lib/bpf/libbpf.c | 7 --- 2 files changed, 5

[RFC PATCH v2 16/26] perf bpf: Add method for fetching nth ubpf vm

2016-06-26 Thread He Kuang
Same as bpf_program__fd() and bpf_program__nth_fd(), add methods for fetching the nth ubpf entry. Signed-off-by: He Kuang Signed-off-by: Wang Nan --- tools/lib/bpf/libbpf.c | 14 ++ tools/lib/bpf/libbpf.h | 1 + 2 files changed, 15 insertions(+) diff --git a/tools/lib/bpf

[RFC PATCH v2 18/26] perf bpf: Add ubpf helper function slots and set/get methods

2016-06-26 Thread He Kuang
slots. Signed-off-by: Wang Nan Signed-off-by: He Kuang --- tools/lib/bpf/engine-ubpf.c | 25 + tools/lib/bpf/libbpf.h | 16 2 files changed, 41 insertions(+) diff --git a/tools/lib/bpf/engine-ubpf.c b/tools/lib/bpf/engine-ubpf.c index 9a0b425..e63a267

[RFC PATCH v2 26/26] perf tests: Add uBPF test case

2016-06-26 Thread He Kuang
From: Wang Nan Introduce a BPF script use uBPF, test compiling, helper and hook. Validate passing information through helper and hooks. Signed-off-by: Wang Nan Signed-off-by: He Kuang --- tools/perf/tests/Build | 8 +++ tools/perf/tests/bpf-script-test-ubpf.c | 88

[RFC PATCH v2 23/26] perf record: Add uBPF hooks at beginning and end of perf record

2016-06-26 Thread He Kuang
Like tracepoint in kernel code, uBPF hooks can be added in perf code and trigger uBPF programs passed by BPF scripts. The first two uBPF hooks added are record start/end. uBPF scripts can initial BPF maps in record start, and report result when record finished. Signed-off-by: He Kuang Signed-off

[RFC PATCH v2 11/26] perf bpf: Store arbitrary entries instread fd array in bpf_program

2016-06-26 Thread He Kuang
The bpf progs loaded into kernel are represented by fd, but we need new types for storing the entity of userspace bpf progs. This patch uses a void pointer to make it more generic so we can store any new types and cast back to its original type when used. Signed-off-by: He Kuang Signed-off-by

[RFC PATCH v2 06/26] tools include: Add (atomic|atomic64)_add implementation from the kernel sources

2016-06-26 Thread He Kuang
Uses the arch/x86/ kernel code for x86_64/i386, fallbacking to a gcc intrinsics implementation. Signed-off-by: He Kuang Signed-off-by: Wang Nan --- tools/arch/x86/include/asm/atomic.h| 28 tools/include/asm-generic/atomic-gcc.h | 10 ++ tools/include

[RFC PATCH v2 09/26] perf bpf: Implement empty instruction handler and build bpf-vm

2016-06-26 Thread He Kuang
oo much kernel structures and headers. CFLAGS are modified for supressing warnings of the existing bpf code. Signed-off-by: Wang Nan Signed-off-by: He Kuang --- tools/perf/util/Build| 2 ++ tools/perf/util/bpf-vm.c | 34 ++ tools/perf/util/bpf-vm.h | 7 +++

[RFC PATCH v2 20/26] perf bpf: Accept uBPF programs

2016-06-26 Thread He Kuang
= "Hello! receive %d samples\n"; ubpf_printf(fmt, *samples); } Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de Melo Cc: Alexei Starovoitov Cc: Brendan Gregg Cc: Jiri Olsa Cc: Li Zefan Signed-off-by: He Kuang --- tools/perf/util/bpf-loader.c | 22 ++ 1 file c

[RFC PATCH v2 07/26] perf bpf: Add map related BPF helper

2016-06-26 Thread He Kuang
: Brendan Gregg Cc: Jiri Olsa Cc: Li Zefan Signed-off-by: He Kuang --- tools/lib/bpf/bpf.c | 24 tools/lib/bpf/bpf.h | 2 ++ 2 files changed, 26 insertions(+) diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index 1f91cc9..337d9dc 100644 --- a/tools/lib/bpf/bpf.c

[tip:perf/core] perf unwind: Fix wrongly used regs for aarch64 unwind

2016-06-26 Thread tip-bot for He Kuang
Commit-ID: 3bd03c9583bfb22cb82eeb09d8445bb79d27ae78 Gitweb: http://git.kernel.org/tip/3bd03c9583bfb22cb82eeb09d8445bb79d27ae78 Author: He Kuang AuthorDate: Wed, 22 Jun 2016 06:57:04 + Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 23 Jun 2016 10:30:31 -0300 perf unwind: Fix

[tip:perf/core] perf unwind: Fix wrongly used regs for x86_32 unwind

2016-06-26 Thread tip-bot for He Kuang
Commit-ID: 5dafea097ac65bd01cc86801c399ae41dce79756 Gitweb: http://git.kernel.org/tip/5dafea097ac65bd01cc86801c399ae41dce79756 Author: He Kuang AuthorDate: Wed, 22 Jun 2016 06:57:03 + Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 23 Jun 2016 10:30:21 -0300 perf unwind: Fix

[tip:perf/core] perf unwind: Change macro names of perf register

2016-06-26 Thread tip-bot for He Kuang
Commit-ID: 78ff1d6d8bf6bb3ee2b3781bbd88355a322435a4 Gitweb: http://git.kernel.org/tip/78ff1d6d8bf6bb3ee2b3781bbd88355a322435a4 Author: He Kuang AuthorDate: Wed, 22 Jun 2016 06:57:02 + Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 23 Jun 2016 10:30:17 -0300 perf unwind

[tip:perf/core] perf tools: Find right DSO taking into account if binary is 32 or 64-bit

2016-06-26 Thread tip-bot for He Kuang
Commit-ID: 76c588f1f6b560c510953b390bc0a26c27cbfbd0 Gitweb: http://git.kernel.org/tip/76c588f1f6b560c510953b390bc0a26c27cbfbd0 Author: He Kuang AuthorDate: Tue, 17 May 2016 09:04:54 + Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 23 Jun 2016 10:25:58 -0300 perf tools: Find

[tip:perf/core] perf tools: Let python use correct gcc for build_ext

2016-06-26 Thread tip-bot for He Kuang
Commit-ID: 48d8d5db4ac454e590ef7d440f456743d6cbaa94 Gitweb: http://git.kernel.org/tip/48d8d5db4ac454e590ef7d440f456743d6cbaa94 Author: He Kuang AuthorDate: Wed, 22 Jun 2016 06:57:05 + Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 22 Jun 2016 16:11:42 -0300 perf tools: Let

[PATCH] perf tools: Fix compiler error due to header file changes

2016-06-26 Thread He Kuang
: In function ‘bt_convert__perf2ctf’: util/data-convert-bt.c:1302:2: error: implicit declaration of function ‘perf_config’ [-Werror=implicit-function-declaration] perf_config(convert__config, &c); ^ Include the right header file to fix this. Signed-off-by: He Kuang --- tools/perf/util/data-conv

[PATCH 2/5] perf unwind: Fix wrongly used regs for x86_32 unwind

2016-06-22 Thread He Kuang
By default, "unwind-libunwind-local.c" gets SP/IP register number according to the host platform, for remote unwind, we should use register number for target platform. Fix this by define LIBUNWIND_ARCH_REG_SP/IP in the wrapper file of x86_32 platform. Signed-off-by: He Kuang Acked-by:

[PATCH 3/5] perf unwind: Fix wrongly used regs for aarch64 unwind

2016-06-22 Thread He Kuang
By default, "unwind-libunwind-local.c" gets SP/IP register number according to the host platform, for remote unwind, we should use register number for target platform. Fix this by define LIBUNWIND_ARCH_REG_SP/IP in the wrapper file of aarch64 platform. Signed-off-by: He Kuang Acked-by:

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

2016-06-21 Thread He Kuang
We should check if 'dso' is a null pointer before passing it to the function dso__type(), otherwise a segfault will be raised in dso__data_get_fd(). In function machine__find_vdso(), the return value checking of 'dso' is missed and this patch fixes this issue. Signed-off-by:

[PATCH 1/5] perf unwind: Change macro names of perf register

2016-06-21 Thread He Kuang
Use macro name prefixed with "LIBUNWIND_ARCH" for better understanding that the regs used by callbacks of libunwind are arch specific. The real regs used should be defined in the wrapper file of "unwind-libunwind-local.c" for each supported arch. Signed-off-by: He Kuang

[PATCH 0/5] Fixes on perf unwind

2016-06-21 Thread He Kuang
ld_ext build. Patch 5 fixes a NULL pointer deference which can cause segfault when the desired dso is not found. Thank you. He Kuang (5): perf unwind: Change macro names of perf register perf unwind: Fix wrongly used regs for x86_32 unwind perf unwind: Fix wrongly used regs for aarch64 unwi

[PATCH 4/5] perf tools: Let python use correct gcc for build_ext

2016-06-21 Thread He Kuang
nd anwsered on stackoverflow. Link: http://stackoverflow.com/questions/5986256/python-distutils-gcc-path Signed-off-by: He Kuang --- tools/perf/Makefile.perf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index bde8cba..d0a2cb1 100

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

2016-06-16 Thread He Kuang
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 'make perf-*-src-pkg'. Signed-off-by: Wang Nan Signed-off-by: He K

[PATCH v2 2/2] tools include: Fix wrong macro definitions for cpu_to_le* for big endian

2016-06-16 Thread He Kuang
From: Wang Nan The cpu_to_le* macros in kernel.h are defined without considering endianese. This patch includes "byteoder/generic.h" instead to fix the bug, and removes redundant definitions of those macros in intel-bts.c and intel-pt-pkt-decoder.c. Signed-off-by: Wang Nan Signed-

[tip:perf/core] perf unwind: Fix compile error for static cross build

2016-06-16 Thread tip-bot for He Kuang
Commit-ID: 906a8276429c7eb3b53676dab4e2acb632ffcc5a Gitweb: http://git.kernel.org/tip/906a8276429c7eb3b53676dab4e2acb632ffcc5a Author: He Kuang AuthorDate: Wed, 15 Jun 2016 11:03:56 + Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 15 Jun 2016 10:27:11 -0300 perf unwind: Fix

[PATCH 2/2] tools include: Fix wrong macro definitions for cpu_to_le* for big endian

2016-06-15 Thread He Kuang
From: Wang Nan The cpu_to_le* macros in kernel.h are defined without considering endianese. This patch includes "byteoder/generic.h" instead to fix the bug, and removes redundant le64_to_cpu definition in intel-bts.c. Signed-off-by: Wang Nan Signed-off-by: He Kuang --- tools/inc

[PATCH 1/2] tools include: Sync byteorder/generic.h

2016-06-15 Thread He Kuang
From: Wang Nan This patch copies "include/linux/byteorder/generic.h" to "tools/include/linux/byteorder/generic.h" to enable other libraries to use macros in it. tools/perf/MANIFEST is also updated for 'make perf-*-src-pkg'. Signed-off-by: Wang Nan Signed-off-by

[PATCH] tools include: Fix wrong macro definitions for cpu_to_le* for big endian

2016-06-15 Thread He Kuang
From: Wang Nan The cpu_to_le* macros in kernel.h are defined without considering endianese. This patch includes "byteoder/generic.h" instead to fix the bug, and removes redundant le64_to_cpu definition in intel-bts.c. Signed-off-by: Wang Nan Signed-off-by: He Kuang --- tools/inc

[PATCH] tools include: Fix wrong macro definitions for cpu_to_le* for big endian

2016-06-15 Thread He Kuang
From: Wang Nan The cpu_to_le* macros in kernel.h are defined without considering endianese. This patch includes "byteoder/generic.h" instead to fix the bug, and removes redundant le64_to_cpu definition in intel-bts.c. Signed-off-by: Wang Nan Signed-off-by: He Kuang --- tools/inc

[PATCH] perf unwind: Fix compile error for static cross build

2016-06-15 Thread He Kuang
nd, this patch introduces a new variable EXTLIBS_LIBUNWIND for storing remote libunwind libraries instead. Signed-off-by: He Kuang --- tools/perf/config/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 098874b..80018fe 100644

[PATCH 1/3] perf unwind: Change macro names of perf register

2016-06-08 Thread He Kuang
Use macro name prefixed with "LIBUNWIND_ARCH" for better understanding that the regs used by callbacks of libunwind are arch specific. The real regs used should be defined in the wrapper file of "unwind-libunwind-local.c" for each supported arch. Signed-off-by: He Kuang

[PATCH 3/3] perf unwind: Fix wrongly used regs for aarch64 unwind

2016-06-08 Thread He Kuang
By default, "unwind-libunwind-local.c" gets SP/IP register number according to the host platform, for remote unwind, we should use register number for target platform. Fix this by define LIBUNWIND_ARCH_REG_SP/IP in the wrapper file of aarch64 platform. Signed-off-by: He Kuang ---

[PATCH 0/3] Fixes on remote unwind

2016-06-08 Thread He Kuang
atform analysis" is not on "origin/perf/unwind" branch, this patch was applied, please check if it was missed, the above test needs this patch. Thank you. He Kuang (3): perf unwind: Change macro names of perf register perf unwind: Fix wrongly used regs for x86_32 unwind perf

[PATCH 2/3] perf unwind: Fix wrongly used regs for x86_32 unwind

2016-06-08 Thread He Kuang
By default, "unwind-libunwind-local.c" gets SP/IP register number according to the host platform, for remote unwind, we should use register number for target platform. Fix this by define LIBUNWIND_ARCH_REG_SP/IP in the wrapper file of x86_32 platform. Signed-off-by: He Kuang --- tools

[tip:perf/core] perf callchain: Support aarch64 cross-platform

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: 057fbfb25cde4a368418f3f720cdc31d48800c4d Gitweb: http://git.kernel.org/tip/057fbfb25cde4a368418f3f720cdc31d48800c4d Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:23 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 15:13:35 -0300 perf callchain

[tip:perf/core] perf callchain: Support x86 target platform

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: 52ffe0ff02fc053a025c381d5808e9ecd3206dfe Gitweb: http://git.kernel.org/tip/52ffe0ff02fc053a025c381d5808e9ecd3206dfe Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:22 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 15:13:27 -0300 perf callchain

[tip:perf/core] perf unwind: Introduce flag to separate local/remote unwind compilation

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: 19473e7ba8f8f443f09d4187791de9d6f95fdc1d Gitweb: http://git.kernel.org/tip/19473e7ba8f8f443f09d4187791de9d6f95fdc1d Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:21 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 15:11:46 -0300 perf unwind

[tip:perf/core] perf unwind: Change fixed name of libunwind__arch_reg_id to macro

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: eeb118c5d77878948e09308afe4fd9d0efe68ef7 Gitweb: http://git.kernel.org/tip/eeb118c5d77878948e09308afe4fd9d0efe68ef7 Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:20 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 15:11:46 -0300 perf unwind: Change

[tip:perf/core] perf unwind: Check the target platform before assigning unwind methods

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: d64ec10ec8b43a519f132e7c33c1815a4e86949e Gitweb: http://git.kernel.org/tip/d64ec10ec8b43a519f132e7c33c1815a4e86949e Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:19 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 15:09:36 -0300 perf unwind: Check

[tip:perf/core] perf tools: Extract common API out of unwind-libunwind-local.c

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: f6d725324ab281880a0b736df5812e3a1e807779 Gitweb: http://git.kernel.org/tip/f6d725324ab281880a0b736df5812e3a1e807779 Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:17 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 12:08:53 -0300 perf tools: Extract

[tip:perf/core] perf tools: Export normalize_arch() function

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: 940e6987fcfb6092cda8f2f87f2937c55fa038c4 Gitweb: http://git.kernel.org/tip/940e6987fcfb6092cda8f2f87f2937c55fa038c4 Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:18 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 12:08:53 -0300 perf tools: Export

[tip:perf/core] perf unwind: Rename unwind-libunwind.c to unwind-libunwind-local.c

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: a597b547d6a599b088e3789a9095bd9bf2b28aaa Gitweb: http://git.kernel.org/tip/a597b547d6a599b088e3789a9095bd9bf2b28aaa Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:16 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 12:08:53 -0300 perf unwind: Rename

[tip:perf/core] perf unwind: Separate local/remote libunwind config

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: 9d8e14d306ef2f5daf2fd099ef07c39dd83e2c0d Gitweb: http://git.kernel.org/tip/9d8e14d306ef2f5daf2fd099ef07c39dd83e2c0d Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:15 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 12:08:52 -0300 perf unwind

[tip:perf/core] perf unwind: Introduce 'struct unwind_libunwind_ops' for local unwind

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: f83c04156c1483f16ac548516f41212cf244e441 Gitweb: http://git.kernel.org/tip/f83c04156c1483f16ac548516f41212cf244e441 Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:12 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 12:08:52 -0300 perf unwind

[tip:perf/core] perf unwind: Don't mix LIBUNWIND_LIBS into LIBUNWIND_LDFLAGS

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: 403cacb8a25eb86d564750fce2293978814d2d15 Gitweb: http://git.kernel.org/tip/403cacb8a25eb86d564750fce2293978814d2d15 Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:14 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 12:08:52 -0300 perf unwind: Don&#

[tip:perf/core] perf unwind: Move unwind__prepare_access from thread_new into thread__insert_map

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: 8132a2a84147d3c98cf580d5759387325fbabf73 Gitweb: http://git.kernel.org/tip/8132a2a84147d3c98cf580d5759387325fbabf73 Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:13 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 12:08:52 -0300 perf unwind: Move

[tip:perf/core] perf unwind: Decouple thread->address_space on libunwind

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: c1d1d0d9b302cb5f0365f4de78dd7fcbf7983c05 Gitweb: http://git.kernel.org/tip/c1d1d0d9b302cb5f0365f4de78dd7fcbf7983c05 Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:11 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 12:08:51 -0300 perf unwind

[tip:perf/core] perf unwind: Use LIBUNWIND_DIR for remote libunwind feature check

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: 195106b9ff87da6da600b2c33d6a8b38281e1af3 Gitweb: http://git.kernel.org/tip/195106b9ff87da6da600b2c33d6a8b38281e1af3 Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:10 + Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 12:08:51 -0300 perf unwind: Use

[tip:perf/core] perf script: Show call graphs when 1st event doesn't have it but some other has

2016-06-08 Thread tip-bot for He Kuang
Commit-ID: 40f20e5074b035c7111e135aa939d1d1a96a2480 Gitweb: http://git.kernel.org/tip/40f20e5074b035c7111e135aa939d1d1a96a2480 Author: He Kuang AuthorDate: Mon, 16 May 2016 04:51:19 + Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 3 Jun 2016 14:53:46 -0300 perf script: Show

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

2016-06-03 Thread He Kuang
assigning unwind methods. In the latter patches in this series, we can use this info to assign the right unwind methods for supported platforms. Signed-off-by: He Kuang Acked-by: Jiri Olsa --- tools/perf/util/thread.c | 2 +- tools/perf/util/unwind-libunwind.c | 25

[PATCH v9 06/14] perf tools: Separate local/remote libunwind config

2016-06-02 Thread He Kuang
. LIBUNWIND_LIBS is eliminated in LDFLAGS if local libunwind is not supported. Signed-off-by: He Kuang --- tools/perf/arch/arm/util/Build | 2 +- tools/perf/arch/arm64/util/Build | 2 +- tools/perf/arch/x86/util/Build | 2 +- tools/perf/config/Makefile | 20 +--- 4 files changed

[PATCH v9 09/14] perf tools: Export normalize_arch() function

2016-06-02 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 v9 10/14] perf tools: Check the target platform before assigning unwind methods

2016-06-02 Thread He Kuang
assigning unwind methods. In the latter patches in this series, we can use this info to assign the right unwind methods for supported platforms. Signed-off-by: He Kuang --- tools/perf/util/thread.c | 2 +- tools/perf/util/unwind-libunwind.c | 24 +++- tools/perf/util

[PATCH v9 03/14] perf tools: Introducing struct unwind_libunwind_ops for local unwind

2016-06-02 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.h | 4 ++- tools/perf/util/unwind-libunwind.c | 58

[PATCH v9 04/14] perf tools: Move unwind__prepare_access from thread_new into thread__insert_map

2016-06-02 Thread He Kuang
. Meanwhile, let thread__insert_map() return value and show messages on error. Signed-off-by: He Kuang --- tools/perf/util/machine.c | 14 -- tools/perf/util/thread.c | 13 + tools/perf/util/thread.h | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/tools

[PATCH v9 12/14] perf tools: Introduce flag to separate local/remote unwind compilation

2016-06-02 Thread He Kuang
This is a preparation for including unwind-libunwind-local.c in other files for remote libunwind. Signed-off-by: He Kuang --- tools/perf/util/unwind-libunwind-local.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind

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

2016-06-02 Thread He Kuang
Support aarch64 cross platform callchain unwind. Signed-off-by: He Kuang --- tools/perf/arch/arm64/util/unwind-libunwind.c | 4 ++- tools/perf/config/Makefile| 12 + tools/perf/util/Build | 1 + tools/perf/util/libunwind/arm64.c

[PATCH v9 01/14] perf tools: Use LIBUNWIND_DIR for remote libunwind feature check

2016-06-02 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 v9 11/14] perf tools: Change fixed name of libunwind__arch_reg_id to macro

2016-06-02 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 9c70486

[PATCH v9 07/14] perf tools: Rename unwind-libunwind.c to unwind-libunwind-local.c

2016-06-02 Thread He Kuang
Since unwind-libunwind.c contains code for specific arithecture, we change it's name to unwind-libunwind-local.c, and let it only be built if local libunwind is supported. Signed-off-by: He Kuang --- tools/perf/util/Build| 2 +- tools/perf

[PATCH v9 08/14] perf tools: Extract common API out of unwind-libunwind-local.c

2016-06-02 Thread He Kuang
This patch extracts common unwind-libunwind APIs out of unwind-libunwind-local.c, this part will be used by both local and remote libunwind. Signed-off-by: He Kuang --- tools/perf/util/Build| 1 + tools/perf/util/unwind-libunwind-local.c | 39

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

2016-06-02 Thread He Kuang
wind__prepare_access() in patch 10. Thanks. He Kuang (14): perf tools: Use LIBUNWIND_DIR for remote libunwind feature check perf tools: Decouple thread->address_space on libunwind perf tools: Introducing struct unwind_libunwind_ops for local unwind perf tools: Move unwind__prepare_acce

[PATCH v9 05/14] perf tools: Don't mix LIBUNWIND_LIBS into LIBUNWIND_LDFLAGS

2016-06-02 Thread He Kuang
LIBUNWIND_LIBS contains libunwind libraries used for local only, don't mix this into LIBUNWIND_LDFLAGS so we can later use LIBUNWIND_LDFLAGS both for local and remote libunwind. Signed-off-by: He Kuang --- tools/perf/config/Makefile | 7 +++ 1 file changed, 3 insertions(+), 4 dele

  1   2   3   4   5   >