Print this page
6583 remove whole-process swapping

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mdb/common/modules/genunix/kmem.c
          +++ new/usr/src/cmd/mdb/common/modules/genunix/kmem.c
↓ open down ↓ 4314 lines elided ↑ open up ↑
4315 4315  
4316 4316  static int
4317 4317  whatthread_walk_thread(uintptr_t addr, const kthread_t *t, whatthread_t *w)
4318 4318  {
4319 4319          uintptr_t current, data;
4320 4320  
4321 4321          if (t->t_stkbase == NULL)
4322 4322                  return (WALK_NEXT);
4323 4323  
4324 4324          /*
4325      -         * Warn about swapped out threads, but drive on anyway
4326      -         */
4327      -        if (!(t->t_schedflag & TS_LOAD)) {
4328      -                mdb_warn("thread %p's stack swapped out\n", addr);
4329      -                return (WALK_NEXT);
4330      -        }
4331      -
4332      -        /*
4333 4325           * Search the thread's stack for the given pointer.  Note that it would
4334 4326           * be more efficient to follow ::kgrep's lead and read in page-sized
4335 4327           * chunks, but this routine is already fast and simple.
4336 4328           */
4337 4329          for (current = (uintptr_t)t->t_stkbase; current < (uintptr_t)t->t_stk;
4338 4330              current += sizeof (uintptr_t)) {
4339 4331                  if (mdb_vread(&data, sizeof (data), current) == -1) {
4340 4332                          mdb_warn("couldn't read thread %p's stack at %p",
4341 4333                              addr, current);
4342 4334                          return (WALK_ERR);
↓ open down ↓ 39 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX