Permalink
Browse files

kernel - Add v_token_name to gd_cnt

* Copy the tok->t_desc field into the gd_cnt.v_token_name buffer
  when a token collides so systat -pv 1 can pick it up.
  • Loading branch information...
1 parent c68b535 commit 173423b5b625915b119ed063ba3c32a5b2c1e458 Matthew Dillon committed Sep 24, 2012
Showing with 6 additions and 5 deletions.
  1. +4 −0 sys/kern/lwkt_token.c
  2. +2 −5 sys/sys/vmmeter.h
View
@@ -468,6 +468,10 @@ lwkt_getalltokens(thread_t td, int spinning)
* Otherwise we failed to acquire all the tokens.
* Release whatever we did get.
*/
+ strncpy(td->td_gd->gd_cnt.v_token_name,
+ tok->t_desc,
+ sizeof(td->td_gd->gd_cnt.v_token_name) - 1);
+
if (lwkt_sched_debug > 0) {
--lwkt_sched_debug;
kprintf("toka %p %s %s\n",
View
@@ -102,11 +102,8 @@ struct vmmeter {
u_int v_waitsys; /* calls to waitsys() */
u_int v_smpinvltlb; /* nasty global invltlbs */
u_int v_ppwakeups; /* wakeups on processes stalled on VM */
- u_int v_token_colls;
- u_int v_reserved2;
- u_int v_reserved3;
- u_int v_reserved4;
- u_int v_reserved5;
+ u_int v_token_colls; /* # of token collisions */
+ char v_token_name[16]; /* last-colliding token name */
u_int v_reserved6;
u_int v_reserved7;
#define vmmeter_uint_end v_reserved7

0 comments on commit 173423b

Please sign in to comment.