]> sourceware.org Git - systemtap.git/commitdiff
translator: in -u (unoptimized) mode, don't merge identical probe handler bodies
authorFrank Ch. Eigler <fche@redhat.com>
Sun, 17 Aug 2014 14:50:52 +0000 (10:50 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Sun, 17 Aug 2014 15:06:25 +0000 (11:06 -0400)
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

index e49caff43b5d7376f2abaeb9a961ef21ffd7c0fe..658ddf8ce81db6988152e38af0186bcfcbe8575d 100644 (file)
@@ -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()];
 
This page took 0.034115 seconds and 5 git commands to generate.