mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
b70100f2e6
- kprobes: use struct_size() for variable size kretprobe_instance data structure. - eprobe: Simplify trace_eprobe list iteration. - probe events: Data structure field access support on BTF argument. . Update BTF argument support on the functions in the kernel loadable modules (only loaded modules are supported). . Move generic BTF access function (search function prototype and get function parameters) to a separated file. . Add a function to search a member of data structure in BTF. . Support accessing BTF data structure member from probe args by C-like arrow('->') and dot('.') operators. e.g. 't sched_switch next=next->pid vruntime=next->se.vruntime' . Support accessing BTF data structure member from $retval. e.g. 'f getname_flags%return +0($retval->name):string' . Add string type checking if BTF type info is available. This will reject if user specify ":string" type for non "char pointer" type. . Automatically assume the fprobe event as a function return event if $retval is used. - selftests/ftrace: Add BTF data field access test cases. - Documentation: Update fprobe event example with BTF data field. -----BEGIN PGP SIGNATURE----- iQFPBAABCgA5FiEEh7BulGwFlgAOi5DV2/sHvwUrPxsFAmTycQkbHG1hc2FtaS5o aXJhbWF0c3VAZ21haWwuY29tAAoJENv7B78FKz8bqS8H/jeR1JhOzIXOvTw7XCFm MrSY/SKi8tQfV6lau2UmoYdbYvYjpqL34XLOQPNf2/lrcL2M9aNYXk9fbhlW8enx vkMyKQ0E5anixkF4vsTbEl9DaprxbpsPVACmZ/7VjQk2JuXIdyaNk8hno9LgIcEq udztb0o2HmDFqAXfRi0LvlSTAIwvXZ+usmEvYpaq1g2WwrCe7NHEYl42vMpj+h4H 9l4t5rA9JyPPX4yQUjtKGW5eRVTwDTm/Gn6DRzYfYzkkiBZv27qfovzBOt672LgG hyot+u7XeKvZx3jjnF7+mRWoH/m0dqyhyi/nPhpIE09VhgwclrbGAcDuR1x6sp01 PHY= =hBDN -----END PGP SIGNATURE----- Merge tag 'probes-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probes updates from Masami Hiramatsu: - kprobes: use struct_size() for variable size kretprobe_instance data structure. - eprobe: Simplify trace_eprobe list iteration. - probe events: Data structure field access support on BTF argument. - Update BTF argument support on the functions in the kernel loadable modules (only loaded modules are supported). - Move generic BTF access function (search function prototype and get function parameters) to a separated file. - Add a function to search a member of data structure in BTF. - Support accessing BTF data structure member from probe args by C-like arrow('->') and dot('.') operators. e.g. 't sched_switch next=next->pid vruntime=next->se.vruntime' - Support accessing BTF data structure member from $retval. e.g. 'f getname_flags%return +0($retval->name):string' - Add string type checking if BTF type info is available. This will reject if user specify ":string" type for non "char pointer" type. - Automatically assume the fprobe event as a function return event if $retval is used. - selftests/ftrace: Add BTF data field access test cases. - Documentation: Update fprobe event example with BTF data field. * tag 'probes-v6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: Documentation: tracing: Update fprobe event example with BTF field selftests/ftrace: Add BTF fields access testcases tracing/fprobe-event: Assume fprobe is a return event by $retval tracing/probes: Add string type check with BTF tracing/probes: Support BTF field access from $retval tracing/probes: Support BTF based data structure field access tracing/probes: Add a function to search a member of a struct/union tracing/probes: Move finding func-proto API and getting func-param API to trace_btf tracing/probes: Support BTF argument on module functions tracing/eprobe: Iterate trace_eprobe directly kernel: kprobes: Use struct_size() |
||
---|---|---|
.. | ||
samples | ||
test.d | ||
.gitignore | ||
config | ||
ftracetest | ||
ftracetest-ktap | ||
Makefile | ||
README | ||
settings |
Linux Ftrace Testcases This is a collection of testcases for ftrace tracing feature in the Linux kernel. Since ftrace exports interfaces via the debugfs, we just need shell scripts for testing. Feel free to add new test cases. Running the ftrace testcases ============================ At first, you need to be the root user to run this script. To run all testcases: $ sudo ./ftracetest To run specific testcases: # ./ftracetest test.d/basic3.tc Or you can also run testcases under given directory: # ./ftracetest test.d/kprobe/ Contributing new testcases ========================== Copy test.d/template to your testcase (whose filename must have *.tc extension) and rewrite the test description line. * The working directory of the script is <debugfs>/tracing/. * Take care with side effects as the tests are run with root privilege. * The tests should not run for a long period of time (more than 1 min.) These are to be unit tests. * You can add a directory for your testcases under test.d/ if needed. * The test cases should run on dash (busybox shell) for testing on minimal cross-build environments. * Note that the tests are run with "set -e" (errexit) option. If any command fails, the test will be terminated immediately. * The tests can return some result codes instead of pass or fail by using exit_unresolved, exit_untested, exit_unsupported and exit_xfail. Result code =========== Ftracetest supports following result codes. * PASS: The test succeeded as expected. The test which exits with 0 is counted as passed test. * FAIL: The test failed, but was expected to succeed. The test which exits with !0 is counted as failed test. * UNRESOLVED: The test produced unclear or intermidiate results. for example, the test was interrupted or the test depends on a previous test, which failed. or the test was set up incorrectly The test which is in above situation, must call exit_unresolved. * UNTESTED: The test was not run, currently just a placeholder. In this case, the test must call exit_untested. * UNSUPPORTED: The test failed because of lack of feature. In this case, the test must call exit_unsupported. * XFAIL: The test failed, and was expected to fail. To return XFAIL, call exit_xfail from the test. There are some sample test scripts for result code under samples/. You can also run samples as below: # ./ftracetest samples/ TODO ==== * Fancy colored output :)