src/share/vm/runtime/arguments.cpp

Print this page




2532       // from the heap size.
2533       if (initHeapSize > MaxPermSize) {
2534         initHeapSize = initHeapSize - MaxPermSize;
2535       } else {
2536         warning("AggressiveHeap and MaxPermSize values may conflict");
2537       }
2538 
2539       if (FLAG_IS_DEFAULT(MaxHeapSize)) {
2540          FLAG_SET_CMDLINE(uintx, MaxHeapSize, initHeapSize);
2541          FLAG_SET_CMDLINE(uintx, InitialHeapSize, initHeapSize);
2542          // Currently the minimum size and the initial heap sizes are the same.
2543          set_min_heap_size(initHeapSize);
2544       }
2545       if (FLAG_IS_DEFAULT(NewSize)) {
2546          // Make the young generation 3/8ths of the total heap.
2547          FLAG_SET_CMDLINE(uintx, NewSize,
2548                                 ((julong)MaxHeapSize / (julong)8) * (julong)3);
2549          FLAG_SET_CMDLINE(uintx, MaxNewSize, NewSize);
2550       }
2551 

2552       FLAG_SET_DEFAULT(UseLargePages, true);

2553 
2554       // Increase some data structure sizes for efficiency
2555       FLAG_SET_CMDLINE(uintx, BaseFootPrintEstimate, MaxHeapSize);
2556       FLAG_SET_CMDLINE(bool, ResizeTLAB, false);
2557       FLAG_SET_CMDLINE(uintx, TLABSize, 256*K);
2558 
2559       // See the OldPLABSize comment below, but replace 'after promotion'
2560       // with 'after copying'.  YoungPLABSize is the size of the survivor
2561       // space per-gc-thread buffers.  The default is 4kw.
2562       FLAG_SET_CMDLINE(uintx, YoungPLABSize, 256*K);      // Note: this is in words
2563 
2564       // OldPLABSize is the size of the buffers in the old gen that
2565       // UseParallelGC uses to promote live data that doesn't fit in the
2566       // survivor spaces.  At any given time, there's one for each gc thread.
2567       // The default size is 1kw. These buffers are rarely used, since the
2568       // survivor spaces are usually big enough.  For specjbb, however, there
2569       // are occasions when there's lots of live data in the young gen
2570       // and we end up promoting some of it.  We don't have a definite
2571       // explanation for why bumping OldPLABSize helps, but the theory
2572       // is that a bigger PLAB results in retaining something like the


3094   }
3095 
3096   // Parse JavaVMInitArgs structure passed in, as well as JAVA_TOOL_OPTIONS and _JAVA_OPTIONS
3097   jint result = parse_vm_init_args(args);
3098   if (result != JNI_OK) {
3099     return result;
3100   }
3101 
3102   // Delay warning until here so that we've had a chance to process
3103   // the -XX:-PrintWarnings flag
3104   if (needs_hotspotrc_warning) {
3105     warning("%s file is present but has been ignored.  "
3106             "Run with -XX:Flags=%s to load the file.",
3107             hotspotrc, hotspotrc);
3108   }
3109 
3110 #if (defined JAVASE_EMBEDDED || defined ARM)
3111   UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
3112 #endif
3113 




