< prev index next >

src/hotspot/share/prims/whitebox.cpp

Print this page
rev 56448 : imported patch 8220310.mut.0
rev 56449 : imported patch 8220310.mut.1
rev 56452 : [mq]: 8220310.mut.4


 602     return GenAlignment;
 603   }
 604   THROW_MSG_0(vmSymbols::java_lang_UnsupportedOperationException(), "WB_PSHeapGenerationAlignment: Parallel GC is not enabled");
 605 WB_END
 606 
 607 #endif // INCLUDE_PARALLELGC
 608 
 609 #if INCLUDE_G1GC
 610 
 611 WB_ENTRY(jobject, WB_G1AuxiliaryMemoryUsage(JNIEnv* env))
 612   if (UseG1GC) {
 613     ResourceMark rm(THREAD);
 614     G1CollectedHeap* g1h = G1CollectedHeap::heap();
 615     MemoryUsage usage = g1h->get_auxiliary_data_memory_usage();
 616     Handle h = MemoryService::create_MemoryUsage_obj(usage, CHECK_NULL);
 617     return JNIHandles::make_local(env, h());
 618   }
 619   THROW_MSG_0(vmSymbols::java_lang_UnsupportedOperationException(), "WB_G1AuxiliaryMemoryUsage: G1 GC is not enabled");
 620 WB_END
 621 























 622 class OldRegionsLivenessClosure: public HeapRegionClosure {
 623 
 624  private:
 625   const int _liveness;
 626   size_t _total_count;
 627   size_t _total_memory;
 628   size_t _total_memory_to_free;
 629 
 630  public:
 631   OldRegionsLivenessClosure(int liveness) :
 632     _liveness(liveness),
 633     _total_count(0),
 634     _total_memory(0),
 635     _total_memory_to_free(0) { }
 636 
 637     size_t total_count() { return _total_count; }
 638     size_t total_memory() { return _total_memory; }
 639     size_t total_memory_to_free() { return _total_memory_to_free; }
 640 
 641   bool do_heap_region(HeapRegion* r) {


2182   {CC"getCompressedOopsMaxHeapSize", CC"()J",
2183       (void*)&WB_GetCompressedOopsMaxHeapSize},
2184   {CC"printHeapSizes",     CC"()V",                   (void*)&WB_PrintHeapSizes    },
2185   {CC"runMemoryUnitTests", CC"()V",                   (void*)&WB_RunMemoryUnitTests},
2186   {CC"readFromNoaccessArea",CC"()V",                  (void*)&WB_ReadFromNoaccessArea},
2187   {CC"stressVirtualSpaceResize",CC"(JJJ)I",           (void*)&WB_StressVirtualSpaceResize},
2188 #if INCLUDE_CDS
2189   {CC"getOffsetForName0", CC"(Ljava/lang/String;)I",  (void*)&WB_GetOffsetForName},
2190 #endif
2191 #if INCLUDE_G1GC
2192   {CC"g1InConcurrentMark", CC"()Z",                   (void*)&WB_G1InConcurrentMark},
2193   {CC"g1IsHumongous0",      CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous     },
2194   {CC"g1BelongsToHumongousRegion0", CC"(J)Z",         (void*)&WB_G1BelongsToHumongousRegion},
2195   {CC"g1BelongsToFreeRegion0", CC"(J)Z",              (void*)&WB_G1BelongsToFreeRegion},
2196   {CC"g1NumMaxRegions",    CC"()J",                   (void*)&WB_G1NumMaxRegions  },
2197   {CC"g1NumFreeRegions",   CC"()J",                   (void*)&WB_G1NumFreeRegions  },
2198   {CC"g1RegionSize",       CC"()I",                   (void*)&WB_G1RegionSize      },
2199   {CC"g1StartConcMarkCycle",       CC"()Z",           (void*)&WB_G1StartMarkCycle  },
2200   {CC"g1AuxiliaryMemoryUsage", CC"()Ljava/lang/management/MemoryUsage;",
2201                                                       (void*)&WB_G1AuxiliaryMemoryUsage  },


2202   {CC"g1GetMixedGCInfo",   CC"(I)[J",                 (void*)&WB_G1GetMixedGCInfo },
2203 #endif // INCLUDE_G1GC
2204 #if INCLUDE_G1GC || INCLUDE_PARALLELGC
2205   {CC"dramReservedStart",   CC"()J",                  (void*)&WB_DramReservedStart },
2206   {CC"dramReservedEnd",     CC"()J",                  (void*)&WB_DramReservedEnd },
2207   {CC"nvdimmReservedStart", CC"()J",                  (void*)&WB_NvdimmReservedStart },
2208   {CC"nvdimmReservedEnd",   CC"()J",                  (void*)&WB_NvdimmReservedEnd },
2209 #endif // INCLUDE_G1GC || INCLUDE_PARALLELGC
2210 #if INCLUDE_PARALLELGC
2211   {CC"psVirtualSpaceAlignment",CC"()J",               (void*)&WB_PSVirtualSpaceAlignment},
2212   {CC"psHeapGenerationAlignment",CC"()J",             (void*)&WB_PSHeapGenerationAlignment},
2213 #endif
2214 #if INCLUDE_NMT
2215   {CC"NMTMalloc",           CC"(J)J",                 (void*)&WB_NMTMalloc          },
2216   {CC"NMTMallocWithPseudoStack", CC"(JI)J",           (void*)&WB_NMTMallocWithPseudoStack},
2217   {CC"NMTMallocWithPseudoStackAndType", CC"(JII)J",   (void*)&WB_NMTMallocWithPseudoStackAndType},
2218   {CC"NMTFree",             CC"(J)V",                 (void*)&WB_NMTFree            },
2219   {CC"NMTReserveMemory",    CC"(J)J",                 (void*)&WB_NMTReserveMemory   },
2220   {CC"NMTAttemptReserveMemoryAt",    CC"(JJ)J",       (void*)&WB_NMTAttemptReserveMemoryAt },
2221   {CC"NMTCommitMemory",     CC"(JJ)V",                (void*)&WB_NMTCommitMemory    },




 602     return GenAlignment;
 603   }
 604   THROW_MSG_0(vmSymbols::java_lang_UnsupportedOperationException(), "WB_PSHeapGenerationAlignment: Parallel GC is not enabled");
 605 WB_END
 606 
 607 #endif // INCLUDE_PARALLELGC
 608 
 609 #if INCLUDE_G1GC
 610 
 611 WB_ENTRY(jobject, WB_G1AuxiliaryMemoryUsage(JNIEnv* env))
 612   if (UseG1GC) {
 613     ResourceMark rm(THREAD);
 614     G1CollectedHeap* g1h = G1CollectedHeap::heap();
 615     MemoryUsage usage = g1h->get_auxiliary_data_memory_usage();
 616     Handle h = MemoryService::create_MemoryUsage_obj(usage, CHECK_NULL);
 617     return JNIHandles::make_local(env, h());
 618   }
 619   THROW_MSG_0(vmSymbols::java_lang_UnsupportedOperationException(), "WB_G1AuxiliaryMemoryUsage: G1 GC is not enabled");
 620 WB_END
 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 
 645 class OldRegionsLivenessClosure: public HeapRegionClosure {
 646 
 647  private:
 648   const int _liveness;
 649   size_t _total_count;
 650   size_t _total_memory;
 651   size_t _total_memory_to_free;
 652 
 653  public:
 654   OldRegionsLivenessClosure(int liveness) :
 655     _liveness(liveness),
 656     _total_count(0),
 657     _total_memory(0),
 658     _total_memory_to_free(0) { }
 659 
 660     size_t total_count() { return _total_count; }
 661     size_t total_memory() { return _total_memory; }
 662     size_t total_memory_to_free() { return _total_memory_to_free; }
 663 
 664   bool do_heap_region(HeapRegion* r) {


2205   {CC"getCompressedOopsMaxHeapSize", CC"()J",
2206       (void*)&WB_GetCompressedOopsMaxHeapSize},
2207   {CC"printHeapSizes",     CC"()V",                   (void*)&WB_PrintHeapSizes    },
2208   {CC"runMemoryUnitTests", CC"()V",                   (void*)&WB_RunMemoryUnitTests},
2209   {CC"readFromNoaccessArea",CC"()V",                  (void*)&WB_ReadFromNoaccessArea},
2210   {CC"stressVirtualSpaceResize",CC"(JJJ)I",           (void*)&WB_StressVirtualSpaceResize},
2211 #if INCLUDE_CDS
2212   {CC"getOffsetForName0", CC"(Ljava/lang/String;)I",  (void*)&WB_GetOffsetForName},
2213 #endif
2214 #if INCLUDE_G1GC
2215   {CC"g1InConcurrentMark", CC"()Z",                   (void*)&WB_G1InConcurrentMark},
2216   {CC"g1IsHumongous0",      CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous     },
2217   {CC"g1BelongsToHumongousRegion0", CC"(J)Z",         (void*)&WB_G1BelongsToHumongousRegion},
2218   {CC"g1BelongsToFreeRegion0", CC"(J)Z",              (void*)&WB_G1BelongsToFreeRegion},
2219   {CC"g1NumMaxRegions",    CC"()J",                   (void*)&WB_G1NumMaxRegions  },
2220   {CC"g1NumFreeRegions",   CC"()J",                   (void*)&WB_G1NumFreeRegions  },
2221   {CC"g1RegionSize",       CC"()I",                   (void*)&WB_G1RegionSize      },
2222   {CC"g1StartConcMarkCycle",       CC"()Z",           (void*)&WB_G1StartMarkCycle  },
2223   {CC"g1AuxiliaryMemoryUsage", CC"()Ljava/lang/management/MemoryUsage;",
2224                                                       (void*)&WB_G1AuxiliaryMemoryUsage  },
2225   {CC"g1ActiveMemoryNodeCount", CC"()I",              (void*)&WB_G1ActiveMemoryNodeCount },
2226   {CC"g1MemoryNodeIds",    CC"()[I",                  (void*)&WB_G1MemoryNodeIds },
2227   {CC"g1GetMixedGCInfo",   CC"(I)[J",                 (void*)&WB_G1GetMixedGCInfo },
2228 #endif // INCLUDE_G1GC
2229 #if INCLUDE_G1GC || INCLUDE_PARALLELGC
2230   {CC"dramReservedStart",   CC"()J",                  (void*)&WB_DramReservedStart },
2231   {CC"dramReservedEnd",     CC"()J",                  (void*)&WB_DramReservedEnd },
2232   {CC"nvdimmReservedStart", CC"()J",                  (void*)&WB_NvdimmReservedStart },
2233   {CC"nvdimmReservedEnd",   CC"()J",                  (void*)&WB_NvdimmReservedEnd },
2234 #endif // INCLUDE_G1GC || INCLUDE_PARALLELGC
2235 #if INCLUDE_PARALLELGC
2236   {CC"psVirtualSpaceAlignment",CC"()J",               (void*)&WB_PSVirtualSpaceAlignment},
2237   {CC"psHeapGenerationAlignment",CC"()J",             (void*)&WB_PSHeapGenerationAlignment},
2238 #endif
2239 #if INCLUDE_NMT
2240   {CC"NMTMalloc",           CC"(J)J",                 (void*)&WB_NMTMalloc          },
2241   {CC"NMTMallocWithPseudoStack", CC"(JI)J",           (void*)&WB_NMTMallocWithPseudoStack},
2242   {CC"NMTMallocWithPseudoStackAndType", CC"(JII)J",   (void*)&WB_NMTMallocWithPseudoStackAndType},
2243   {CC"NMTFree",             CC"(J)V",                 (void*)&WB_NMTFree            },
2244   {CC"NMTReserveMemory",    CC"(J)J",                 (void*)&WB_NMTReserveMemory   },
2245   {CC"NMTAttemptReserveMemoryAt",    CC"(JJ)J",       (void*)&WB_NMTAttemptReserveMemoryAt },
2246   {CC"NMTCommitMemory",     CC"(JJ)V",                (void*)&WB_NMTCommitMemory    },


< prev index next >