From: Masami Hiramatsu (Google)
Add a testcase for poll() on hist file. This introduces a helper binary
to the ftracetest, because there is no good way to reliably execute
poll() on hist file.
Signed-off-by: Masami Hiramatsu (Google)
Reviewed-by: Shuah Khan
---
Changes in v5:
- Update
From: Masami Hiramatsu (Google)
Since POLLIN will not be flashed until read the hist file, user needs
to repeat read() and poll() on hist for monitoring the event
continuously. But the read() is somewhat redundant only for monitoring
events.
This add POLLPRI poll event on hist, this event
From: Masami Hiramatsu (Google)
Add poll syscall support on the `hist` file. The Waiter will be waken
up when the histogram is updated with POLLIN.
Currently, there is no way to wait for a specific event in userspace.
So user needs to peek the `trace` periodicaly, or wait on `trace_pipe`.
But
or update
poll pri $EVENT/hist
# Event arrived.
echo "process free event is comming"
tail $TRACEFS/trace
The 'poll' command is in the selftest patch.
You can take this series also from here;
https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git/log/?h=topic/eve
From: Masami Hiramatsu (Google)
Add a testcase for poll() on hist file. This introduces a helper binary
to the ftracetest, because there is no good way to reliably execute
poll() on hist file.
Signed-off-by: Masami Hiramatsu (Google)
---
Changes in v4:
- Use getopt() in poll.c (command
From: Masami Hiramatsu (Google)
Since POLLIN will not be flashed until read the hist file, user needs
to repeat read() and poll() on hist for monitoring the event
continuously. But the read() is somewhat redundant only for monitoring
events.
This add POLLPRI poll event on hist, this event
From: Masami Hiramatsu (Google)
Add poll syscall support on the `hist` file. The Waiter will be waken
up when the histogram is updated with POLLIN.
Currently, there is no way to wait for a specific event in userspace.
So user needs to peek the `trace` periodicaly, or wait on `trace_pipe`.
But
/mhiramat/linux.git/log/?h=topic/event-hist-poll
Thank you,
---
Masami Hiramatsu (Google) (3):
tracing/hist: Add poll(POLLIN) support on hist file
tracing/hist: Support POLLPRI event for poll on histogram
selftests/tracing: Add hist poll() support test
include/linux/
From: Masami Hiramatsu (Google)
Add a testcase for poll() on hist file. This introduces a helper binary
to the ftracetest, because there is no good way to reliably execute
poll() on hist file.
Signed-off-by: Masami Hiramatsu (Google)
---
Changes in v2:
- Update poll command to support both
From: Masami Hiramatsu (Google)
Since POLLIN will not be flashed until read the hist file, user needs
to repeat read() and poll() on hist for monitoring the event
continuously. But the read() is somewhat redundant only for monitoring
events.
This add POLLPRI poll event on hist, this event
From: Masami Hiramatsu (Google)
Add poll syscall support on the `hist` file. The Waiter will be waken
up when the histogram is updated with POLLIN.
Currently, there is no way to wait for a specific event in userspace.
So user needs to peek the `trace` periodicaly, or wait on `trace_pipe`.
But
rived.
echo "process free event is comming"
tail $TRACEFS/trace
The 'poll' command is in the selftest patch.
You can take this series also from here;
https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git/log/?h=topic/event-hist-poll
Thank you,
---
Masam
From: Masami Hiramatsu (Google)
Add a testcase for poll() on hist file. This introduces a helper binary
to the ftracetest, because there is no good way to reliably execute
poll() on hist file.
Signed-off-by: Masami Hiramatsu (Google)
---
Changes in v2:
- Update poll command to support both
From: Masami Hiramatsu (Google)
Since POLLIN will not be flashed until read the hist file, user needs
to repeat read() and poll() on hist for monitoring the event
continuously. But the read() is somewhat redundant only for monitoring
events.
This add POLLPRI poll event on hist, this event
From: Masami Hiramatsu (Google)
Add poll syscall support on the `hist` file. The Waiter will be waken
up when the histogram is updated with POLLIN.
Currently, there is no way to wait for a specific event in userspace.
So user needs to peek the `trace` periodicaly, or wait on `trace_pipe`.
But
$EVENT/hist
# Event arrived.
echo "process free event is comming"
tail $TRACEFS/trace
The 'poll' command is in the selftest patch.
You can take this series also from here;
https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git/log/?h=topic/event-hist-poll
Thank y
From: Masami Hiramatsu (Google)
Add a testcase for poll() on hist file. This introduces a helper binary
to the ftracetest, because there is no good way to reliably execute
poll() on hist file.
Signed-off-by: Masami Hiramatsu (Google)
---
tools/testing/selftests/ftrace/Makefile
From: Masami Hiramatsu (Google)
Since POLLIN will not be flashed until read the hist file, user needs
to repeat read() and poll() on hist for monitoring the event
continuously. But the read() is somewhat redundant only for monitoring
events.
This add POLLPRI poll event on hist, this event
From: Masami Hiramatsu (Google)
Add poll syscall support on the `hist` file. The Waiter will be waken
up when the histogram is updated with POLLIN.
Currently, there is no way to wait for a specific event in userspace.
So user needs to peek the `trace` periodicaly, or wait on `trace_pipe`.
But
/kernel/git/mhiramat/linux.git/log/?h=topic/event-hist-poll
Thank you,
---
Masami Hiramatsu (Google) (3):
tracing/hist: Add poll(POLLIN) support on hist file
tracing/hist: Support POLLPRI event for poll on histogram
selftests/tracing: Add hist poll() support test
include/linux
From: Masami Hiramatsu (Google)
kprobe_args_{char,string}.tc are using available_filter_functions file
which is provided by function tracer. Thus if function tracer is disabled,
these tests are failed on recent kernels because tracefs_create_dir is
not raised events by adding a dynamic event
From: Masami Hiramatsu (Google)
Since test_duplicates.tc depends on syscalls/sys_enter_openat event,
it must add the event file to `requires`.
Without this fix, the test fails if CONFIG_FTRACE_SYSCALLS=n.
Fixes: 297e1dcdca3d ("selftests/ftrace: Add selftest for testing duplicate
eprobe
From: Masami Hiramatsu (Google)
Commit eb50d0f250e9 ("selftests/ftrace: Choose target function for filter
test from samples") choose the target function from samples, but sometimes
this test failes randomly because the target function does not hit at the
next time. So retry getting sam
Here is a couple of patches to fix issues related to runing environment
and kernel configuration.
Thank you,
---
Masami Hiramatsu (Google) (2):
selftests/tracing: Fix event filter test to retry up to 10 times
selftests/tracing: Fix to check the required syscall event
.../ftrace
From: Masami Hiramatsu (Google)
Add a basic uprobe testcase which checks whether add/remove/trace
operations works on /bin/sh.
Signed-off-by: Masami Hiramatsu (Google)
---
.../ftrace/test.d/dynevent/add_remove_uprobe.tc| 26
1 file changed, 26 insertions(+)
create
From: Masami Hiramatsu (Google)
Update required config options for running all tests.
This also sorts the config entries alphabetically.
Signed-off-by: Masami Hiramatsu (Google)
---
tools/testing/selftests/ftrace/config | 26 +++---
1 file changed, 19 insertions(+), 7
From: Masami Hiramatsu (Google)
The dynevent/test_duplicates.tc test case uses `syscalls/sys_enter_openat`
event for defining eprobe on it. Since this `syscalls` events depend on
CONFIG_FTRACE_SYSCALLS=y, if it is not set, the test will fail.
Add the event file to `required` line so that the
Here is a couple of patches to fix some issues related to kconfig.
I found these issues when I built the kernel with
tools/testing/selftests/ftrace/config.
Thank you,
---
Masami Hiramatsu (Google) (2):
selftests/ftrace: Fix to check required event file
selftests/ftrace: Update
From: Masami Hiramatsu (Google)
Since the VFS type argument test case uses fprobe events, it must
check the availablity of dynamic_events file and fprobe events syntax
in README. Without this fix, the test fails if CONFIG_FPROBE_EVENTS=n.
Fixes: ee97e5e135c6 ("selftests/ftrace: add fprobe
From: Masami Hiramatsu (Google)
Fix the below checkbashisms errors. Because of these errors, these tests
will fail on dash shell.
possible bashism in test.d/kprobe/kretprobe_entry_arg.tc line 14 ('function' is
useless):
function streq() {
possible bashism in test.d/dynevent/fprobe_en
From: Masami Hiramatsu (Google)
Since the dynevent/add_remove_btfarg.tc test case forgets to ensure that
fprobe is enabled for some structure field access tests which uses the
fprobe, it fails if CONFIG_FPROBE=n or CONFIG_FPROBE_EVENTS=n.
Fixes it to ensure the fprobe events are supported
Here is a couple of patches for fixing errors on ftracetest.
Shuah, can you pick these to your fixes branch? Or I also can push it.
Thank you,
---
Masami Hiramatsu (Google) (2):
selftests/ftrace: Fix BTFARG testcase to check fprobe is enabled correctly
selftests/ftrace: Fix
From: Masami Hiramatsu (Google)
Add a notes about the entry argument access at function exit probes for
kprobes and fprobe trace event.
Signed-off-by: Masami Hiramatsu (Google)
---
Changes in v3:
- Add usage example in fprobetrace.rst.
---
Documentation/trace/fprobetrace.rst | 31
From: Masami Hiramatsu (Google)
Add kretprobe and function exit probe test cases for checking whether
those can access entry arguments at function exit correctly.
Signed-off-by: Masami Hiramatsu (Google)
---
.../ftrace/test.d/dynevent/fprobe_entry_arg.tc | 18
From: Masami Hiramatsu (Google)
Support accessing $argN in the return probe events. This will help users to
record entry data in function return (exit) event for simplfing the function
entry/exit information in one event, and record the result values (e.g.
allocated object/initialized object) at
From: Masami Hiramatsu (Google)
Remove redundant #else block for BTF args from README message.
This is a cleanup, so no change on the message.
Signed-off-by: Masami Hiramatsu (Google)
Reviewed-by: Steven Rostedt (Google)
---
kernel/trace/trace.c |4 +---
1 file changed, 1 insertion(+), 3
From: Masami Hiramatsu (Google)
Instead of incrementing the trace_probe::nr_args, init it at
trace_probe_init(). Without this change, there is no way to get the number
of trace_probe arguments while parsing it.
This is a cleanup, so the behavior is not changed.
Signed-off-by: Masami Hiramatsu
From: Masami Hiramatsu (Google)
Cleanup traceprobe_parse_probe_arg_body() to split out the
type parser and post-processing part of fetch_insn.
This makes no functional change.
Signed-off-by: Masami Hiramatsu (Google)
Reviewed-by: Steven Rostedt (Google)
---
kernel/trace/trace_probe.c | 230
From: Masami Hiramatsu (Google)
Despite the fprobe event, "Kretprobe" was commented. So fix it.
Signed-off-by: Masami Hiramatsu (Google)
Reviewed-by: Steven Rostedt (Google)
---
kernel/trace/trace_fprobe.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ke
From: Masami Hiramatsu (Google)
Fix to allocate fprobe::entry_data_size buffer with rethook instances.
If fprobe doesn't allocate entry_data_size buffer for each rethook instance,
fprobe entry handler can cause a buffer overrun when storing entry data in
entry handler.
Link:
4/0x3d0 <- vfs_open) mode=0xa800d inode=0x888004ada8d8
So as you can see those fields are initialized at exit.
This series is based on v6.8-rc5 kernel or you can checkout from
https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git/log/?h=topic/entry-data
Thank you,
---
From: Masami Hiramatsu (Google)
Add a notes about the entry argument access at function exit probes for
kprobes and fprobe trace event.
Signed-off-by: Masami Hiramatsu (Google)
---
Documentation/trace/fprobetrace.rst |7 +++
Documentation/trace/kprobetrace.rst |7 +++
2 files
From: Masami Hiramatsu (Google)
Add kretprobe and function exit probe test cases for checking whether
those can access entry arguments at function exit correctly.
Signed-off-by: Masami Hiramatsu (Google)
---
.../ftrace/test.d/dynevent/fprobe_entry_arg.tc | 18
From: Masami Hiramatsu (Google)
Support accessing $argN in the return probe events. This will help users to
record entry data in function return (exit) event for simplfing the function
entry/exit information in one event, and record the result values (e.g.
allocated object/initialized object) at
From: Masami Hiramatsu (Google)
Remove redundant #else block for BTF args from README message.
This is a cleanup, so no change on the message.
Signed-off-by: Masami Hiramatsu (Google)
---
kernel/trace/trace.c |4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel
From: Masami Hiramatsu (Google)
Instead of incrementing the trace_probe::nr_args, init it at trace_probe_init().
This is a cleanup, so the behavior is not changed.
Signed-off-by: Masami Hiramatsu (Google)
---
kernel/trace/trace_eprobe.c |2 +-
kernel/trace/trace_probe.c | 10
From: Masami Hiramatsu (Google)
Cleanup traceprobe_parse_probe_arg_body() to split out the
type parser and post-processing part of fetch_insn.
This makes no functional change.
Signed-off-by: Masami Hiramatsu (Google)
---
kernel/trace/trace_probe.c | 230
From: Masami Hiramatsu (Google)
Despite the fprobe event, "Kretprobe" was commented. So fix it.
Signed-off-by: Masami Hiramatsu (Google)
---
kernel/trace/trace_fprobe.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_fprobe.c b/ke
. 1945.728263: vfs_open__exit:
(do_open+0x274/0x3d0 <- vfs_open) mode=0xa800d inode=0x888004ada8d8
So as you can see those fields are initialized at exit.
This series is based on v6.8-rc5 kernel or you can checkout from
https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git/lo
From: Masami Hiramatsu (Google)
Add a test case for probing on a symbol in a module without module name.
When probing on a symbol in a module, ftrace accepts both the syntax that
: and . Current test case only checks the former
syntax. This adds a test for the latter one.
Signed-off-by: Masami
From: Masami Hiramatsu (Google)
Fix to unmount the tracefs if the ftracetest mounted it for recovering
system environment. If the tracefs is already mounted, this does nothing.
Suggested-by: Mark Brown
Link:
https://lore.kernel.org/all/29fce076-746c-4650-8358-b4e0fa215...@sirena.org.uk/
Fixes
51 matches
Mail list logo