#include "hprof.h"
Go to the source code of this file.
Data Structures | |
| struct | TableKey |
| struct | TableElement |
| struct | LookupTable |
Defines | |
| #define | BV_CHUNK_POWER_2 3 |
| #define | BV_CHUNK_TYPE unsigned char |
| #define | BV_CHUNK_BITSIZE (((int)sizeof(BV_CHUNK_TYPE))<<3) |
| #define | BV_CHUNK_INDEX_MASK ( (1 << BV_CHUNK_POWER_2) - 1 ) |
| #define | BV_ELEMENT_COUNT(nelems) ((((nelems+1)) >> BV_CHUNK_POWER_2) + 1) |
| #define | BV_CHUNK_ROUND(i) ((i) & ~(BV_CHUNK_INDEX_MASK)) |
| #define | BV_CHUNK(ptr, i) (((BV_CHUNK_TYPE*)(ptr))[(i) >> BV_CHUNK_POWER_2]) |
| #define | BV_CHUNK_MASK(i) (1 << ((i) & BV_CHUNK_INDEX_MASK)) |
| #define | ELEMENT_PTR(ltable, i) ((void*)(((char*)(ltable)->table) + (ltable)->elem_size * (i))) |
| #define | SANITY_CHECK(condition) |
| #define | SANITY_CHECK_INDEX(ltable, i) SANITY_CHECK((i) < ltable->next_index) |
| #define | _SANITY_USE_HARE |
| #define | SANITY_ADD_HARE(i, hare) (SANITY_REMOVE_HARE(i) | (hare)) |
| #define | SANITY_REMOVE_HARE(i) ((i) & 0x0FFFFFFF) |
| #define | SANITY_CHECK_HARE(i, hare) SANITY_CHECK(SANITY_ADD_HARE(i,hare)==(i)) |
Typedefs | |
| typedef unsigned | HashCode |
Functions | |
| static jrawMonitorID | lock_create (char *name) |
| static void | lock_destroy (jrawMonitorID stanley) |
| static void | lock_enter (jrawMonitorID stanley) |
| static void | lock_exit (jrawMonitorID stanley) |
| static void | get_key (LookupTable *ltable, TableIndex index, void **pkey_ptr, int *pkey_len) |
| static void * | get_info (LookupTable *ltable, TableIndex index) |
| static void | hash_out (LookupTable *ltable, TableIndex index) |
| static jboolean | is_freed_entry (LookupTable *ltable, TableIndex index) |
| static void | set_freed_bit (LookupTable *ltable, TableIndex index) |
| static TableIndex | find_freed_entry (LookupTable *ltable) |
| static void | free_entry (LookupTable *ltable, TableIndex index) |
| static HashCode | hashcode (void *key_ptr, int key_len) |
| static void | hash_in (LookupTable *ltable, TableIndex index, HashCode hcode) |
| static void | resize_hash_buckets (LookupTable *ltable) |
| static void | resize (LookupTable *ltable) |
| static jboolean | keys_equal (void *key_ptr1, void *key_ptr2, int key_len) |
| static TableIndex | find_entry (LookupTable *ltable, void *key_ptr, int key_len, HashCode hcode) |
| static TableIndex | setup_new_entry (LookupTable *ltable, void *key_ptr, int key_len, void *info_ptr) |
| LookupTable * | table_initialize (const char *name, int size, int incr, int bucket_count, int info_size) |
| int | table_element_count (LookupTable *ltable) |
| void | table_free_entry (LookupTable *ltable, TableIndex index) |
| void | table_walk_items (LookupTable *ltable, LookupTableIterator func, void *arg) |
| void | table_cleanup (LookupTable *ltable, LookupTableIterator func, void *arg) |
| TableIndex | table_create_entry (LookupTable *ltable, void *key_ptr, int key_len, void *info_ptr) |
| TableIndex | table_find_entry (LookupTable *ltable, void *key_ptr, int key_len) |
| TableIndex | table_find_or_create_entry (LookupTable *ltable, void *key_ptr, int key_len, jboolean *pnew_entry, void *info_ptr) |
| void * | table_get_info (LookupTable *ltable, TableIndex index) |
| void | table_get_key (LookupTable *ltable, TableIndex index, void **pkey_ptr, int *pkey_len) |
| void | table_lock_enter (LookupTable *ltable) |
| void | table_lock_exit (LookupTable *ltable) |
| #define _SANITY_USE_HARE |
Definition at line 151 of file hprof_table.c.
| #define BV_CHUNK | ( | ptr, | |||
| i | ) | (((BV_CHUNK_TYPE*)(ptr))[(i) >> BV_CHUNK_POWER_2]) |
Definition at line 81 of file hprof_table.c.
| #define BV_CHUNK_BITSIZE (((int)sizeof(BV_CHUNK_TYPE))<<3) |
Definition at line 76 of file hprof_table.c.
| #define BV_CHUNK_INDEX_MASK ( (1 << BV_CHUNK_POWER_2) - 1 ) |
Definition at line 77 of file hprof_table.c.
| #define BV_CHUNK_MASK | ( | i | ) | (1 << ((i) & BV_CHUNK_INDEX_MASK)) |
Definition at line 83 of file hprof_table.c.
| #define BV_CHUNK_POWER_2 3 |
Definition at line 73 of file hprof_table.c.
| #define BV_CHUNK_ROUND | ( | i | ) | ((i) & ~(BV_CHUNK_INDEX_MASK)) |
Definition at line 80 of file hprof_table.c.
| #define BV_CHUNK_TYPE unsigned char |
Definition at line 74 of file hprof_table.c.
| #define BV_ELEMENT_COUNT | ( | nelems | ) | ((((nelems+1)) >> BV_CHUNK_POWER_2) + 1) |
Definition at line 78 of file hprof_table.c.
| #define ELEMENT_PTR | ( | ltable, | |||
| i | ) | ((void*)(((char*)(ltable)->table) + (ltable)->elem_size * (i))) |
Definition at line 132 of file hprof_table.c.
| #define SANITY_ADD_HARE | ( | i, | |||
| hare | ) | (SANITY_REMOVE_HARE(i) | (hare)) |
Definition at line 153 of file hprof_table.c.
| #define SANITY_CHECK | ( | condition | ) |
( (condition) ? (void)0 : \ HPROF_ERROR(JNI_FALSE, "SANITY IN QUESTION: " #condition))
Definition at line 137 of file hprof_table.c.
| #define SANITY_CHECK_HARE | ( | i, | |||
| hare | ) | SANITY_CHECK(SANITY_ADD_HARE(i,hare)==(i)) |
Definition at line 155 of file hprof_table.c.
| #define SANITY_CHECK_INDEX | ( | ltable, | |||
| i | ) | SANITY_CHECK((i) < ltable->next_index) |
Definition at line 142 of file hprof_table.c.
| #define SANITY_REMOVE_HARE | ( | i | ) | ((i) & 0x0FFFFFFF) |
Definition at line 154 of file hprof_table.c.
| typedef unsigned HashCode |
Definition at line 88 of file hprof_table.c.
| static TableIndex find_entry | ( | LookupTable * | ltable, | |
| void * | key_ptr, | |||
| int | key_len, | |||
| HashCode | hcode | |||
| ) | [static] |
Definition at line 539 of file hprof_table.c.


