summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Pacheco <dap@joyent.com>2013-10-08 10:22:48 -0700
committerDave Pacheco <dap@joyent.com>2013-10-08 10:22:48 -0700
commit0c3e53c3a25115a415f4ee6f6d02e7a0a285a676 (patch)
tree2aadcf4a2699c6137d4ec141bbbcf54fbb8c25b7
parent04a9960a653c8abe7af77dbc9762d64e36c37c73 (diff)
downloadillumos-joyent-0c3e53c3a25115a415f4ee6f6d02e7a0a285a676.tar.gz
4159 dtrace ignores all ustack helper frames from dead processes
Reviewed by: Bryan Cantrill <bryan@joyent.com> Reviewed by: Robert Mustacchi <rm@joyent.com>
-rw-r--r--usr/src/lib/libdtrace/common/dt_consume.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/src/lib/libdtrace/common/dt_consume.c b/usr/src/lib/libdtrace/common/dt_consume.c
index b1e8d2daa4..d33a8c9ba4 100644
--- a/usr/src/lib/libdtrace/common/dt_consume.c
+++ b/usr/src/lib/libdtrace/common/dt_consume.c
@@ -1078,8 +1078,8 @@ dt_print_ustack(dtrace_hdl_t *dtp, FILE *fp, const char *format,
"%s`%s", dt_basename(objname), name);
}
} else if (str != NULL && str[0] != '\0' && str[0] != '@' &&
- (P != NULL && ((map = Paddr_to_map(P, pc[i])) == NULL ||
- (map->pr_mflags & MA_WRITE)))) {
+ (P == NULL || (map = Paddr_to_map(P, pc[i])) == NULL ||
+ map->pr_mflags & MA_WRITE)) {
/*
* If the current string pointer in the string table
* does not point to an empty string _and_ the program
@@ -1091,7 +1091,10 @@ dt_print_ustack(dtrace_hdl_t *dtp, FILE *fp, const char *format,
* identify. If we have a string for a program
* counter that falls in a segment that isn't
* writable, we assume that we have fallen into this
- * case and we refuse to use the string.
+ * case and we refuse to use the string. Finally,
+ * note that if we could not grab the process (e.g.,
+ * because it exited), the information from the helper
+ * is better than nothing.
*/
(void) snprintf(c, sizeof (c), "%s", str);
} else {