From f76427a2bf80e4451e5e8d0c26b06aca65e4e2c4 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Wed, 10 Sep 2008 17:21:44 -0400 Subject: PR6876: translator speedup for many $vars --- main.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'main.cxx') diff --git a/main.cxx b/main.cxx index 5d0739eb..634feb03 100644 --- a/main.cxx +++ b/main.cxx @@ -147,6 +147,8 @@ printscript(systemtap_session& s, ostream& o) for (unsigned i=0; ibasest() is not so interesting; // p->almost_basest() doesn't quite work, so ... @@ -198,6 +200,7 @@ printscript(systemtap_session& s, ostream& o) o << "# global embedded code" << endl; for (unsigned i=0; iprint (o); o << endl; @@ -207,6 +210,7 @@ printscript(systemtap_session& s, ostream& o) o << "# globals" << endl; for (unsigned i=0; iprintsig (o); if (s.verbose && v->init) @@ -219,9 +223,10 @@ printscript(systemtap_session& s, ostream& o) if (s.functions.size() > 0) o << "# functions" << endl; - for (unsigned i=0; i::iterator it = s.functions.begin(); it != s.functions.end(); it++) { - functiondecl* f = s.functions[i]; + if (pending_interrupts) return; + functiondecl* f = it->second; f->printsig (o); o << endl; if (f->locals.size() > 0) @@ -244,6 +249,7 @@ printscript(systemtap_session& s, ostream& o) o << "# probes" << endl; for (unsigned i=0; iprintsig (o); o << endl; -- cgit From 223f5b6b6e2c945c442a5dde7e63e637237f575b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 10 Sep 2008 18:30:45 -0700 Subject: Ensure that "stap -l ..." only prints probe names, not variables. --- main.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'main.cxx') diff --git a/main.cxx b/main.cxx index 634feb03..563e4b01 100644 --- a/main.cxx +++ b/main.cxx @@ -182,14 +182,15 @@ printscript(systemtap_session& s, ostream& o) if (seen.find (pp) == seen.end()) { o << pp; - // This list will be empty unless s.unoptimized = true -- i.e., -L mode - for (unsigned j=0; jlocals.size(); j++) - { - o << " "; - vardecl* v = p->locals[j]; - v->printsig (o); - } - o << endl; + // Print the locals for -L mode only + if (s.unoptimized) + for (unsigned j=0; jlocals.size(); j++) + { + o << " "; + vardecl* v = p->locals[j]; + v->printsig (o); + } + o << endl; seen.insert (pp); } } -- cgit