[vmkit-commits] [vmkit] r134239 - in /vmkit/trunk: include/j3/J3Intrinsics.h include/j3/JavaAOTCompiler.h include/j3/JavaLLVMCompiler.h include/mvm/Config/config.h.in include/mvm/Threads/CollectionRV.h include/mvm/Threads/Thread.h lib/Mvm/CommonThread/CollectionRV.cpp lib/Mvm/CommonThread/ObjectLocks.cpp lib/Mvm/CommonThread/cterror.cpp lib/Mvm/CommonThread/cterror.h lib/Mvm/CommonThread/ctlock.cpp lib/Mvm/CommonThread/ctthread.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Fri Jul 1 09:46:40 PDT 2011
Author: geoffray
Date: Fri Jul 1 11:46:40 2011
New Revision: 134239
URL: http://llvm.org/viewvc/llvm-project?rev=134239&view=rev
Log:
Remove obsolete code.
Removed:
vmkit/trunk/lib/Mvm/CommonThread/cterror.cpp
vmkit/trunk/lib/Mvm/CommonThread/cterror.h
Modified:
vmkit/trunk/include/j3/J3Intrinsics.h
vmkit/trunk/include/j3/JavaAOTCompiler.h
vmkit/trunk/include/j3/JavaLLVMCompiler.h
vmkit/trunk/include/mvm/Config/config.h.in
vmkit/trunk/include/mvm/Threads/CollectionRV.h
vmkit/trunk/include/mvm/Threads/Thread.h
vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp
vmkit/trunk/lib/Mvm/CommonThread/ObjectLocks.cpp
vmkit/trunk/lib/Mvm/CommonThread/ctlock.cpp
vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp
Modified: vmkit/trunk/include/j3/J3Intrinsics.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/j3/J3Intrinsics.h?rev=134239&r1=134238&r2=134239&view=diff
==============================================================================
--- vmkit/trunk/include/j3/J3Intrinsics.h (original)
+++ vmkit/trunk/include/j3/J3Intrinsics.h Fri Jul 1 11:46:40 2011
@@ -44,10 +44,6 @@
const llvm::Type* JavaThreadType;
const llvm::Type* MutatorThreadType;
-#ifdef ISOLATE_SHARING
- const llvm::Type* JnjvmType;
-#endif
-
llvm::Function* StartJNIFunction;
llvm::Function* EndJNIFunction;
llvm::Function* InterfaceLookupFunction;
@@ -68,9 +64,7 @@
llvm::Function* ResolveStaticStubFunction;
llvm::Function* ResolveInterfaceFunction;
-#ifndef WITHOUT_VTABLE
llvm::Function* VirtualLookupFunction;
-#endif
llvm::Function* IsAssignableFromFunction;
llvm::Function* IsSecondaryClassFunction;
llvm::Function* GetDepthFunction;
@@ -83,19 +77,6 @@
llvm::Function* MultiCallNewFunction;
llvm::Function* GetArrayClassFunction;
-#ifdef ISOLATE_SHARING
- llvm::Function* GetCtpClassFunction;
- llvm::Function* GetJnjvmExceptionClassFunction;
- llvm::Function* GetJnjvmArrayClassFunction;
- llvm::Function* StaticCtpLookupFunction;
- llvm::Function* SpecialCtpLookupFunction;
-#endif
-
-#ifdef SERVICE
- llvm::Function* ServiceCallStartFunction;
- llvm::Function* ServiceCallStopFunction;
-#endif
-
llvm::Function* GetClassDelegateeFunction;
llvm::Function* RuntimeDelegateeFunction;
llvm::Function* ArrayLengthFunction;
Modified: vmkit/trunk/include/j3/JavaAOTCompiler.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/j3/JavaAOTCompiler.h?rev=134239&r1=134238&r2=134239&view=diff
==============================================================================
--- vmkit/trunk/include/j3/JavaAOTCompiler.h (original)
+++ vmkit/trunk/include/j3/JavaAOTCompiler.h Fri Jul 1 11:46:40 2011
@@ -70,10 +70,6 @@
virtual void setMethod(llvm::Function* func, void* ptr, const char* name);
-#ifdef SERVICE
- virtual llvm::Value* getIsolate(Jnjvm* vm, llvm::Value* Where);
-#endif
-
virtual ~JavaAOTCompiler() {}
virtual void* loadMethod(void* handle, const char* symbol);
@@ -156,13 +152,6 @@
typedef std::map<const UTF8*, llvm::Constant*>::iterator
utf8_iterator;
-#ifdef SERVICE
- virtual llvm::Value* getIsolate(Jnjvm* vm, llvm::Value* Where);
- std::map<const Jnjvm*, llvm::GlobalVariable*> isolates;
- typedef std::map<const Jnjvm*, llvm::GlobalVariable*>::iterator
- isolate_iterator;
-#endif
-
bool isCompiling(const CommonClass* cl) const;
public:
Modified: vmkit/trunk/include/j3/JavaLLVMCompiler.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/j3/JavaLLVMCompiler.h?rev=134239&r1=134238&r2=134239&view=diff
==============================================================================
--- vmkit/trunk/include/j3/JavaLLVMCompiler.h (original)
+++ vmkit/trunk/include/j3/JavaLLVMCompiler.h Fri Jul 1 11:46:40 2011
@@ -197,10 +197,6 @@
virtual void setMethod(llvm::Function* func, void* ptr, const char* name) = 0;
-#ifdef SERVICE
- virtual llvm::Value* getIsolate(Jnjvm* vm, llvm::Value* Where) = 0;
-#endif
-
virtual void* materializeFunction(JavaMethod* meth) = 0;
llvm::Function* parseFunction(JavaMethod* meth);
Modified: vmkit/trunk/include/mvm/Config/config.h.in
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Config/config.h.in?rev=134239&r1=134238&r2=134239&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/Config/config.h.in (original)
+++ vmkit/trunk/include/mvm/Config/config.h.in Fri Jul 1 11:46:40 2011
@@ -78,18 +78,6 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
-/* Using the boehm gc */
-#undef USE_GC_BOEHM
-
-/* Using the gcmmap2 */
-#undef USE_GC_MMAP2
-
-/* Compiling N3 */
-#undef WITH_N3
-
-/* Compiling JNJVM */
-#undef WITH_J3
-
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
Modified: vmkit/trunk/include/mvm/Threads/CollectionRV.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/CollectionRV.h?rev=134239&r1=134238&r2=134239&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/Threads/CollectionRV.h (original)
+++ vmkit/trunk/include/mvm/Threads/CollectionRV.h Fri Jul 1 11:46:40 2011
@@ -80,18 +80,6 @@
};
-class UncooperativeCollectionRV : public CollectionRV {
-public:
- void finishRV();
- void synchronize();
-
- void join();
- void joinAfterUncooperative(void* SP);
- void joinBeforeUncooperative();
- void addThread(Thread* th);
-};
-
-
}
#endif
Modified: vmkit/trunk/include/mvm/Threads/Thread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/Thread.h?rev=134239&r1=134238&r2=134239&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/Threads/Thread.h (original)
+++ vmkit/trunk/include/mvm/Threads/Thread.h Fri Jul 1 11:46:40 2011
@@ -289,12 +289,6 @@
///
void (*routine)(mvm::Thread*);
-#ifdef SERVICE
- /// stoppingService - The service that is currently stopping.
- ///
- VirtualMachine* stoppingService;
-#endif
-
/// printBacktrace - Print the backtrace.
///
void printBacktrace();
Modified: vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp?rev=134239&r1=134238&r2=134239&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/CollectionRV.cpp Fri Jul 1 11:46:40 2011
@@ -82,50 +82,6 @@
unlockRV();
}
-
-#if defined(__MACH__)
-# define SIGGC SIGXCPU
-#else
-# define SIGGC SIGPWR
-#endif
-
-void UncooperativeCollectionRV::synchronize() {
- assert(nbJoined == 0);
- mvm::Thread* self = mvm::Thread::get();
- // Lock thread lock, so that we can traverse the thread list safely. This will
- // be released on finishRV.
- self->MyVM->threadLock.lock();
-
- for (mvm::Thread* cur = (mvm::Thread*)self->next(); cur != self;
- cur = (mvm::Thread*)cur->next()) {
- int res = cur->kill(SIGGC);
- assert(!res && "Error on kill");
- }
-
- // And wait for other threads to finish.
- waitRV();
-
- // Unlock, so that threads in uncooperative code that go back to cooperative
- // code can set back their lastSP.
- unlockRV();
-}
-
-
-void UncooperativeCollectionRV::join() {
- mvm::Thread* th = mvm::Thread::get();
- th->inRV = true;
-
- lockRV();
- void* old = th->getLastSP();
- th->setLastSP(FRAME_PTR());
- another_mark();
- waitEndOfRV();
- th->setLastSP(old);
- unlockRV();
-
- th->inRV = false;
-}
-
void CooperativeCollectionRV::join() {
mvm::Thread* th = mvm::Thread::get();
assert(th->doYield && "No yield");
@@ -213,47 +169,6 @@
mvm::Thread::get()->inRV = false;
}
-void UncooperativeCollectionRV::finishRV() {
- lockRV();
- mvm::Thread* initiator = mvm::Thread::get();
- assert(nbJoined == initiator->MyVM->numberOfThreads && "Inconsistent state");
- nbJoined = 0;
- initiator->MyVM->threadLock.unlock();
- condEndRV.broadcast();
- unlockRV();
- initiator->inRV = false;
-}
-
-void UncooperativeCollectionRV::joinAfterUncooperative(void* SP) {
- UNREACHABLE();
-}
-
-void UncooperativeCollectionRV::joinBeforeUncooperative() {
- UNREACHABLE();
-}
-
void CooperativeCollectionRV::addThread(Thread* th) {
// Nothing to do.
}
-
-static void siggcHandler(int) {
- mvm::Thread* th = mvm::Thread::get();
- th->MyVM->rendezvous.join();
-}
-
-void UncooperativeCollectionRV::addThread(Thread* th) {
- // Set the SIGGC handler for uncooperative rendezvous.
- struct sigaction sa;
- sigset_t mask;
- sigaction(SIGGC, 0, &sa);
- sigfillset(&mask);
- sa.sa_mask = mask;
- sa.sa_handler = siggcHandler;
- sa.sa_flags |= SA_RESTART;
- sigaction(SIGGC, &sa, NULL);
-
- if (nbJoined != 0) {
- // In uncooperative mode, we may have missed a signal.
- join();
- }
-}
Modified: vmkit/trunk/lib/Mvm/CommonThread/ObjectLocks.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/ObjectLocks.cpp?rev=134239&r1=134238&r2=134239&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/ObjectLocks.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/ObjectLocks.cpp Fri Jul 1 11:46:40 2011
@@ -15,7 +15,6 @@
#include "mvm/Threads/Thread.h"
#include "mvm/VirtualMachine.h"
#include "MvmGC.h"
-#include "cterror.h"
#include <cerrno>
#include <sys/time.h>
#include <pthread.h>
Removed: vmkit/trunk/lib/Mvm/CommonThread/cterror.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/cterror.cpp?rev=134238&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/cterror.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/cterror.cpp (removed)
@@ -1,35 +0,0 @@
-//===-------------- cterror.cc - Mvm common threads -----------------------===//
-//
-// Mvm
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "cterror.h"
-#include <stdio.h>
-#include <stdarg.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-void (*pgcdomsgf)(const char *, unsigned int l, const char *, const char *, ...) = _gcdomsgf;
-void (**gcdomsgf)(const char *, unsigned int l, const char *, const char *, ...) = &pgcdomsgf;
-
-const char *ctperror() {
- return strerror(errno);
-}
-
-void _gcdomsgf(const char *file, unsigned int l, const char *func, const char *msg, ...)
-{
- va_list va;
- va_start(va, msg);
- fprintf(stderr, "GC[error] in %s line %d (function %s)\n", file, l, func);
- vfprintf(stderr, msg, va);
- fprintf(stderr, "\n");
- va_end(va);
- exit(0);
-}
-
-
Removed: vmkit/trunk/lib/Mvm/CommonThread/cterror.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/cterror.h?rev=134238&view=auto
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/cterror.h (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/cterror.h (removed)
@@ -1,22 +0,0 @@
-//===---------------- cterror.h - Mvm common threads ----------------------===//
-//
-// Mvm
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef _CT_ERROR_H_
-#define _CT_ERROR_H_
-
-extern const char *ctperror();
-extern void _gcdomsgf(const char *file, unsigned int l, const char *func, const char *msg, ...);
-extern void (*pgcdomsgf)(const char *, unsigned int l, const char *, const char *, ...);
-extern void (**gcdomsgf)(const char *, unsigned int l, const char *, const char *, ...);
-
-#define ctfatal(msg) (*gcdomsgf)(__FILE__, __LINE__, __PRETTY_FUNCTION__, msg)
-
-#endif
-
-
Modified: vmkit/trunk/lib/Mvm/CommonThread/ctlock.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/ctlock.cpp?rev=134239&r1=134238&r2=134239&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/ctlock.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/ctlock.cpp Fri Jul 1 11:46:40 2011
@@ -14,7 +14,6 @@
#include "mvm/Threads/Thread.h"
#include "mvm/VirtualMachine.h"
#include "MvmGC.h"
-#include "cterror.h"
#include <cerrno>
#include <sys/time.h>
#include <pthread.h>
Modified: vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp?rev=134239&r1=134238&r2=134239&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp (original)
+++ vmkit/trunk/lib/Mvm/CommonThread/ctthread.cpp Fri Jul 1 11:46:40 2011
@@ -93,12 +93,6 @@
lastKnownFrame = lastKnownFrame->previousFrame;
}
-#if defined(__MACH__)
-#define SELF_HANDLE RTLD_DEFAULT
-#else
-#define SELF_HANDLE 0
-#endif
-
void Thread::internalThrowException() {
#if defined(__MACH__)
_longjmp(lastExceptionBuffer->buffer, 1);
@@ -374,9 +368,6 @@
assert(th->MyVM && "VM not set in a thread");
-#ifdef ISOLATE
- th->IsolateID = th->MyVM->IsolateID;
-#endif
th->MyVM->rendezvous.addThread(th);
th->routine(th);
th->MyVM->removeThread(th);
More information about the vmkit-commits
mailing list