History log of /linux-6.15/tools/testing/selftests/ftrace/test.d/functions (Results 1 – 25 of 29)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4
# 4a3134b1 20-Feb-2025 Steven Rostedt <[email protected]>

selftests/tracing: Test only toplevel README file not the instances

For the tests that have both a README attribute as well as the instance
flag to run the tests as an instance, the instance version

selftests/tracing: Test only toplevel README file not the instances

For the tests that have both a README attribute as well as the instance
flag to run the tests as an instance, the instance version will always
exit with UNSUPPORTED. That's because the instance directory does not
contain a README file. Currently, the tests check for a README file in the
directory that the test runs in and if there's a requirement for something
to be present in the README file, it will not find it, as the instance
directory doesn't have it.

Have the tests check if the current directory is an instance directory,
and if it is, check two directories above the current directory for the
README file:

/sys/kernel/tracing/README
/sys/kernel/tracing/instances/foo/../../README

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>

show more ...


Revision tags: v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6
# 8b55572e 30-Oct-2024 Kalesh Singh <[email protected]>

tracing/selftests: Add tracefs mount options test

Add a selftest to check that the tracefs gid mount option is applied
correctly.

./ftracetest test.d/00basic/mount_options.tc

Use the new readme

tracing/selftests: Add tracefs mount options test

Add a selftest to check that the tracefs gid mount option is applied
correctly.

./ftracetest test.d/00basic/mount_options.tc

Use the new readme string "[gid=<gid>] as a requirement and also update
test_ownership.tc requirements to use this.

Cc: Eric Sandeen <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Ali Zahraee <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: David Howells <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Kalesh Singh <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>

show more ...


Revision tags: v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3
# 4aa4d4de 28-Oct-2022 Naveen N. Rao <[email protected]>

selftests/ftrace: Add check for ping command for trigger tests

All these tests depend on the ping command and will fail if it is not
found. Allow tests to specify dependencies on programs through th

selftests/ftrace: Add check for ping command for trigger tests

All these tests depend on the ping command and will fail if it is not
found. Allow tests to specify dependencies on programs through the
'requires' field. Add dependency on 'ping' for some of the trigger
tests.

Link: https://lore.kernel.org/all/[email protected]/
Reported-by: Akanksha J N <[email protected]>
Acked-by: Masami Hiramatsu (Google) <[email protected]>
Suggested-by: Steven Rostedt (Google) <[email protected]>
Reviewed-by: Steven Rostedt (Google) <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>

show more ...


Revision tags: v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15
# 25b95138 26-Oct-2021 Masami Hiramatsu <[email protected]>

selftests/ftrace: Stop tracing while reading the trace file by default

Stop tracing while reading the trace file by default, to prevent
the test results while checking it and to avoid taking a long

selftests/ftrace: Stop tracing while reading the trace file by default

Stop tracing while reading the trace file by default, to prevent
the test results while checking it and to avoid taking a long time
to check the result.
If there is any testcase which wants to test the tracing while reading
the trace file, please override this setting inside the test case.

This also recovers the pause-on-trace when clean it up.

Link: https://lkml.kernel.org/r/163529053143.690749.15365238954175942026.stgit@devnote2

Signed-off-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


Revision tags: v5.15-rc7, v5.15-rc6, v5.15-rc5, v5.15-rc4, v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7
# 210f9df0 20-Aug-2021 Steven Rostedt (VMware) <[email protected]>

selftests/ftrace: Fix requirement check of README file

The selftest for ftrace checks some features by checking if the README has
text that states the feature is supported by that kernel. Unfortunat

selftests/ftrace: Fix requirement check of README file

The selftest for ftrace checks some features by checking if the README has
text that states the feature is supported by that kernel. Unfortunately,
this check gives false positives because it many not be checked if there's
spaces in the string to check. This is due to the compare between the
required variable with the ":README" string stripped, because neither has
quotes around them.

Link: https://lkml.kernel.org/r/[email protected]

Cc: "Tzvetomir Stoyanov" <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: [email protected]
Cc: [email protected]
Fixes: 1b8eec510ba64 ("selftests/ftrace: Support ":README" suffix for requires")
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


