|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
@@ -189,17 +189,8 @@ public static void main(String[] args) throws Exception {
|
189 | 189 |
|
190 | 190 | // Fails if not enough space for VM internal code
|
191 | 191 | long minUseSpace = WHITE_BOX.getUintxVMFlag("CodeCacheMinimumUseSpace");
|
192 |
| - long nMethodSizeLimit = WHITE_BOX.getIntxVMFlag("NMethodSizeLimit"); |
193 |
| - long codeEntryAlignment = WHITE_BOX.getIntxVMFlag("CodeEntryAlignment"); |
194 |
| - long c1MinCodeCacheSize = 11 * nMethodSizeLimit / 10; |
195 |
| - long c2MinCodeCacheSize = 2048 /* PhaseOutput::MAX_inst_size */ + |
196 |
| - 128 /* PhaseOutput::MAX_stubs_size */ + |
197 |
| - 4 * 1024 /* initial_const_capacity */ + |
198 |
| - 2 * Math.max(64, codeEntryAlignment) /* 2 * CodeSection::end_slop() */ + |
199 |
| - 2 * 128 /* sizeof(relocInfo) * PhaseOutput::MAX_locs_size */; |
200 |
| - // minimum size: CompilerConfig::min_code_cache_size = |
201 |
| - // CodeCacheMinimumUseSpace DEBUG_ONLY(* 3) + Compiler::code_buffer_size() + C2Compiler::initial_code_buffer_size()) |
202 |
| - long minSize = minUseSpace * (Platform.isDebugBuild() ? 3 : 1) + c1MinCodeCacheSize + c2MinCodeCacheSize; |
| 192 | + // minimum size: CodeCacheMinimumUseSpace DEBUG_ONLY(* 3) |
| 193 | + long minSize = (Platform.isDebugBuild() ? 3 : 1) * minUseSpace; |
203 | 194 | pb = ProcessTools.createLimitedTestJavaProcessBuilder("-XX:+SegmentedCodeCache",
|
204 | 195 | "-XX:NonNMethodCodeHeapSize=" + minSize,
|
205 | 196 | "-XX:ReservedCodeCacheSize=" + minSize,
|
|
0 commit comments