[vmkit-commits] [vmkit] r134150 - in /vmkit/trunk: Makefile.common.in Makefile.config.in autoconf/configure.ac configure include/mvm/Allocator.h lib/J3/Compiler/JavaAOTCompiler.cpp lib/J3/LLVMRuntime/Makefile lib/J3/VMCore/JavaClass.cpp lib/J3/VMCore/JavaClass.h lib/Mvm/Compiler/JIT.cpp tools/llcj/llcj.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Thu Jun 30 06:50:38 PDT 2011
Author: geoffray
Date: Thu Jun 30 08:50:38 2011
New Revision: 134150
URL: http://llvm.org/viewvc/llvm-project?rev=134150&view=rev
Log:
vmkit only supports MMTk.
Modified:
vmkit/trunk/Makefile.common.in
vmkit/trunk/Makefile.config.in
vmkit/trunk/autoconf/configure.ac
vmkit/trunk/configure
vmkit/trunk/include/mvm/Allocator.h
vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp
vmkit/trunk/lib/J3/LLVMRuntime/Makefile
vmkit/trunk/lib/J3/VMCore/JavaClass.cpp
vmkit/trunk/lib/J3/VMCore/JavaClass.h
vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
vmkit/trunk/tools/llcj/llcj.cpp
Modified: vmkit/trunk/Makefile.common.in
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.common.in?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/Makefile.common.in (original)
+++ vmkit/trunk/Makefile.common.in Thu Jun 30 08:50:38 2011
@@ -36,9 +36,4 @@
LIBS += -lz
-# GC configuration
-ifeq ($(GCLIB), BoehmGC)
- LIBS += -lgc
-endif
-
include $(PROJ_SRC_ROOT)/Makefile.rules
Modified: vmkit/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.config.in?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/Makefile.config.in (original)
+++ vmkit/trunk/Makefile.config.in Thu Jun 30 08:50:38 2011
@@ -1,14 +1,8 @@
-GCLIB = @GC_LIBS@
WITH_N3 = @WITH_N3@
WITH_N3_PNETLIB = @WITH_N3_PNETLIB@
WITH_N3_MONO = @WITH_N3_MONO@
WITH_J3 = @WITH_J3@
N3_LIB = @N3_LIB@
-GC_MULTI_MMAP = @GC_MULTI_MMAP@
-GC_SINGLE_MMAP = @GC_SINGLE_MMAP@
-GC_BOEHM = @GC_BOEHM@
-GC_MMAP2 = @GC_MMAP2@
-GC_MMTK = @GC_MMTK@
MMTK_PLAN = @MMTK_PLAN@
MMTK_PLAN_HEADER = @MMTK_PLAN_HEADER@
ISOLATE_BUILD = @ISOLATE_BUILD@
Modified: vmkit/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/autoconf/configure.ac (original)
+++ vmkit/trunk/autoconf/configure.ac Thu Jun 30 08:50:38 2011
@@ -167,15 +167,6 @@
dnl **************************************************************************
dnl GC type
dnl **************************************************************************
-AC_ARG_WITH(gc,
- [AS_HELP_STRING(--with-gc=something,
- [GC type ('mmtk' (requires llvm-gcc) 'single-mmap' 'multi-mmap' or 'boehm')])],
- [[gc=$withval]],
- [[ echo Using mmap2 as vvm gc type.
- gc=single-mmap
- ]]
-)
-
AC_ARG_WITH(mmtk-plan,
[AS_HELP_STRING(--with-mmtk-plan=something,
[MMTk plan type ('org.mmtk.plan.marksweep.MS')])],
@@ -183,47 +174,9 @@
[[MMTK_PLAN=org.mmtk.plan.marksweep.MS]]
)
-if test "x$gc" = "xboehm"; then
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DGC_THREADS"
- AC_DEFINE([USE_GC_BOEHM], [1], [Using the boehm gc])
- AC_SUBST(GC_MMAP2, [0])
- AC_SUBST(GC_BOEHM, [1])
- AC_SUBST(GC_MMTK, [0])
- GC_LIBS=BoehmGC
- case $target_os in
- *linux*)
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DUSE_GC_BOEHM -DGC_THREADS -DGC_LINUX_THREADS"
- ;;
- esac
-else
- if test "x$gc" = "xmmtk"; then
- AC_SUBST([GC_MULTI_MMAP], [0])
- AC_SUBST([GC_SINGLE_MMAP], [1])
- AC_SUBST(GC_MMAP2, [0])
- AC_SUBST(GC_BOEHM, [0])
- AC_SUBST(GC_MMTK, [1])
- GC_LIBS=MMTk
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk -DWITH_MMTK"
- else
- GC_LIBS=GCMmap2
- if test "x$gc" = "xmulti-mmap"; then
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -DMULTIPLE_GC -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator"
- AC_SUBST([GC_MULTI_MMAP], [1])
- AC_SUBST([GC_SINGLE_MMAP], [0])
- else
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator"
- AC_SUBST([GC_MULTI_MMAP], [0])
- AC_SUBST([GC_SINGLE_MMAP], [1])
- fi
- AC_DEFINE([USE_GC_MMAP2], [1], [Using the gcmmap2])
- AC_SUBST(GC_MMAP2, [1])
- AC_SUBST(GC_BOEHM, [0])
- AC_SUBST(GC_MMTK, [0])
- fi
-fi
+GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk"
AC_SUBST([GC_FLAGS])
-AC_SUBST([GC_LIBS])
AC_SUBST([MMTK_PLAN])
dnl **************************************************************************
@@ -429,13 +382,7 @@
AC_PATH_PROG(LLVMAS, [llvm-as], [llvm-as])
AC_PATH_PROG(LLC, [llc], [llc])
-
-if test "x$gc" = "xmmtk"; then
- AC_PATH_PROG(ANT, [ant])
- if test -z "$ANT"; then
- AC_MSG_ERROR([Apache ANT required for MMTk, but not found])
- fi
-fi
+AC_PATH_PROG(ANT, [ant])
dnl Find the install program
AC_PROG_INSTALL
@@ -508,11 +455,6 @@
[AC_MSG_ERROR([You need to install the zlib package (z).])]
)
-if test "x$gc" = "xboehm"; then
-AC_CHECK_LIB(gc, GC_malloc, [], \
- [AC_MSG_ERROR([You need to install the boehm-gc package (gc).])]
-)
-fi
dnl===-----------------------------------------------------------------------===
dnl===
@@ -524,13 +466,6 @@
AC_MSG_ERROR([You need to install the zlib devel package (zlib.h).])
)
-if test "x$gc" = "xboehm"; then
- AC_CHECK_HEADER([gc/gc.h], [], \
- AC_MSG_ERROR([You need to install the boehm-gc devel package (gc/gc.h).])
- )
-fi
-
-
nl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 7: Check for types and structures
Modified: vmkit/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/configure (original)
+++ vmkit/trunk/configure Thu Jun 30 08:50:38 2011
@@ -652,13 +652,7 @@
SERVICE_BUILD
SINGLE_BUILD
MMTK_PLAN
-GC_LIBS
GC_FLAGS
-GC_SINGLE_MMAP
-GC_MULTI_MMAP
-GC_MMTK
-GC_BOEHM
-GC_MMAP2
WITH_64
DYLIB_EXTENSION
target_os
@@ -719,7 +713,6 @@
enable_option_checking
with_llvmsrc
with_llvmobj
-with_gc
with_mmtk_plan
with_vm_type
with_exception_type
@@ -1360,8 +1353,6 @@
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-llvmsrc Location of LLVM Source Code
--with-llvmobj Location of LLVM Object Code
- --with-gc=something GC type ('mmtk' (requires llvm-gcc) 'single-mmap'
- 'multi-mmap' or 'boehm')
--with-mmtk-plan=something
MMTk plan type ('org.mmtk.plan.marksweep.MS')
--with-vm-type=something
@@ -2547,18 +2538,6 @@
-# Check whether --with-gc was given.
-if test "${with_gc+set}" = set; then :
- withval=$with_gc; gc=$withval
-else
- echo Using mmap2 as vvm gc type.
- gc=single-mmap
-
-
-fi
-
-
-
# Check whether --with-mmtk-plan was given.
if test "${with_mmtk_plan+set}" = set; then :
withval=$with_mmtk_plan; MMTK_PLAN=$withval
@@ -2568,64 +2547,7 @@
fi
-if test "x$gc" = "xboehm"; then
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DGC_THREADS"
-
-$as_echo "#define USE_GC_BOEHM 1" >>confdefs.h
-
- GC_MMAP2=0
-
- GC_BOEHM=1
-
- GC_MMTK=0
-
- GC_LIBS=BoehmGC
- case $target_os in
- *linux*)
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/BoehmGC -DUSE_GC_BOEHM -DGC_THREADS -DGC_LINUX_THREADS"
- ;;
- esac
-else
- if test "x$gc" = "xmmtk"; then
- GC_MULTI_MMAP=0
-
- GC_SINGLE_MMAP=1
-
- GC_MMAP2=0
-
- GC_BOEHM=0
-
- GC_MMTK=1
-
- GC_LIBS=MMTk
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk -DWITH_MMTK"
- else
- GC_LIBS=GCMmap2
- if test "x$gc" = "xmulti-mmap"; then
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -DMULTIPLE_GC -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator"
- GC_MULTI_MMAP=1
-
- GC_SINGLE_MMAP=0
-
- else
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/GCMmap2 -DWITH_TRACER -I\$(PROJ_SRC_ROOT)/lib/Mvm/Allocator"
- GC_MULTI_MMAP=0
-
- GC_SINGLE_MMAP=1
-
- fi
-
-$as_echo "#define USE_GC_MMAP2 1" >>confdefs.h
-
- GC_MMAP2=1
-
- GC_BOEHM=0
-
- GC_MMTK=0
-
- fi
-fi
-
+GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk"
@@ -5087,9 +5009,7 @@
fi
-
-if test "x$gc" = "xmmtk"; then
- # Extract the first word of "ant", so it can be a program name with args.
+# Extract the first word of "ant", so it can be a program name with args.
set dummy ant; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
@@ -5129,10 +5049,6 @@
fi
- if test -z "$ANT"; then
- as_fn_error $? "Apache ANT required for MMTk, but not found" "$LINENO" 5
- fi
-fi
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -5421,57 +5337,6 @@
fi
-if test "x$gc" = "xboehm"; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_malloc in -lgc" >&5
-$as_echo_n "checking for GC_malloc in -lgc... " >&6; }
-if test "${ac_cv_lib_gc_GC_malloc+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgc $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char GC_malloc ();
-int
-main ()
-{
-return GC_malloc ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_gc_GC_malloc=yes
-else
- ac_cv_lib_gc_GC_malloc=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5
-$as_echo "$ac_cv_lib_gc_GC_malloc" >&6; }
-if test "x$ac_cv_lib_gc_GC_malloc" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGC 1
-_ACEOF
-
- LIBS="-lgc $LIBS"
-
-else
- \
- as_fn_error $? "You need to install the boehm-gc package (gc)." "$LINENO" 5
-
-fi
-
-fi
@@ -5745,20 +5610,6 @@
-if test "x$gc" = "xboehm"; then
- ac_fn_c_check_header_mongrel "$LINENO" "gc/gc.h" "ac_cv_header_gc_gc_h" "$ac_includes_default"
-if test "x$ac_cv_header_gc_gc_h" = x""yes; then :
-
-else
- \
- as_fn_error $? "You need to install the boehm-gc devel package (gc/gc.h)." "$LINENO" 5
-
-fi
-
-
-fi
-
-
nl===-----------------------------------------------------------------------===
ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Modified: vmkit/trunk/include/mvm/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Allocator.h?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/Allocator.h (original)
+++ vmkit/trunk/include/mvm/Allocator.h Thu Jun 30 08:50:38 2011
@@ -30,15 +30,11 @@
llvm::BumpPtrAllocator Allocator;
public:
void* Allocate(size_t sz, const char* name) {
-#ifdef USE_GC_BOEHM
- return GC_MALLOC(sz);
-#else
TheLock.acquire();
void* res = Allocator.Allocate(sz, sizeof(void*));
TheLock.release();
memset(res, 0, sz);
return res;
-#endif
}
void Deallocate(void* obj) {}
@@ -50,13 +46,9 @@
llvm::BumpPtrAllocator Allocator;
public:
void* Allocate(size_t sz) {
-#ifdef USE_GC_BOEHM
- return GC_MALLOC(sz);
-#else
void* res = Allocator.Allocate(sz, sizeof(void*));
memset(res, 0, sz);
return res;
-#endif
}
void Deallocate(void* obj) {}
Modified: vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaAOTCompiler.cpp Thu Jun 30 08:50:38 2011
@@ -2204,8 +2204,7 @@
return JavaCompiler::loadMethod(handle, symbol);
}
-#ifdef WITH_MMTK
-
+// TODO: clean up to have a better interface with the fake GC.
#include <set>
extern std::set<gc*> __InternalSet__;
@@ -2228,9 +2227,3 @@
}
return currentClass;
}
-
-#else
-CommonClass* JavaAOTCompiler::getUniqueBaseClass(CommonClass* cl) {
- return 0;
-}
-#endif
Modified: vmkit/trunk/lib/J3/LLVMRuntime/Makefile
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/LLVMRuntime/Makefile?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/LLVMRuntime/Makefile (original)
+++ vmkit/trunk/lib/J3/LLVMRuntime/Makefile Thu Jun 30 08:50:38 2011
@@ -12,11 +12,7 @@
VMKIT_RUNTIME = $(PROJ_SRC_DIR)/runtime-default.ll
-ifeq ($(GC_MMTK), 1)
VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-mmtk-thread.ll
-else
-VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-default-thread.ll
-endif
ifeq ($(ISOLATE_BUILD), 1)
VMKIT_RUNTIME += $(PROJ_SRC_DIR)/runtime-isolate.ll
Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.cpp?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaClass.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaClass.cpp Thu Jun 30 08:50:38 2011
@@ -629,12 +629,8 @@
}
void* UserClass::allocateStaticInstance(Jnjvm* vm) {
-#ifdef USE_GC_BOEHM
- void* val = GC_MALLOC(getStaticSize());
-#else
void* val = classLoader->allocator.Allocate(getStaticSize(),
"Static instance");
-#endif
setStaticInstance(val);
return val;
}
Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.h?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaClass.h (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaClass.h Thu Jun 30 08:50:38 2011
@@ -368,12 +368,6 @@
//
static UserCommonClass* resolvedImplClass(Jnjvm* vm, JavaObject* delegatee,
bool doClinit);
-#ifdef USE_GC_BOEHM
- void* operator new(size_t sz, mvm::BumpPtrAllocator& allocator) {
- return GC_MALLOC(sz);
- }
-#endif
-
};
/// ClassPrimitive - This class represents internal classes for primitive
Modified: vmkit/trunk/lib/Mvm/Compiler/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/Compiler/JIT.cpp?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/lib/Mvm/Compiler/JIT.cpp (original)
+++ vmkit/trunk/lib/Mvm/Compiler/JIT.cpp Thu Jun 30 08:50:38 2011
@@ -397,10 +397,8 @@
addPass(PM, createVerifierPass()); // Verify that input is correct
-#ifdef WITH_MMTK
addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code
addPass(PM, createInlineMallocPass());
-#endif
// Create a new optimization pass for each one specified on the command line
for (unsigned i = 0; i < PassList.size(); ++i) {
Modified: vmkit/trunk/tools/llcj/llcj.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tools/llcj/llcj.cpp?rev=134150&r1=134149&r2=134150&view=diff
==============================================================================
--- vmkit/trunk/tools/llcj/llcj.cpp (original)
+++ vmkit/trunk/tools/llcj/llcj.cpp Thu Jun 30 08:50:38 2011
@@ -215,9 +215,6 @@
gccArgv[gccArgc++] = VMKITLibs2;
gccArgv[gccArgc++] = VMKITLibs3;
gccArgv[gccArgc++] = "-pthread";
-#ifdef USE_GC_BOEHM
- gccArgv[gccArgc++] = "-lgc";
-#endif
gccArgv[gccArgc++] = "-lm";
gccArgv[gccArgc++] = "-ldl";
gccArgv[gccArgc++] = "-lz";
More information about the vmkit-commits
mailing list