Print this page
OS-5223 removed shm segment is no longer available
Reviewed by: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mdb/common/modules/ipc/ipc.c
          +++ new/usr/src/cmd/mdb/common/modules/ipc/ipc.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + * Copyright 2016 Joyent, Inc.
  24   25   */
  25   26  
  26   27  #include <mdb/mdb_modapi.h>
  27   28  #include <mdb/mdb_ks.h>
  28   29  
  29   30  #include <sys/types.h>
  30   31  #include <sys/mman.h>
  31   32  #include <sys/project.h>
  32   33  #include <sys/ipc_impl.h>
  33   34  #include <sys/shm_impl.h>
↓ open down ↓ 188 lines elided ↑ open up ↑
 222  223          mdb_printf("%10#lx %?p %5u %7d %7d %7lu %7lu\n",
 223  224              shmid->shm_segsz, shmid->shm_amp, shmid->shm_lkcnt,
 224  225              (int)shmid->shm_lpid, (int)shmid->shm_cpid, nattch,
 225  226              shmid->shm_ismattch);
 226  227  
 227  228          printtime_nice("atime: ", shmid->shm_atime);
 228  229          printtime_nice("dtime: ", shmid->shm_dtime);
 229  230          printtime_nice("ctime: ", shmid->shm_ctime);
 230  231          mdb_printf("sptinfo: %-?p    sptseg: %-?p\n",
 231  232              shmid->shm_sptinfo, shmid->shm_sptseg);
 232      -        mdb_printf("sptprot: <%lb>\n", shmid->shm_sptprot, prot_flag_bits);
      233 +        mdb_printf("opts: rmpend: %d prot: <%b>\n",
      234 +            ((shmid->shm_opts & SHM_RM_PENDING) != 0),
      235 +            (shmid->shm_opts & SHM_PROT_MASK), prot_flag_bits);
 233  236  }
 234  237  
 235  238  
 236  239  /*ARGSUSED1*/
 237  240  static void
 238  241  sem_print(ksemid_t *semid, uintptr_t addr)
 239  242  {
 240  243          mdb_printf("base: %-?p    nsems: 0t%u\n",
 241  244              semid->sem_base, semid->sem_nsems);
 242  245          printtime_nice("otime: ", semid->sem_otime);
↓ open down ↓ 500 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX