Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/whitebox.cpp @ 12233:40136aa2cdb1
8010722: assert: failed: heap size is too big for compressed oops
Summary: Use conservative assumptions of required alignment for the various garbage collector components into account when determining the maximum heap size that supports compressed oops. Using this conservative value avoids several circular dependencies in the calculation.
Reviewed-by: stefank, dholmes
author | tschatzl |
---|---|
date | Wed, 11 Sep 2013 16:25:02 +0200 |
parents | 5fd8e2fbafd4 |
children | 9d8b29a0548c 8f07aa079343 |
comparison
equal
deleted
inserted
replaced
12230:040895ec3920 | 12233:40136aa2cdb1 |
---|---|
31 #include "classfile/classLoaderData.hpp" | 31 #include "classfile/classLoaderData.hpp" |
32 | 32 |
33 #include "prims/whitebox.hpp" | 33 #include "prims/whitebox.hpp" |
34 #include "prims/wbtestmethods/parserTests.hpp" | 34 #include "prims/wbtestmethods/parserTests.hpp" |
35 | 35 |
36 #include "runtime/arguments.hpp" | |
36 #include "runtime/interfaceSupport.hpp" | 37 #include "runtime/interfaceSupport.hpp" |
37 #include "runtime/os.hpp" | 38 #include "runtime/os.hpp" |
38 #include "utilities/debug.hpp" | 39 #include "utilities/debug.hpp" |
39 #include "utilities/macros.hpp" | 40 #include "utilities/macros.hpp" |
40 #include "utilities/exceptions.hpp" | 41 #include "utilities/exceptions.hpp" |
90 | 91 |
91 WBIsKlassAliveClosure closure(sym); | 92 WBIsKlassAliveClosure closure(sym); |
92 ClassLoaderDataGraph::classes_do(&closure); | 93 ClassLoaderDataGraph::classes_do(&closure); |
93 | 94 |
94 return closure.found(); | 95 return closure.found(); |
96 WB_END | |
97 | |
98 WB_ENTRY(jlong, WB_GetCompressedOopsMaxHeapSize(JNIEnv* env, jobject o)) { | |
99 return (jlong)Arguments::max_heap_for_compressed_oops(); | |
100 } | |
95 WB_END | 101 WB_END |
96 | 102 |
97 WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) { | 103 WB_ENTRY(void, WB_PrintHeapSizes(JNIEnv* env, jobject o)) { |
98 CollectorPolicy * p = Universe::heap()->collector_policy(); | 104 CollectorPolicy * p = Universe::heap()->collector_policy(); |
99 gclog_or_tty->print_cr("Minimum heap "SIZE_FORMAT" Initial heap " | 105 gclog_or_tty->print_cr("Minimum heap "SIZE_FORMAT" Initial heap " |
434 {CC"isClassAlive0", CC"(Ljava/lang/String;)Z", (void*)&WB_IsClassAlive }, | 440 {CC"isClassAlive0", CC"(Ljava/lang/String;)Z", (void*)&WB_IsClassAlive }, |
435 {CC"parseCommandLine", | 441 {CC"parseCommandLine", |
436 CC"(Ljava/lang/String;[Lsun/hotspot/parser/DiagnosticCommand;)[Ljava/lang/Object;", | 442 CC"(Ljava/lang/String;[Lsun/hotspot/parser/DiagnosticCommand;)[Ljava/lang/Object;", |
437 (void*) &WB_ParseCommandLine | 443 (void*) &WB_ParseCommandLine |
438 }, | 444 }, |
445 {CC"getCompressedOopsMaxHeapSize", CC"()J", | |
446 (void*)&WB_GetCompressedOopsMaxHeapSize}, | |
439 {CC"printHeapSizes", CC"()V", (void*)&WB_PrintHeapSizes }, | 447 {CC"printHeapSizes", CC"()V", (void*)&WB_PrintHeapSizes }, |
440 #if INCLUDE_ALL_GCS | 448 #if INCLUDE_ALL_GCS |
441 {CC"g1InConcurrentMark", CC"()Z", (void*)&WB_G1InConcurrentMark}, | 449 {CC"g1InConcurrentMark", CC"()Z", (void*)&WB_G1InConcurrentMark}, |
442 {CC"g1IsHumongous", CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous }, | 450 {CC"g1IsHumongous", CC"(Ljava/lang/Object;)Z", (void*)&WB_G1IsHumongous }, |
443 {CC"g1NumFreeRegions", CC"()J", (void*)&WB_G1NumFreeRegions }, | 451 {CC"g1NumFreeRegions", CC"()J", (void*)&WB_G1NumFreeRegions }, |