[vmkit-commits] [vmkit] r120718 - in /vmkit/branches/multi-vm: include/mvm/JIT.h include/mvm/Threads/Thread.h include/mvm/VMKit.h include/mvm/VirtualMachine.h lib/J3/Classpath/ClasspathVMThrowable.inc lib/J3/Compiler/JavaJITCompiler.cpp lib/J3/VMCore/JnjvmClassLoader.cpp lib/J3/VMCore/VirtualTables.cpp lib/Mvm/CommonThread/CollectionRV.cpp lib/Mvm/CommonThread/ctthread.cpp lib/Mvm/Compiler/JIT.cpp lib/Mvm/Runtime/MethodInfo.cpp mmtk/mmtk-j3/ActivePlan.cpp mmtk/mmtk-j3/Collection.cpp
Gael Thomas
gael.thomas at lip6.fr
Thu Dec 2 09:58:14 PST 2010
Author: gthomas
Date: Thu Dec 2 11:58:14 2010
New Revision: 120718
URL: http://llvm.org/viewvc/llvm-project?rev=120718&view=rev
Log:
Move function map in vmkit. Hide the field vmkit.
Modified:
vmkit/branches/multi-vm/include/mvm/JIT.h
vmkit/branches/multi-vm/include/mvm/Threads/Thread.h
vmkit/branches/multi-vm/include/mvm/VMKit.h
vmkit/branches/multi-vm/include/mvm/VirtualMachine.h
vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMThrowable.inc
vmkit/branches/multi-vm/lib/J3/Compiler/JavaJITCompiler.cpp
vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.cpp
vmkit/branches/multi-vm/lib/J3/VMCore/VirtualTables.cpp
vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp
vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctthread.cpp
vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp
vmkit/branches/multi-vm/lib/Mvm/Runtime/MethodInfo.cpp
vmkit/branches/multi-vm/mmtk/mmtk-j3/ActivePlan.cpp
vmkit/branches/multi-vm/mmtk/mmtk-j3/Collection.cpp
Modified: vmkit/branches/multi-vm/include/mvm/JIT.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/JIT.h?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/JIT.h (original)
+++ vmkit/branches/multi-vm/include/mvm/JIT.h Thu Dec 2 11:58:14 2010
@@ -220,7 +220,7 @@
public:
virtual void scan(uintptr_t closure, void* ip, void* addr);
JITMethodInfo(llvm::GCFunctionInfo* GFI) : GCInfo(GFI) {}
- void addToVM(VirtualMachine* vm, llvm::JIT* jit);
+ void addToVMKit(VMKit* vmkit, llvm::JIT* jit);
};
class MvmJITMethodInfo : public JITMethodInfo {
Modified: vmkit/branches/multi-vm/include/mvm/Threads/Thread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/Threads/Thread.h?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/Threads/Thread.h (original)
+++ vmkit/branches/multi-vm/include/mvm/Threads/Thread.h Thu Dec 2 11:58:14 2010
@@ -175,7 +175,7 @@
#else
lastExceptionBuffer = 0;
#endif
- vmkit = vmk;
+ _vmkit = vmk;
lastKnownFrame = 0;
pendingException = 0;
}
@@ -382,9 +382,13 @@
///
gc* pendingException;
- /// vmkit - a (shortcut) pointer to vmkit that contains information on all the vms
+private:
+ /// _vmkit - a (shortcut) pointer to vmkit that contains information on all the vms
///
- mvm::VMKit* vmkit;
+ mvm::VMKit* _vmkit;
+
+public:
+ mvm::VMKit* vmkit();
};
#ifndef RUNTIME_DWARF_EXCEPTIONS
Modified: vmkit/branches/multi-vm/include/mvm/VMKit.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/VMKit.h?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/VMKit.h (original)
+++ vmkit/branches/multi-vm/include/mvm/VMKit.h Thu Dec 2 11:58:14 2010
@@ -7,6 +7,35 @@
#include "mvm/VirtualMachine.h"
namespace mvm {
+class MethodInfo;
+class VMKit;
+class gc;
+
+class FunctionMap {
+public:
+ /// Functions - Map of applicative methods to function pointers. This map is
+ /// used when walking the stack so that VMKit knows which applicative method
+ /// is executing on the stack.
+ ///
+ std::map<void*, MethodInfo*> Functions;
+
+ /// FunctionMapLock - Spin lock to protect the Functions map.
+ ///
+ mvm::SpinLock FunctionMapLock;
+
+ /// IPToMethodInfo - Map a code start instruction instruction to the MethodInfo.
+ ///
+ MethodInfo* IPToMethodInfo(void* ip);
+
+ /// addMethodInfo - A new instruction pointer in the function map.
+ ///
+ void addMethodInfo(MethodInfo* meth, void* ip);
+
+ /// removeMethodInfos - Remove all MethodInfo owned by the given owner.
+ void removeMethodInfos(void* owner);
+
+ FunctionMap();
+};
class VMKit : public mvm::PermanentObject {
public:
@@ -15,11 +44,14 @@
VMKit(mvm::BumpPtrAllocator &Alloc) : allocator(Alloc) {
}
+
/// ------------------------------------------------- ///
/// --- vm managment --- ///
/// ------------------------------------------------- ///
- mvm::SpinLock lockvms; // lock for vms
- std::vector<VirtualMachine*> vms; // array of vms
+ // locksvms - a lock for vms
+ mvm::SpinLock lockvms;
+ // vms - the list of vms. Could be directly an array and we could also directly use the vmID as index in this array.
+ std::vector<VirtualMachine*> vms;
size_t addVM(VirtualMachine* vm);
void removeVM(size_t id);
@@ -27,7 +59,6 @@
/// ------------------------------------------------- ///
/// --- thread managment --- ///
/// ------------------------------------------------- ///
-
/// rendezvous - The rendezvous implementation for garbage collection.
///
#ifdef WITH_LLVM_GCC
@@ -36,6 +67,20 @@
UncooperativeCollectionRV rendezvous;
#endif
+ /// ------------------------------------------------- ///
+ /// --- backtrace related methods --- ///
+ /// ------------------------------------------------- ///
+ /// FunctionsCache - cache of compiled functions
+ //
+ FunctionMap FunctionsCache;
+
+ MethodInfo* IPToMethodInfo(void* ip) {
+ return FunctionsCache.IPToMethodInfo(ip);
+ }
+
+ void removeMethodInfos(void* owner) {
+ FunctionsCache.removeMethodInfos(owner);
+ }
};
}
Modified: vmkit/branches/multi-vm/include/mvm/VirtualMachine.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/include/mvm/VirtualMachine.h?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/include/mvm/VirtualMachine.h (original)
+++ vmkit/branches/multi-vm/include/mvm/VirtualMachine.h Thu Dec 2 11:58:14 2010
@@ -19,36 +19,6 @@
namespace mvm {
-class MethodInfo;
-class VMKit;
-class gc;
-
-class FunctionMap {
-public:
- /// Functions - Map of applicative methods to function pointers. This map is
- /// used when walking the stack so that VMKit knows which applicative method
- /// is executing on the stack.
- ///
- std::map<void*, MethodInfo*> Functions;
-
- /// FunctionMapLock - Spin lock to protect the Functions map.
- ///
- mvm::SpinLock FunctionMapLock;
-
- /// IPToMethodInfo - Map a code start instruction instruction to the MethodInfo.
- ///
- MethodInfo* IPToMethodInfo(void* ip);
-
- /// addMethodInfo - A new instruction pointer in the function map.
- ///
- void addMethodInfo(MethodInfo* meth, void* ip);
-
- /// removeMethodInfos - Remove all MethodInfo owned by the given owner.
- void removeMethodInfos(void* owner);
-
- FunctionMap();
-};
-
/// VirtualMachine - This class is the root of virtual machine classes. It
/// defines what a VM should be.
///
@@ -126,18 +96,6 @@
virtual const char* getObjectTypeName(gc* object) { return "An object"; }
//===----------------------------------------------------------------------===//
-// (3) Backtrace-related methods.
-//===----------------------------------------------------------------------===//
-
- FunctionMap FunctionsCache;
- MethodInfo* IPToMethodInfo(void* ip) {
- return FunctionsCache.IPToMethodInfo(ip);
- }
- void removeMethodInfos(void* owner) {
- FunctionsCache.removeMethodInfos(owner);
- }
-
-//===----------------------------------------------------------------------===//
// (4) Launch-related methods.
//===----------------------------------------------------------------------===//
Modified: vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMThrowable.inc
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMThrowable.inc?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMThrowable.inc (original)
+++ vmkit/branches/multi-vm/lib/J3/Classpath/ClasspathVMThrowable.inc Thu Dec 2 11:58:14 2010
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+#include "mvm/VMKit.h"
+
#include "types.h"
#include "Classpath.h"
@@ -137,15 +139,18 @@
llvm_gcroot(stack, 0);
BEGIN_NATIVE_EXCEPTION(0)
- Jnjvm* vm = JavaThread::get()->getJVM();
- JavaField* field = vm->upcalls->vmDataVMThrowable;
+
+ Jnjvm* vm = JavaThread::get()->getJVM();
+ mvm::VMKit* vmkit = vm->vmkit;
+ JavaField* field = vm->upcalls->vmDataVMThrowable;
+
stack = field->getInstanceObjectField(vmthrow);
// remove the VMThrowable.fillInStackTrace method and the last method
// on the stack.
sint32 index = 2;;
while (index != JavaArray::getSize(stack)) {
- mvm::MethodInfo* MI = vm->IPToMethodInfo(ArrayPtr::getElement((ArrayPtr*)stack, index));
+ mvm::MethodInfo* MI = vmkit->IPToMethodInfo(ArrayPtr::getElement((ArrayPtr*)stack, index));
if (!MI->isHighLevelMethod()) ++index;
else {
JavaMethod* meth = (JavaMethod*)MI->MetaInfo;
@@ -159,7 +164,7 @@
sint32 size = 0;
sint32 cur = index;
while (cur < JavaArray::getSize(stack)) {
- mvm::MethodInfo* MI = vm->IPToMethodInfo(ArrayPtr::getElement((ArrayPtr*)stack, cur));
+ mvm::MethodInfo* MI = vmkit->IPToMethodInfo(ArrayPtr::getElement((ArrayPtr*)stack, cur));
++cur;
if (MI->isHighLevelMethod()) ++size;
}
@@ -169,7 +174,7 @@
cur = 0;
for (sint32 i = index; i < JavaArray::getSize(stack); ++i) {
- mvm::MethodInfo* MI = vm->IPToMethodInfo(ArrayPtr::getElement((ArrayPtr*)stack, i));
+ mvm::MethodInfo* MI = vmkit->IPToMethodInfo(ArrayPtr::getElement((ArrayPtr*)stack, i));
if (MI->isHighLevelMethod()) {
JavaMethod* meth = (JavaMethod*)MI->MetaInfo;
ArrayObject::setElement(result, consStackElement(meth, ArrayPtr::getElement((ArrayPtr*)stack, i)), cur);
Modified: vmkit/branches/multi-vm/lib/J3/Compiler/JavaJITCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/Compiler/JavaJITCompiler.cpp?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/Compiler/JavaJITCompiler.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/Compiler/JavaJITCompiler.cpp Thu Dec 2 11:58:14 2010
@@ -359,10 +359,10 @@
llvm::GCFunctionInfo* GFI = &(GCInfo->getFunctionInfo(*func));
assert((GFI != NULL) && "No GC information");
- Jnjvm* vm = JavaThread::get()->getJVM();
+ mvm::VMKit* vmkit = mvm::Thread::get()->vmkit();
mvm::JITMethodInfo* MI =
new(allocator, "JavaJITMethodInfo") JavaJITMethodInfo(GFI, meth);
- MI->addToVM(vm, (JIT*)executionEngine);
+ MI->addToVMKit(vmkit, (JIT*)executionEngine);
uint32_t infoLength = GFI->size();
meth->codeInfoLength = infoLength;
@@ -401,10 +401,10 @@
llvm::GCFunctionInfo* GFI = &(GCInfo->getFunctionInfo(*F));
assert((GFI != NULL) && "No GC information");
- Jnjvm* vm = JavaThread::get()->getJVM();
+ mvm::VMKit* vmkit = mvm::Thread::get()->vmkit();
mvm::JITMethodInfo* MI =
new(allocator, "JITMethodInfo") mvm::MvmJITMethodInfo(GFI, F, this);
- MI->addToVM(vm, (JIT*)executionEngine);
+ MI->addToVMKit(vmkit, (JIT*)executionEngine);
// Now that it's compiled, we don't need the IR anymore
F->deleteBody();
Modified: vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.cpp?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/JnjvmClassLoader.cpp Thu Dec 2 11:58:14 2010
@@ -34,6 +34,7 @@
#include "debug.h"
#include "mvm/Allocator.h"
+#include "mvm/VMKit.h"
#include "Classpath.h"
#include "ClasspathReflect.h"
@@ -917,8 +918,10 @@
JnjvmClassLoader::~JnjvmClassLoader() {
if (isolate) {
- isolate->removeMethodInfos(TheCompiler);
- }
+ isolate->vmkit->removeMethodInfos(TheCompiler);
+ } else {
+ mvm::Thread::get()->vmkit()->removeMethodInfos(TheCompiler);
+ }
if (classes) {
classes->~ClassMap();
@@ -1128,7 +1131,7 @@
if (!isAbstract(meth.access) && meth.code) {
JavaStaticMethodInfo* MI = new (allocator, "JavaStaticMethodInfo")
JavaStaticMethodInfo(0, meth.code, &meth);
- vm->FunctionsCache.addMethodInfo(MI, meth.code);
+ vm->vmkit->FunctionsCache.addMethodInfo(MI, meth.code);
}
}
@@ -1137,7 +1140,7 @@
if (!isAbstract(meth.access) && meth.code) {
JavaStaticMethodInfo* MI = new (allocator, "JavaStaticMethodInfo")
JavaStaticMethodInfo(0, meth.code, &meth);
- vm->FunctionsCache.addMethodInfo(MI, meth.code);
+ vm->vmkit->FunctionsCache.addMethodInfo(MI, meth.code);
}
}
}
Modified: vmkit/branches/multi-vm/lib/J3/VMCore/VirtualTables.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/J3/VMCore/VirtualTables.cpp?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/J3/VMCore/VirtualTables.cpp (original)
+++ vmkit/branches/multi-vm/lib/J3/VMCore/VirtualTables.cpp Thu Dec 2 11:58:14 2010
@@ -56,7 +56,7 @@
void Jnjvm::initialiseInternalVTs() {
VMClassLoader__VT = (mvm::VirtualTable*)allocator.Allocate(sizeof(mvm::VirtualTable), "Virtual table");
VMClassLoader__VT->destructor = (uintptr_t)VMClassLoader::staticDestructor;
- VMClassLoader__VT->operatorDelete = 0;
+ VMClassLoader__VT->operatorDelete = (uintptr_t)VMClassLoader::staticDestructor;
VMClassLoader__VT->tracer = (uintptr_t)VMClassLoader::staticTracer;
VMClassLoader__VT->vm = this;
}
Modified: vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/CommonThread/CollectionRV.cpp Thu Dec 2 11:58:14 2010
@@ -205,7 +205,7 @@
extern "C" void conditionalSafePoint() {
mvm::Thread* th = mvm::Thread::get();
- th->vmkit->rendezvous.join();
+ th->vmkit()->rendezvous.join();
}
void CooperativeCollectionRV::finishRV() {
@@ -254,7 +254,7 @@
static void siggcHandler(int) {
mvm::Thread* th = mvm::Thread::get();
- th->vmkit->rendezvous.join();
+ th->vmkit()->rendezvous.join();
}
void UncooperativeCollectionRV::prepareForJoin() {
Modified: vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctthread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctthread.cpp?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctthread.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/CommonThread/ctthread.cpp Thu Dec 2 11:58:14 2010
@@ -31,6 +31,10 @@
using namespace mvm;
+mvm::VMKit* Thread::vmkit() {
+ return vmData->vm->vmkit;
+}
+
void Thread::tracer(uintptr_t closure) {
mvm::Collector::markAndTraceRoot(&pendingException, closure);
vmData->tracer(closure);
@@ -52,18 +56,18 @@
Thread* th = mvm::Thread::get();
if (th->isMvmThread()) {
if (th->doYield && !th->inRV) {
- th->vmkit->rendezvous.join();
+ th->vmkit()->rendezvous.join();
}
}
sched_yield();
}
void Thread::joinRVBeforeEnter() {
- vmkit->rendezvous.joinBeforeUncooperative();
+ vmkit()->rendezvous.joinBeforeUncooperative();
}
void Thread::joinRVAfterLeave(void* savedSP) {
- vmkit->rendezvous.joinAfterUncooperative(savedSP);
+ vmkit()->rendezvous.joinAfterUncooperative(savedSP);
}
void Thread::startKnownFrame(KnownFrame& F) {
@@ -177,7 +181,7 @@
ip = FRAME_IP(addr);
bool isStub = ((unsigned char*)ip)[0] == 0xCE;
if (isStub) ip = addr[2];
- return thread->MyVM->IPToMethodInfo(ip);
+ return thread->vmkit()->IPToMethodInfo(ip);
}
void* StackWalker::operator*() {
@@ -429,9 +433,9 @@
#ifdef ISOLATE
th->IsolateID = th->MyVM->IsolateID;
#endif
- th->vmkit->rendezvous.prepareForJoin();
+ th->vmkit()->rendezvous.prepareForJoin();
th->routine(th);
- th->vmkit->rendezvous.removeThread(th);
+ th->vmkit()->rendezvous.removeThread(th);
}
@@ -446,7 +450,7 @@
routine = fct;
// Make sure to add it in the list of threads before leaving this function:
// the garbage collector wants to trace this thread.
- vmkit->rendezvous.addThread(this);
+ vmkit()->rendezvous.addThread(this);
int res = pthread_create((pthread_t*)(void*)(&internalThreadID), &attributs,
(void* (*)(void *))internalThreadStart, this);
pthread_detach((pthread_t)internalThreadID);
@@ -490,3 +494,4 @@
index = (index & ~TheStackManager.baseAddr) >> 20;
TheStackManager.used[index] = 0;
}
+
Modified: vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Compiler/JIT.cpp Thu Dec 2 11:58:14 2010
@@ -44,6 +44,7 @@
#include "mvm/VirtualMachine.h"
#include "MutatorThread.h"
#include "mvm/GC.h"
+#include "mvm/VMKit.h"
#include <dlfcn.h>
#include <sys/mman.h>
@@ -99,11 +100,11 @@
llvm::GCFunctionInfo* GFI = *I;
JITMethodInfo* MI = new(*MvmModule::Allocator, "MvmJITMethodInfo")
MvmJITMethodInfo(GFI, &F, MvmModule::executionEngine);
- MI->addToVM(mvm::Thread::get()->MyVM, (JIT*)MvmModule::executionEngine);
+ MI->addToVMKit(mvm::Thread::get()->vmkit(), (JIT*)MvmModule::executionEngine);
}
};
-void JITMethodInfo::addToVM(VirtualMachine* VM, JIT* jit) {
+void JITMethodInfo::addToVMKit(VMKit* vmkit, JIT* jit) {
JITCodeEmitter* JCE = jit->getCodeEmitter();
assert(GCInfo != NULL);
for (GCFunctionInfo::iterator I = GCInfo->begin(), E = GCInfo->end();
@@ -111,7 +112,7 @@
I++) {
uintptr_t address = JCE->getLabelAddress(I->Label);
assert(address != 0);
- VM->FunctionsCache.addMethodInfo(this, (void*)address);
+ vmkit->FunctionsCache.addMethodInfo(this, (void*)address);
}
}
Modified: vmkit/branches/multi-vm/lib/Mvm/Runtime/MethodInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/lib/Mvm/Runtime/MethodInfo.cpp?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/lib/Mvm/Runtime/MethodInfo.cpp (original)
+++ vmkit/branches/multi-vm/lib/Mvm/Runtime/MethodInfo.cpp Thu Dec 2 11:58:14 2010
@@ -11,6 +11,7 @@
#include "mvm/MethodInfo.h"
#include "mvm/VirtualMachine.h"
#include "mvm/GC.h"
+#include "mvm/VMKit.h"
#include <dlfcn.h>
#include <map>
Modified: vmkit/branches/multi-vm/mmtk/mmtk-j3/ActivePlan.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/mmtk/mmtk-j3/ActivePlan.cpp?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/mmtk/mmtk-j3/ActivePlan.cpp (original)
+++ vmkit/branches/multi-vm/mmtk/mmtk-j3/ActivePlan.cpp Thu Dec 2 11:58:14 2010
@@ -19,8 +19,8 @@
assert(A && "No active plan");
if (A->current == NULL) {
- A->current = (mvm::MutatorThread*)mvm::Thread::get()->vmkit->rendezvous.oneThread;
- } else if (A->current->next() == mvm::Thread::get()->vmkit->rendezvous.oneThread) {
+ A->current = (mvm::MutatorThread*)mvm::Thread::get()->vmkit()->rendezvous.oneThread;
+ } else if (A->current->next() == mvm::Thread::get()->vmkit()->rendezvous.oneThread) {
A->current = NULL;
return NULL;
} else {
Modified: vmkit/branches/multi-vm/mmtk/mmtk-j3/Collection.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/multi-vm/mmtk/mmtk-j3/Collection.cpp?rev=120718&r1=120717&r2=120718&view=diff
==============================================================================
--- vmkit/branches/multi-vm/mmtk/mmtk-j3/Collection.cpp (original)
+++ vmkit/branches/multi-vm/mmtk/mmtk-j3/Collection.cpp Thu Dec 2 11:58:14 2010
@@ -36,14 +36,14 @@
mvm::Thread* th = mvm::Thread::get();
// Verify that another collection is not happening.
- th->vmkit->rendezvous.startRV();
+ th->vmkit()->rendezvous.startRV();
if (th->doYield) {
- th->vmkit->rendezvous.cancelRV();
- th->vmkit->rendezvous.join();
+ th->vmkit()->rendezvous.cancelRV();
+ th->vmkit()->rendezvous.join();
return;
} else {
th->MyVM->startCollection();
- th->vmkit->rendezvous.synchronize();
+ th->vmkit()->rendezvous.synchronize();
JnJVM_org_mmtk_plan_Plan_setCollectionTriggered__();
@@ -73,7 +73,7 @@
elapsedTime / 1000000);
}
- th->vmkit->rendezvous.finishRV();
+ th->vmkit()->rendezvous.finishRV();
th->MyVM->endCollection();
}
@@ -82,7 +82,7 @@
extern "C" void Java_org_j3_mmtk_Collection_joinCollection__ (MMTkObject* C) {
mvm::Thread* th = mvm::Thread::get();
assert(th->inRV && "Joining collection without a rendezvous");
- th->vmkit->rendezvous.join();
+ th->vmkit()->rendezvous.join();
}
extern "C" int Java_org_j3_mmtk_Collection_rendezvous__I (MMTkObject* C, int where) {
More information about the vmkit-commits
mailing list