# aaac2820 19-Aug-2021 Steven Rostedt (VMware) <[email protected]>

selftests/ftrace: Add clear_dynamic_events() to test cases

Add a function to remove all dynamic events from the tracing directory. It
requires a loop as some of the dynamic events may depend on othe

selftests/ftrace: Add clear_dynamic_events() to test cases

Add a function to remove all dynamic events from the tracing directory. It
requires a loop as some of the dynamic events may depend on others being
removed first. Also add a safety that prevents it from looping infinitely
due to a bug where an event never gets removed.

Link: https://lkml.kernel.org/r/[email protected]

Cc: "Tzvetomir Stoyanov" <[email protected]>
Cc: Tom Zanussi <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: [email protected]
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


Revision tags: v5.14-rc6, v5.14-rc5, v5.14-rc4, v5.14-rc3, v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12, v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse, v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5, v5.10-rc4, v5.10-rc3, v5.10-rc2
# dc6bf4da 26-Oct-2020 Steven Rostedt (VMware) <[email protected]>

selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function

Commit cad6967ac108 ("fork: introduce kernel_clone()") replaced "_do_fork()"
with "kernel_clone()". The ftrace selftests refere

selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function

Commit cad6967ac108 ("fork: introduce kernel_clone()") replaced "_do_fork()"
with "kernel_clone()". The ftrace selftests reference the fork function in
several of the tests. The rename will make the tests break, but if those
names are changed in the tests, they would then break on older kernels. The
same set of tests should pass older kernels if they have previously passed.
Obviously, a new test may not work on older kernels if the test was added
due to a bug or a new feature.

The setup of ftracetest will now create a $FUNCTION_FORK bash variable
that will contain "_do_fork" for older kernels and "kernel_clone" for newer
ones. It figures out the proper name by examining /proc/kallsyms.

Note, available_filter_functions could also be used, but because some tests
should be able to pass without function tracing enabled, it could not be
used.

Fixes: eea11285dab3 ("tracing: switch to kernel_clone()")
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>

show more ...


Revision tags: v5.10-rc1, v5.9, v5.9-rc8, v5.9-rc7, v5.9-rc6, v5.9-rc5, v5.9-rc4, v5.9-rc3, v5.9-rc2, v5.9-rc1, v5.8, v5.8-rc7, v5.8-rc6, v5.8-rc5, v5.8-rc4, v5.8-rc3, v5.8-rc2, v5.8-rc1
# 1b8eec51 03-Jun-2020 Masami Hiramatsu <[email protected]>

selftests/ftrace: Support ":README" suffix for requires

Add ":README" suffix support for the requires list, so that
the testcase can list up the required string for README file
to the requires list.

selftests/ftrace: Support ":README" suffix for requires

Add ":README" suffix support for the requires list, so that
the testcase can list up the required string for README file
to the requires list.

Note that the required string is treated as a fixed string,
instead of regular expression. Also, the testcase can specify
a string containing spaces with quotes. E.g.

# requires: "place: [<module>:]<symbol>":README

Signed-off-by: Masami Hiramatsu <[email protected]>
Reviewed-by: Tom Zanussi <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>

show more ...


# 305c8388 03-Jun-2020 Masami Hiramatsu <[email protected]>

selftests/ftrace: Support ":tracer" suffix for requires

Add ":tracer" suffix support for the requires list, so that
the testcase can list up the required tracer (e.g. function)
to the requires list.

selftests/ftrace: Support ":tracer" suffix for requires

Add ":tracer" suffix support for the requires list, so that
the testcase can list up the required tracer (e.g. function)
to the requires list.

For example, if the testcase requires function_graph tracer,
it can write requires list as below instead of checking
available_tracers.

# requires: function_graph:tracer

Signed-off-by: Masami Hiramatsu <[email protected]>
Reviewed-by: Tom Zanussi <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>

show more ...


# 74e60728 03-Jun-2020 Masami Hiramatsu <[email protected]>

selftests/ftrace: Convert check_filter_file() with requires list

Since check_filter_file() is basically checking the filter
tracefs file, we can convert it into requires list.

