Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/javavm/export/jmm.h
          +++ new/src/share/javavm/export/jmm.h
   1    1  /*
   2      - * Copyright (c) 2003, 2012, 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 ↓ 29 lines elided ↑ open up ↑
  42   42  #ifdef __cplusplus
  43   43  extern "C" {
  44   44  #endif
  45   45  
  46   46  enum {
  47   47    JMM_VERSION_1   = 0x20010000,
  48   48    JMM_VERSION_1_0 = 0x20010000,
  49   49    JMM_VERSION_1_1 = 0x20010100, // JDK 6
  50   50    JMM_VERSION_1_2 = 0x20010200, // JDK 7
  51   51    JMM_VERSION_1_2_1 = 0x20010201, // JDK 7 GA
  52      -  JMM_VERSION     = 0x20010202
       52 +  JMM_VERSION_1_2_2 = 0x20010202,
       53 +  JMM_VERSION     = 0x20010203
  53   54  };
  54   55  
  55   56  typedef struct {
  56   57    unsigned int isLowMemoryDetectionSupported : 1;
  57   58    unsigned int isCompilationTimeMonitoringSupported : 1;
  58   59    unsigned int isThreadContentionMonitoringSupported : 1;
  59   60    unsigned int isCurrentThreadCpuTimeSupported : 1;
  60   61    unsigned int isOtherThreadCpuTimeSupported : 1;
  61   62    unsigned int isBootClassPathSupported : 1;
  62   63    unsigned int isObjectMonitorUsageSupported : 1;
  63   64    unsigned int isSynchronizerUsageSupported : 1;
  64   65    unsigned int isThreadAllocatedMemorySupported : 1;
  65      -  unsigned int : 23;
       66 +  unsigned int isRemoteDiagnosticCommandsSupported : 1;
       67 +  unsigned int : 22;
  66   68  } jmmOptionalSupport;
  67   69  
  68   70  typedef enum {
  69   71    JMM_CLASS_LOADED_COUNT             = 1,    /* Total number of loaded classes */
  70   72    JMM_CLASS_UNLOADED_COUNT           = 2,    /* Total number of unloaded classes */
  71   73    JMM_THREAD_TOTAL_COUNT             = 3,    /* Total number of threads that have been started */
  72   74    JMM_THREAD_LIVE_COUNT              = 4,    /* Current number of live threads */
  73   75    JMM_THREAD_PEAK_COUNT              = 5,    /* Peak number of live threads */
  74   76    JMM_THREAD_DAEMON_COUNT            = 6,    /* Current number of daemon threads */
  75   77    JMM_JVM_INIT_DONE_TIME_MS          = 7,    /* Time when the JVM finished initialization */
↓ open down ↓ 107 lines elided ↑ open up ↑
 183  185    jlong        end_time;                       /* End time of the GC */
 184  186    jobjectArray usage_before_gc;                /* Memory usage array before GC */
 185  187    jobjectArray usage_after_gc;                 /* Memory usage array after GC */
 186  188    jint         gc_ext_attribute_values_size;   /* set by the caller of GetGCStat */
 187  189    jvalue*      gc_ext_attribute_values;        /* Array of jvalue for GC extension attributes */
 188  190    jint         num_gc_ext_attributes;          /* number of GC extension attribute values s are filled */
 189  191                                                 /* -1 indicates gc_ext_attribute_values is not big enough */
 190  192  } jmmGCStat;
 191  193  
 192  194  typedef struct {
 193      -  const char* name;
 194      -  const char* description;
 195      -  const char* impact;
 196      -  int         num_arguments;
 197      -  jboolean    enabled;
      195 +  const char* name;                /* Name of the diagnostic command */
      196 +  const char* description;         /* Short description */
      197 +  const char* impact;              /* Impact on the JVM */
      198 +  const char* permission_class;    /* Class name of the required permission if any */
      199 +  const char* permission_name;     /* Permission name of the required permission if any */
      200 +  const char* permission_action;   /* Action name of the required permission if any*/
      201 +  int         num_arguments;       /* Number of supported options or arguments */
      202 +  jboolean    enabled;             /* True if the diagnostic command can be invoked, false otherwise*/
      203 +  
 198  204  } dcmdInfo;
 199  205  
 200  206  typedef struct {
 201      -  const char* name;
 202      -  const char* description;
 203      -  const char* type;
 204      -  const char* default_string;
 205      -  jboolean    mandatory;
 206      -  jboolean    option;
 207      -  int         position;
      207 +  const char* name;                /* Option/Argument name*/
      208 +  const char* description;         /* Short description */
      209 +  const char* type;                /* Type: STRING, BOOLEAN, etc. */
      210 +  const char* default_string;      /* Default value in a parsable string */
      211 +  jboolean    mandatory;           /* True if the option/argument is mandatory */
      212 +  jboolean    option;              /* True if it is an option, false if it is an argument */
      213 +                                   /* (see diagnosticFramework.hpp for option/argument definitions) */
      214 +  jboolean    multiple;            /* True is the option can be specified several time */
      215 +  int         position;            /* Expected position for this argument (this field is */
      216 +                                   /* meaningless for options) */
 208  217  } dcmdArgInfo;
 209  218  
 210  219  typedef struct jmmInterface_1_ {
 211  220    void*        reserved1;
 212  221    void*        reserved2;
 213  222  
 214  223    jint         (JNICALL *GetVersion)             (JNIEnv *env);
 215  224  
 216  225    jint         (JNICALL *GetOptionalSupport)     (JNIEnv *env,
 217  226                                                    jmmOptionalSupport* support_ptr);
↓ open down ↓ 102 lines elided ↑ open up ↑
 320  329                                                   (JNIEnv *env,
 321  330                                                    jobjectArray cmds,
 322  331                                                    dcmdInfo *infoArray);
 323  332    void         (JNICALL *GetDiagnosticCommandArgumentsInfo)
 324  333                                                   (JNIEnv *env,
 325  334                                                    jstring commandName,
 326  335                                                    dcmdArgInfo *infoArray);
 327  336    jstring      (JNICALL *ExecuteDiagnosticCommand)
 328  337                                                   (JNIEnv *env,
 329  338                                                    jstring command);
      339 +  void         (JNICALL *SetDiagnosticFrameworkNotificationEnabled)
      340 +                                                 (JNIEnv *env,
      341 +                                                  jboolean enabled);
 330  342  } JmmInterface;
 331  343  
 332  344  #ifdef __cplusplus
 333  345  } /* extern "C" */
 334  346  #endif /* __cplusplus */
 335  347  
 336  348  #endif /* !_JAVA_JMM_H_ */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX