< prev index next >

src/hotspot/share/prims/whitebox.cpp

Print this page
rev 56323 : imported patch 8220310.mut.0
rev 56326 : [mq]: 8220310.mut.1-3_kim


 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) {


2168   {CC"getCompressedOopsMaxHeapSize", CC"()J",
2169       (void*)&WB_GetCompressedOopsMaxHeapSize},
2170   {CC"printHeapSizes",     CC"()V",                   (void*)&WB_PrintHeapSizes    },
2171   {CC"runMemoryUnitTests", CC"()V",                   (void*)&WB_RunMemoryUnitTests},
2172   {CC"readFromNoaccessArea",CC"()V",                  (void*)&WB_ReadFromNoaccessArea},
2173   {CC"stressVirtualSpaceResize",CC"(JJJ)I",           (void*)&WB_StressVirtualSpaceResize},
2174 #if INCLUDE_CDS
2175   {CC"getOffsetForName0", CC"(Ljava/lang/String;)I",  (void*)&WB_GetOffsetForName},
2176 #endif
2177 #if INCLUDE_G1GC
2178   {CC"g1InConcurrentMark", CC"()Z",                   (void*)&WB_G1InConcurrentMark},
2179   {CC"g1IsHumongous0",      CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous     },
2180   {CC"g1BelongsToHumongousRegion0", CC"(J)Z",         (void*)&WB_G1BelongsToHumongousRegion},
2181   {CC"g1BelongsToFreeRegion0", CC"(J)Z",              (void*)&WB_G1BelongsToFreeRegion},
2182   {CC"g1NumMaxRegions",    CC"()J",                   (void*)&WB_G1NumMaxRegions  },
2183   {CC"g1NumFreeRegions",   CC"()J",                   (void*)&WB_G1NumFreeRegions  },
2184   {CC"g1RegionSize",       CC"()I",                   (void*)&WB_G1RegionSize      },
2185   {CC"g1StartConcMarkCycle",       CC"()Z",           (void*)&WB_G1StartMarkCycle  },
2186   {CC"g1AuxiliaryMemoryUsage", CC"()Ljava/lang/management/MemoryUsage;",
2187                                                       (void*)&WB_G1AuxiliaryMemoryUsage  },


2188   {CC"g1GetMixedGCInfo",   CC"(I)[J",                 (void*)&WB_G1GetMixedGCInfo },
2189 #endif // INCLUDE_G1GC
2190 #if INCLUDE_G1GC || INCLUDE_PARALLELGC
2191   {CC"dramReservedStart",   CC"()J",                  (void*)&WB_DramReservedStart },
2192   {CC"dramReservedEnd",     CC"()J",                  (void*)&WB_DramReservedEnd },
2193   {CC"nvdimmReservedStart", CC"()J",                  (void*)&WB_NvdimmReservedStart },
2194   {CC"nvdimmReservedEnd",   CC"()J",                  (void*)&WB_NvdimmReservedEnd },
2195 #endif // INCLUDE_G1GC || INCLUDE_PARALLELGC
2196 #if INCLUDE_PARALLELGC
2197   {CC"psVirtualSpaceAlignment",CC"()J",               (void*)&WB_PSVirtualSpaceAlignment},
2198   {CC"psHeapGenerationAlignment",CC"()J",             (void*)&WB_PSHeapGenerationAlignment},
2199 #endif
2200 #if INCLUDE_NMT
2201   {CC"NMTMalloc",           CC"(J)J",                 (void*)&WB_NMTMalloc          },
2202   {CC"NMTMallocWithPseudoStack", CC"(JI)J",           (void*)&WB_NMTMallocWithPseudoStack},
2203   {CC"NMTMallocWithPseudoStackAndType", CC"(JII)J",   (void*)&WB_NMTMallocWithPseudoStackAndType},
2204   {CC"NMTFree",             CC"(J)V",                 (void*)&WB_NMTFree            },
2205   {CC"NMTReserveMemory",    CC"(J)J",                 (void*)&WB_NMTReserveMemory   },
2206   {CC"NMTAttemptReserveMemoryAt",    CC"(JJ)J",       (void*)&WB_NMTAttemptReserveMemoryAt },
2207   {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     G1MemoryNodeManager* mgr = G1MemoryNodeManager::mgr();
 625     return (jint)mgr->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     G1MemoryNodeManager* mgr = G1MemoryNodeManager::mgr();
 633     int num_node_ids = (int)mgr->num_active_nodes();
 634     const int* node_ids = mgr->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) {


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


< prev index next >