Signed-off-by: Masami

selftests/ftrace: Convert check_filter_file() with requires list

Since check_filter_file() is basically checking the filter
tracefs file, we can convert it into requires list.

Signed-off-by: Masami Hiramatsu <[email protected]>
Reviewed-by: Tom Zanussi <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>

show more ...


# fa33e623 03-Jun-2020 Masami Hiramatsu <[email protected]>

selftests/ftrace: Add "requires:" list support

Introduce "requires:" list to check required ftrace interface
for each test. This will simplify the interface checking code
and unify the error message

selftests/ftrace: Add "requires:" list support

Introduce "requires:" list to check required ftrace interface
for each test. This will simplify the interface checking code
and unify the error message. Another good point is, it can
skip the ftrace initializing.

Note that this requires list must be written as a shell
comment.

Signed-off-by: Masami Hiramatsu <[email protected]>
Reviewed-by: Tom Zanussi <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>

show more ...


Revision tags: v5.7, v5.7-rc7, v5.7-rc6
# 8e923a21 11-May-2020 Masami Hiramatsu <[email protected]>

selftests/ftrace: Use printf for backslash included command

Since the built-in echo has different behavior in POSIX shell
(dash) and bash, kprobe_syntax_errors.tc can fail on dash which
interpret ba

selftests/ftrace: Use printf for backslash included command

Since the built-in echo has different behavior in POSIX shell
(dash) and bash, kprobe_syntax_errors.tc can fail on dash which
interpret backslash escape automatically.

To fix this issue, we explicitly use printf "%s" (not interpret
backslash escapes) if the command string can include backslash.

Reported-by: Liu Yiding <[email protected]>
Suggested-by: Xiao Yang <[email protected]>
Signed-off-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>

show more ...


Revision tags: v5.7-rc5, v5.7-rc4, v5.7-rc3
# 16bcd0f5 22-Apr-2020 Xiao Yang <[email protected]>

selftests/ftrace: Check required filter files before running test

