src/hotspot/share/prims/whitebox.cpp
changeset 59060 fce1fa1bdc91
parent 59053 ba6c248cae19
child 59113 700a2ad8fc19
equal deleted inserted replaced
59059:27a266d5fb13 59060:fce1fa1bdc91
   617     return JNIHandles::make_local(env, h());
   617     return JNIHandles::make_local(env, h());
   618   }
   618   }
   619   THROW_MSG_0(vmSymbols::java_lang_UnsupportedOperationException(), "WB_G1AuxiliaryMemoryUsage: G1 GC is not enabled");
   619   THROW_MSG_0(vmSymbols::java_lang_UnsupportedOperationException(), "WB_G1AuxiliaryMemoryUsage: G1 GC is not enabled");
   620 WB_END
   620 WB_END
   621 
   621 
       
   622 WB_ENTRY(jint, WB_G1ActiveMemoryNodeCount(JNIEnv* env, jobject o))
       
   623   if (UseG1GC) {
       
   624     G1NUMA* numa = G1NUMA::numa();
       
   625     return (jint)numa->num_active_nodes();
       
   626   }
       
   627   THROW_MSG_0(vmSymbols::java_lang_UnsupportedOperationException(), "WB_G1ActiveMemoryNodeCount: G1 GC is not enabled");
       
   628 WB_END
       
   629 
       
   630 WB_ENTRY(jintArray, WB_G1MemoryNodeIds(JNIEnv* env, jobject o))
       
   631   if (UseG1GC) {
       
   632     G1NUMA* numa = G1NUMA::numa();
       
   633     int num_node_ids = (int)numa->num_active_nodes();
       
   634     const int* node_ids = numa->node_ids();
       
   635 
       
   636     typeArrayOop result = oopFactory::new_intArray(num_node_ids, CHECK_NULL);
       
   637     for (int i = 0; i < num_node_ids; i++) {
       
   638       result->int_at_put(i, (jint)node_ids[i]);
       
   639     }
       
   640     return (jintArray) JNIHandles::make_local(env, result);
       
   641   }
       
   642   THROW_MSG_NULL(vmSymbols::java_lang_UnsupportedOperationException(), "WB_G1MemoryNodeIds: G1 GC is not enabled");
       
   643 WB_END
       
   644 
   622 class OldRegionsLivenessClosure: public HeapRegionClosure {
   645 class OldRegionsLivenessClosure: public HeapRegionClosure {
   623 
   646 
   624  private:
   647  private:
   625   const int _liveness;
   648   const int _liveness;
   626   size_t _total_count;
   649   size_t _total_count;
  2193   {CC"g1NumFreeRegions",   CC"()J",                   (void*)&WB_G1NumFreeRegions  },
  2216   {CC"g1NumFreeRegions",   CC"()J",                   (void*)&WB_G1NumFreeRegions  },
  2194   {CC"g1RegionSize",       CC"()I",                   (void*)&WB_G1RegionSize      },
  2217   {CC"g1RegionSize",       CC"()I",                   (void*)&WB_G1RegionSize      },
  2195   {CC"g1StartConcMarkCycle",       CC"()Z",           (void*)&WB_G1StartMarkCycle  },
  2218   {CC"g1StartConcMarkCycle",       CC"()Z",           (void*)&WB_G1StartMarkCycle  },
  2196   {CC"g1AuxiliaryMemoryUsage", CC"()Ljava/lang/management/MemoryUsage;",
  2219   {CC"g1AuxiliaryMemoryUsage", CC"()Ljava/lang/management/MemoryUsage;",
  2197                                                       (void*)&WB_G1AuxiliaryMemoryUsage  },
  2220                                                       (void*)&WB_G1AuxiliaryMemoryUsage  },
       
  2221   {CC"g1ActiveMemoryNodeCount", CC"()I",              (void*)&WB_G1ActiveMemoryNodeCount },
       
  2222   {CC"g1MemoryNodeIds",    CC"()[I",                  (void*)&WB_G1MemoryNodeIds },
  2198   {CC"g1GetMixedGCInfo",   CC"(I)[J",                 (void*)&WB_G1GetMixedGCInfo },
  2223   {CC"g1GetMixedGCInfo",   CC"(I)[J",                 (void*)&WB_G1GetMixedGCInfo },
  2199 #endif // INCLUDE_G1GC
  2224 #endif // INCLUDE_G1GC
  2200 #if INCLUDE_G1GC || INCLUDE_PARALLELGC
  2225 #if INCLUDE_G1GC || INCLUDE_PARALLELGC
  2201   {CC"dramReservedStart",   CC"()J",                  (void*)&WB_DramReservedStart },
  2226   {CC"dramReservedStart",   CC"()J",                  (void*)&WB_DramReservedStart },
  2202   {CC"dramReservedEnd",     CC"()J",                  (void*)&WB_DramReservedEnd },
  2227   {CC"dramReservedEnd",     CC"()J",                  (void*)&WB_DramReservedEnd },