Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
@@ -19,11 +19,11 @@
* CDDL HEADER END
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2017 Joyent, Inc.
+ * Copyright (c) 2018, Joyent, Inc.
* Copyright (c) 2013 by Delphix. All rights reserved.
*/
#include <mdb/mdb_param.h>
#include <mdb/mdb_modapi.h>
@@ -162,13 +162,18 @@
};
if (prt_flags & PS_PRTTHREADS)
mdb_printf("\tT %?a <%b>\n", addr, t->t_state, t_state_bits);
- if (prt_flags & PS_PRTLWPS)
- mdb_printf("\tL %?a ID: %u\n", t->t_lwp, t->t_tid);
+ if (prt_flags & PS_PRTLWPS) {
+ char desc[128] = "";
+ (void) thread_getdesc(addr, B_FALSE, desc, sizeof (desc));
+
+ mdb_printf("\tL %?a ID: %s\n", t->t_lwp, desc);
+ }
+
return (WALK_NEXT);
}
typedef struct mdb_pflags_proc {
struct pid *p_pidp;