[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
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. Signed-

[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
ngs 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, 10 insertions(+), 6 deleti

[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 <heku...@huawei.com> AuthorDate: Tue, 7 Feb 2017 07:34:11 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[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 <heku...@huawei.com> --- 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..b

[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 <heku...@huawei.com> --- tools/perf/arch/arm64/Makefile | 1 + tool

[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 <heku...@huawei.com> --- tools/perf/arch/arm64/Makefile | 1 + tool

[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 <heku...@huawei.com> --- 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..b

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

2017-02-03 Thread He Kuang
86. Acked-by: Masami Hiramatsu <mhira...@kernel.org> Signed-off-by: He Kuang <heku...@huawei.com> --- 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/tool

[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
86. 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 index d49efeb..090f

[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 <mhira...@kernel.org> Signed-off-by: He Kuang <heku...@huawei.com> ---

[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 <heku...@huawei.com> AuthorDate: Tue, 24 Jan 2017 10:30:14 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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
with x86. Signed-off-by: He Kuang <heku...@huawei.com> --- 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/tool

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

2017-01-24 Thread He Kuang
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/arch/arm64/Makefile

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

2017-01-24 Thread He Kuang
count=86 Signed-off-by: He Kuang <heku...@huawei.com> --- 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-regs-table.

[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 1/2] perf probe: Fix wrong register name for arm64

2017-01-24 Thread He Kuang
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-regs-table.h index 2675936..36e37

[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
with x86. Signed-off-by: He Kuang <heku...@huawei.com> --- 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/tool

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

2017-01-24 Thread He Kuang
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/arch/arm64/Makefile

[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 <heku...@huawei.com> AuthorDate: Thu, 4 Aug 2016 11:25:43 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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't

[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 <heku...@huawei.com> AuthorDate: Thu, 4 Aug 2016 11:25:42 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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
-off-by: He Kuang <heku...@huawei.com> --- 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-sc

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

2016-08-04 Thread He Kuang
-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 +371,16

[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 []

[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 []

[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 <heku...@huawei.

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

2016-06-26 Thread He Kuang
t;wangn...@huawei.com> Signed-off-by: He Kuang <heku...@huawei.com> --- tools/include/linux/byteorder/generic.h | 48 + tools/perf/MANIFEST | 1 + 2 files changed, 49 insertions(+) create mode 100644 tools/include/linux/byteorder/gener

[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: Wang Nan

[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 Kuang ---

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

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

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

2016-06-26 Thread He Kuang
off-by: Wang Nan <wangn...@huawei.com> Signed-off-by: He Kuang <heku...@huawei.com> --- tools/include/linux/kernel.h| 7 +-- tools/perf/util/intel-bts.c | 5 - tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 7

[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
_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 UBPF_BUILD flag tools include: Add (atomic|

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

2016-06-26 Thread He Kuang
_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 UBPF_BUILD flag tools include: Add (atomic|

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

2016-06-26 Thread He Kuang
defined in them. tools/perf/MANIFEST is also updated for 'make perf-*-src-pkg'. Signed-off-by: Wang Nan <wangn...@huawei.com> Signed-off-by: He Kuang <heku...@huawei.com> --- tools/include/asm-generic/div64.h | 234 tools/include/linux/math64.h

[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/MANIFEST

[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 <heku...@huawei.com> --- tools/lib/bpf/libbpf.c | 4 tools/lib/bpf/libbpf.h | 3 --- tools/perf/ut

[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/perf/util/bpf-loader.c | 1 - 3

[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 <h

[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 <heku...@huawei.com> Signed-off-by: Wang Nan <wangn...@huawei.com> --- tools/lib/bpf/engine-ubpf.c | 12 tools/lib/bpf/libbpf.h | 17

[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 <heku...@huawei.com> --- tools/lib/bpf/libbpf-internal.h | 65 +++ tools/lib/bpf/libbpf.c

[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 --git

[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 <heku...@huawei.com> Signed-off-by: Wang Nan <wangn...@huawei.com> --- tools/perf/util/ubpf-hooks.c | 19 --- 1 file changed, 16 insertions(+), 3 deleti

[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 <heku...@huawei.com> --- kernel/bpf/vm.c | 11 +-- 1 file changed, 9 insertions(+), 2 del

[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(-) diff --git

[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 <heku...@huawei.com> --- tools/perf/util/bpf-vm.c | 24 ++-- 1 file changed, 22 i

[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
mail.com> Cc: Jiri Olsa <jo...@kernel.org> Cc: Li Zefan <lize...@huawei.com> Signed-off-by: He Kuang <heku...@huawei.com> --- tools/perf/perf.c | 3 ++ tools/perf/util/Build | 1 + tools/perf/util/ubpf-helpers-list.h | 11

[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
-by: He Kuang <heku...@huawei.com> Signed-off-by: Wang Nan <wangn...@huawei.com> --- 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

[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 <heku...@huawei.com> --- tools/perf/util/bpf-vm.c | 35 +++ tools/perf/util/bpf-vm.h | 3 ++- 2 files changed, 37 insertions(+), 1 deletion(-)

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

2016-06-26 Thread He Kuang
From: Wang Nan <wangn...@huawei.com> UBPF are not built by default, unless user explicitly build perf with UBPF defined. Signed-off-by: Wang Nan <wangn...@huawei.com> Signed-off-by: He Kuang <heku...@huawei.com> --- tools/lib/bpf/Makefile | 4 tools/perf/Makefile.pe

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

2016-06-26 Thread He Kuang
-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 tools/lib/bpf

[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 <heku...@huawei.com> --- tools/lib/bpf/Makefile | 2 +- tools/lib/bpf/libbpf.c | 7 --- 2

[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 <heku...@huawei.com> Signed-off-by: Wang Nan <wangn...@huawei.com> --- tools/lib/bpf/libbpf.c | 14 ++ tools/lib/bpf/libbpf.h | 1 + 2 files

[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 <wangn...@huawei.com> Signed-off-by: He Kuang <heku...@huawei.com> --- 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

[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 insertions

[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 <wangn...@huawei.com> Introduce a BPF script use uBPF, test compiling, helper and hook. Validate passing information through helper and hooks. Signed-off-by: Wang Nan <wangn...@huawei.com> Signed-off-by: He Kuang <heku...@huawei.com> --- tool

[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 <h

[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 <h

[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 <heku...@huawei.com> Signed-off-by: Wang Nan <wangn...@huawei.com> --- tools/arch/x86/include/asm/atomic.h| 28 tools/include

[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

[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 07/26] perf bpf: Add map related BPF helper

2016-06-26 Thread He Kuang
ldo Carvalho de Melo <a...@redhat.com> Cc: Alexei Starovoitov <a...@kernel.org> Cc: Brendan Gregg <brendan.d.gr...@gmail.com> Cc: Jiri Olsa <jo...@kernel.org> Cc: Li Zefan <lize...@huawei.com> Signed-off-by: He Kuang <heku...@huawei.com> --- tools/lib/bpf/bp

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

2016-06-26 Thread He Kuang
structures and headers. CFLAGS are modified for supressing warnings of the existing bpf code. Signed-off-by: Wang Nan <wangn...@huawei.com> Signed-off-by: He Kuang <heku...@huawei.com> --- tools/perf/util/Build| 2 ++ tools/perf/util/bpf-vm.c | 34 +

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

2016-06-26 Thread He Kuang
c: Jiri Olsa <jo...@kernel.org> Cc: Li Zefan <lize...@huawei.com> Signed-off-by: He Kuang <heku...@huawei.com> --- tools/perf/util/bpf-loader.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c in

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

2016-06-26 Thread He Kuang
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 +++ 3 files c

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

2016-06-26 Thread He Kuang
llo! 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 changed, 22

[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 <heku...@huawei.com> AuthorDate: Wed, 22 Jun 2016 06:57:04 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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 <heku...@huawei.com> AuthorDate: Wed, 22 Jun 2016 06:57:03 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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 <heku...@huawei.com> AuthorDate: Wed, 22 Jun 2016 06:57:02 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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 <heku...@huawei.com> AuthorDate: Tue, 17 May 2016 09:04:54 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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 <heku...@huawei.com> AuthorDate: Wed, 22 Jun 2016 06:57:05 + Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate:

[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

  1   2   3   4   5   6   7   8   9   >