Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/native/sun/management/VMManagementImpl.c
          +++ new/src/share/native/sun/management/VMManagementImpl.c
   1    1  /*
   2      - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
        2 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
   3    3   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4    4   *
   5    5   * This code is free software; you can redistribute it and/or modify it
   6    6   * under the terms of the GNU General Public License version 2 only, as
   7    7   * published by the Free Software Foundation.  Oracle designates this
   8    8   * particular file as subject to the "Classpath" exception as provided
   9    9   * by Oracle in the LICENSE file that accompanied this code.
  10   10   *
  11   11   * This code is distributed in the hope that it will be useful, but WITHOUT
  12   12   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
↓ open down ↓ 4 lines elided ↑ open up ↑
  17   17   * You should have received a copy of the GNU General Public License version
  18   18   * 2 along with this work; if not, write to the Free Software Foundation,
  19   19   * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20   20   *
  21   21   * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22   22   * or visit www.oracle.com if you need additional information or have any
  23   23   * questions.
  24   24   */
  25   25  
  26   26  #include <jni.h>
       27 +#include <stdlib.h>
  27   28  #include "jvm.h"
  28   29  #include "management.h"
  29   30  #include "sun_management_VMManagementImpl.h"
  30   31  
  31   32  #define MAX_VERSION_LEN   20
  32   33  
  33   34  JNIEXPORT jstring JNICALL
  34   35  Java_sun_management_VMManagementImpl_getVersion0
  35   36    (JNIEnv *env, jclass dummy)
  36   37  {
↓ open down ↓ 52 lines elided ↑ open up ↑
  89   90          value = mos.isSynchronizerUsageSupported;
  90   91          setStaticBooleanField(env, cls, "synchronizerUsageSupport", value);
  91   92      } else {
  92   93          setStaticBooleanField(env, cls, "objectMonitorUsageSupport", JNI_FALSE);
  93   94          setStaticBooleanField(env, cls, "synchronizerUsageSupport", JNI_FALSE);
  94   95      }
  95   96  
  96   97      value = mos.isThreadAllocatedMemorySupported;
  97   98      setStaticBooleanField(env, cls, "threadAllocatedMemorySupport", value);
  98   99  
      100 +    value = mos.isRemoteDiagnosticCommandsSupported;
      101 +    setStaticBooleanField(env, cls, "remoteDiagnosticCommandsSupport", value);
      102 +
  99  103      if ((jmm_version > JMM_VERSION_1_2) ||
 100  104          (jmm_version == JMM_VERSION_1_2 && ((jmm_version&0xFF) >= 1))) {
 101  105          setStaticBooleanField(env, cls, "gcNotificationSupport", JNI_TRUE);
 102  106      } else {
 103  107          setStaticBooleanField(env, cls, "gcNotificationSupport", JNI_FALSE);
 104  108      }
 105  109  }
 106  110  
 107  111  JNIEXPORT jobjectArray JNICALL
 108  112  Java_sun_management_VMManagementImpl_getVmArguments0
↓ open down ↓ 215 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX