Skip to content

Commit

Permalink
3501 mdb: ::thread -d needs the SWITCH column
Browse files Browse the repository at this point in the history
Reviewed by: David Höppner <[email protected]>
Reviewed by: Richard Lowe <[email protected]>
Approved by: Richard Lowe <[email protected]>
  • Loading branch information
mtelka authored and richlowe committed Feb 19, 2013
1 parent 870e339 commit 9583f71
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions usr/src/cmd/mdb/common/modules/genunix/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*/


#include <mdb/mdb_modapi.h>
#include <mdb/mdb_ks.h>
#include <sys/types.h>
#include <sys/thread.h>
#include <sys/lwp.h>
Expand Down Expand Up @@ -466,8 +470,8 @@ thread(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)

if (oflags & TF_DISP) {
SPACER();
mdb_printf("%<u> %?s %5s %2s%</u>",
"DISPTIME", "BOUND", "PR");
mdb_printf("%<u> %?s %5s %2s %-6s%</u>",
"DISPTIME", "BOUND", "PR", "SWITCH");
}
mdb_printf("\n");
}
Expand Down Expand Up @@ -523,8 +527,13 @@ thread(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
/* dispatcher stuff */
if (oflags & TF_DISP) {
SPACER();
mdb_printf(" %?lx %5d %2d",
mdb_printf(" %?lx %5d %2d ",
t.t_disp_time, t.t_bind_cpu, t.t_preempt);
if (t.t_disp_time != 0)
mdb_printf("t-%-4d",
(clock_t)mdb_get_lbolt() - t.t_disp_time);
else
mdb_printf("%-6s", "-");
}

mdb_printf("\n");
Expand Down

0 comments on commit 9583f71

Please sign in to comment.