| static TableIndex find_freed_entry | ( | LookupTable * | ltable | ) | [static] |
Definition at line 290 of file hprof_table.c.


| static void free_entry | ( | LookupTable * | ltable, | |
| TableIndex | index | |||
| ) | [static] |
Definition at line 349 of file hprof_table.c.


| static void* get_info | ( | LookupTable * | ltable, | |
| TableIndex | index | |||
| ) | [static] |
| static void get_key | ( | LookupTable * | ltable, | |
| TableIndex | index, | |||
| void ** | pkey_ptr, | |||
| int * | pkey_len | |||
| ) | [static] |
| static void hash_in | ( | LookupTable * | ltable, | |
| TableIndex | index, | |||
| HashCode | hcode | |||
| ) | [static] |
| static void hash_out | ( | LookupTable * | ltable, | |
| TableIndex | index | |||
| ) | [static] |
| static HashCode hashcode | ( | void * | key_ptr, | |
| int | key_len | |||
| ) | [static] |
| static jboolean is_freed_entry | ( | LookupTable * | ltable, | |
| TableIndex | index | |||
| ) | [static] |
| static jboolean keys_equal | ( | void * | key_ptr1, | |
| void * | key_ptr2, | |||
| int | key_len | |||
| ) | [static] |
| static jrawMonitorID lock_create | ( | char * | name | ) | [static] |
Definition at line 163 of file hprof_table.c.


