summaryrefslogtreecommitdiff
path: root/usr/src/cmd/latencytop/common/dwrapper.c
diff options
context:
space:
mode:
authorKrishnendu Sadhukhan - Sun Microsystems <Krishnendu.Sadhukhan@Sun.COM>2009-10-26 22:25:39 -0700
committerKrishnendu Sadhukhan - Sun Microsystems <Krishnendu.Sadhukhan@Sun.COM>2009-10-26 22:25:39 -0700
commit1a1f79f5a554655d51ccfdc74953bc86dc99d174 (patch)
treef4df3fe6c994c5ad62531864175a9da28471e14c /usr/src/cmd/latencytop/common/dwrapper.c
parentfa30e7bddfac4c97c0f5c9fda279fd4e6e9a9cac (diff)
downloadillumos-joyent-1a1f79f5a554655d51ccfdc74953bc86dc99d174.tar.gz
6893075 LatencyTOP hits "dtrace deadman" problem when -t > 30 sec
6889369 LatencyTOP drops data when run on a heavily-loaded and large-memoried system Portions contributed by Lejun Zhu <lejun.zhu@intel.com>
Diffstat (limited to 'usr/src/cmd/latencytop/common/dwrapper.c')
-rw-r--r--usr/src/cmd/latencytop/common/dwrapper.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr/src/cmd/latencytop/common/dwrapper.c b/usr/src/cmd/latencytop/common/dwrapper.c
index d1920e5500..f634065e38 100644
--- a/usr/src/cmd/latencytop/common/dwrapper.c
+++ b/usr/src/cmd/latencytop/common/dwrapper.c
@@ -359,6 +359,7 @@ static int
drop_handler(const dtrace_dropdata_t *data, void *user)
{
lt_display_error("Drop: %s\n", data->dtdda_msg);
+ lt_drop_detected = B_TRUE;
/* Pretend nothing happened, so just continue */
return (DTRACE_HANDLE_OK);
@@ -565,9 +566,18 @@ lt_dtrace_collect(void)
/*
* dtrace clean up.
*/
-void
+int
lt_dtrace_deinit(void)
{
- (void) dtrace_stop(g_dtp);
+ int ret = 0;
+
+ if (dtrace_stop(g_dtp) != 0) {
+ lt_display_error("dtrace_stop failed: %s\n",
+ dtrace_errmsg(g_dtp, dtrace_errno(g_dtp)));
+ ret = -1;
+ }
+
dtrace_close(g_dtp);
+
+ return (ret);
}