Introduce another trace buffer besides perf_trace_buffer, so other
utilities like bpf can generate and fill perf event data to it
extraly and the data can be collected to the original buffer
afterwards. The life cycle of this extra buffer is the same as the
original one.
Signed-off-by: He Kuang
k count=3
$ cat /sys/kernel/debug/tracing/trace
dd-994 [000] d...46.386754: : generic_perform_write: tgid=994, pid=994
dd-994 [000] d...46.389167: : generic_perform_write: tgid=994, pid=994
dd-994 [000] d...46.389551: : generic_perform_write: tgid=994, pid=994
Signed-o
processed by perf-script.
Signed-off-by: He Kuang
---
kernel/trace/trace_kprobe.c | 34 --
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 16ad88e..88642ee 100644
--- a/kernel/trace
063753: perf_bpf_probe:generic_perform_write:
(81140b60)
Next step, we'll let the userspace perf tools to parse this extra data
generated by eBPF.
Thank you.
He Kuang (5):
bpf: Put perf_events check ahead of bpf prog
perf/trace: Add perf extra percpu trace buffer
tracing/kpro
t a
second time.
Signed-off-by: He Kuang
---
include/linux/ftrace_event.h| 2 ++
kernel/trace/trace_event_perf.c | 27 ++-
kernel/trace/trace_kprobe.c | 28 ++--
3 files changed, 46 insertions(+), 11 deletions(-)
diff --git a/inc
probe:skb_is_nonlinear (on skb_is_nonlinear in test_bpf)
You can now use it in all perf tools, such as:
perf record -e probe:skb_is_nonlinear -aR sleep 1
Signed-off-by: He Kuang
---
tools/perf/util/probe-event.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/perf/util/pro
Change improper type size_t to diffptr_t to make consistent with libdw
and handle error code.
Signed-off-by: He Kuang
---
tools/perf/util/dwarf-aux.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c
index
The option --range uses functions in libdw (elfutils version >= 1.57),
this patch check if elfutils version meets the requirements before
enable this feature, so that perf can be built with old libdw.
Reported-by: Alexei Starovoitov
Signed-off-by: He Kuang
---
tools/perf/builtin-probe.c |
enter_write -- dd if=/dev/zero
of=/dev/null bs=4k count=1000
1000+0 records in
1000+0 records out
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.077 MB perf.data (1001 samples) ]
Signed-off-by: He Kuang
---
tools/perf/builtin-record.c | 2 +-
1 file
Change improper type size_t to diffptr_t to make consistent with libdw
and handle error code.
Signed-off-by: He Kuang
---
tools/perf/util/dwarf-aux.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c
e, so that perf can be built with old libdw.
Reported-by: Alexei Starovoitov
Signed-off-by: He Kuang
---
tools/perf/builtin-probe.c | 2 ++
tools/perf/util/dwarf-aux.c | 2 ++
tools/perf/util/dwarf-aux.h | 13 -
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/tools
hi, Masami
On 2015/7/1 19:00, Masami Hiramatsu wrote:
> On 2015/07/01 18:05, He Kuang wrote:
>> Change improper type size_t to diffptr_t to make consistent with libdw
>> and handle error code.
>>
>> Signed-off-by: He Kuang
>> ---
>> tools/perf/util/
On 2015/7/2 10:48, Alexei Starovoitov wrote:
On 7/1/15 4:58 AM, Peter Zijlstra wrote:
But why create a separate trace buffer, it should go into the regular
perf buffer.
+1
I think
+static char __percpu *perf_extra_trace_buf[PERF_NR_CONTEXTS];
is redundant.
It adds quite a bit of unnecessar
perf-script.
Signed-off-by: He Kuang
---
kernel/trace/trace_kprobe.c | 36 ++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 16ad88e..274735b 100644
--- a/kernel/trace/trace_kprobe.c
perf_trace_buf at the stage of
perf_trace_prepare_buf.
v1-v2:
- Remove additional perf_trace_buf. Use the end of perf_trace_buf as
a temporary region to store bpf data.
- Rename bpf_output_sample to bpf_output_data.
- New bpf API added to the end of the function list.
Thank you.
He
k count=3
$ cat /sys/kernel/debug/tracing/trace
dd-994 [000] d...46.386754: : generic_perform_write: tgid=994, pid=994
dd-994 [000] d...46.389167: : generic_perform_write: tgid=994, pid=994
dd-994 [000] d...46.389551: : generic_perform_write: tgid=994, pid=994
Signed-o
econd time.
Signed-off-by: He Kuang
---
include/linux/ftrace_event.h| 2 ++
kernel/trace/trace_event_perf.c | 27 ++-
kernel/trace/trace_kprobe.c | 28 ++--
3 files changed, 46 insertions(+), 11 deletions(-)
diff --git a/include/linux/ftrace
type but does not increase the recursion
count.
Signed-off-by: He Kuang
---
include/linux/ftrace_event.h| 2 ++
include/linux/perf_event.h | 2 ++
include/uapi/linux/bpf.h| 3 +++
kernel/events/core.c| 6 ++
kernel/events/internal.h| 17
On 2015/9/29 15:57, Jiri Olsa wrote:
On Tue, Sep 29, 2015 at 03:52:09PM +0800, He Kuang wrote:
hi, jirka
On 2015/9/29 15:20, Jiri Olsa wrote:
On Tue, Sep 29, 2015 at 09:14:10AM +0200, Jiri Olsa wrote:
SNIP
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
Copyright (C) 2010
Hi,
perf cross-compile error dual to fixdep is not a host executable, first bad
commit
is 7c422f557266("tools build: Build fixdep helper from perf and basic libs")
Cross-compiling an aarch64 target on x86_64 host, error like this:
$ make ARCH=aarch64 O=xx/aarch64 CROSS_COMPILE=aarch64-linux-
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
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
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
.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
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
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
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
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:
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
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
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:
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:
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
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
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
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
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
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-
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
void *' instead to decouple the dependence on libunwind.
Signed-off-by: He Kuang
---
tools/perf/util/thread.h | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 45fba13..aa3a8ff 100644
--- a/tools/perf/util/thread.
. 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
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
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
Support x86(32-bit) cross platform callchain unwind.
Signed-off-by: He Kuang
---
tools/perf/arch/x86/util/unwind-libunwind.c | 6 +++--
tools/perf/config/Makefile | 8 +++
tools/perf/util/Build | 1 +
tools/perf/util/libunwind/x86_32.c | 37
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
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
.
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
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
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 | 38
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
in file 'util/libunwind/arm64.c',
'util/libunwind/x86_32.c', and explain the reason for debug-frame
flag in non-arm arch.
Thanks.
He Kuang (14):
perf tools: Use LIBUNWIND_DIR for remote libunwind feature check
perf tools: Decouple thread->address_space
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
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 | 57
.
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
void *' instead to decouple the dependence on libunwind.
Signed-off-by: He Kuang
---
tools/perf/util/thread.h | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 45fba13..aa3a8ff 100644
--- a/tools/perf/util/thread.
Support x86(32-bit) cross platform callchain unwind.
Signed-off-by: He Kuang
---
tools/perf/arch/x86/util/unwind-libunwind.c | 6 +++--
tools/perf/config/Makefile | 8 +++
tools/perf/util/Build | 1 +
tools/perf/util/libunwind/x86_32.c | 37
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
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
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
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
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
.
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
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
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
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
. 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
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
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
.
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
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
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 | 32
Support x86(32-bit) cross platform callchain unwind.
Signed-off-by: He Kuang
---
tools/perf/arch/x86/util/unwind-libunwind.c | 6 --
tools/perf/config/Makefile | 8
tools/perf/util/Build | 1 +
tools/perf/util/libunwind/x86_32.c
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
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
void *' instead to decouple the dependence on libunwind.
Signed-off-by: He Kuang
---
tools/perf/util/thread.h | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 45fba13..aa3a8ff 100644
--- a/tools/perf/util/thread.
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
orted warnings to "Support x86 target platform"
- Export $(ARCH)_unwind_libunwind_ops variables instead of
functions.
- Move arch/$(ARCH)/util/unwind-libunwind-$(ARCH).c into
util/libunwind/ folder.
Thanks.
He Kuang (14):
perf tools: Use LIBUNWIND_DIR for remote libunw
.
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 | 21 ++---
4 files changed
. Meanwhile, let thread__insert_map()
return value and show messages on error.
Signed-off-by: He Kuang
---
tools/perf/util/machine.c | 10 --
tools/perf/util/thread.c | 13 +++--
tools/perf/util/thread.h | 2 +-
tools/perf/util/unwind-libunwind.c | 7
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
methods of libunwind operations to
thread/map related, and each thread can have indivadual libunwind
operations. Local libunwind methods are registered as default value.
Signed-off-by: He Kuang
---
tools/perf/util/thread.c | 6
tools/perf/util/thread.h | 4 ++-
tools/perf
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 | 30 +++---
tools/perf
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
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 | 38
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
.
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
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
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
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
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
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
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
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:
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
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
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
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
---
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
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
: 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
201 - 300 of 419 matches
Mail list logo