gc_common.h File Reference


Classes

struct  GC

Defines

#define GC_GEN_STATS
 
Author:
Xiao-Feng Li, 2006/10/05

#define null   0
#define KB   (1<<10)
#define MB   (1<<20)
#define verbose_print_size(size)   (((size)/MB!=0)?(size)/MB:(((size)/KB!=0)?(size)/KB:(size)))<<(((size)/MB!=0)?"MB":(((size)/KB!=0)?"KB":"B"))
#define BITS_PER_BYTE   8
#define BYTES_PER_WORD   (sizeof(POINTER_SIZE_INT))
#define BITS_PER_WORD   (BITS_PER_BYTE * BYTES_PER_WORD)
#define MASK_OF_BYTES_PER_WORD   (BYTES_PER_WORD-1)
#define BIT_SHIFT_TO_BITS_PER_BYTE   3
#define BIT_SHIFT_TO_BYTES_PER_WORD   2
#define BIT_SHIFT_TO_BITS_PER_WORD   5
#define BIT_SHIFT_TO_KILO   10
#define BIT_MASK_TO_BITS_PER_WORD   ((1<<BIT_SHIFT_TO_BITS_PER_WORD)-1)
#define BITS_OF_POINTER_SIZE_INT   (sizeof(POINTER_SIZE_INT) << BIT_SHIFT_TO_BITS_PER_BYTE)
#define BYTES_OF_POINTER_SIZE_INT   (sizeof(POINTER_SIZE_INT))
#define BIT_SHIFT_TO_BYTES_OF_POINTER_SIZE_INT   ((sizeof(POINTER_SIZE_INT)==4)? 2: 3)
#define GC_OBJ_SIZE_THRESHOLD   (5*KB)
#define USE_32BITS_HASHCODE
#define REF   Partial_Reveal_Object*

Typedefs

typedef void(*) TaskType (void *)

Enumerations

enum  Collection_Algorithm {
  COLLECTION_ALGOR_NIL, MINOR_GEN_FORWARD_POOL, MINOR_NONGEN_FORWARD_POOL, MINOR_GEN_SEMISPACE_POOL,
  MINOR_NONGEN_SEMISPACE_POOL, MAJOR_COMPACT_SLIDE, MAJOR_COMPACT_MOVE, MAJOR_MARK_SWEEP
}
enum  Collection_Kind {
  GEN_GC = 0x1, MARK_SWEEP_GC = 0x2, MOVE_COMPACT_NO_LOS = 0x4, GC_BASIC_KIND_MASK = ~(unsigned int)0x7,
  MINOR_COLLECTION = 0x11, MAJOR_COLLECTION = 0x21, NORMAL_MAJOR_COLLECTION = 0x121, FALLBACK_COLLECTION = 0x221,
  EXTEND_COLLECTION = 0x421, MS_COLLECTION = 0x1002, MS_COMPACT_COLLECTION = 0x2002, MC_COLLECTION = 0x1004
}
enum  GC_CAUSE {
  GC_CAUSE_NIL, GC_CAUSE_NOS_IS_FULL, GC_CAUSE_LOS_IS_FULL, GC_CAUSE_COS_IS_FULL,
  GC_CAUSE_WSPACE_IS_FULL, GC_CAUSE_RUNTIME_FORCE_GC
}

Functions

FORCE_INLINE Partial_Reveal_Objectobj_ptr_to_ref (Partial_Reveal_Object *p_obj)
FORCE_INLINE Partial_Reveal_Objectref_to_obj_ptr (Partial_Reveal_Object *ref)
FORCE_INLINE Partial_Reveal_Objectread_slot (Partial_Reveal_Object **p_slot)
FORCE_INLINE void write_slot (Partial_Reveal_Object **p_slot, Partial_Reveal_Object *p_obj)
POINTER_SIZE_INT round_up_to_size (POINTER_SIZE_INT size, int block_size)
POINTER_SIZE_INT round_down_to_size (POINTER_SIZE_INT size, int block_size)
int * object_ref_iterator_init (Partial_Reveal_Object *obj)
FORCE_INLINE Partial_Reveal_Object ** object_ref_iterator_get (int *iterator, Partial_Reveal_Object *obj)
int * object_ref_iterator_next (int *iterator)
Boolean obj_is_marked_in_vt (Partial_Reveal_Object *obj)
Boolean obj_mark_in_vt (Partial_Reveal_Object *obj)
void obj_unmark_in_vt (Partial_Reveal_Object *obj)
void obj_clear_dual_bits_in_vt (Partial_Reveal_Object *p_obj)
Boolean obj_is_marked_or_fw_in_oi (Partial_Reveal_Object *obj)
void obj_clear_dual_bits_in_oi (Partial_Reveal_Object *obj)
Partial_Reveal_Objectobj_get_fw_in_oi (Partial_Reveal_Object *obj)
Boolean obj_is_fw_in_oi (Partial_Reveal_Object *obj)
void obj_set_fw_in_oi (Partial_Reveal_Object *obj, void *dest)
Boolean obj_is_marked_in_oi (Partial_Reveal_Object *obj)
FORCE_INLINE Boolean obj_mark_in_oi (Partial_Reveal_Object *obj)
void obj_unmark_in_oi (Partial_Reveal_Object *obj)
Boolean obj_is_dirty_in_oi (Partial_Reveal_Object *p_obj)
Boolean obj_dirty_in_oi (Partial_Reveal_Object *p_obj)
Boolean is_obj_alloced_live ()
void gc_enable_alloc_obj_live ()
void gc_disable_alloc_obj_live ()
Boolean obj_is_survivor (Partial_Reveal_Object *p_obj)
void obj_set_age_bit (Partial_Reveal_Object *p_obj)
void obj_clear_age_bit (Partial_Reveal_Object *p_obj)
Boolean obj_is_remembered (Partial_Reveal_Object *p_obj)
void obj_set_rem_bit (Partial_Reveal_Object *p_obj)
void obj_clear_rem_bit (Partial_Reveal_Object *p_obj)
void mark_scan_pool (Collector *collector)
void mark_scan_heap (Collector *collector)
void * gc_heap_base (GC *gc)
void * gc_heap_ceiling (GC *gc)
Boolean address_belongs_to_gc_heap (void *addr, GC *gc)
Boolean obj_belongs_to_gc_heap (Partial_Reveal_Object *p_obj)
Boolean gc_match_kind (GC *gc, unsigned int kind)
Boolean gc_match_either_kind (GC *gc, unsigned int multi_kinds)
unsigned int gc_get_processor_num (GC *gc)
void gc_parse_options (GC *gc)
void gc_reclaim_heap (GC *gc, unsigned int gc_cause)
void gc_prepare_rootset (GC *gc)
int64 get_collection_end_time ()
void gc_init_collector_alloc (GC *gc, Collector *collector)
void gc_reset_collector_alloc (GC *gc, Collector *collector)
void gc_destruct_collector_alloc (GC *gc, Collector *collector)
FORCE_INLINE Boolean addr_belongs_to_nos (void *addr)
FORCE_INLINE Boolean obj_belongs_to_nos (Partial_Reveal_Object *p_obj)
Boolean obj_is_moved (Partial_Reveal_Object *p_obj)

Variables

Boolean IS_FALLBACK_COMPACTION
POINTER_SIZE_INT HEAP_NULL
volatile Boolean obj_alloced_live
Boolean NOS_PARTIAL_FORWARD
void * nos_boundary
void * los_boundary
Boolean * p_global_lspace_move_obj
Boolean TRACE_JLC_VIA_VTABLE


Define Documentation

#define GC_GEN_STATS

Author:
Xiao-Feng Li, 2006/10/05

#define null   0

#define KB   (1<<10)

#define MB   (1<<20)

