ARB
Classes | Macros | Functions | Variables
PT_prefixtree.cxx File Reference
#include "probe.h"
#include "probe_tree.h"
#include "pt_prototypes.h"
#include "PT_mem.h"
#include <arb_file.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <climits>
Include dependency graph for PT_prefixtree.cxx:

Go to the source code of this file.

Classes

class  ChainEntryBuffer
 

Macros

#define __ATTR__DONT_VECTORIZE_HERE
 
#define CACHE_SEQ_PERCENT   50
 

Functions

bool locs_in_chain_order (const AbsLoc &loc1, const AbsLoc &loc2)
 
template<typename CHAINITER >
bool PT_chain_has_valid_entries (const typename CHAINITER::POS_TREE_TYPE *const node)
 
void PT_init_cache_sizes (Stage stage)
 
static void PT_change_link_in_father (POS_TREE1 *father, POS_TREE1 *old_link, POS_TREE1 *new_link)
 
void PT_add_to_chain (POS_TREE1 *node, const DataLoc &loc)
 
POS_TREE1PT_change_leaf_to_node (POS_TREE1 *node)
 
POS_TREE1PT_leaf_to_chain (POS_TREE1 *node)
 
POS_TREE1PT_create_leaf (POS_TREE1 **pfather, PT_base base, const DataLoc &loc)
 
void PTD_put_int (FILE *out, ULONG i)
 
void PTD_put_short (FILE *out, ULONG i)
 
void PTD_put_byte (FILE *out, ULONG i)
 
static int put_compact_nat (FILE *out, uint_32 nat)
 
 STATIC_ASSERT (PT1_BASE_SIZE<=PT1_EMPTY_LEAF_SIZE)
 
static void PTD_set_object_to_saved_status (POS_TREE1 *node, long pos_start, uint_32 former_size)
 
int get_memsize_of_saved (const POS_TREE1 *node)
 
static long PTD_write_tip_to_disk (FILE *out, POS_TREE1 *node, const long oldpos)
 
static long PTD_write_chain_to_disk (FILE *out, POS_TREE1 *const node, const long oldpos, ARB_ERROR &error)
 
void PTD_delete_saved_node (POS_TREE1 *&node)
 
static long PTD_write_node_to_disk (FILE *out, POS_TREE1 *node, long *r_poss, const long oldpos)
 
long PTD_write_leafs_to_disk (FILE *out, POS_TREE1 *const node, long pos, long *node_pos, ARB_ERROR &error)
 
ARB_ERROR PTD_read_leafs_from_disk (const char *fname, POS_TREE2 *&root_ptr)
 

Variables

struct pt_global PT_GLOBAL
 
const int BITS_FOR_SIZE = 4
 
const int SIZE_MASK = (1<<BITS_FOR_SIZE)-1
 
const uint_32 MIN_SIZE_IN_FLAGS = PT1_BASE_SIZE
 
const uint_32 MAX_SIZE_IN_FLAGS = PT1_BASE_SIZE+SIZE_MASK-1
 
const int FLAG_SIZE_REDUCTION = MIN_SIZE_IN_FLAGS-1
 

Macro Definition Documentation

#define __ATTR__DONT_VECTORIZE_HERE

Definition at line 94 of file PT_prefixtree.cxx.

#define CACHE_SEQ_PERCENT   50

Referenced by PT_init_cache_sizes().

Function Documentation

bool locs_in_chain_order ( const AbsLoc loc1,
const AbsLoc loc2 
)
inline

Definition at line 24 of file PT_prefixtree.cxx.

References AbsLoc::get_abs_pos(), and AbsLoc::get_name().

Referenced by PT_chain_has_valid_entries().

template<typename CHAINITER >
bool PT_chain_has_valid_entries ( const typename CHAINITER::POS_TREE_TYPE *const  node)

Definition at line 51 of file PT_prefixtree.cxx.

References locs_in_chain_order(), and pt_assert.

void PT_init_cache_sizes ( Stage  stage)
static void PT_change_link_in_father ( POS_TREE1 father,
POS_TREE1 old_link,
POS_TREE1 new_link 
)
static
void PT_add_to_chain ( POS_TREE1 node,
const DataLoc loc 
)
POS_TREE1* PT_change_leaf_to_node ( POS_TREE1 node)
POS_TREE1* PT_leaf_to_chain ( POS_TREE1 node)
POS_TREE1* PT_create_leaf ( POS_TREE1 **  pfather,
PT_base  base,
const DataLoc loc 
)
void PTD_put_int ( FILE *  out,
ULONG  i 
)
void PTD_put_short ( FILE *  out,
ULONG  i 
)
void PTD_put_byte ( FILE *  out,
ULONG  i 
)
static int put_compact_nat ( FILE *  out,
uint_32  nat 
)
static

Definition at line 459 of file PT_prefixtree.cxx.

References ASSERT_RESULT, pt_assert, and PT_write_compact_nat().

Referenced by PTD_write_chain_to_disk().

STATIC_ASSERT ( PT1_BASE_SIZE<=  PT1_EMPTY_LEAF_SIZE)
static void PTD_set_object_to_saved_status ( POS_TREE1 node,
long  pos_start,
uint_32  former_size 
)
static
int get_memsize_of_saved ( const POS_TREE1 node)
inline
static long PTD_write_tip_to_disk ( FILE *  out,
POS_TREE1 node,
const long  oldpos 
)
static
static long PTD_write_chain_to_disk ( FILE *  out,
POS_TREE1 *const  node,
const long  oldpos,
ARB_ERROR error 
)
static
void PTD_delete_saved_node ( POS_TREE1 *&  node)

Definition at line 619 of file PT_prefixtree.cxx.

References get_memsize_of_saved(), MEM, NULp, and Memory::put().

Referenced by PTD_save_upper_tree().

static long PTD_write_node_to_disk ( FILE *  out,
POS_TREE1 node,
long r_poss,
const long  oldpos 
)
static
long PTD_write_leafs_to_disk ( FILE *  out,
POS_TREE1 *const  node,
long  pos,
long node_pos,
ARB_ERROR error 
)
ARB_ERROR PTD_read_leafs_from_disk ( const char fname,
POS_TREE2 *&  root_ptr 
)

Variable Documentation

struct pt_global PT_GLOBAL

Definition at line 22 of file PT_prefixtree.cxx.

Referenced by probe_struct_global::enter_stage(), and PT_change_link_in_father().

const int BITS_FOR_SIZE = 4

Definition at line 473 of file PT_prefixtree.cxx.

const int SIZE_MASK = (1<<BITS_FOR_SIZE)-1

Definition at line 474 of file PT_prefixtree.cxx.

Referenced by get_memsize_of_saved().

const uint_32 MIN_SIZE_IN_FLAGS = PT1_BASE_SIZE

Definition at line 480 of file PT_prefixtree.cxx.

const uint_32 MAX_SIZE_IN_FLAGS = PT1_BASE_SIZE+SIZE_MASK-1

Definition at line 481 of file PT_prefixtree.cxx.

const int FLAG_SIZE_REDUCTION = MIN_SIZE_IN_FLAGS-1

Definition at line 483 of file PT_prefixtree.cxx.

Referenced by get_memsize_of_saved(), and PTD_set_object_to_saved_status().