trace-cmd list: Add --proto option to show fuction prototype
PATCH v2 1/1 trace-cmd list: Add --proto option to show fuction prototype
From: "Steven Rostedt (Google)" <[email protected]>
If BTF is available and the user adds --proto to the command line, the function list (-f) will include the prototypes of the functions.
Signed-off-by Steven Rostedt (Google) <[email protected]>
---
Changes since v1: https://lore.kernel.org/[email protected]
- Have it still build with libtraceevent 1.8 (no BTF)
Documentation/trace-cmd/trace-cmd-list.1.txt | 7 ++ tracecmd/trace-cmd.bash | 2 +- tracecmd/trace-list.c | 94 +++++++++++++++++++- tracecmd/trace-usage.c | 1 + 4 files changed, 99 insertions(+), 5 deletions(-)
Documentation/trace-cmd/trace-cmd-list.1.txt +7 -0
@@ -58,6 +58,13 @@ OPTIONS trace-cmd list -f '^sched.*' + If *--proto* is also added to the command line, the functions will also have + show their prototypes if BTF is available. + +*--proto*:: + If BTF is available on the running kernel, it will also show the function + parameters with *-f*. + *-P*:: List the plugin files that get loaded on trace-cmd report.
tracecmd/trace-cmd.bash +1 -1
@@ -108,7 +108,7 @@ __trace_cmd_list_complete() case "$prev" in list) local cmds=$(trace-cmd list -h |egrep "^ {10}-" | \ - sed -e 's/.*\(-.\).*/\1/') + sed -e 's/^ *\(-[^ ]*\).*/\1/') COMPREPLY=( $(compgen -W "${cmds}" -- "${cur}") ) ;; -e)
tracecmd/trace-list.c +90 -4
142 lines not on this page · raw message
tracecmd/trace-usage.c +1 -0
@@ -391,6 +391,7 @@ static struct usage_help usage_help[] = {" -B list defined buffer instances\n" " -C list the defined clocks (and active one)\n" " -c list the supported trace file compression algorithms\n" +" --proto list the prototype of a function (if BTF is available)\n" }, { "restore",
Signature · 1 line
2.51.0