#define verbose_print_size ( size   )     (((size)/MB!=0)?(size)/MB:(((size)/KB!=0)?(size)/KB:(size)))<<(((size)/MB!=0)?"MB":(((size)/KB!=0)?"KB":"B"))

#define BITS_PER_BYTE   8

#define BYTES_PER_WORD   (sizeof(POINTER_SIZE_INT))

#define BITS_PER_WORD   (BITS_PER_BYTE * BYTES_PER_WORD)

#define MASK_OF_BYTES_PER_WORD   (BYTES_PER_WORD-1)

#define BIT_SHIFT_TO_BITS_PER_BYTE   3

#define BIT_SHIFT_TO_BYTES_PER_WORD   2

#define BIT_SHIFT_TO_BITS_PER_WORD   5

#define BIT_SHIFT_TO_KILO   10

#define BIT_MASK_TO_BITS_PER_WORD   ((1<<BIT_SHIFT_TO_BITS_PER_WORD)-1)

#define BITS_OF_POINTER_SIZE_INT   (sizeof(POINTER_SIZE_INT) << BIT_SHIFT_TO_BITS_PER_BYTE)

#define BYTES_OF_POINTER_SIZE_INT   (sizeof(POINTER_SIZE_INT))

#define BIT_SHIFT_TO_BYTES_OF_POINTER_SIZE_INT   ((sizeof(POINTER_SIZE_INT)==4)? 2: 3)

#define GC_OBJ_SIZE_THRESHOLD   (5*KB)

#define USE_32BITS_HASHCODE

#define REF   Partial_Reveal_Object*


Typedef Documentation

typedef void(*) TaskType(void *)


Enumeration Type Documentation

enum Collection_Algorithm

Enumerator:
COLLECTION_ALGOR_NIL 
MINOR_GEN_FORWARD_POOL 
MINOR_NONGEN_FORWARD_POOL 
MINOR_GEN_SEMISPACE_POOL 
MINOR_NONGEN_SEMISPACE_POOL 
MAJOR_COMPACT_SLIDE 
MAJOR_COMPACT_MOVE 
MAJOR_MARK_SWEEP 

enum Collection_Kind

Enumerator:
GEN_GC 
MARK_SWEEP_GC 
MOVE_COMPACT_NO_LOS 
GC_BASIC_KIND_MASK 
MINOR_COLLECTION 
MAJOR_COLLECTION 
NORMAL_MAJOR_COLLECTION 
FALLBACK_COLLECTION 
EXTEND_COLLECTION 
MS_COLLECTION 
MS_COMPACT_COLLECTION 
MC_COLLECTION 

enum GC_CAUSE

Enumerator:
GC_CAUSE_NIL 
GC_CAUSE_NOS_IS_FULL 
GC_CAUSE_LOS_IS_FULL 
GC_CAUSE_COS_IS_FULL 
GC_CAUSE_WSPACE_IS_FULL 
GC_CAUSE_RUNTIME_FORCE_GC 


Function Documentation

FORCE_INLINE Partial_Reveal_Object* obj_ptr_to_ref ( Partial_Reveal_Object p_obj  ) 

FORCE_INLINE Partial_Reveal_Object* ref_to_obj_ptr ( Partial_Reveal_Object ref  ) 

FORCE_INLINE Partial_Reveal_Object* read_slot ( Partial_Reveal_Object **  p_slot  ) 

FORCE_INLINE void write_slot ( Partial_Reveal_Object **  p_slot,
Partial_Reveal_Object p_obj 
)

POINTER_SIZE_INT round_up_to_size ( POINTER_SIZE_INT  size,
int  block_size 
)

POINTER_SIZE_INT round_down_to_size ( POINTER_SIZE_INT  size,
int  block_size 
)

int* object_ref_iterator_init ( Partial_Reveal_Object obj  ) 

FORCE_INLINE Partial_Reveal_Object* * object_ref_iterator_get ( int *  iterator,
Partial_Reveal_Object obj 
)

