Target_java_lang_Thread(String withName, ThreadGroup withGroup, boolean asDaemon) { /* * Raw creation of a thread without calling init(). Used to create a Thread object for an * already running thread. */ this.unsafeParkEvent = new AtomicReference<>(); this.sleepParkEvent = new AtomicReference<>(); tid = nextThreadID(); threadStatus = ThreadStatus.RUNNABLE; name = (withName != null) ? withName : ("System-" + nextThreadNum()); group = (withGroup != null) ? withGroup : JavaThreads.singleton().rootGroup; priority = Thread.NORM_PRIORITY; blockerLock = new Object(); daemon = asDaemon; }
@Substitute @SuppressWarnings({"unused"}) @TargetElement(onlyWith = JDK9OrLater.class) private Target_java_lang_Thread( ThreadGroup g, Runnable target, String name, long stackSize, AccessControlContext acc, boolean inheritThreadLocals) { /* Non-0 instance field initialization. */ this.blockerLock = new Object(); /* Injected Target_java_lang_Thread instance field initialization. */ this.unsafeParkEvent = new AtomicReference<>(); this.sleepParkEvent = new AtomicReference<>(); /* Initialize the rest of the Thread object, ignoring `acc` and `inheritThreadLocals`. */ Util_java_lang_Thread.initialize(this, g, target, name, stackSize); }
/** Constructor for subclasses. */ @Platforms(Platform.HOSTED_ONLY.class) public HeapImpl(FeatureAccess access) { this.youngGeneration = new YoungGeneration("YoungGeneration"); this.oldGeneration = new OldGeneration("OldGeneration"); this.gcImpl = new GCImpl(access); this.objectHeaderImpl = new ObjectHeaderImpl(); this.heapPolicy = new HeapPolicy(access); this.pinHead = new AtomicReference<>(); /* Pre-allocate verifiers for use during collection. */ if (getVerifyHeapBeforeGC() || getVerifyHeapAfterGC() || getVerifyStackBeforeGC() || getVerifyStackAfterGC()) { this.heapVerifier = HeapVerifierImpl.factory(); this.stackVerifier = new StackVerifier(); } else { this.heapVerifier = null; this.stackVerifier = null; } chunkProvider = new HeapChunkProvider(); this.pinnedAllocatorListHead = null; this.objectVisitorWalkerOperation = new ObjectVisitorWalkerOperation(); this.memoryMXBean = new HeapImplMemoryMXBean(); this.classList = null; SubstrateUtil.DiagnosticThunkRegister.getSingleton().register(() -> { bootImageHeapBoundariesToLog(Log.log()).newline(); zapValuesToLog(Log.log()).newline(); report(Log.log(), true).newline(); Log.log().newline(); }); }
/** Private constructor: Only the singleton instance. */ private ParkEventList() { freeList = new AtomicReference<>(null); }
/** Constructor for subclasses. */ protected FeebleReference(final T referent, final FeebleReferenceList<T> list) { super(referent); this.list = new AtomicReference<>(list); FeebleReferenceList.clean(this); }
/** Constructor for subclasses. */ private FeebleReferenceList() { head = new UninterruptibleUtils.AtomicReference<>(null); }
@Substitute @TargetElement(onlyWith = JDK8OrEarlier.class) private void init(ThreadGroup groupArg, Runnable targetArg, String nameArg, long stackSizeArg) { /* Injected Target_java_lang_Thread instance field initialization. */ this.unsafeParkEvent = new AtomicReference<>(); this.sleepParkEvent = new AtomicReference<>(); /* Initialize the rest of the Thread object. */ Util_java_lang_Thread.initialize(this, groupArg, targetArg, nameArg, stackSizeArg); }