Without CONFIG_DYNAMIC_FTRACE, some tests get failure because required
filter files(set_ftrace_filter/available_filter_functions/sta

selftests/ftrace: Check required filter files before running test

Without CONFIG_DYNAMIC_FTRACE, some tests get failure because required
filter files(set_ftrace_filter/available_filter_functions/stack_trace_filter)
are missing. So implement check_filter_file() and make all related tests
check required filter files by it.

BTW: set_ftrace_filter and available_filter_functions are introduced together
so just check either of them.

Signed-off-by: Xiao Yang <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>

show more ...


Revision tags: v5.7-rc2, v5.7-rc1, v5.6, v5.6-rc7, v5.6-rc6, v5.6-rc5, v5.6-rc4, v5.6-rc3, v5.6-rc2, v5.6-rc1, v5.5, v5.5-rc7, v5.5-rc6, v5.5-rc5, v5.5-rc4, v5.5-rc3, v5.5-rc2, v5.5-rc1
# fd1baf6c 26-Nov-2019 Masami Hiramatsu <[email protected]>

selftests/ftrace: Fix to check the existence of set_ftrace_filter

If we run ftracetest on the kernel with CONFIG_DYNAMIC_FTRACE=n,
there is no set_ftrace_filter and all test cases are failed, becaus

selftests/ftrace: Fix to check the existence of set_ftrace_filter

If we run ftracetest on the kernel with CONFIG_DYNAMIC_FTRACE=n,
there is no set_ftrace_filter and all test cases are failed, because
reset_ftrace_filter() returns an error.
Let's check whether set_ftrace_filter exists in reset_ftrace_filter()
and clean up only set_ftrace_notrace in initialize_ftrace().

Signed-off-by: Masami Hiramatsu <[email protected]>
Reviewed-by: Steven Rostedt (VMware) <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>

show more ...


Revision tags: v5.4, v5.4-rc8, v5.4-rc7, v5.4-rc6, v5.4-rc5, v5.4-rc4, v5.4-rc3, v5.4-rc2, v5.4-rc1, v5.3, v5.3-rc8, v5.3-rc7, v5.3-rc6, v5.3-rc5, v5.3-rc4, v5.3-rc3, v5.3-rc2, v5.3-rc1, v5.2, v5.2-rc7, v5.2-rc6
# 7f5291da 19-Jun-2019 Masami Hiramatsu <[email protected]>

selftests/ftrace: Add syntax error test for multiprobe

Add syntax error test cases for multiprobe appending
errors.

Link: http://lkml.kernel.org/r/156095694541.28024.11918630805148623119.stgit@devn

selftests/ftrace: Add syntax error test for multiprobe

Add syntax error test cases for multiprobe appending
errors.

Link: http://lkml.kernel.org/r/156095694541.28024.11918630805148623119.stgit@devnote2

Signed-off-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


# 6e55f320 03-Jul-2019 Steven Rostedt (VMware) <[email protected]>

ftrace/selftest: Test if set_event/ftrace_pid exists before writing

While testing on a very old kernel (3.5), the tests failed because the write
to set_event_pid in the setup code, did not exist. Th

ftrace/selftest: Test if set_event/ftrace_pid exists before writing

While testing on a very old kernel (3.5), the tests failed because the write
to set_event_pid in the setup code, did not exist. The tests themselves
could pass, but the setup failed causing an error.

Other files test for existance before writing to them. Do the same for
set_event_pid and set_ftrace_pid.

Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


Revision tags: v5.2-rc5, v5.2-rc4, v5.2-rc3, v5.2-rc2, v5.2-rc1, v5.1, v5.1-rc7, v5.1-rc6, v5.1-rc5, v5.1-rc4
# c5e4114f 31-Mar-2019 Tom Zanussi <[email protected]>

selftests/ftrace: Move kprobe/uprobe check_error() to test.d/functions

The k/uprobe_sytax_errors test case defines a check_error() function
used to run a command and check the position of the caret

selftests/ftrace: Move kprobe/uprobe check_error() to test.d/functions

The k/uprobe_sytax_errors test case defines a check_error() function
used to run a command and check the position of the caret in the
output.

This would be useful for other ftrace facilities too, so move it to
test.d/functions for use by anyone. In the process, rename it to
ftrace_errlog_check() and parametrize it for general use.

Link: http://lkml.kernel.org/r/9f88080a06f1755811f69081926afe7e5cb53178.1554072478.git.tom.zanussi@linux.intel.com

Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Tom Zanussi <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


Revision tags: v5.1-rc3, v5.1-rc2, v5.1-rc1, v5.0, v5.0-rc8, v5.0-rc7, v5.0-rc6, v5.0-rc5, v5.0-rc4, v5.0-rc3, v5.0-rc2, v5.0-rc1, v4.20, v4.20-rc7, v4.20-rc6, v4.20-rc5, v4.20-rc4, v4.20-rc3, v4.20-rc2, v4.20-rc1, v4.19, v4.19-rc8, v4.19-rc7, v4.19-rc6, v4.19-rc5, v4.19-rc4, v4.19-rc3, v4.19-rc2
# cec3adf5 30-Aug-2018 Masami Hiramatsu <[email protected]>

selftests/ftrace: Use loopback address instead of localhost

Use raw loopback address instead of localhost, because
"localhost" can depend on nsswitch and in some case
we can not resolve the localhos

selftests/ftrace: Use loopback address instead of localhost

Use raw loopback address instead of localhost, because
"localhost" can depend on nsswitch and in some case
we can not resolve the localhost.

Signed-off-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Shuah Khan (Samsung OSG) <[email protected]>

show more ...


# 7590472e 30-Aug-2018 Masami Hiramatsu <[email protected]>

selftests/ftrace: More initialize features in initialize_ftrace

Clear pid filter, synthetic_events, snapshots,
ftrace filter, and trace log in initialize_ftrace(),
since those are used in test cases

selftests/ftrace: More initialize features in initialize_ftrace

Clear pid filter, synthetic_events, snapshots,
ftrace filter, and trace log in initialize_ftrace(),
since those are used in test cases.

Signed-off-by: Masami Hiramatsu <[email protected]>
Acked-by: Steven Rostedt (VMware) <[email protected]>
Signed-off-by: Shuah Khan (Samsung OSG) <[email protected]>

show more ...


Revision tags: v4.19-rc1, v4.18, v4.18-rc8, v4.18-rc7, v4.18-rc6, v4.18-rc5, v4.18-rc4, v4.18-rc3, v4.18-rc2, v4.18-rc1, v4.17, v4.17-rc7, v4.17-rc6
# 922a418d 14-May-2018 Steven Rostedt (VMware) <[email protected]>

ftrace/selftest: Fix reset_trigger() to handle triggers with filters

The reset_trigger() function breaks up the command by a space ' '. This is
useful to ignore the '[active]' word for triggers when

ftrace/selftest: Fix reset_trigger() to handle triggers with filters

The reset_trigger() function breaks up the command by a space ' '. This is
useful to ignore the '[active]' word for triggers when removing them. But if
the trigger has a filter (ie. "if prio < 10") then the filter needs to be
attached to the line that is written into the trigger file to remove it. But
the truncation removes the filter and the triggers are not cleared properly.

Before, reset_trigger() did this:

# echo 'hist:keys=common_pid if prev_prio < 10' > events/sched/sched_switch/trigger
# echo 'hist:keys=common_pid if next_prio < 10' >> events/sched/sched_switch/trigger
# cat events/sched/sched_switch/trigger
hist:keys=common_pid:vals=hitcount:sort=hitcount:size=2048 if prev_prio < 10 [active]
hist:keys=common_pid:vals=hitcount:sort=hitcount:size=2048 if next_prio < 10 [active]

reset_trigger() {
echo '!hist:keys=common_pid:vals=hitcount:sort=hitcount:size=2048' >> events/sched/sched_switch/trigger
}

# cat events/sched/sched_switch/trigger
hist:keys=common_pid:vals=hitcount:sort=hitcount:size=2048 if prev_prio < 10 [active]
hist:keys=common_pid:vals=hitcount:sort=hitcount:size=2048 if next_prio < 10 [active]

After, where it includes the filter:

reset_trigger() {
echo '!hist:keys=common_pid:vals=hitcount:sort=hitcount:size=2048 if prev_prio < 10' >> events/sched/sched_switch/trigger
}

# cat events/sched/sched_switch/trigger
hist:keys=common_pid:vals=hitcount:sort=hitcount:size=2048 if next_prio < 10 [active]

Fixes: cfa0963dc474f ("kselftests/ftrace : Add event trigger testcases")
Acked-by: Masami Hiramatsu <[email protected]>
Reviewed-by: Namhyung Kim <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


# 756b56a9 14-May-2018 Steven Rostedt (VMware) <[email protected]>

ftrace/selftest: Have the reset_trigger code be a bit more careful

The trigger code is picky in how it can be disabled as there may be
dependencies between different events and synthetic events. Cha

ftrace/selftest: Have the reset_trigger code be a bit more careful

The trigger code is picky in how it can be disabled as there may be
dependencies between different events and synthetic events. Change the order
on how triggers are reset.

1) Reset triggers of all synthetic events first
2) Remove triggers with actions attached to them
3) Remove all other triggers

