8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking

Reviewed-by: jrose, kvn, heidinga, asmehra, vlivanov
This commit is contained in:
Ioi Lam 2024-11-15 22:28:54 +00:00
parent 276251c44a
commit 41a2d49f0a
106 changed files with 6601 additions and 760 deletions

View file

@ -70,6 +70,7 @@ import java.util.function.ToLongFunction;
import java.util.stream.Stream;
import jdk.internal.misc.Unsafe;
import jdk.internal.util.ArraysSupport;
import jdk.internal.vm.annotation.Stable;
/**
* A hash table supporting full concurrency of retrievals and
@ -595,7 +596,16 @@ public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
static final int HASH_BITS = 0x7fffffff; // usable bits of normal node hash
/** Number of CPUS, to place bounds on some sizings */
static final int NCPU = Runtime.getRuntime().availableProcessors();
static @Stable int NCPU;
static {
runtimeSetup();
}
// Called from JVM when loading an AOT cache.
private static void runtimeSetup() {
NCPU = Runtime.getRuntime().availableProcessors();
}
/**
* Serialized pseudo-fields, provided only for jdk7 compatibility.