tm_data Struct Reference
[Internal: Data]

Internal data for the allocator. More...

#include <internal.h>

Collaboration diagram for tm_data:
Collaboration graph
[legend]

Data Fields

int inited
 Current status.
int initing
enum tm_phase phase next_phase
 The current processing phase.
size_t n_phase_transitions [tm_phase_END+1][tm_phase_END+1]
 Number of transitions from one phase to another.
size_t n_color_transitions [tm_TOTAL+1][tm_TOTAL+1]
 Number of transitions from one color to another.
int parceling
 Possible actions during current phase.
int allocating
int marking
int scanning
int sweeping
int unmarking
int trigger_full_gc
 If true, full GC is triggered on next call to tm_alloc().
size_t n [tm__LAST3]
 Global node counts.
size_t alloc_by_phase [tm_phase_END]
 Number of cumulative allocations during each phase.
size_t alloc_n [tm__LAST3]
 Stats during tm_alloc().
tm_type types
 Types.
int type_id
 The next type id.
tm_type type_reserve [50]
 A reserve of tm_type structures.
tm_typetype_free
tm_typetype_hash [tm_type_hash_LEN]
 Type hash table.
int block_id
 Blocks:.
tm_blockblock_first
 The first block allocated.
tm_blockblock_last
 The last block allocated.
tm_list free_blocks
 A list of free tm_blocks not returned to the OS.
int free_blocks_n
 Number of tm_blocks in the free_blocks list.
tm_typebt
 Block sweeping iterators.
tm_blockbb
 Block.
void * os_alloc_last
 OS-level allocation:.
size_t os_alloc_last_size
 The size of the last allocation from the operating system.
void * os_alloc_expected
 The next addresses expected from _tm_os_alloc_().
void * ptr_range [2]
 Valid pointer range.
bitset_t page_in_use [tm_BITMAP_SIZE]
 A bit map of pages with nodes in use.
bitset_t block_header [tm_BITMAP_SIZE]
 A bit map of pages containing allocated block headers.
bitset_t block_large [tm_BITMAP_SIZE]
 A bit map of large blocks.
tm_node_iterator node_color_iter [tm_TOTAL]
 Type color list iterators.
tm_nodescan_node
 Partial scan buffer:.
void * scan_ptr
 The current position int the node being scanned for pointers.
size_t * scan_size
 The scan size.
tm_root roots [16]
 Roots:.
short nroots
 Number of roots regions registered.
tm_root aroots [16]
 List of roots to avoid during scanning: anti-roots.
short naroots
 Number of anti-roots registered.
short root_datai
 Huh?
short root_newi
short stack_grows
 Direction of C stack growth.
void ** stack_ptrp
 Pointer to a stack allocated variable.
short rooti
 Root being marked.
const char * rp
 Current address in root being marked.
unsigned long data_mutations
 How many root mutations happened since the start of the ROOT phase.
unsigned long stack_mutations
 How many stack mutations happened since the start of the ROOT phase.
tm_time_stat ts_os_alloc
 Time Stats:.
tm_time_stat ts_os_free
 Time spent in tm_free_os().
tm_time_stat ts_alloc
 Time spent in tm_malloc().
tm_time_stat ts_free
 Time spent in tm_free().
tm_time_stat ts_gc
 Time spent in tm_gc_full().
tm_time_stat ts_gc_inner
 Time spent in tm_gc_full_inner().
tm_time_stat ts_barrier
 Time spent in tm_write_barrier().
tm_time_stat ts_barrier_root
 Time spent in tm_write_barrier_root().
tm_time_stat ts_barrier_pure
 Time spent in tm_write_barrier_pure().
tm_time_stat ts_barrier_black
 Time spent in tm_write_barrier on tm_BLACK nodes.
tm_time_stat ts_phase [tm_phase_END]
 Time spent in each phase during tm_alloc().
size_t alloc_id
 Stats/debugging support:.
size_t alloc_pass
 Current allocation pass.
size_t alloc_since_sweep
 Allocations since sweep.