If this order isn't followed, then some triggers will not be reset, and an
error may happen because a trigger is busy.

Cc: [email protected]
Fixes: cfa0963dc474f ("kselftests/ftrace : Add event trigger testcases")
Reviewed-by: Namhyung Kim <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


Revision tags: v4.17-rc5, v4.17-rc4, v4.17-rc3, v4.17-rc2, v4.17-rc1, v4.16, v4.16-rc7, v4.16-rc6, v4.16-rc5, v4.16-rc4, v4.16-rc3, v4.16-rc2, v4.16-rc1, v4.15, v4.15-rc9
# f06eec4d 16-Jan-2018 Rajvi Jingar <[email protected]>

selftests: ftrace: Add inter-event hist triggers testcases

This adds inter-event hist triggers testcases which covers following:
- create/remove synthetic event
- disable histogram for

selftests: ftrace: Add inter-event hist triggers testcases

This adds inter-event hist triggers testcases which covers following:
- create/remove synthetic event
- disable histogram for synthetic event
- extended error support
- field variable support
- histogram variables
- histogram trigger onmatch action
- histogram trigger onmax action
- histogram trigger onmatch-onmax action
- simple expression support
- combined histogram

Here is the test result.
=== Ftrace unit tests ===
[1] event trigger - test extended error support [PASS]
[2] event trigger - test field variable support [PASS]
[3] event trigger - test inter-event combined histogram trigger [PASS]
[4] event trigger - test inter-event histogram trigger onmatch action [PASS]
[5] event trigger - test inter-event histogram trigger onmatch-onmax action [PASS]
[6] event trigger - test inter-event histogram trigger onmax action [PASS]
[7] event trigger - test synthetic event create remove [PASS]

Link: http://lkml.kernel.org/r/e07ef1e72f7bf0f84dc87c9b736d6dc91b4b0b49.1516069914.git.tom.zanussi@linux.intel.com

Signed-off-by: Rajvi Jingar <[email protected]>
Signed-off-by: Tom Zanussi <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


# 0787ce33 06-Feb-2018 Steven Rostedt (VMware) <[email protected]>

selftests/ftrace: Have reset_ftrace_filter handle multiple instances

If a probe is attached to a static function that is in multiple files with
the same name, removing it by name will remove all ins

selftests/ftrace: Have reset_ftrace_filter handle multiple instances

If a probe is attached to a static function that is in multiple files with
the same name, removing it by name will remove all instances:

# grep jump_label_unlock set_ftrace_filter
jump_label_unlock:traceoff:unlimited
jump_label_unlock:traceoff:unlimited

# echo '!jump_label_unlock:traceoff' >> set_ftrace_filter
# grep jump_label_unlock set_ftrace_filter
#

But the loop in reset_ftrace_filter will try to remove multiple instances
multiple times. If this happens the second time will error and cause the
test to fail.

At each iteration of the loop, check to see if the probe being removed still
exists.

Cc: Shuah Khan <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


# df9d36d9 06-Feb-2018 Steven Rostedt (VMware) <[email protected]>

selftests/ftrace: Have reset_ftrace_filter handle modules

If a function probe in set_ftrace_filter belongs to a module, it will
contain the module name. Like:

wmi_query_block [wmi]:traceoff:unlimi

selftests/ftrace: Have reset_ftrace_filter handle modules

If a function probe in set_ftrace_filter belongs to a module, it will
contain the module name. Like:

wmi_query_block [wmi]:traceoff:unlimited

But writing:

'!wmi_query_block [wmi]:traceoff' > set_ftrace_filter

will cause an error. We still need to write:

'!wmi_query_block:traceoff' > set_ftrace_filter

Cc: Shuah Khan <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


Revision tags: v4.15-rc8, v4.15-rc7, v4.15-rc6, v4.15-rc5, v4.15-rc4, v4.15-rc3, v4.15-rc2, v4.15-rc1, v4.14, v4.14-rc8, v4.14-rc7, v4.14-rc6, v4.14-rc5, v4.14-rc4, v4.14-rc3, v4.14-rc2, v4.14-rc1, v4.13, v4.13-rc7, v4.13-rc6, v4.13-rc5, v4.13-rc4, v4.13-rc3, v4.13-rc2, v4.13-rc1, v4.12, v4.12-rc7, v4.12-rc6, v4.12-rc5, v4.12-rc4, v4.12-rc3, v4.12-rc2
# d2ffb8d3 16-May-2017 Naveen N. Rao <[email protected]>

selftests/ftrace: Fix bashisms

Fix a few bashisms in ftrace selftests.

Link: http://lkml.kernel.org/r/5fbf4613eef0766918fa04e3ff537cae271223ee.1494956770.git.naveen.n.rao@linux.vnet.ibm.com

Acked-

selftests/ftrace: Fix bashisms

Fix a few bashisms in ftrace selftests.

Link: http://lkml.kernel.org/r/5fbf4613eef0766918fa04e3ff537cae271223ee.1494956770.git.naveen.n.rao@linux.vnet.ibm.com

Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Naveen N. Rao <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>

show more ...


12