From c72aa911bf91607626427dac0e00ea0c751a22ba Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 16 Mar 2010 11:11:26 -0700 Subject: 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. --- main.cxx | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'main.cxx') diff --git a/main.cxx b/main.cxx index 93fd6bfe..c3769bae 100644 --- a/main.cxx +++ b/main.cxx @@ -198,10 +198,31 @@ printscript(systemtap_session& s, ostream& o) p->collect_derivation_chain (chain); probe* second = (chain.size()>1) ? chain[chain.size()-2] : chain[0]; - #if 0 - cerr << "\tchain[" << chain.size() << "]:" << endl; - for (unsigned i=0; iprintsig(cerr); cerr << endl; } + #if 0 // dump everything about the derivation chain + p->printsig(cerr); cerr << endl; + cerr << "chain[" << chain.size() << "]:" << endl; + for (unsigned j=0; jlocations.size() << "]:" << endl; + for (unsigned k=0; klocations.size(); k++) + { + cerr << "\t [" << k << "]: "; + chain[j]->locations[k]->print(cerr); + cerr << endl; + } + const probe_alias *a = chain[j]->get_alias(); + if (a) + { + cerr << "\taliases[" << a->alias_names.size() << "]:" << endl; + for (unsigned k=0; kalias_names.size(); k++) + { + cerr << "\t [" << k << "]: "; + a->alias_names[k]->print(cerr); + cerr << endl; + } + } + } #endif stringstream tmps; -- cgit