]> sourceware.org Git - systemtap.git/commitdiff
unwind diagnostic improvements
authorFrank Ch. Eigler <fche@redhat.com>
Sat, 12 Dec 2015 16:01:02 +0000 (11:01 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Sat, 12 Dec 2015 16:01:02 +0000 (11:01 -0500)
Add a heuristic for missing kernel unwindsyms to the runtime.
Tweak documentation to spell out --ldd is for userspace only.

Reported by: Nikolay Borisov <n.borisov@siteground.com>

man/stap.1
runtime/unwind.c
session.cxx

index 42612aa51f2316a5ad8950e24933835b2f29b478..3d3a0db60ea4156efe23a1160cca7df83973ee06 100644 (file)
@@ -237,10 +237,11 @@ module.  This may enable symbolic tracebacks from those modules/programs,
 even if they do not have an explicit probe placed into them.
 .TP
 .BI \-\-ldd
-Add symbol/unwind information for all shared libraries suspected by
-ldd to be necessary for user-space binaries being probe or listed with
+Add symbol/unwind information for all user-space shared libraries suspected
+by ldd to be necessary for user-space binaries being probe or listed with
 the \-d option.  Caution: this can make the probe modules considerably
-larger.
+larger.  Note that this option does not deal with kernel-space modules:
+see instead \-\-all\-modules below.
 .TP
 .BI \-\-all\-modules
 Equivalent to specifying "\-dkernel" and a "\-d" for each kernel module that is
@@ -575,7 +576,7 @@ Dumps a list of all functions found in library files and exits. Also includes
 their parameters and types. A function of type 'unknown' indicates a function
 that does not return a value. Note that not all function/parameter types may be
 resolved (these are also shown by 'unknown'). This features is very
-memory-intensive and thus may not work properly with \fI--use-server\fR if the
+memory-intensive and thus may not work properly with \fI\-\-use-server\fR if the
 target server imposes an rlimit on process memory (i.e. through the
 \fI~stap-server/.systemtap/rc\fR configuration file, see \fIstap-server\fR(8)).
 
@@ -598,7 +599,7 @@ libvirt. Optionally, LIBVIRT_URI may be specified to connect to a specific
 driver and/or a remote host. For example, to connect to the local privileged
 QEMU driver, use:
 .SAMPLE
---remote libvirt://MyDomain/qemu:///system
+\-\-remote libvirt://MyDomain/qemu:///system
 .ESAMPLE
 See the page at
 .nh
index b5c8f6f8c8d945eaf2129eb105f755fbb52c6cb7..874fc670913476f893d508e93e84493b8d2b58ba 100644 (file)
@@ -1507,10 +1507,13 @@ static int unwind(struct unwind_context *context, int user)
           }
 
        if (unlikely(m == NULL)) {
-                if (module_name)
-                        _stp_warn ("Missing unwind data for module, rerun with 'stap -d %s'\n",
-                                   module_name);
-               // Don't _stp_warn about this, will use fallback unwinder.
+                // some heuristics for the module name; we can't call
+                // kernel_text_address or friends from this context.
+                if (! module_name && (unsigned long)pc > PAGE_OFFSET)
+                        module_name = "kernel";
+                _stp_warn ("Missing unwind data for a module, rerun with 'stap -d %s'\n",
+                           module_name ?: "(unknown; retry witn -DDEBUG_UNWIND)");
+               // Don't _stp_warn including the pc#, since it'll defeat warning deduplicator
                dbug_unwind(1, "No module found for pc=%lx", pc);
                return -EINVAL;
        }
index 0fff59c43bf7ad66108da3e59f1efea1a55283bf..55e5760efc680d63f972291c984c2e4b237e7d2d 100644 (file)
@@ -589,7 +589,7 @@ systemtap_session::usage (int exitcode)
       cout << "              " << syms[i].c_str() << endl;
   }
   cout
-    << _F("   --ldd      add unwind/symbol data for all referenced object files.\n"
+    << _F("   --ldd      add unwind/symbol data for referenced user-space objects.\n"
     "   --all-modules\n"
     "              add unwind/symbol data for all loaded kernel objects.\n"
     "   -t         collect probe timing information\n"
This page took 0.093652 seconds and 5 git commands to generate.