ARB
|
#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>
Go to the source code of this file.
Classes | |
class | ChainEntryBuffer |
Macros | |
#define | __ATTR__DONT_VECTORIZE_HERE |
#define | CACHE_SEQ_PERCENT 50 |
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 |
#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().
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().
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 | ) |
Definition at line 126 of file PT_prefixtree.cxx.
References CACHE_SEQ_PERCENT, probe_struct_global::data_count, psg, pt_assert, probe_input_data::set_cache_sizes(), and STAGE1.
Referenced by enter_stage_1_build_tree(), and enter_stage_2_load_tree().
|
static |
Definition at line 150 of file PT_prefixtree.cxx.
References pt_global::count_bits, POS_TREE1::flags, link, pt_assert, pt_assert_stage, PT_BASES, PT_GLOBAL, PT_write_pointer(), STAGE1, and POS_TREE1::udata().
Referenced by PT_change_leaf_to_node(), PT_create_leaf(), and PT_leaf_to_chain().
Definition at line 199 of file PT_prefixtree.cxx.
References PT_short_chain_header::abspos, ChainEntryBuffer::add(), PT_long_chain_header::entries, PT_long_chain_header::entrymem, POS_TREE1::flags, Memory::get(), AbsLoc::get_abs_pos(), ChainEntryBuffer::get_lastname(), ChainEntryBuffer::get_mem(), AbsLoc::get_name(), ChainEntryBuffer::get_refabspos(), ChainEntryBuffer::get_size(), PT_long_chain_header::lastname, max, MEM, PT_long_chain_header::memsize, PT_long_chain_header::memused, PT_short_chain_header::name, NULp, pt_assert, pt_assert_stage, PTM_MIN_SIZE, Memory::put(), PT_long_chain_header::refabspos, SHORT_CHAIN_HEADER_ELEMS, SHORT_CHAIN_HEADER_FLAG_BIT, SHORT_CHAIN_HEADER_SIZE_MASK, STAGE1, and POS_TREE1::udata().
Referenced by build_pos_tree(), and PT_leaf_to_chain().
Definition at line 278 of file PT_prefixtree.cxx.
References father, Memory::get(), POS_TREE1::get_father(), POS_TREE1::is_leaf(), MEM, PT1_EMPTY_NODE_SIZE, PT1_LEAF_SIZE, PT1_NODE, pt_assert, pt_assert_stage, PT_change_link_in_father(), Memory::put(), POS_TREE1::set_father(), POS_TREE1::set_type(), and STAGE1.
Referenced by build_pos_tree(), and enter_stage_1_build_tree().
Definition at line 293 of file PT_prefixtree.cxx.
References father, POS_TREE1::flags, Memory::get(), POS_TREE1::get_father(), POS_TREE1::is_leaf(), MEM, PT1_CHAIN, PT1_LEAF_SIZE, PT_add_to_chain(), pt_assert, pt_assert_stage, PT_change_link_in_father(), Memory::put(), POS_TREE1::set_father(), POS_TREE1::set_type(), SHORT_CHAIN_HEADER_FLAG_BIT, SHORT_CHAIN_HEADER_SIZE_MASK, and STAGE1.
Referenced by build_pos_tree(), and PT_create_leaf().
Definition at line 318 of file PT_prefixtree.cxx.
References father, FLAG_FREE_BITS, POS_TREE1::flags, Memory::get(), AbsLoc::get_abs_pos(), POS_TREE1::get_father(), AbsLoc::get_name(), DataLoc::get_rel_pos(), POS_TREE1::is_saved(), MEM, PT1_EMPTY_LEAF_SIZE, PT1_LEAF, PT1_NODE, PT1_NODE_SIZE, pt_assert, pt_assert_stage, PT_BASES, PT_change_link_in_father(), PT_leaf_to_chain(), PT_QU, PT_SHORT_SIZE, PT_write_int(), PT_write_pointer(), PT_write_short(), Memory::put(), POS_TREE1::set_father(), POS_TREE1::set_type(), STAGE1, and POS_TREE1::udata().
Referenced by build_pos_tree(), and enter_stage_1_build_tree().
void PTD_put_int | ( | FILE * | out, |
ULONG | i | ||
) |
Definition at line 433 of file PT_prefixtree.cxx.
References ASSERT_RESULT, pt_assert, PT_write_int(), SIZE, and STATIC_ASSERT().
Referenced by enter_stage_1_build_tree(), PTD_write_chain_to_disk(), and PTD_write_node_to_disk().
void PTD_put_short | ( | FILE * | out, |
ULONG | i | ||
) |
Definition at line 444 of file PT_prefixtree.cxx.
References ASSERT_RESULT, pt_assert, PT_write_short(), and SIZE.
Referenced by enter_stage_1_build_tree(), PTD_write_chain_to_disk(), and PTD_write_node_to_disk().
void PTD_put_byte | ( | FILE * | out, |
ULONG | i | ||
) |
Definition at line 452 of file PT_prefixtree.cxx.
References fputc(), pt_assert, and PT_write_char().
Referenced by enter_stage_1_build_tree(), PTD_write_chain_to_disk(), and PTD_write_node_to_disk().
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 | ) |
Referenced by PTD_put_int(), PTD_read_leafs_from_disk(), and PTD_set_object_to_saved_status().
|
static |
Definition at line 485 of file PT_prefixtree.cxx.
References POS_TREE1::father, FLAG_SIZE_REDUCTION, POS_TREE1::flags, PT1_BASE_SIZE, pt_assert, pt_assert_stage, PT_write_big(), PT_write_int(), STAGE1, and STATIC_ASSERT().
Referenced by PTD_write_chain_to_disk(), PTD_write_node_to_disk(), and PTD_write_tip_to_disk().
Definition at line 507 of file PT_prefixtree.cxx.
References FLAG_SIZE_REDUCTION, POS_TREE1::flags, PT_read_int(), SIZE_MASK, and POS_TREE1::udata().
Referenced by PTD_delete_saved_node(), and PTD_write_node_to_disk().
Definition at line 518 of file PT_prefixtree.cxx.
References ASSERT_RESULT, POS_TREE1::flags, fputc(), PT1_LEAF_SIZE, pt_assert, PTD_set_object_to_saved_status(), and POS_TREE1::udata().
Referenced by PTD_write_leafs_to_disk().
|
static |
Definition at line 532 of file PT_prefixtree.cxx.
References ChainEntryBuffer::add(), ChainIteratorStage1::at(), PT_long_chain_header::entrymem, POS_TREE1::flags, GB_IO_error(), GBS_global_string(), ChainIteratorStage1::get_elements_ahead(), ChainEntryBuffer::get_lastname(), ChainEntryBuffer::get_mem(), AbsLoc::get_name(), ChainIteratorStage1::get_refabspos(), ChainEntryBuffer::get_size(), POS_TREE1::is_saved(), MEM, PT_long_chain_header::memsize, pt_assert, pt_assert_valid_chain_stage1, PTD_put_byte(), PTD_put_int(), PTD_put_short(), PTD_set_object_to_saved_status(), Memory::put(), put_compact_nat(), SHORT_CHAIN_HEADER_FLAG_BIT, and POS_TREE1::udata().
Referenced by PTD_write_leafs_to_disk().
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 |
Definition at line 624 of file PT_prefixtree.cxx.
References probe_statistic_struct::chars, diff(), flags, POS_TREE1::flags, fputc(), GBK_terminate(), get_memsize_of_saved(), POS_TREE1::is_saved(), probe_statistic_struct::long_node, probe_statistic_struct::longs, MEM, psg, PT1_EMPTY_NODE_SIZE, pt_assert, pt_assert_stage, PT_BASES, PT_QU, PT_read_son(), PTD_put_byte(), PTD_put_int(), PTD_put_longlong(), PTD_put_short(), PTD_set_object_to_saved_status(), Memory::put(), probe_statistic_struct::short_node, probe_statistic_struct::shorts, probe_statistic_struct::shorts2, probe_statistic_struct::single_node, STAGE1, and probe_struct_global::stat.
Referenced by PTD_write_leafs_to_disk().
long PTD_write_leafs_to_disk | ( | FILE * | out, |
POS_TREE1 *const | node, | ||
long | pos, | ||
long * | node_pos, | ||
ARB_ERROR & | error | ||
) |
Definition at line 781 of file PT_prefixtree.cxx.
References error(), POS_TREE1::father, POS_TREE1::get_type(), POS_TREE1::is_saved(), PT1_CHAIN, PT1_LEAF, PT1_NODE, PT1_SAVED, PT1_UNDEF, pt_assert, pt_assert_stage, PT_BASES, PT_QU, PT_read_big(), PT_read_son(), PTD_write_chain_to_disk(), PTD_write_leafs_to_disk(), PTD_write_node_to_disk(), PTD_write_tip_to_disk(), and STAGE1.
Referenced by PTD_write_leafs_to_disk(), and write_subtree().
Definition at line 829 of file PT_prefixtree.cxx.
References probe_struct_global::big_db, buffer, error(), GB_await_error(), GB_map_file(), GB_size_of_file(), GBS_global_string(), main(), NULp, psg, pt_assert, pt_assert_stage, PT_read_big(), PT_read_char(), PT_read_int(), PT_read_short(), PT_SERVER_MAGIC, PT_SERVER_VERSION, STAGE2, and STATIC_ASSERT().
Referenced by enter_stage_2_load_tree().
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().