| static void lock_destroy | ( | jrawMonitorID | stanley | ) | [static] |
Definition at line 172 of file hprof_table.c.


| static void lock_enter | ( | jrawMonitorID | stanley | ) | [static] |
Definition at line 180 of file hprof_table.c.


| static void lock_exit | ( | jrawMonitorID | stanley | ) | [static] |
Definition at line 188 of file hprof_table.c.


| static void resize | ( | LookupTable * | ltable | ) | [static] |
Definition at line 453 of file hprof_table.c.


| static void resize_hash_buckets | ( | LookupTable * | ltable | ) | [static] |
Definition at line 400 of file hprof_table.c.


| static void set_freed_bit | ( | LookupTable * | ltable, | |
| TableIndex | index | |||
| ) | [static] |
Definition at line 256 of file hprof_table.c.


| static TableIndex setup_new_entry | ( | LookupTable * | ltable, | |
| void * | key_ptr, | |||
| int | key_len, | |||
| void * | info_ptr | |||
| ) | [static] |
Definition at line 581 of file hprof_table.c.


| void table_cleanup | ( | LookupTable * | ltable, | |
| LookupTableIterator | func, | |||
| void * | arg | |||
| ) |
Definition at line 774 of file hprof_table.c.


| TableIndex table_create_entry | ( | LookupTable * | ltable, | |
| void * | key_ptr, | |||
| int | key_len, | |||
| void * | info_ptr | |||
| ) |
Definition at line 812 of file hprof_table.c.


| int table_element_count | ( | LookupTable * | ltable | ) |
Definition at line 711 of file hprof_table.c.


| TableIndex table_find_entry | ( | LookupTable * | ltable, | |
| void * | key_ptr, | |||
| int | key_len | |||
| ) |
Definition at line 841 of file hprof_table.c.


| TableIndex table_find_or_create_entry | ( | LookupTable * | ltable, | |
| void * | key_ptr, | |||
| int | key_len, | |||
| jboolean * | pnew_entry, | |||
| void * | info_ptr | |||
| ) |
Definition at line 861 of file hprof_table.c.


| void table_free_entry | ( | LookupTable * | ltable, | |
| TableIndex | index | |||
| ) |
Definition at line 725 of file hprof_table.c.


| void* table_get_info | ( | LookupTable * | ltable, | |
| TableIndex | index | |||
| ) |
Definition at line 904 of file hprof_table.c.


| void table_get_key | ( | LookupTable * | ltable, | |
| TableIndex | index, | |||
| void ** | pkey_ptr, | |||
| int * | pkey_len | |||
| ) |
Definition at line 923 of file hprof_table.c.


| LookupTable* table_initialize | ( | const char * | name, | |
| int | size, | |||
| int | incr, | |||
| int | bucket_count, | |||
| int | info_size | |||
| ) | [read] |
Definition at line 655 of file hprof_table.c.


| void table_lock_enter | ( | LookupTable * | ltable | ) |
Definition at line 940 of file hprof_table.c.


| void table_lock_exit | ( | LookupTable * | ltable | ) |
Definition at line 946 of file hprof_table.c.


| void table_walk_items | ( | LookupTable * | ltable, | |
| LookupTableIterator | func, | |||
| void * | arg | |||
| ) |
Definition at line 739 of file hprof_table.c.


1.6.1