diff options
author | Wenji Huang <wenji.huang@oracle.com> | 2009-03-09 08:17:27 -0400 |
---|---|---|
committer | Wenji Huang <wenji.huang@oracle.com> | 2009-03-10 21:01:06 -0400 |
commit | e2086848b3b1e010249f68857ec10d6b9382446e (patch) | |
tree | 15b93360494f47795416cf017a76516fe7da1dcb /tapsets.cxx | |
parent | f400d6e427cb7494d072ad124e7996925015bdf4 (diff) | |
download | systemtap-steved-e2086848b3b1e010249f68857ec10d6b9382446e.tar.gz systemtap-steved-e2086848b3b1e010249f68857ec10d6b9382446e.tar.xz systemtap-steved-e2086848b3b1e010249f68857ec10d6b9382446e.zip |
Make tracepoint probe support listing mode -L
This patch is to enable displaying arguments of tracepoint
probe in listing mode -L. The example output is like
$stap -L 'kernel.trace("block_bio*")'
kernel.trace("block_bio_bounce") $q:struct request_queue* $bio:struct bio*
kernel.trace("block_bio_backmerge") $q:struct request_queue* $bio:struct bio*
kernel.trace("block_bio_complete") $q:struct request_queue* $bio:struct bio*
kernel.trace("block_bio_queue") $q:struct request_queue* $bio:struct bio*
kernel.trace("block_bio_frontmerge") $q:struct request_queue* $bio:struct bio*
Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index b66dd123..71a9a768 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -9217,6 +9217,7 @@ struct tracepoint_derived_probe: public derived_probe vector <struct tracepoint_arg> args; void build_args(dwflpp& dw, Dwarf_Die& func_die); + void printargs (std::ostream &o) const; void join_group (systemtap_session& s); void emit_probe_context_vars (translator_output* o); }; @@ -9665,6 +9666,12 @@ tracepoint_derived_probe::build_args(dwflpp& dw, Dwarf_Die& func_die) while (dwarf_siblingof(&arg, &arg) == 0); } +void +tracepoint_derived_probe::printargs(std::ostream &o) const +{ + for (unsigned i = 0; i < args.size(); ++i) + o << " $" << args[i].name << ":" << args[i].c_type; +} void tracepoint_derived_probe::join_group (systemtap_session& s) |