I found a wrong result of aarch64 callchain when using perf script on
a android phone.
Here's the callchain record fragment from the output of perf script:
init 369 [002] 339.970607: raw_syscalls:sys_enter: NR 22 (b, 7fd9e360a0,
10, , 0, 8)
...
4 regs(R2,R3,R4,R5) for variable passing according to bpf calling
convention.
- Move bpf prologue code to tools/lib/bpf.
- Sample codes in patch instead of comments.
- Fix code style problems mentioned by Alexei and Masami.
Thanks.
He Kuang (15):
perf tools: Add lib/bpf
Add lib/bpf folder to cscope list.
Signed-off-by: He Kuang
---
tools/perf/Makefile.perf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index c69821c..7b77d14 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf
-1176 [000] d.h. 87778.533049: : submit_bio count=12288, rw=1,
bio=88007c237a80
Signed-off-by: He Kuang
---
samples/bpf/Makefile| 1 +
samples/bpf/sample_bpf_fetch_args.c | 62 +
2 files changed, 63 insertions(+)
create mode 100644 samples
-off-by: He Kuang
---
samples/bpf/Makefile | 1 +
samples/bpf/sample_bpf_fetch_args_without_debug.c | 49 +++
2 files changed, 50 insertions(+)
create mode 100644 samples/bpf/sample_bpf_fetch_args_without_debug.c
diff --git a/samples/bpf/Makefile b
Combine bpf prologue before attaching bpf progs to perf probe event. If
prologue is generated, it will be pasted in front of the original bpf
prog.
Signed-off-by: He Kuang
---
tools/lib/bpf/libbpf.c | 27 +++
tools/lib/bpf/libbpf.h | 2 ++
tools/perf/util
hi, jirka
ping..
Thanks.
On 2015/5/15 16:01, He Kuang wrote:
Traceevent plugins need dynamic symbols exported from libtraceevent.a,
otherwise a dlopen error will occur during plugins loading.
This patch uses dynamic-list-file to export dynamic symbols which will
be used in plugins to perf
For generating bpf prologue which fetches function formal parameters
when debuginfo is not provided.
Signed-off-by: He Kuang
---
tools/lib/bpf/gen_prologue.c | 19 +++
tools/lib/bpf/libbpf.h | 2 ++
2 files changed, 21 insertions(+)
diff --git a/tools/lib/bpf
Copying bpf instruction macros from sample/bpf/libbpf.h, and register
alias from include/linux/ftrace.h, so we can generating bpf bytecode by
using these macros.
Signed-off-by: He Kuang
---
tools/lib/bpf/bpf.h | 187
1 file changed, 187
When probing at function entry, fallback to generate bpf prologue by
calling args if '$param' is the only args and no debuginfo is provided.
Signed-off-by: He Kuang
---
tools/perf/util/probe-event.c | 54 ++-
1 file changed, 53 insertions(+),
Save reg number in function convert_variable_location() instead of the
register string name, so we can fetch the target register from bpf
context register later.
Signed-off-by: He Kuang
---
tools/perf/util/include/dwarf-regs.h | 13 +
tools/perf/util/probe-event.h| 1
Make bpf command support -k option, when inserting probe point which
needs debuginfo, a customized vmlinux path can be specified.
Signed-off-by: He Kuang
---
tools/perf/builtin-bpf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-bpf.c b/tools/perf/builtin-bpf.c
index
After gethered all vars represented in trace_probe_arg, we can now use
functions in libbpf to generate the args prologue.
Signed-off-by: He Kuang
---
tools/perf/util/probe-finder.c | 83 +-
1 file changed, 81 insertions(+), 2 deletions(-)
diff --git a
arg5=0x556062e3 arg6=0x12a8010
Signed-off-by: He Kuang
---
tools/perf/util/probe-event.c | 42 ++
1 file changed, 42 insertions(+)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index d05b77c..7f9f431 100644
--- a/tools/perf/util
For generating function formal parameters without debuginfo, add
function to get names and offsets of architecture dependent calling
regs.
Signed-off-by: He Kuang
---
tools/perf/util/include/dwarf-regs.h | 2 ++
tools/perf/util/probe-finder.c | 10 ++
2 files changed, 12
Process debuginfo for bpf prologue, the process function is copied and
modified from debuginfo__find_trace_events(), with a different callback
function for generating bpf prologue bytecode.
Signed-off-by: He Kuang
---
tools/perf/util/probe-event.c | 27
tools/perf/util/probe
steps:
1. alloc dst address in stack -> r1
2. set size -> r2
3. fetch base register and offset -> r3
4. call BPF_FUNC_probe_read
5. loop 1
6. save intermediate result and process next arg
7. restore intermediate result to arg2~5
Signed-off-by: He Kuang
---
tools/lib/bpf/Build | 2
Combine pt_regs offset of each registers into arch_regs_table. And add
architecture dependent calling_regs_table.
Signed-off-by: He Kuang
---
tools/perf/arch/x86/util/dwarf-regs.c | 100 +++---
1 file changed, 79 insertions(+), 21 deletions(-)
diff --git a/tools
On 2015/5/24 21:31, Masami Hiramatsu wrote:
> On 2015/05/24 17:27, He Kuang wrote:
>> Save reg number in function convert_variable_location() instead of the
>> register string name, so we can fetch the target register from bpf
>> context register later.
>
> This is
hi,
On 2015/5/24 16:49, Masami Hiramatsu wrote:
> On 2015/05/24 17:28, He Kuang wrote:
>> When probing at function entry, fallback $params to calling regs if no
>> debuginfo is provided.
>>
>> Before this path:
>>$ perf probe -v --add='generic_perform_wr
On 2015/5/14 21:31, Jiri Olsa wrote:
On Thu, May 14, 2015 at 08:56:15PM +0800, He Kuang wrote:
SNIP
It seems new targets are needed. In the v2 patch,
hum, I dont get it.. why ?
dynamic-list-file gets rebuilt any time plugins are rebuilt..
why not keep just the 'plugins' depende
The libtrace-dynamic-list file is used to export symbols used by
traceevent plugins.
Signed-off-by: He Kuang
---
tools/lib/traceevent/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/traceevent/.gitignore b/tools/lib/traceevent/.gitignore
index 35f56be..3c60335 100644
1049 [000] 9666.754487: ftrace:function: __set_task_comm
:1049 1049 [000] 9666.754487: ftrace:function:_raw_spin_lock
:1049 1049 [000] 9666.754487: ftrace:function: task_tgid_nr_ns
...
Signed-off-by: He Kuang
---
tools/lib/traceevent/Makefile | 14 +-
Add -k option to perf bpf command.
Signed-off-by: He Kuang
---
tools/perf/builtin-bpf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-bpf.c b/tools/perf/builtin-bpf.c
index 4ef294a..9ea34b3 100644
--- a/tools/perf/builtin-bpf.c
+++ b/tools/perf/builtin-bpf.c
@@ -11,6
This helper function uses kernel structure trace_probe and related fetch
functions for fetching variables described in 'SEC' to bpf stack.
Signed-off-by: He Kuang
---
include/uapi/linux/bpf.h | 1 +
kernel/trace/bpf_trace.c | 38 ++
s
Add new structure bpf_pt_regs, which contains both original
'ctx'(pt_regs) and trabe_probe pointer, and pass this new pointer to bpf
prog for variable fetching.
Signed-off-by: He Kuang
---
kernel/trace/trace_kprobe.c | 11 +--
kernel/trace/trace_probe.h | 5 +
2 files c
nt functionality of parsing args.
cons:
- User should add the 'structure param' code themselves.
Looking forward for disscusions.
He Kuang (5):
perf bpf: Add -k option for testing convenience
bpf: Pass trace_probe to bpf_prog for variable fetching
bpf: Add helper function for fetching
: : NODE_write1 a_ops=81a20160,
bytes=1000
dd-1098 [000] d... 6892.829842: : NODE_write2 page =ea0001c49f80, pos
=2000
Signed-off-by: He Kuang
---
samples/bpf/Makefile| 1 +
samples/bpf/sample_bpf_fetch_args.c | 43
Always use $(obj) when referring to generated files and use $(src) when
referring to files located in the src tree.
Signed-off-by: He Kuang
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 76e3458
Use struct strbuf instead of bare char[] to remove the length limitation
of variables in variable_list, so they will not disappear due to
overlength, and make preparation for adding more description for
variables.
Signed-off-by: He Kuang
---
tools/perf/util/dwarf-aux.c| 50
Change current boolean flag 'externs' to unsigned long 'var_flags' for
more options related to variables. These options work with --vars only.
Signed-off-by: He Kuang
---
tools/perf/builtin-probe.c | 8 +++-
tools/perf/util/probe-event.c | 12 ++--
t
struct page*page[byte offset]:
<70-307>,<346-411>
Then it is more clearly for us to do the probe with this variable:
$ perf probe --add 'generic_perform_write+170 a_ops'
Added new event:
probe:generic_perform_write (on generic_perform_write+170 with a_ops)
S
033e
sh-1260 [000] d... 112600.790977: : NODE_generic_perform_write,
a_ops=81a20160, bytes=000a, offset=0355
He Kuang (6):
perf bpf: Add headers for generate bpf bytecode
perf bpf: Add pt_regs convert table for x86
perf bpf: Save pt_regs i
Generate bpf prologue before attaching bpf progs to perf probe event. If
prologue is generated, it will be pasted in front of the original bpf
prog.
Signed-off-by: He Kuang
---
tools/perf/util/bpf-loader.c | 66
1 file changed, 66 insertions(+)
diff
Including bpf instruction macros and register alias.
Signed-off-by: He Kuang
---
tools/perf/util/bpf-loader.h | 188 +++
1 file changed, 188 insertions(+)
diff --git a/tools/perf/util/bpf-loader.h b/tools/perf/util/bpf-loader.h
index baa4404..840f96d
Convert register number in debuginfo to its index in pt_regs.
Signed-off-by: He Kuang
---
tools/perf/arch/x86/util/dwarf-regs.c | 31 +++
1 file changed, 31 insertions(+)
diff --git a/tools/perf/arch/x86/util/dwarf-regs.c
b/tools/perf/arch/x86/util/dwarf-regs.c
h base register and offset -> r3
4. call BPF_FUNC_probe_read
5. loop 1
6. save intermediate result and process next arg
7. restore intermediate result to arg2~5
Signed-off-by: He Kuang
---
tools/perf/util/probe-event.c | 94 +++
tools/perf/util/probe-eve
Save pt_regs number and size information in function
convert_variable_location() instead of the register string name, so we
can fetch the target register from bpf context register later.
Signed-off-by: He Kuang
---
tools/perf/util/include/dwarf-regs.h | 2 ++
tools/perf/util/probe-event.h
Process debuginfo for bpf prologue, the process function is copied and
modified from debuginfo__find_trace_events(), but use a different
callback function for generating bpf prologue bytecode.
Signed-off-by: He Kuang
---
tools/perf/util/probe-event.c | 27 +
tools/perf/util/probe
Hi, jirka
On 2015/5/13 22:50, Jiri Olsa wrote:
On Tue, May 12, 2015 at 11:25:45PM +0800, hekuang wrote:
Hi, jirka
On 05/12/2015 08:37 PM, Jiri Olsa wrote:
On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote:
SNIP
$(Q)$(MAKE) $(build)=perf
-$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN
hi, Masami
On 2015/5/8 21:15, Masami Hiramatsu wrote:
> On 2015/05/08 21:23, He Kuang wrote:
>> Change current boolean flag 'externs' to unsigned long 'var_flags' for
>> more options related to variables. These options work with --vars only.
> NAK, p
On 2015/5/8 22:17, Masami Hiramatsu wrote:
> On 2015/05/08 21:23, He Kuang wrote:
>> Use struct strbuf instead of bare char[] to remove the length limitation
>> of variables in variable_list, so they will not disappear due to
>> overlength, and make preparation for adding
On 2015/5/8 22:08, Masami Hiramatsu wrote:
On 2015/05/08 21:23, He Kuang wrote:
It is not easy for users to get the accurate byte offset or the line
number where a local variable can be probed. With '--range' option,
local variables in scope of the probe point are showed with byte of
led to add events.
After this patch:
$ perf probe --add 'generic_perform_write+118 bytes'
Failed to find the location of bytes at this address.
Perhaps, it has been optimized out.
Use -V with --range option to show variable location range.
Error: Failed to add events.
Sig
Use struct strbuf instead of bare char[] to remove the length limitation
of variables in variable_list, so they will not disappear due to
overlength, and make preparation for adding more description for
variables.
Signed-off-by: He Kuang
---
tools/perf/util/dwarf-aux.c| 50
$ perf probe --add 'generic_perform_write+170 a_ops'
Added new event:
probe:generic_perform_write (on generic_perform_write+170 with a_ops)
Signed-off-by: He Kuang
---
tools/perf/builtin-probe.c | 2 +
tools/perf/util/dwarf-aux.c| 121
Hi, Masami
On 2015/5/10 11:21, Masami Hiramatsu wrote:
On 2015/05/09 18:55, He Kuang wrote:
It is not easy for users to get the accurate byte offset or the line
number where a local variable can be probed. With '--range' option,
local variables in scope of the probe point are showed
led to add events.
After this patch:
$ perf probe --add 'generic_perform_write+118 bytes'
Failed to find the location of bytes at this address.
Perhaps, it has been optimized out.
Use -V with --range option to show variable location range.
Error: Failed to add events.
Sig
Use struct strbuf instead of bare char[] to remove the length limitation
of variables in variable_list, so they will not disappear due to
overlength, and make preparation for adding more description for
variables.
Signed-off-by: He Kuang
Acked-by: Masami Hiramatsu
---
tools/perf/util/dwarf
$ perf probe --add 'generic_perform_write+170 a_ops'
Added new event:
probe:generic_perform_write (on generic_perform_write+170 with a_ops)
Signed-off-by: He Kuang
---
tools/perf/builtin-probe.c | 2 +
tools/perf/util/dwarf-aux.c| 121
1049 [000] 9666.754487: ftrace:function: __set_task_comm
:1049 1049 [000] 9666.754487: ftrace:function:_raw_spin_lock
:1049 1049 [000] 9666.754487: ftrace:function: task_tgid_nr_ns
...
Signed-off-by: He Kuang
---
tools/lib/traceevent/Makefile | 14 ++
The libtrace-dynamic-list file is used to export symbols used by
traceevent plugins.
Signed-off-by: He Kuang
---
tools/lib/traceevent/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/traceevent/.gitignore b/tools/lib/traceevent/.gitignore
index 35f56be..3c60335 100644
Hi, Ingo
On 2015/5/11 17:30, Ingo Molnar wrote:
* He Kuang wrote:
Indicate to check variable location range in error message when we got
failed to find the variable.
Before this patch:
$ perf probe --add 'generic_perform_write+118 bytes'
Failed to find the location of byt
On 2015/5/11 17:50, Ingo Molnar wrote:
* He Kuang wrote:
Hi, Ingo
On 2015/5/11 17:30, Ingo Molnar wrote:
* He Kuang wrote:
Indicate to check variable location range in error message when we got
failed to find the variable.
Before this patch:
$ perf probe --add
Hi, Arnaldo
On 2015/4/8 11:15, He Kuang wrote:
Hi, Arnaldo
On 2015/4/7 20:36, Arnaldo Carvalho de Melo wrote:
Em Tue, Apr 07, 2015 at 05:31:11PM +0800, He Kuang escreveu:
After perf_evlist__filter_pollfd() filters out fds and releases
perf_mmap by using perf_evlist__mmap_put(), refcnt of
Duplication NULL test for trace.evlist.
Signed-off-by: He Kuang
---
tools/perf/builtin-trace.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index bb05e44..ca39530 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools
-by: He Kuang
---
tools/perf/tests/builtin-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 4f40981..f42af98 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -21
$ perf probe --add 'generic_perform_write+170 a_ops'
Added new event:
probe:generic_perform_write (on generic_perform_write+170 with a_ops)
Signed-off-by: He Kuang
Acked-by: Masami Hiramatsu
---
tools/perf/builtin-probe.c | 2 +
tools/perf/util/dwarf-aux.c| 121
o show variable location range.
Error: Failed to add events.
Signed-off-by: He Kuang
---
tools/perf/util/probe-finder.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index f032329..0fc2ae8 100644
--- a/
Use struct strbuf instead of bare char[] to remove the length limitation
of variables in variable_list, so they will not disappear due to
overlength, and make preparation for adding more description for
variables.
Signed-off-by: He Kuang
Acked-by: Masami Hiramatsu
---
tools/perf/util/dwarf
1049 [000] 9666.754487: ftrace:function: __set_task_comm
:1049 1049 [000] 9666.754487: ftrace:function:_raw_spin_lock
:1049 1049 [000] 9666.754487: ftrace:function: task_tgid_nr_ns
...
Signed-off-by: He Kuang
---
tools/lib/traceevent/Makefile | 14 +-
The libtrace-dynamic-list file is used to export symbols used by
traceevent plugins.
Signed-off-by: He Kuang
---
tools/lib/traceevent/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/lib/traceevent/.gitignore b/tools/lib/traceevent/.gitignore
index 35f56be..3c60335 100644
Hi, jirka
On 2015/5/11 22:33, Jiri Olsa wrote:
On Mon, May 11, 2015 at 09:35:26AM +, He Kuang wrote:
Traceevent plugins need dynamic symbols exported from libtraceevent.a,
otherwise a dlopen error will occur during plugins loading.
This patch uses dynamic-list-file to export dynamic
hi, Tom
On 2015/3/3 3:55, Tom Zanussi wrote:
BTW, I've actually tried to play around with the BPF samples/, but it
seems they're not actually hooked into the system i.e. the samples
Makefile doesn't build them, and it even looks for tools/llvm that's
not there. I got as far as getting the late
Hi,
It seems this patch not appeared in any repo, so ping..
On 2015/3/4 20:46, Masami Hiramatsu wrote:
(2015/03/04 19:01), He Kuang wrote:
A double free occurred when get source file path failed. If lr->path
failed to assign a new value, it will be freed as the old path and then
be fr
ping..
On 2015/3/4 12:13, He Kuang wrote:
When all perf report entries be filtered, the result of
hists__filter_entries() can be NULL, check the result before processing.
Miss this checking will cause segmentation fault like this:
$ perf report
(filter all entries and left nothing, then
ping..
On 2015/3/3 15:21, He Kuang wrote:
TRACE_EVENT_FL_USE_CALL_FILTER flag in ftrace:functon event can be
removed. This flag was first introduced in commit
f306cc82a93d ("tracing: Update event filters for multibuffer").
Now, the only place uses this flag is ftrace:function, but the
hi,
On 2015/3/10 14:28, Namhyung Kim wrote:
On Fri, Mar 06, 2015 at 08:51:44PM +0800, He Kuang wrote:
In perf hists browser, the fold/unfold stat of each hist entry is
recorded but hb->nr_callchain_rows loses its value after zoom out and
zoom in back. This causes a wrong row cursor range t
8.33% 0x65
- 16.67% 0.00% ls [unknown] [.]0x6469702e64
0x6469702e64
This patch recalculates hb->nr_callchain_rows to fix the bug.
Signed-off-by: He Kuang
---
tools/perf/ui/browsers/hists.c | 20
1 file changed, 20 insertions(+)
diff
ld64.so [.] _dl_load_shared_library
_dl_load_shared_library
_dl_get_ready_to_run <= [cursor may stop here, can't move down]
_start
...
This patch clear h->nr_rows to fix this bug.
Signed-off-by: He Kuang
---
tools/perf/util/hist.c | 1 +
1 file changed, 1 insertion(+)
d
8.33% 0x65
- 16.67% 0.00% ls [unknown] [.]0x6469702e64
0x6469702e64
This patch recalculates hb->nr_callchain_rows to fix the bug.
Signed-off-by: He Kuang
---
tools/perf/ui/browsers/hists.c | 19 +++
1 file changed, 19 insertions(+)
diff
Hi, Alexei
In our end-end IO module project, we use bpf maps to record
configurations. According to current bpf syscall interface, we
should specify map_fd to lookup/update bpf maps, so we are
restricted to do config in the same user program.
My suggestion is to export this kind of operations to
On 2015/3/29 1:21, Alexei Starovoitov wrote:
On 3/28/15 4:36 AM, He Kuang wrote:
Hi, Alexei
In our end-end IO module project, we use bpf maps to record
configurations. According to current bpf syscall interface, we
should specify map_fd to lookup/update bpf maps, so we are
restricted to do
Uprobe uses inode address to index all registered uprobes in a
rb_tree, this works well in most filesystems but failed on 9pfs.
9pfs allocate more than one vfs inode to the same file, the inode
address when we create uprobe is not same as the inode address we
run later. As a result, neither perf
7% 0.00% ls [unknown] [.]0x6469702e64
0x6469702e64
When zoom into DSO or thread, nr_rows is not cleared which causes a
similar problem.
This patch recalculates hb->nr_callchain_rows and clears nr_rows to fix
the bug.
Signed-off-by: He Kuang
---
tools/perf/ui/br
27;u64' [-Werror=format]
cc1: all warnings being treated as errors
make[3]: *** [util/probe-event.o] Error 1
Fix it by using the PRIx64 for u64.
Signed-off-by: He Kuang
---
tools/perf/util/probe-event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/ut
--add='sys_open'
Added new event:
probe:sys_write (on sys_write)
You can now use it in all perf tools, such as:
perf record -e probe:sys_write -aR sleep 1
Added new event:
probe:sys_open (on sys_open)
You can now use it in all perf tools, such as:
p
n'
Added new event:
probe:sys_write (on sys_write)
You can now use it in all perf tools, such as:
perf record -e probe:sys_write -aR sleep 1
Added new event:
probe:sys_open (on sys_open)
You can now use it in all perf tools, such as:
perf record -e pro
Hi, Alexei
I've followed up your bpf version. In bpf filter, sometimes we need to
get 'pid' and some other context informations to decide whether to
filter or not.
For example, to trace a vfs read procedure, we can insert bpf program to
'__vfs_read(struct file *file, char __user *buf ...)', mark
r those events filtered out.
4. Provide a more user-friendly interface for user to use.
Thanks for your work.
Signed-off-by: He Kuang
He Kuang (2):
tracing: add additional IO tracepoints
samples: bpf: IO profiling example
block/bio.c| 1 +
block/blk-core.c
Add tracepoints according to IO data stream to trace data propagate
in vfs, fs, block layers.
Signed-off-by: He Kuang
---
block/bio.c| 1 +
block/blk-core.c | 4 +++
drivers/scsi/virtio_scsi.c | 3 ++
fs/ext4/page-io.c | 4 +++
include
For the first node, we sample and record its characteristic
(eg. address), and add the result to a global hash table. For other
nodes, they'll be traced when their context matches the characteristics
in previous tables.
Signed-off-by: He Kuang
---
samples/bpf/Makefile | 4 +
sa
After applying the previous patch, TRACE_EVENT_FL_USE_CALL_FILTER and
the codes relate to it can be removed.
Signed-off-by: He Kuang
---
include/linux/ftrace_event.h | 2 --
kernel/trace/trace_events_filter.c | 68 ++
2 files changed, 11 insertions
or file->filter is
used.
So we can safely remove TRACE_EVENT_FL_USE_CALL_FILTER flag from
ftrace:function events.
Signed-off-by: He Kuang
---
kernel/trace/trace_export.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_
]
../bin/perf[0x408584]
Signed-off-by: He Kuang
---
tools/perf/ui/browsers/hists.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 788506e..1106bb8 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers
rruption (fasttop):
0x00a9ac50 ***
=== Backtrace: =
../lib64/libc.so.6(+0x6eeef)[0x75e44eef]
../lib64/libc.so.6(+0x78cae)[0x75e4ecae]
../lib64/libc.so.6(+0x79987)[0x75e4f987]
../bin/perf[0x4ab41f]
...
This patch fix this problem.
Signed-off-by:
t c6e5e9fbc3ea1 ("perf tools: Fix building error
in x86_64 when dwarf unwind is on"), ARCH test in Makefile.perf
conflicts with tests/builtin-test.c's __x86_64__.
To x86/x86_64 platform, ARCH should always override to x86 while
IS_64_BIT stands for the actual architecture.
Signed-off
t c6e5e9fbc3ea1 ("perf tools: Fix building error
in x86_64 when dwarf unwind is on"), ARCH test in Makefile.perf
conflicts with tests/builtin-test.c's __x86_64__.
To x86/x86_64 platform, ARCH should always override to x86 while
IS_64_BIT stands for the actual architecture.
Signed-off
allsyms] [k] zap_pte_range
6.25% ls [kernel.kallsyms] [k] change_pte_range
[kernel.kallsyms] [k] change_pte_range
0.39% ls [kernel.kallsyms] [k] prio_tree_remove
[kernel.kallsyms] [k] prio_tree_remove
...
Signe
abled
too.
Do you have any advices on the conflicts between kernel hacking tools and
practical kernel which compiled without it? If there is no kprobes
module, what should we use?
Signed-off-by: He Kuang
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel&q
The minus operator has higher precedence than ?:
Add parentheses around ?: fix this.
---
tools/perf/util/probe-event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 919937e..bed8d0f 100644
--- a/tools/perf/ut
ping..
在 2015/2/15 10:33, He Kuang 写道:
When perf.data file be abtained by using 'perf record -b', perf report
should use branch stack mode to generate output. But this function is
broken by improper comparison between boolean and constant -1.
before this patch:
$perf report -b -i
s caused commit c6e5e9fbc3ea1 ("perf tools: Fix building error
in x86_64 when dwarf unwind is on"), ARCH test in Makefile.perf
conflicts with tests/builtin-test.c's __x86_64__.
To x86/x86_64 platform, ARCH should always override to x86 while
IS_64_BIT stands for the actual architecture.
Signe
Signed-off-by: He Kuang
在 2015/2/27 17:35, He Kuang 写道:
The minus operator has higher precedence than ?:
Add parentheses around ?: fix this.
---
tools/perf/util/probe-event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util
yprobe do_sys_open' > /sys/kernel/debug/tracing/kprobe_events
$ perf probe -l -k ../vmlinux
kprobes:myprobe (on do_sys_o...@linux.git/fs/open.c)
Signed-off-by: He Kuang
---
tools/perf/util/probe-event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/
Well, I've tested and it worked.
On 2015/2/28 10:49, Namhyung Kim wrote:
Hi He,
On Fri, Feb 27, 2015 at 06:05:37PM +0800, He Kuang wrote:
When build with ARCH=x86_64/i386, perf failed to compile with following
error:
tests/builtin-test.o:(.data+0x158): undefined referen
Hi, Alexei
Another suggestion on bpf syscall interface. Currently, BPF +
syscalls/kprobes depends on CONFIG_BPF_SYSCALL. In kernel used on
commercial products, CONFIG_BPF_SYSCALL is probably disabled, in this
case, bpf bytecode cannot be loaded to the kernel.
If we turn the functionality of BPF_
This reverts commit 998d39cb236fe464af86a3492a24d2f67ee1efc2.
When local irq is disabled, a percpu variable does not change, so we can
remove the access macros and let the compiler optimize the code safely.
Signed-off-by: He Kuang
---
mm/page_alloc.c | 10 --
1 file changed, 4
rror 1
Makefile:68: recipe for target 'all' failed
make: *** [all] Error 2
Since tsc conversion functions were moved out from arch dir, move
'tsc.h' out from x86 dir to make it possible to compile for other archs.
Signed-off-by: He Kuang
---
tools/perf/arch/x86/util/tsc.c |
the corresponding trace buffer of the context, new
function perf_swevent_current_context_type() is added, this function
only gets the current context type but does not increase the recursion
count.
Signed-off-by: He Kuang
---
include/linux/perf_event.h | 2 ++
include/uapi/linux/bpf.h | 1
101 - 200 of 419 matches
Mail list logo