3114 #ifndef PRODUCT
3115   if (TraceBytecodesAt != 0) {
3116     TraceBytecodes = true;
3117   }
3118   if (CountCompiledCalls) {
3119     if (UseCounterDecay) {
3120       warning("UseCounterDecay disabled because CountCalls is set");
3121       UseCounterDecay = false;
3122     }
3123   }
3124 #endif // PRODUCT
3125 
3126   // JSR 292 is not supported before 1.7
3127   if (!JDK_Version::is_gte_jdk17x_version()) {
3128     if (EnableInvokeDynamic) {
3129       if (!FLAG_IS_DEFAULT(EnableInvokeDynamic)) {
3130         warning("JSR 292 is not supported before 1.7.  Disabling support.");
3131       }
3132       EnableInvokeDynamic = false;
3133     }




2532       // from the heap size.
2533       if (initHeapSize > MaxPermSize) {
2534         initHeapSize = initHeapSize - MaxPermSize;
2535       } else {
2536         warning("AggressiveHeap and MaxPermSize values may conflict");
2537       }
2538 
2539       if (FLAG_IS_DEFAULT(MaxHeapSize)) {
2540          FLAG_SET_CMDLINE(uintx, MaxHeapSize, initHeapSize);
2541          FLAG_SET_CMDLINE(uintx, InitialHeapSize, initHeapSize);
2542          // Currently the minimum size and the initial heap sizes are the same.
2543          set_min_heap_size(initHeapSize);
2544       }
2545       if (FLAG_IS_DEFAULT(NewSize)) {
2546          // Make the young generation 3/8ths of the total heap.
2547          FLAG_SET_CMDLINE(uintx, NewSize,
2548                                 ((julong)MaxHeapSize / (julong)8) * (julong)3);
2549          FLAG_SET_CMDLINE(uintx, MaxNewSize, NewSize);
2550       }
2551 
2552 #ifndef _ALLBSD_SOURCE  // UseLargePages is not yet supported on BSD.
2553       FLAG_SET_DEFAULT(UseLargePages, true);
2554 #endif
2555 
2556       // Increase some data structure sizes for efficiency
2557       FLAG_SET_CMDLINE(uintx, BaseFootPrintEstimate, MaxHeapSize);
2558       FLAG_SET_CMDLINE(bool, ResizeTLAB, false);
2559       FLAG_SET_CMDLINE(uintx, TLABSize, 256*K);
2560 
2561       // See the OldPLABSize comment below, but replace 'after promotion'
2562       // with 'after copying'.  YoungPLABSize is the size of the survivor
2563       // space per-gc-thread buffers.  The default is 4kw.
2564       FLAG_SET_CMDLINE(uintx, YoungPLABSize, 256*K);      // Note: this is in words
2565 
2566       // OldPLABSize is the size of the buffers in the old gen that
2567       // UseParallelGC uses to promote live data that doesn't fit in the
2568       // survivor spaces.  At any given time, there's one for each gc thread.
2569       // The default size is 1kw. These buffers are rarely used, since the
2570       // survivor spaces are usually big enough.  For specjbb, however, there
2571       // are occasions when there's lots of live data in the young gen
2572       // and we end up promoting some of it.  We don't have a definite
2573       // explanation for why bumping OldPLABSize helps, but the theory
2574       // is that a bigger PLAB results in retaining something like the


3096   }
3097 
3098   // Parse JavaVMInitArgs structure passed in, as well as JAVA_TOOL_OPTIONS and _JAVA_OPTIONS
3099   jint result = parse_vm_init_args(args);
3100   if (result != JNI_OK) {
3101     return result;
3102   }
3103 
3104   // Delay warning until here so that we've had a chance to process
3105   // the -XX:-PrintWarnings flag
3106   if (needs_hotspotrc_warning) {
3107     warning("%s file is present but has been ignored.  "
3108             "Run with -XX:Flags=%s to load the file.",
3109             hotspotrc, hotspotrc);
3110   }
3111 
3112 #if (defined JAVASE_EMBEDDED || defined ARM)
3113   UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
3114 #endif
3115 
3116 #ifdef _ALLBSD_SOURCE  // UseLargePages is not yet supported on BSD.
3117   UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages");
3118 #endif
3119 
3120 #ifndef PRODUCT
3121   if (TraceBytecodesAt != 0) {
3122     TraceBytecodes = true;
3123   }
3124   if (CountCompiledCalls) {
3125     if (UseCounterDecay) {
3126       warning("UseCounterDecay disabled because CountCalls is set");
3127       UseCounterDecay = false;
3128     }
3129   }
3130 #endif // PRODUCT
3131 
3132   // JSR 292 is not supported before 1.7
3133   if (!JDK_Version::is_gte_jdk17x_version()) {
3134     if (EnableInvokeDynamic) {
3135       if (!FLAG_IS_DEFAULT(EnableInvokeDynamic)) {
3136         warning("JSR 292 is not supported before 1.7.  Disabling support.");
3137       }
3138       EnableInvokeDynamic = false;
3139     }