From: Frank Ch. Eigler Date: Sun, 17 Aug 2014 14:50:52 +0000 (-0400) Subject: translator: in -u (unoptimized) mode, don't merge identical probe handler bodies X-Git-Tag: release-2.6~36 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=179ff0f38649c814fcf077804f89641d48c498fb;p=systemtap.git translator: in -u (unoptimized) mode, don't merge identical probe handler bodies Normal optimized mode can make it difficult to see which stap probe was being invoked for which C probe handler body, as identical probe handlers are reused. This is inconvenient if one just has a kernel crash backtrace to start from from. * translate.cxx (emit_common_header, emit_probe): In -u mode, eschew duplicate probe handler body elision. --- diff --git a/translate.cxx b/translate.cxx index e49caff43..658ddf8ce 100644 --- a/translate.cxx +++ b/translate.cxx @@ -960,7 +960,7 @@ c_unparser::emit_common_header () // That's because they're only dependent on the probe body, which is already // "hashed" in above. - if (tmp_probe_contents.count(oss.str()) == 0) // unique + if (session->unoptimized || tmp_probe_contents.count(oss.str()) == 0) // unique { tmp_probe_contents[oss.str()] = dp->name; // save it @@ -2480,7 +2480,7 @@ c_unparser::emit_probe (derived_probe* v) // If an identical probe has already been emitted, just call that // one. - if (probe_contents.count(oss.str()) != 0) + if (!session->unoptimized && probe_contents.count(oss.str()) != 0) { string dupe = probe_contents[oss.str()];