From 179ff0f38649c814fcf077804f89641d48c498fb Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Sun, 17 Aug 2014 10:50:52 -0400 Subject: [PATCH] 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. --- translate.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()]; -- 2.43.5