size_t alloc_request_size
 Current allocation request size.
tm_typealloc_request_type
 Current allocation request type.
int msg_ignored
 True if last tm_msg() was disabled; used by tm_msg1().
char msg_enable_table [256]
 Table of enabled message types.
size_t blocks_allocated_since_gc
 Full GC stats:.
size_t blocks_in_use_after_gc
size_t nodes_allocated_since_gc
size_t nodes_in_use_after_gc
size_t bytes_allocated_since_gc
size_t bytes_in_use_after_gc
int mmap_fd
 File descriptor used by mmap().
jmp_buf jb
 A block of saved CPU registers to root scan.

Detailed Description

Internal data for the allocator.

This structure is specifically avoided by the uninitialized data segment root, using an anti-root. See tm_init().

FIXME: this structure is very large due to the statically allocated block bit maps.

Definition at line 92 of file internal.h.


Field Documentation

size_t tm_data::alloc_by_phase[tm_phase_END]

Number of cumulative allocations during each phase.

Definition at line 120 of file internal.h.

Referenced by _tm_alloc_type_inner(), and tm_print_time_stats().

Stats/debugging support:.

Current allocation id.

Definition at line 256 of file internal.h.

Referenced by _tm_alloc_type_inner(), and _tm_phase_init().

size_t tm_data::alloc_n[tm__LAST3]

Stats during tm_alloc().

Definition at line 123 of file internal.h.

Referenced by _tm_alloc_type_inner(), and _tm_node_set_color().

Current allocation pass.

Definition at line 259 of file internal.h.

Referenced by _tm_alloc_type_inner().

Current allocation request size.

Definition at line 265 of file internal.h.

Referenced by _tm_alloc_desc_inner(), and _tm_alloc_inner().

Current allocation request type.

Definition at line 267 of file internal.h.

Referenced by _tm_alloc_desc_inner(), and _tm_alloc_inner().

Allocations since sweep.

Definition at line 262 of file internal.h.

Referenced by _tm_alloc_type_inner(), _tm_phase_init(), and _tm_type_memory_pressureQ_2().

Definition at line 107 of file internal.h.

Referenced by _tm_phase_init().

List of roots to avoid during scanning: anti-roots.

Definition at line 205 of file internal.h.

Referenced by _tm_root_add(), and tm_root_remove().

Block.

Definition at line 159 of file internal.h.

Referenced by _tm_block_sweep_init().

The first block allocated.

Definition at line 145 of file internal.h.

Referenced by _tm_block_reclaim(), and tm_block_init().

bitset_t tm_data::block_header[tm_BITMAP_SIZE]

A bit map of pages containing allocated block headers.

Definition at line 180 of file internal.h.

Blocks:.

The next block id.

Definition at line 142 of file internal.h.

Referenced by tm_block_init(), and tm_print_block_stats().

bitset_t tm_data::block_large[tm_BITMAP_SIZE]

A bit map of large blocks.

Definition at line 183 of file internal.h.

The last block allocated.

Definition at line 147 of file internal.h.

Referenced by _tm_block_reclaim(), and tm_block_init().

Full GC stats:.

Definition at line 277 of file internal.h.

Referenced by _tm_block_alloc(), _tm_block_alloc_from_free_list(), and _tm_gc_clear_stats().

Definition at line 279 of file internal.h.

Referenced by _tm_gc_clear_stats().

Block sweeping iterators.

Block type.

Definition at line 157 of file internal.h.

Referenced by _tm_block_sweep_init().

Definition at line 285 of file internal.h.

Referenced by _tm_gc_clear_stats(), and _tm_type_alloc_node_from_free_list().

Definition at line 287 of file internal.h.

Referenced by _tm_gc_clear_stats().

unsigned long tm_data::data_mutations

How many root mutations happened since the start of the ROOT phase.

Definition at line 224 of file internal.h.

Referenced by __tm_write_barrier(), __tm_write_barrier_root(), _tm_phase_init(), _tm_root_loop_init(), _tm_root_scan_all(), and tm_init().

