File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/hotspot/share/compiler Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -571,8 +571,15 @@ void CompilationPolicy::initialize() {
571
571
#ifdef COMPILER2
572
572
c2_size = C2Compiler::initial_code_buffer_size ();
573
573
#endif
574
- size_t buffer_size = c1_only ? c1_size : (c1_size/3 + 2 *c2_size/3 );
575
- size_t max_count = (ReservedCodeCacheSize - (CodeCacheMinimumUseSpace DEBUG_ONLY (* 3 ))) / buffer_size;
574
+ size_t buffer_size = 0 ;
575
+ if (c1_only) {
576
+ buffer_size = c1_size;
577
+ } else if (c2_only) {
578
+ buffer_size = c2_size;
579
+ } else {
580
+ buffer_size = c1_size / 3 + 2 * c2_size / 3 ;
581
+ }
582
+ size_t max_count = (NonNMethodCodeHeapSize - (CodeCacheMinimumUseSpace DEBUG_ONLY (* 3 ))) / buffer_size;
576
583
if ((size_t )count > max_count) {
577
584
// Lower the compiler count such that all buffers fit into the code cache
578
585
count = MAX2 ((int )max_count, min_count);
@@ -591,7 +598,7 @@ void CompilationPolicy::initialize() {
591
598
count = 3 ;
592
599
FLAG_SET_ERGO (CICompilerCount, count);
593
600
}
594
- #endif
601
+ #endif // _LP64
595
602
596
603
if (c1_only) {
597
604
// No C2 compiler threads are needed
You can’t perform that action at this time.
0 commit comments