summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2009-12-15 22:10:13 -0500
committerStan Cox <scox@redhat.com>2009-12-15 22:10:13 -0500
commit39a3e39706a18dbf3698b52fc1cc7532d94078e8 (patch)
treefa0ce64db361bfa9fe4a51137b8dbc95878959dc
parentde187584bc552c81851542e7011d9da65c74576f (diff)
downloadsystemtap-steved-39a3e39706a18dbf3698b52fc1cc7532d94078e8.tar.gz
systemtap-steved-39a3e39706a18dbf3698b52fc1cc7532d94078e8.tar.xz
systemtap-steved-39a3e39706a18dbf3698b52fc1cc7532d94078e8.zip
Fix handling of multiple sdt uprobes with the same name.
tapsets.cxx (sdt_query::handle_query_module): Improve trace handling. (sdt_query::convert_location): Create new component instead of reusing old.
-rw-r--r--tapsets.cxx26
1 files changed, 18 insertions, 8 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 555a6587..cf6f97ef 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -3711,6 +3711,22 @@ sdt_query::handle_query_module()
&& !probes_handled.insert(probe_name).second)
continue;
+ if (sess.verbose > 3)
+ {
+ clog << "matched probe_name " << probe_name << " probe_type ";
+ switch (probe_type)
+ {
+ case uprobe_type:
+ clog << "uprobe at 0x" << hex << probe_arg << dec << endl;
+ break;
+ case kprobe_type:
+ clog << "kprobe" << endl;
+ break;
+ case utrace_type:
+ clog << "utrace" << endl;
+ break;
+ }
+ }
probe *new_base = new probe(*base_probe);
probe_point *new_location = new probe_point(*base_loc);
convert_location(new_base, new_location);
@@ -3873,12 +3889,7 @@ sdt_query::get_next_probe()
if ((mark_name == probe_name)
|| (dw.name_has_wildcard (mark_name)
&& dw.function_name_matches_pattern (probe_name, mark_name)))
- {
- if (sess.verbose > 3)
- clog << "found probe_name" << probe_name << " at 0x"
- << hex << probe_arg << dec << endl;
- return true;
- }
+ return true;
else
continue;
}
@@ -4016,8 +4027,7 @@ sdt_query::convert_location (probe *base, probe_point *location)
clog << "probe_type == uprobe_type, use statement addr: 0x"
<< hex << probe_arg << dec << endl;
// process("executable").statement(probe_arg)
- location->components[i]->functor = TOK_STATEMENT;
- location->components[i]->arg = new literal_number(probe_arg);
+ location->components[i] = new probe_point::component(TOK_STATEMENT, new literal_number(probe_arg));
break;
case kprobe_type: