//mark table....keep track of mark bits
volatile unsigned int * gcmarktbl;
-void * gcbaseva; // base va for shared memory without reserved sblocks
-
bool gc_checkCoreStatus();
void gc_resetCoreStatus();
struct allocrecord allocationinfo;
#ifdef GC_CACHE_ADAPT
-void * gctopva; // top va for shared memory without reserved sblocks
volatile bool gccachestage;
// table recording the sampling data collected for cache adaption
int * gccachesamplingtbl;
void * array[];
};
+void * gctopva; // top va for shared memory without reserved sblocks
+void * gcbaseva; // base va for shared memory without reserved sblocks
+
+
#endif // BAMBOO_MULTICORE_GC_H
#define BAMBOO_SHARED_MEM_SIZE ((unsigned int)((BAMBOO_SMEM_SIZE) * (BAMBOO_NUM_BLOCKS))) //(1024 * 1024 * 240) //((unsigned long long int)(3.0 * 1024 * 1024 * 1024)) // 3G
#endif // GC_DEBUG
-#ifdef MULTICORE_GC
-#ifdef GC_SMALLPAGESIZE
+#if defined(MULTICORE_GC)||defined(PMC_GC)
+#if defined(GC_SMALLPAGESIZE)||defined(PMC_GC)
// memory for globals
#define BAMBOO_GLOBAL_DEFS_SIZE (1024 * 1024)
#define BAMBOO_GLOBAL_DEFS_PRIM_SIZE (1024 * 512)
#include "multicoreruntime.h"
#include "multicoregarbage.h"
#include "multicoretaskprofile.h"
-#include "gcqueue.h"
#include "runtime_arch.h"
+#ifdef MULTICORE_GC
+#include "gcqueue.h"
#include "markbit.h"
+#endif
int msgsizearray[] = {
0, //MSGSTART,
#endif
BAMBOO_ASSERT(type<=MSGEND);
#ifdef TASK
-#ifdef MULTICORE_GC
+#if defined(MULTICORE_GC)
if(type==TRANSOBJ||type==GCLOBJINFO) {
#else
if(type==TRANSOBJ) {
#endif
-#elif MULTICORE_GC
+#elif defined(MULTICORE_GC)
if (type==GCLOBJINFO) {
#endif
#if (defined(TASK)||defined(MULTICORE_GC))
}
}
-#ifndef MULTICORE_GC
+#if !defined(MULTICORE_GC)&&!defined(PMC_GC)
void processmsg_lockrequest_I() {
// check to see if there is a lock exist for the required obj
// msgdata[1] -> lock type
/* Object allocation function */
-#ifdef MULTICORE_GC
+#if defined(MULTICORE_GC)||defined(PMC_GC)
void * allocate_new(void * ptr,
int type) {
struct ___Object___ * v=
#endif
/* Converts C character arrays into Java strings */
-#ifdef MULTICORE_GC
+#if defined(MULTICORE_GC)||defined(PMC_GC)
__attribute__((malloc)) struct ___String___ * NewStringShort(void * ptr,
const short *str,
int length) {
int length) {
#endif
int i;
-#ifdef MULTICORE_GC
+#if defined(MULTICORE_GC)||defined(PMC_GC)
struct ArrayObject * chararray=
allocate_newarray((struct garbagelist *)ptr, CHARARRAYTYPE, length);
INTPTR ptrarray[]={1, (INTPTR) ptr, (INTPTR) chararray};
}
/* Converts C character arrays into Java strings */
-#ifdef MULTICORE_GC
+#if defined(MULTICORE_GC)||defined(PMC_GC)
struct ___String___ * NewString(void * ptr,
const char *str,
int length) {
int length) {
#endif
int i;
-#ifdef MULTICORE_GC
+#if defined(MULTICORE_GC)||defined(PMC_GC)
struct ArrayObject * chararray=
allocate_newarray((struct garbagelist *)ptr, CHARARRAYTYPE, length);
int ptrarray[]={1, (int) ptr, (int) chararray};
/* Generated code calls this if we fail null ptr chk */
void failednullptr(void * ptr) {
-#ifdef MULTICORE_GC
+#if defined(MULTICORE_GC)||defined(PMC_GC)
#ifndef RAW
//print out current stack
int i,j;
//Define the following line if the base object type has pointers
//#define OBJECTHASPOINTERS
-#ifdef MULTICORE_GC
+#if defined(MULTICORE_GC)||defined(PMC_GC)
extern volatile bool gcflag;
#define GCCHECK(p) \
if(gcflag) gc(p)
#include "pmc_garbage.h"
#include "runtime_arch.h"
+struct pmc_heap * pmc_heapptr;
struct pmc_queue * pmc_localqueue;
void incrementthreads() {
#include "runtime.h"
#include <stdio.h>
-#ifdef MULTICORE_GC
+#if defined(MULTICORE_GC)||defined(PMC_GC)
#include "multicoreruntime.h"
#include "bambooalign.h"
-#include "multicoremem.h"
-#include "multicoregarbage.h"
#include "runtime_arch.h"
#include "methodheaders.h"
+#endif
+
+#ifdef MULTICORE_GC
+#include "multicoremem.h"
+#include "multicoregarbage.h"
+#endif
+#if defined(MULTICORE_GC)||defined(PMC_GC)
extern volatile bool gcflag;
void * mycalloc_share(struct garbagelist * stackptr, int size) {
void * p = NULL;
#define RUNFREE(x) myfree(x)
#define RUNFREE_I(x) myfree_i(x)
-#ifdef MULTICORE_GC
+#if defined(MULTICORE_GC)||defined(PMC_GC)
#include "multicoregc.h"
void * mycalloc_share(struct garbagelist * stackptr, int size);
void * mycalloc_share_ngc(int size);
__attribute__((malloc)) StringPtr NewString(void *, const char *str,int length);
__attribute__((malloc)) StringPtr NewStringShort(void *, const short *str,int length);
__attribute__((malloc)) struct ___TagDescriptor___ * allocate_tag(void *ptr, int index);
-#elif defined MULTICORE_GC
+#elif defined(MULTICORE_GC)||defined(PMC_GC)
__attribute__((malloc)) void * allocate_new(void *, int type);
__attribute__((malloc)) struct ArrayObject * allocate_newarray(void *, int type, int length);
__attribute__((malloc)) StringPtr NewString(void *, const char *str,int length);
void createstartupobject();
#endif
-#if defined(PRECISE_GC)||defined(MULTICORE_GC)
+#if defined(PRECISE_GC)||defined(MULTICORE_GC)||defined(PMC_GC)
#define VAR(name) ___params___->name
#define CALL00(name) name(struct name ## _params * ___params___)
#define CALL01(name, alt) name(struct name ## _params * ___params___)