From 3475f9cdb47a6d6f8ad2ce49bbc3af46bca92f09 Mon Sep 17 00:00:00 2001 From: Carl Shapiro Date: Mon, 21 Mar 2011 13:35:24 -0700 Subject: Move finalization out of the VM. This change introduces a new reference class whose referent points to instances requiring finalization. This makes the finalization of objects possible using a reference queue and a dedicated thread which removes objects from the queue. Change-Id: I0ff6dd272f00ca08c6ed3aa667bf766a039a944e --- vm/Thread.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'vm/Thread.c') diff --git a/vm/Thread.c b/vm/Thread.c index eb026fde3..33d659941 100644 --- a/vm/Thread.c +++ b/vm/Thread.c @@ -1311,23 +1311,6 @@ bool dvmCreateInterpThread(Object* threadObj, int reqStackSize) assert(threadObj != NULL); - if(gDvm.zygote) { - // Allow the sampling profiler thread. We shut it down before forking. - StringObject* nameStr = (StringObject*) dvmGetFieldObject(threadObj, - gDvm.offJavaLangThread_name); - char* threadName = dvmCreateCstrFromString(nameStr); - bool profilerThread = strcmp(threadName, "SamplingProfiler") == 0; - if (!profilerThread) { - dvmThrowExceptionFmt(gDvm.exIllegalStateException, - "No new threads in -Xzygote mode. " - "Found thread named '%s'", threadName); - - free(threadName); - goto fail; - } - free(threadName); - } - self = dvmThreadSelf(); if (reqStackSize == 0) stackSize = gDvm.stackSize; -- cgit v1.2.3