A list of free tm_blocks not returned to the OS.

Definition at line 150 of file internal.h.

Referenced by _tm_block_alloc_from_free_list(), _tm_block_free(), tm_init(), and tm_validate_lists().

Number of tm_blocks in the free_blocks list.

Definition at line 152 of file internal.h.

Referenced by _tm_alloc_type_inner(), _tm_block_alloc_from_free_list(), _tm_block_free(), _tm_type_memory_pressureQ(), tm_init(), and tm_print_stats().

Current status.

Definition at line 94 of file internal.h.

Referenced by tm_abort(), tm_alloc(), tm_free(), tm_gc_full(), and tm_init().

Definition at line 94 of file internal.h.

Referenced by tm_init().

jmp_buf tm_data::jb

A block of saved CPU registers to root scan.

Definition at line 293 of file internal.h.

Referenced by tm_init().

Definition at line 108 of file internal.h.

Referenced by _tm_phase_init().

File descriptor used by mmap().

Definition at line 290 of file internal.h.

Referenced by _tm_os_alloc_().

Table of enabled message types.

Definition at line 272 of file internal.h.

True if last tm_msg() was disabled; used by tm_msg1().

Definition at line 270 of file internal.h.

size_t tm_data::n[tm__LAST3]
size_t tm_data::n_color_transitions[tm_TOTAL+1][tm_TOTAL+1]

Number of transitions from one color to another.

Definition at line 103 of file internal.h.

Referenced by _tm_node_set_color(), and tm_print_color_transition_stats().

size_t tm_data::n_phase_transitions[tm_phase_END+1][tm_phase_END+1]

Number of transitions from one phase to another.

Definition at line 100 of file internal.h.

Referenced by _tm_phase_init(), and tm_print_phase_transition_stats().

Number of anti-roots registered.

Definition at line 207 of file internal.h.

Referenced by _tm_root_add(), and tm_root_remove().

The current processing phase.

Definition at line 97 of file internal.h.

Referenced by _tm_alloc_type_inner().

Type color list iterators.

Definition at line 186 of file internal.h.

Referenced by tm_write_barrier_node().

Definition at line 281 of file internal.h.

Referenced by _tm_gc_clear_stats(), and _tm_type_alloc_node_from_free_list().

Definition at line 283 of file internal.h.

Referenced by _tm_gc_clear_stats().

Number of roots regions registered.

Definition at line 202 of file internal.h.

Referenced by _tm_root_add_1(), tm_init(), tm_ptr_is_in_root_set(), and tm_root_remove().

The next addresses expected from _tm_os_alloc_().

Only used for sbrk() allocations.

Definition at line 168 of file internal.h.

Referenced by _tm_os_alloc_(), and _tm_os_free_().

OS-level allocation:.

The address of the last allocation from the operating system.

Definition at line 164 of file internal.h.

Referenced by _tm_os_alloc_(), and _tm_os_free_().

The size of the last allocation from the operating system.

Definition at line 166 of file internal.h.

Referenced by _tm_os_alloc_(), and _tm_os_free_().

bitset_t tm_data::page_in_use[tm_BITMAP_SIZE]

A bit map of pages with nodes in use.

Definition at line 177 of file internal.h.

Referenced by _tm_page_in_use(), _tm_page_mark_unused(), _tm_page_mark_used(), and tm_init().

Possible actions during current phase.

Definition at line 106 of file internal.h.

Referenced by _tm_node_parcel_some(), and _tm_node_set_color().

Valid pointer range.

Definition at line 174 of file internal.h.

Huh?

Definition at line 210 of file internal.h.

Referenced by _tm_root_add_1(), _tm_root_loop_init(), tm_init(), and tm_root_remove().

Definition at line 210 of file internal.h.

Referenced by _tm_root_add_1(), and tm_root_add().

Root being marked.

Definition at line 219 of file internal.h.

Referenced by _tm_root_loop_init(), and _tm_root_scan_some().

