1588 return 0;
1589 }
1590 // Determine the maximum notification frequency value currently supported.
1591 // The largest mask value that the interpreter/C1 can handle is
1592 // of length InvocationCounter::number_of_count_bits. Mask values are always
1593 // one bit shorter then the value of the notification frequency. Set
1594 // max_freq_bits accordingly.
1595 intx max_freq_bits = InvocationCounter::number_of_count_bits + 1;
1596 intx scaled_freq = scaled_compile_threshold((intx)1 << freq_log, scale);
1597 if (scaled_freq == 0) {
1598 // Return 0 right away to avoid calculating log2 of 0.
1599 return 0;
1600 } else if (scaled_freq > nth_bit(max_freq_bits)) {
1601 return max_freq_bits;
1602 } else {
1603 return log2_intptr(scaled_freq);
1604 }
1605 }
1606
1607 void Arguments::set_tiered_flags() {
1608 // With tiered, set default policy to AdvancedThresholdPolicy, which is 3.
1609 if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) {
1610 FLAG_SET_DEFAULT(CompilationPolicyChoice, 3);
1611 }
1612 if (CompilationPolicyChoice < 2) {
1613 vm_exit_during_initialization(
1614 "Incompatible compilation policy selected", NULL);
1615 }
1616 // Increase the code cache size - tiered compiles a lot more.
1617 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
1618 FLAG_SET_ERGO(uintx, ReservedCodeCacheSize,
1619 MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5));
1620 }
1621 // Enable SegmentedCodeCache if TieredCompilation is enabled and ReservedCodeCacheSize >= 240M
1622 if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) {
1623 FLAG_SET_ERGO(bool, SegmentedCodeCache, true);
1624 }
1625 if (!UseInterpreter) { // -Xcomp
1626 Tier3InvokeNotifyFreqLog = 0;
1627 Tier4InvocationThreshold = 0;
1628 }
|
1588 return 0;
1589 }
1590 // Determine the maximum notification frequency value currently supported.
1591 // The largest mask value that the interpreter/C1 can handle is
1592 // of length InvocationCounter::number_of_count_bits. Mask values are always
1593 // one bit shorter then the value of the notification frequency. Set
1594 // max_freq_bits accordingly.
1595 intx max_freq_bits = InvocationCounter::number_of_count_bits + 1;
1596 intx scaled_freq = scaled_compile_threshold((intx)1 << freq_log, scale);
1597 if (scaled_freq == 0) {
1598 // Return 0 right away to avoid calculating log2 of 0.
1599 return 0;
1600 } else if (scaled_freq > nth_bit(max_freq_bits)) {
1601 return max_freq_bits;
1602 } else {
1603 return log2_intptr(scaled_freq);
1604 }
1605 }
1606
1607 void Arguments::set_tiered_flags() {
1608 // With tiered, set default policy to SimpleThresholdPolicy, which is 2 or 3.
1609 if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) {
1610 FLAG_SET_DEFAULT(CompilationPolicyChoice, 3);
1611 }
1612 if (CompilationPolicyChoice < 2) {
1613 vm_exit_during_initialization(
1614 "Incompatible compilation policy selected", NULL);
1615 }
1616 // Increase the code cache size - tiered compiles a lot more.
1617 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
1618 FLAG_SET_ERGO(uintx, ReservedCodeCacheSize,
1619 MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5));
1620 }
1621 // Enable SegmentedCodeCache if TieredCompilation is enabled and ReservedCodeCacheSize >= 240M
1622 if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) {
1623 FLAG_SET_ERGO(bool, SegmentedCodeCache, true);
1624 }
1625 if (!UseInterpreter) { // -Xcomp
1626 Tier3InvokeNotifyFreqLog = 0;
1627 Tier4InvocationThreshold = 0;
1628 }
|