int* object_ref_iterator_next ( int *  iterator  ) 

Boolean obj_is_marked_in_vt ( Partial_Reveal_Object obj  ) 

Boolean obj_mark_in_vt ( Partial_Reveal_Object obj  ) 

void obj_unmark_in_vt ( Partial_Reveal_Object obj  ) 

void obj_clear_dual_bits_in_vt ( Partial_Reveal_Object p_obj  ) 

Boolean obj_is_marked_or_fw_in_oi ( Partial_Reveal_Object obj  ) 

void obj_clear_dual_bits_in_oi ( Partial_Reveal_Object obj  ) 

Partial_Reveal_Object* obj_get_fw_in_oi ( Partial_Reveal_Object obj  ) 

Boolean obj_is_fw_in_oi ( Partial_Reveal_Object obj  ) 

void obj_set_fw_in_oi ( Partial_Reveal_Object obj,
void *  dest 
)

Boolean obj_is_marked_in_oi ( Partial_Reveal_Object obj  ) 

FORCE_INLINE Boolean obj_mark_in_oi ( Partial_Reveal_Object obj  ) 

void obj_unmark_in_oi ( Partial_Reveal_Object obj  ) 

Boolean obj_is_dirty_in_oi ( Partial_Reveal_Object p_obj  ) 

Boolean obj_dirty_in_oi ( Partial_Reveal_Object p_obj  ) 

Boolean is_obj_alloced_live (  ) 

void gc_enable_alloc_obj_live (  ) 

void gc_disable_alloc_obj_live (  ) 

Boolean obj_is_survivor ( Partial_Reveal_Object p_obj  ) 

void obj_set_age_bit ( Partial_Reveal_Object p_obj  ) 

void obj_clear_age_bit ( Partial_Reveal_Object p_obj  ) 

Boolean obj_is_remembered ( Partial_Reveal_Object p_obj  ) 

void obj_set_rem_bit ( Partial_Reveal_Object p_obj  ) 

void obj_clear_rem_bit ( Partial_Reveal_Object p_obj  ) 

void mark_scan_pool ( Collector collector  ) 

void mark_scan_heap ( Collector collector  ) 

void* gc_heap_base ( GC gc  ) 

void* gc_heap_ceiling ( GC gc  ) 

Boolean address_belongs_to_gc_heap ( void *  addr,
GC gc 
)

Boolean obj_belongs_to_gc_heap ( Partial_Reveal_Object p_obj  ) 

Boolean gc_match_kind ( GC gc,
unsigned int  kind 
)

Boolean gc_match_either_kind ( GC gc,
unsigned int  multi_kinds 
)

unsigned int gc_get_processor_num ( GC gc  ) 

void gc_parse_options ( GC gc  ) 

void gc_reclaim_heap ( GC gc,
unsigned int  gc_cause 
)

void gc_prepare_rootset ( GC gc  ) 

int64 get_collection_end_time (  ) 

void gc_init_collector_alloc ( GC gc,
Collector collector 
)

void gc_reset_collector_alloc ( GC gc,
Collector collector 
)

void gc_destruct_collector_alloc ( GC gc,
Collector collector 
)

FORCE_INLINE Boolean addr_belongs_to_nos ( void *  addr  ) 

FORCE_INLINE Boolean obj_belongs_to_nos ( Partial_Reveal_Object p_obj  ) 

Boolean obj_is_moved ( Partial_Reveal_Object p_obj  ) 


Variable Documentation

Boolean IS_FALLBACK_COMPACTION

POINTER_SIZE_INT HEAP_NULL

volatile Boolean obj_alloced_live

Boolean NOS_PARTIAL_FORWARD

void* nos_boundary

void* los_boundary

Boolean* p_global_lspace_move_obj

Boolean TRACE_JLC_VIA_VTABLE


Genereated on Tue Mar 11 19:25:34 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.