[vmkit-commits] [vmkit] r120477 - in /vmkit/trunk: Makefile.rules autoconf/configure.ac configure include/mvm/GC/GC.h include/mvm/Threads/Locks.h include/mvm/Threads/ObjectLocks.h
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Tue Nov 30 14:30:57 PST 2010
Author: geoffray
Date: Tue Nov 30 16:30:57 2010
New Revision: 120477
URL: http://llvm.org/viewvc/llvm-project?rev=120477&view=rev
Log:
Refactor the code so that we don't need to create a ObjectHeader.h. This has the disadvantage that the same object layout is used for all the GCs we support, and the GC.h file needs to be edited by hand to tweak it.
Modified:
vmkit/trunk/Makefile.rules
vmkit/trunk/autoconf/configure.ac
vmkit/trunk/configure
vmkit/trunk/include/mvm/GC/GC.h
vmkit/trunk/include/mvm/Threads/Locks.h
vmkit/trunk/include/mvm/Threads/ObjectLocks.h
Modified: vmkit/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/Makefile.rules?rev=120477&r1=120476&r2=120477&view=diff
==============================================================================
--- vmkit/trunk/Makefile.rules (original)
+++ vmkit/trunk/Makefile.rules Tue Nov 30 16:30:57 2010
@@ -1,3 +1,5 @@
+LTO_OPTS = -std-compile-opts
+
ifdef VMKIT_RUNTIME
Modified: vmkit/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/autoconf/configure.ac?rev=120477&r1=120476&r2=120477&view=diff
==============================================================================
--- vmkit/trunk/autoconf/configure.ac (original)
+++ vmkit/trunk/autoconf/configure.ac Tue Nov 30 16:30:57 2010
@@ -222,9 +222,9 @@
AC_ARG_WITH(mmtk-plan,
[AS_HELP_STRING(--with-mmtk-plan=something,
- [MMTk plan type ('marksweep')])],
- [[MMTK_PLAN_HEADER=$withval]],
- [[MMTK_PLAN_HEADER=marksweep]]
+ [MMTk plan type ('org.mmtk.plan.marksweep.MS')])],
+ [[MMTK_PLAN=$withval]],
+ [[MMTK_PLAN=org.mmtk.plan.marksweep.MS]]
)
if test "x$gc" = "xboehm"; then
@@ -247,7 +247,7 @@
AC_SUBST(GC_BOEHM, [0])
AC_SUBST(GC_MMTK, [1])
GC_LIBS=MMTk
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk -DWITH_MMTK -I\$(PROJ_SRC_ROOT)/mmtk/config/\$(MMTK_PLAN_HEADER)"
+ GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk -DWITH_MMTK"
else
GC_LIBS=GCMmap2
if test "x$gc" = "xmulti-mmap"; then
@@ -266,23 +266,9 @@
fi
fi
-
-if test "x$MMTK_PLAN_HEADER" = "xmarksweep"; then
- MMTK_PLAN=org.mmtk.plan.marksweep.MS
-else
- if test "x$MMTK_PLAN_HEADER" = "xcopyms"; then
- MMTK_PLAN=org.mmtk.plan.copyms.CopyMS
- else
- if test "x$MMTK_PLAN_HEADER" != "x"; then
- error Unknown or unsupported MMTK plan
- fi
- fi
-fi
-
AC_SUBST([GC_FLAGS])
AC_SUBST([GC_LIBS])
AC_SUBST([MMTK_PLAN])
-AC_SUBST([MMTK_PLAN_HEADER])
dnl **************************************************************************
dnl Virtual Machine type
Modified: vmkit/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=120477&r1=120476&r2=120477&view=diff
==============================================================================
--- vmkit/trunk/configure (original)
+++ vmkit/trunk/configure Tue Nov 30 16:30:57 2010
@@ -641,7 +641,6 @@
ISOLATE_BUILD
SERVICE_BUILD
SINGLE_BUILD
-MMTK_PLAN_HEADER
MMTK_PLAN
GC_LIBS
GC_FLAGS
@@ -1371,7 +1370,7 @@
--with-gc=something GC type ('mmtk' (requires llvm-gcc) 'single-mmap'
'multi-mmap' or 'boehm')
--with-mmtk-plan=something
- MMTk plan type ('marksweep')
+ MMTk plan type ('org.mmtk.plan.marksweep.MS')
--with-vm-type=something
VM type ('single' 'isolate' 'isolate-sharing' or
'service')
@@ -3861,9 +3860,9 @@
# Check whether --with-mmtk-plan was given.
if test "${with_mmtk_plan+set}" = set; then :
- withval=$with_mmtk_plan; MMTK_PLAN_HEADER=$withval
+ withval=$with_mmtk_plan; MMTK_PLAN=$withval
else
- MMTK_PLAN_HEADER=marksweep
+ MMTK_PLAN=org.mmtk.plan.marksweep.MS
fi
@@ -3898,7 +3897,7 @@
GC_MMTK=1
GC_LIBS=MMTk
- GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk -DWITH_MMTK -I\$(PROJ_SRC_ROOT)/mmtk/config/\$(MMTK_PLAN_HEADER)"
+ GC_FLAGS="-I\$(PROJ_SRC_ROOT)/lib/Mvm/MMTk -DWITH_MMTK"
else
GC_LIBS=GCMmap2
if test "x$gc" = "xmulti-mmap"; then
@@ -3927,20 +3926,6 @@
fi
-if test "x$MMTK_PLAN_HEADER" = "xmarksweep"; then
- MMTK_PLAN=org.mmtk.plan.marksweep.MS
-else
- if test "x$MMTK_PLAN_HEADER" = "xcopyms"; then
- MMTK_PLAN=org.mmtk.plan.copyms.CopyMS
- else
- if test "x$MMTK_PLAN_HEADER" != "x"; then
- error Unknown or unsupported MMTK plan
- fi
- fi
-fi
-
-
-
Modified: vmkit/trunk/include/mvm/GC/GC.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/GC/GC.h?rev=120477&r1=120476&r2=120477&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/GC/GC.h (original)
+++ vmkit/trunk/include/mvm/GC/GC.h Tue Nov 30 16:30:57 2010
@@ -12,7 +12,6 @@
#define MVM_GC_H
#include <stdint.h>
-#include "ObjectHeader.h"
struct VirtualTable;
@@ -36,6 +35,11 @@
};
namespace mvm {
+ // TODO(ngeoffray): Make these two constants easily configurable. For now they
+ // work for all our supported GCs.
+ static const uint32_t GCBits = 8;
+ static const bool MovesObject = true;
+
static const uint32_t HashBits = 8;
static const uint64_t GCBitMask = ((1 << GCBits) - 1);
}
Modified: vmkit/trunk/include/mvm/Threads/Locks.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/Locks.h?rev=120477&r1=120476&r2=120477&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/Threads/Locks.h (original)
+++ vmkit/trunk/include/mvm/Threads/Locks.h Tue Nov 30 16:30:57 2010
@@ -14,7 +14,6 @@
#include <cassert>
#include <cstdio>
-#include "ObjectHeader.h"
#include "mvm/Threads/Thread.h"
#ifdef WITH_LLVM_GCC
Modified: vmkit/trunk/include/mvm/Threads/ObjectLocks.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/ObjectLocks.h?rev=120477&r1=120476&r2=120477&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/Threads/ObjectLocks.h (original)
+++ vmkit/trunk/include/mvm/Threads/ObjectLocks.h Tue Nov 30 16:30:57 2010
@@ -10,7 +10,6 @@
#ifndef MVM_OBJECT_LOCKS_H
#define MVM_OBJECT_LOCKS_H
-#include "ObjectHeader.h"
#include "mvm/Allocator.h"
#include "mvm/GC/GC.h"
#include "mvm/Threads/Cond.h"
More information about the vmkit-commits
mailing list