diff options
author | Josh Stone <jistone@redhat.com> | 2010-03-16 11:11:26 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2010-03-16 11:11:26 -0700 |
commit | c72aa911bf91607626427dac0e00ea0c751a22ba (patch) | |
tree | d100a4d0f02e3ca1f54f4b06b75936174c3ee65e /elaborate.cxx | |
parent | 513f3caec840862f2bc10d4f830ba81c28e7cda9 (diff) | |
download | systemtap-steved-c72aa911bf91607626427dac0e00ea0c751a22ba.tar.gz systemtap-steved-c72aa911bf91607626427dac0e00ea0c751a22ba.tar.xz systemtap-steved-c72aa911bf91607626427dac0e00ea0c751a22ba.zip |
PR10831: Remember derived "aliases" in the probe chain
SDT and label probes are not really final probe types themselves, but
rather they get translated into some other final type. This patch
preserves this relationship as if SDT and label probes were dynamically
generated aliases.
* elaborate.cxx (probe::create_alias): New, fake an alias_derived_probe.
* tapsets.cxx (query_label): Append the label name as an alias.
(sdt_query::handle_query_module): Let convert_location do the alias.
(sdt_query::convert_location): Translate the location using an alias.
* main.cxx (printscript): Elaborate the derivation debug dump.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r-- | elaborate.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/elaborate.cxx b/elaborate.cxx index 11d6142b..3a0e6dd9 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -517,6 +517,19 @@ private: const probe_alias *alias; // Used to check for recursion }; +probe* +probe::create_alias(probe_point* l, probe_point* a) +{ + vector<probe_point*> aliases(1, a); + probe_alias* p = new probe_alias(aliases); + p->tok = tok; + p->locations.push_back(l); + p->body = body; + p->privileged = privileged; + p->epilogue_style = false; + return new alias_derived_probe(this, l, p); +} + struct alias_expansion_builder |