.. | .. |
---|
1 | 1 | #!/bin/sh |
---|
2 | 2 | # SPDX-License-Identifier: GPL-2.0 |
---|
3 | 3 | # description: ftrace - function profiler with function tracing |
---|
| 4 | +# requires: function_profile_enabled set_ftrace_filter function_graph:tracer |
---|
4 | 5 | |
---|
5 | 6 | # There was a bug after a rewrite of the ftrace infrastructure that |
---|
6 | 7 | # caused the function_profiler not to be able to run with the function |
---|
.. | .. |
---|
13 | 14 | # This test triggers those bugs on those kernels. |
---|
14 | 15 | # |
---|
15 | 16 | # We need function_graph and profiling to to run this test |
---|
16 | | -if ! grep -q function_graph available_tracers; then |
---|
17 | | - echo "no function graph tracer configured" |
---|
18 | | - exit_unsupported; |
---|
19 | | -fi |
---|
20 | | - |
---|
21 | | -if [ ! -f set_ftrace_filter ]; then |
---|
22 | | - echo "set_ftrace_filter not found? Is dynamic ftrace not set?" |
---|
23 | | - exit_unsupported |
---|
24 | | -fi |
---|
25 | | - |
---|
26 | | -if [ ! -f function_profile_enabled ]; then |
---|
27 | | - echo "function_profile_enabled not found, function profiling enabled?" |
---|
28 | | - exit_unsupported |
---|
29 | | -fi |
---|
30 | 17 | |
---|
31 | 18 | fail() { # mesg |
---|
32 | | - reset_tracer |
---|
33 | | - echo > set_ftrace_filter |
---|
34 | 19 | echo $1 |
---|
35 | 20 | exit_fail |
---|
36 | 21 | } |
---|
.. | .. |
---|
75 | 60 | cat trace |
---|
76 | 61 | fail "no other functions besides schedule was found" |
---|
77 | 62 | fi |
---|
78 | | - |
---|
79 | | -reset_tracer |
---|
80 | 63 | |
---|
81 | 64 | exit 0 |
---|