const char* tm_data::rp

Current address in root being marked.

Definition at line 221 of file internal.h.

Referenced by _tm_root_loop_init(), and _tm_root_scan_some().

Partial scan buffer:.

The current node being scanned for pointers.

Definition at line 191 of file internal.h.

The current position int the node being scanned for pointers.

Definition at line 193 of file internal.h.

The scan size.

Definition at line 195 of file internal.h.

Definition at line 109 of file internal.h.

Referenced by _tm_phase_init().

Direction of C stack growth.

Definition at line 213 of file internal.h.

Referenced by tm_init().

unsigned long tm_data::stack_mutations

How many stack mutations happened since the start of the ROOT phase.

Definition at line 226 of file internal.h.

Referenced by __tm_write_barrier(), __tm_write_barrier_root(), _tm_phase_init(), _tm_root_loop_init(), _tm_root_scan_all(), _tm_stack_scan(), and tm_init().

Pointer to a stack allocated variable.

See user.c.

Definition at line 216 of file internal.h.

Referenced by _tm_set_stack_ptr(), and tm_init().

Definition at line 110 of file internal.h.

Referenced by _tm_phase_init().

If true, full GC is triggered on next call to tm_alloc().

Definition at line 114 of file internal.h.

Referenced by tm_alloc(), and tm_write_barrier_node().

Time spent in tm_malloc().

Definition at line 235 of file internal.h.

Referenced by _tm_check_sweep_error(), tm_alloc(), tm_alloc_desc(), tm_init(), tm_print_time_stats(), and tm_realloc().

Time spent in tm_write_barrier().

Definition at line 243 of file internal.h.

Referenced by __tm_write_barrier(), tm_init(), and tm_print_time_stats().

Time spent in tm_write_barrier on tm_BLACK nodes.

Definition at line 249 of file internal.h.

Referenced by tm_init(), tm_print_time_stats(), and tm_write_barrier_node().

Time spent in tm_write_barrier_pure().

Definition at line 247 of file internal.h.

Referenced by __tm_write_barrier_pure(), tm_init(), and tm_print_time_stats().

Time spent in tm_write_barrier_root().

Definition at line 245 of file internal.h.

Referenced by __tm_write_barrier_root(), tm_init(), and tm_print_time_stats().

Time spent in tm_free().

Definition at line 237 of file internal.h.

Referenced by tm_free(), tm_init(), and tm_print_time_stats().

Time spent in tm_gc_full().

Definition at line 239 of file internal.h.

Referenced by tm_gc_full(), tm_init(), and tm_print_time_stats().

Time spent in tm_gc_full_inner().

Definition at line 241 of file internal.h.

Referenced by _tm_gc_full_type_inner(), and tm_init().

Time Stats:.

Time spent in tm_alloc_os().

Definition at line 231 of file internal.h.

Referenced by _tm_os_alloc(), tm_init(), and tm_print_time_stats().

Time spent in tm_free_os().

Definition at line 233 of file internal.h.

Referenced by _tm_os_free(), tm_init(), and tm_print_time_stats().

Time spent in each phase during tm_alloc().

Definition at line 251 of file internal.h.

Referenced by _tm_alloc_type_inner(), tm_init(), and tm_print_time_stats().

Definition at line 132 of file internal.h.

Referenced by tm_init(), and tm_type_new().

tm_type* tm_data::type_hash[tm_type_hash_LEN]

Type hash table.

Definition at line 137 of file internal.h.

Referenced by tm_init(), tm_size_to_type_2(), and tm_type_new_2().

The next type id.

Definition at line 129 of file internal.h.

Referenced by tm_print_stats(), and tm_type_init().

A reserve of tm_type structures.

Definition at line 132 of file internal.h.

Referenced by tm_init().

Definition at line 111 of file internal.h.

Referenced by _tm_phase_init().


The documentation for this struct was generated from the following file:

Generated on Mon Jan 25 06:33:12 2010 for TM(tredmill) by  doxygen 1.6.1