mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 09:30:53 +07:00
495d714ad1
- Rework of the kprobe/uprobe and synthetic events to consolidate all the dynamic event code. This will make changes in the future easier. - Partial rewrite of the function graph tracing infrastructure. This will allow for multiple users of hooking onto functions to get the callback (return) of the function. This is the ground work for having kprobes and function graph tracer using one code base. - Clean up of the histogram code that will facilitate adding more features to the histograms in the future. - Addition of str_has_prefix() and a few use cases. There currently is a similar function strstart() that is used in a few places, but only returns a bool and not a length. These instances will be removed in the future to use str_has_prefix() instead. - A few other various clean ups as well. -----BEGIN PGP SIGNATURE----- iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCXCawlBQccm9zdGVkdEBn b29kbWlzLm9yZwAKCRAp5XQQmuv6qhbcAQCFeT0fWWTUxofBQz5jqsHaRnVg21+9 X4sTldYRYEn4YgEAmWOyiwq7zvrsAu4ZwkNBMeqxn3tVymYHiGOGe3Y4BAw= =u96o -----END PGP SIGNATURE----- Merge tag 'trace-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: - Rework of the kprobe/uprobe and synthetic events to consolidate all the dynamic event code. This will make changes in the future easier. - Partial rewrite of the function graph tracing infrastructure. This will allow for multiple users of hooking onto functions to get the callback (return) of the function. This is the ground work for having kprobes and function graph tracer using one code base. - Clean up of the histogram code that will facilitate adding more features to the histograms in the future. - Addition of str_has_prefix() and a few use cases. There currently is a similar function strstart() that is used in a few places, but only returns a bool and not a length. These instances will be removed in the future to use str_has_prefix() instead. - A few other various clean ups as well. * tag 'trace-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (57 commits) tracing: Use the return of str_has_prefix() to remove open coded numbers tracing: Have the historgram use the result of str_has_prefix() for len of prefix tracing: Use str_has_prefix() instead of using fixed sizes tracing: Use str_has_prefix() helper for histogram code string.h: Add str_has_prefix() helper function tracing: Make function ‘ftrace_exports’ static tracing: Simplify printf'ing in seq_print_sym tracing: Avoid -Wformat-nonliteral warning tracing: Merge seq_print_sym_short() and seq_print_sym_offset() tracing: Add hist trigger comments for variable-related fields tracing: Remove hist trigger synth_var_refs tracing: Use hist trigger's var_ref array to destroy var_refs tracing: Remove open-coding of hist trigger var_ref management tracing: Use var_refs[] for hist trigger reference checking tracing: Change strlen to sizeof for hist trigger static strings tracing: Remove unnecessary hist trigger struct field tracing: Fix ftrace_graph_get_ret_stack() to use task and not current seq_buf: Use size_t for len in seq_buf_puts() seq_buf: Make seq_buf_puts() null-terminate the buffer arm64: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack ... |
||
---|---|---|
.. | ||
samples | ||
test.d | ||
.gitignore | ||
config | ||
ftracetest | ||
Makefile | ||
README |
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 :)