name string | code string | asm string | file string |
|---|---|---|---|
print_usage() | void print_usage(void)
{
printf("\nUsage: forestdb_hexamine [OPTION]... [filename]\n"
"\n- Loads entire file in memory and hangs in gdb_loop for examination\n"
"\nOptions:\n"
"\n --print-header displays KV info (for non-corrupted files)"
"\n --headers-only only dump contents of al... | leaq 0x38422(%rip), %rdi # 0x3d721
jmp 0x35b0
| /ForestDB-KVStore[P]forestdb/tools/forestdb_hexamine.cc |
filemgr_aio_init(async_io_handle*) | int _filemgr_aio_init(struct async_io_handle *aio_handle)
{
#ifdef _ASYNC_IO
if (!aio_handle) {
return FDB_RESULT_INVALID_ARGS;
}
if (!aio_handle->queue_depth || aio_handle->queue_depth > 512) {
aio_handle->queue_depth = ASYNC_IO_QUEUE_DEPTH;
}
if (!aio_handle->block_size) {
... | movl $0xffffffd8, %eax # imm = 0xFFFFFFD8
retq
| /ForestDB-KVStore[P]forestdb/src/filemgr_ops_linux.cc |
filemgr_aio_submit(async_io_handle*, int) | int _filemgr_aio_submit(struct async_io_handle *aio_handle, int num_subs)
{
#ifdef _ASYNC_IO
if (!aio_handle) {
return FDB_RESULT_INVALID_ARGS;
}
int rc = io_submit(aio_handle->ioctx, num_subs, aio_handle->ioq);
if (rc < 0) {
return FDB_RESULT_AIO_SUBMIT_FAIL;
}
return rc; // 'rc... | movl $0xffffffd8, %eax # imm = 0xFFFFFFD8
retq
| /ForestDB-KVStore[P]forestdb/src/filemgr_ops_linux.cc |
avl_first | struct avl_node* avl_first(struct avl_tree *tree)
{
struct avl_node *p = NULL;
struct avl_node *node = tree->root;
while(node) {
p = node;
node = node->left;
}
return p;
} | xorl %ecx, %ecx
movq %rcx, %rax
movq (%rdi), %rcx
leaq 0x8(%rcx), %rdi
testq %rcx, %rcx
jne 0x61d2
retq
| /ForestDB-KVStore[P]forestdb/src/avltree.cc |
avl_last | struct avl_node* avl_last(struct avl_tree *tree)
{
struct avl_node *p = NULL;
struct avl_node *node = tree->root;
while(node) {
p = node;
node = node->right;
}
return p;
} | xorl %ecx, %ecx
movq %rcx, %rax
movq (%rdi), %rcx
leaq 0x10(%rcx), %rdi
testq %rcx, %rcx
jne 0x61e4
retq
| /ForestDB-KVStore[P]forestdb/src/avltree.cc |
avl_prev | struct avl_node* avl_prev(struct avl_node *node)
{
if (node == NULL) return NULL;
#ifdef _AVL_NEXT_POINTER
return node->prev;
#else
struct avl_node *p;
// largest value of left subtree
if (node->left) {
p = node;
node = node->left;
while (node) {
p = node;
... | testq %rdi, %rdi
je 0x625b
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x6244
movq %rcx, %rax
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x6237
retq
movq (%rdi), %rax
andq $-0x4, %rax
je 0x625b
cmpq %rdi, 0x10(%rax)
je 0x6243
movq %rax, %rdi
movq (%rax), %rax
jmp 0x6247
xorl %eax, %eax
retq
| /ForestDB-KVStore[P]forestdb/src/avltree.cc |
avl_search | struct avl_node* avl_search(struct avl_tree *tree,
struct avl_node *node,
avl_cmp_func *func)
// exact match
{
struct avl_node *p = tree->root;
int cmp;
while(p)
{
cmp = func(p, node, tree->aux);
if (cmp > 0) {
p = p->l... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x629e
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x8(%r12), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq *%r14
movl $0x8, %ecx
testl %eax, %eax
jg 0x6295
movl $0x10, %ecx
jns 0x62a0
movq (%rbx,%rcx), %rbx
testq %rbx, %... | /ForestDB-KVStore[P]forestdb/src/avltree.cc |
avl_search_greater | struct avl_node* avl_search_greater(struct avl_tree *tree,
struct avl_node *node,
avl_cmp_func *func)
// if an exact match does not exist,
// return smallest node greater than NODE
{
struct avl_node *p = tree->root;
struct avl_node *pp = NU... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
testq %rax, %rax
je 0x6317
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rax, %rbx
movq 0x8(%r12), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq *%r14
movl $0x8, %ecx
testl %eax, %eax
jg 0x62e9
movl $0x10, %ecx
jns 0x6319
movq (%rbx,%rcx), %r... | /ForestDB-KVStore[P]forestdb/src/avltree.cc |
avl_search_smaller | struct avl_node* avl_search_smaller(struct avl_tree *tree,
struct avl_node *node,
avl_cmp_func *func)
// if an exact match does not exist,
// return greatest node smaller than NODE
{
struct avl_node *p = tree->root;
struct avl_node *pp = NU... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
testq %rax, %rax
je 0x6390
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rax, %rbx
movq 0x8(%r12), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq *%r14
movl $0x8, %ecx
testl %eax, %eax
jg 0x6362
movl $0x10, %ecx
jns 0x6392
movq (%rbx,%rcx), %r... | /ForestDB-KVStore[P]forestdb/src/avltree.cc |
bgflusher_switch_file | void bgflusher_switch_file(struct filemgr *old_file, struct filemgr *new_file,
err_log_callback *log_callback)
{
if (!bgflusher_initialized) return;
struct avl_node *a = NULL;
struct openfiles_elem query, *elem;
strcpy(query.filename, old_file->filename);
mutex_lock(&bgf... | cmpb $0x0, 0x4b52f(%rip) # 0x525b0
je 0x7139
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x528, %rsp # imm = 0x528
movq %rsi, %rbx
movq (%rdi), %rsi
movq %rsp, %rdi
callq 0x3380
leaq 0x4b50e(%rip), %rdi # 0x525b8
callq 0x3550
leaq 0x510(%rsp), %rsi
leaq 0x4b522(%rip), %rdi # 0x525e0
leaq -0... | /ForestDB-KVStore[P]forestdb/src/bgflusher.cc |
bgflusher_deregister_file | void bgflusher_deregister_file(struct filemgr *file)
{
if (!bgflusher_initialized) return;
struct avl_node *a = NULL;
struct openfiles_elem query, *elem;
strcpy(query.filename, file->filename);
mutex_lock(&bgf_lock);
a = avl_search(&openfiles, &query.avl, _bgflusher_cmp);
if (a) {
... | cmpb $0x0, 0x4b46f(%rip) # 0x525b0
je 0x71d5
pushq %rbx
subq $0x530, %rsp # imm = 0x530
movq (%rdi), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3380
leaq 0x4b455(%rip), %rdi # 0x525b8
callq 0x3550
leaq 0x518(%rsp), %rsi
leaq 0x4b469(%rip), %rdi # 0x525e0
leaq -0x11b(%rip), %rdx # 0x7063
callq 0x625e
... | /ForestDB-KVStore[P]forestdb/src/bgflusher.cc |
bcache_read | int bcache_read(struct filemgr *file, bid_t bid, void *buf)
{
struct hash_elem *h;
struct bcache_item *item;
struct bcache_item query;
struct fnamedic_item *fname;
// Note that we don't need to grab bcache_lock here as the block cache
// is already created and binded when the file is created or... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0x128(%rdi), %rbp
testq %rbp, %rbp
je 0x73f1
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x28(%rsp), %r12
movq %rsi, -0x10(%r12)
xorl %r15d, %r15d
leaq 0x8(%rsp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x35f0
imulq $0xf4240, (%r13), %r... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
bcache_invalidate_block | bool bcache_invalidate_block(struct filemgr *file, bid_t bid)
{
struct hash_elem *h;
struct bcache_item *item;
struct bcache_item query;
struct fnamedic_item *fname;
bool ret = false;
// Note that we don't need to grab bcache_lock here as the block cache
// is already created and binded whe... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0x128(%rdi), %r12
testq %r12, %r12
je 0x74ea
movq %rsi, %rbx
leaq 0x28(%rsp), %r14
movq %rsi, -0x10(%r14)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x35f0
imulq $0xf4240, (%r15), %rax # imm = 0xF4240
addq 0x8(%r15), %rax
movq %rax, 0x68... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
bcache_remove_file | bool bcache_remove_file(struct filemgr *file)
{
bool rv = false;
struct fnamedic_item *fname_item;
// Before proceeding with deletion, garbage collect zombie files
_garbage_collect_zombie_fnames();
fname_item = file->bcache;
if (fname_item) {
// acquire lock
spin_lock(&bcache_l... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x8737
movq 0x128(%rbx), %rbx
testq %rbx, %rbx
je 0x86cb
leaq 0x4a0e4(%rip), %rdi # 0x526ac
callq 0x3310
movq %rbx, %rdi
callq 0x874e
testb %al, %al
je 0x86bf
leaq 0x30(%rbx), %rsi
leaq 0x4a0c8(%rip), %rdi # 0x526b0
callq 0x27638
leaq ... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
file_empty(fnamedic_item*) | static bool _file_empty(struct fnamedic_item *fname) {
bool empty = true;
size_t i = 0;
_acquire_all_shard_locks(fname);
for (; i < fname->num_shards; ++i) {
if (!(_list_empty(fname->shards[i].cleanlist) &&
_tree_empty(fname->shards[i].tree) &&
_tree_empty(fname->shar... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movb $0x1, %bpl
cmpq $0x0, 0x70(%rdi)
je 0x87b5
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %rdi
addq %r14, %rdi
callq 0x3310
incq %r15
movq 0x70(%rbx), %rax
addq $0x70, %r14
cmpq %rax, %r15
jb 0x8768
testq %rax, %rax
je 0x87b5
movq 0x18(%r... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
fname_free(fnamedic_item*) | static void _fname_free(struct fnamedic_item *fname)
{
// file must be empty
if (!_file_empty(fname)) {
DBG("Warning: failed to free fnamedic_item instance for a file '%s' "
"because the fnamedic_item instance is not empty!\n",
fname->filename);
return;
}
uint32_t... | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x874e
testb %al, %al
je 0x8814
movl 0x48(%rbx), %eax
testl %eax, %eax
je 0x881a
popq %rbx
popq %r14
popq %r15
retq
cmpq $0x0, 0x70(%rbx)
je 0x8851
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
leaq (%rax,%r14), %rdi
addq $0x38, %rdi
callq 0x27689
movq ... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
bcache_init | void bcache_init(int nblock, int blocksize, const bcache_config& bconfig)
{
int i;
struct bcache_item *item;
uint8_t *block_ptr;
struct timeval begin, end;
gettimeofday(&begin, NULL);
list_init(&freelist);
list_init(&file_zombies);
hash_init(&fnamedic, BCACHE_NDICBUCKET, _fname_hash, _... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r15
movl %esi, %ebp
movl %edi, %ebx
movq %rsp, %rdi
xorl %esi, %esi
callq 0x35f0
xorps %xmm0, %xmm0
movups %xmm0, 0x49e22(%rip) # 0x526d8
movups %xmm0, 0x49e2b(%rip) # 0x526e8
leaq 0x49dec(%rip), %rdi # 0x526b0
leaq 0xafa(%rip... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
dirty_cmp(avl_node*, avl_node*, void*) | INLINE int _dirty_cmp(struct avl_node *a, struct avl_node *b, void *aux)
{
struct dirty_item *aa, *bb;
aa = _get_entry(a, struct dirty_item, avl);
bb = _get_entry(b, struct dirty_item, avl);
#ifdef __BIT_CMP
return _CMP_U64(aa->item->bid , bb->item->bid);
#else
if (aa->item->bid < ... | movq -0x8(%rdi), %rax
movq (%rax), %rcx
movq -0x8(%rsi), %rax
movq (%rax), %rax
movq %rax, %rdx
xorq %rcx, %rdx
movq %rdx, %rsi
shrq $0x3f, %rsi
leal -0x1(%rsi), %edi
xorl %r8d, %r8d
subq %rax, %rcx
setne %r8b
shrq $0x20, %rcx
orl %r8d, %ecx
andl %edi, %ecx
shrq $0x20, %rdx
movl $0x80000000, %edi # imm = 0x800000... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
bcache_free_fnamedic(hash_elem*) | INLINE void _bcache_free_fnamedic(struct hash_elem *h)
{
size_t i = 0;
struct fnamedic_item *item;
item = _get_entry(h, struct fnamedic_item, hash_elem);
for (; i < item->num_shards; ++i) {
hash_free_active(&item->shards[i].hashtable, _bcache_free_bcache_item);
spin_destroy(&item->shard... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x40(%rdi)
je 0x9474
xorl %r15d, %r15d
leaq 0x107(%rip), %r14 # 0x954b
xorl %r12d, %r12d
movq -0x18(%rbx), %rax
leaq (%rax,%r15), %rdi
addq $0x38, %rdi
movq %r14, %rsi
callq 0x27692
movq -0x18(%rbx), %rdi
addq %r15, %rdi
callq 0x34c... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
bcache_cmp(hash_elem*, hash_elem*) | INLINE int _bcache_cmp(struct hash_elem *a, struct hash_elem *b)
{
struct bcache_item *aa, *bb;
aa = _get_entry(a, struct bcache_item, hash_elem);
bb = _get_entry(b, struct bcache_item, hash_elem);
#ifdef __BIT_CMP
return _CMP_U64(aa->bid, bb->bid);
#else
if (aa->bid == bb->bid) ... | movq -0x10(%rdi), %rcx
movq -0x10(%rsi), %rax
movq %rax, %rdx
xorq %rcx, %rdx
movq %rdx, %rsi
shrq $0x3f, %rsi
leal -0x1(%rsi), %edi
xorl %r8d, %r8d
subq %rax, %rcx
setne %r8b
shrq $0x20, %rcx
orl %r8d, %ecx
andl %edi, %ecx
shrq $0x20, %rdx
movl $0x80000000, %edi # imm = 0x80000000
andl %edi, %edx
orl %esi, %edx
... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
dirty_bid_cmp(avl_node*, avl_node*, void*) | INLINE int _dirty_bid_cmp(struct avl_node *a, struct avl_node *b, void *aux)
{
struct dirty_bid *aa, *bb;
aa = _get_entry(a, struct dirty_bid, avl);
bb = _get_entry(b, struct dirty_bid, avl);
#ifdef __BIT_CMP
return _CMP_U64(aa->bid , bb->bid);
#else
if (aa->bid < bb->bid) return -... | movq -0x8(%rdi), %rcx
movq -0x8(%rsi), %rax
movq %rax, %rdx
xorq %rcx, %rdx
movq %rdx, %rsi
shrq $0x3f, %rsi
leal -0x1(%rsi), %edi
xorl %r8d, %r8d
subq %rax, %rcx
setne %r8b
shrq $0x20, %rcx
orl %r8d, %ecx
andl %edi, %ecx
shrq $0x20, %rdx
movl $0x80000000, %edi # imm = 0x80000000
andl %edi, %edx
orl %esi, %edx
sh... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
btree_read_meta | metasize_t btree_read_meta(struct btree *btree, void *buf)
{
void *addr;
void *ptr;
metasize_t size;
struct bnode *node;
addr = btree->blk_ops->blk_read(btree->blk_handle, btree->root_bid);
node = _fetch_bnode(btree, addr, btree->height);
if (node->flag & BNODE_MASK_METADATA) {
ptr ... | pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x18(%rdi), %rax
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
callq *0x18(%rax)
leaq 0x10(%rax), %rcx
testb $0x2, 0x2(%rax)
jne 0x95a4
movq %rcx, 0x8(%rax)
xorl %ebp, %ebp
jmp 0x95cd
movzwl 0x10(%rax), %ebp
rolw $0x8, %bp
movzwl %bp, %edx
movl %edx, %esi
addl $0x11, %... | /ForestDB-KVStore[P]forestdb/src/btree.cc |
btree_update_meta | void btree_update_meta(struct btree *btree, struct btree_meta *meta)
{
void *addr;
void *ptr;
metasize_t metasize, _metasize;
metasize_t old_metasize = (metasize_t)(-1);
struct bnode *node;
// read root node
addr = btree->blk_ops->blk_read(btree->blk_handle, btree->root_bid);
node = _fe... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
callq *0x18(%rax)
movq %rax, %r14
leaq 0x10(%rax), %r12
testb $0x2, 0x2(%rax)
jne 0x961a
movq %r12, 0x8(%r14)
testq %r15, %r15
je 0x972f
movzwl (%... | /ForestDB-KVStore[P]forestdb/src/btree.cc |
btree_init_from_bid | btree_result btree_init_from_bid(struct btree *btree, void *blk_handle,
struct btree_blk_ops *blk_ops,
struct btree_kv_ops *kv_ops,
uint32_t nodesize, bid_t root_bid)
{
void *addr;
struct bnode *root;
btree->... | pushq %rbx
movq %rdi, %rbx
movq %rdx, 0x18(%rdi)
movq %rsi, 0x10(%rdi)
movq %rcx, 0x20(%rdi)
movl %r8d, 0x4(%rdi)
movq %r9, 0x8(%rdi)
movq %rsi, %rdi
movq %r9, %rsi
callq *0x18(%rdx)
movzwl 0x2(%rax), %ecx
movq %rax, %rdx
addq $0x10, %rdx
testb $0x2, %cl
je 0x97c1
movzwl (%rdx), %esi
rolw $0x8, %si
movzwl %si, %esi
add... | /ForestDB-KVStore[P]forestdb/src/btree.cc |
btree_find_entry(btree*, bnode*, void*) | static idx_t _btree_find_entry(struct btree *btree, struct bnode *node, void *key)
{
idx_t start, end, middle, temp;
uint8_t *k = alca(uint8_t, btree->ksize);
int cmp;
#ifdef __BIT_CMP
idx_t *_map1[3] = {&end, &start, &start};
idx_t *_map2[3] = {&temp, &end, &temp};
#endif
if (b... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movzbl (%rdi), %eax
movq %rsp, %r14
addl $0xf, %eax
andl $-0x10, %eax
subq %rax, %r14
movq %r14, %rsp
leaq -0x2a(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x2c(%rbp), %rcx
mo... | /ForestDB-KVStore[P]forestdb/src/btree.cc |
btree_add_entry(btree*, bnode*, void*, void*) | static idx_t _btree_add_entry(struct btree *btree, struct bnode *node, void *key, void *value)
{
idx_t idx, idx_insert;
uint8_t *k = alca(uint8_t, btree->ksize);
if (btree->kv_ops->init_kv_var) btree->kv_ops->init_kv_var(btree, k, NULL);
if (node->nentry > 0) {
idx = _btree_find_entry(btree, n... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movzbl (%rdi), %eax
movq %rsp, %r14
addl $0xf, %eax
andl $-0x10, %eax
subq %rax, %r14
movq %r14, %rsp
movq 0x20(%rdi), %rax
movq 0x30(%rax), %rax
testq %rax,... | /ForestDB-KVStore[P]forestdb/src/btree.cc |
btree_split_node(btree*, void*, bnode**, unsigned long*, unsigned short*, int, list*, unsigned long, void*, void*, signed char*, signed char*, signed char*) | static int _btree_split_node(
struct btree *btree, void *key, struct bnode **node, bid_t *bid, idx_t *idx, int i,
struct list *kv_ins_list, size_t nsplitnode, void *k, void *v,
int8_t *modified, int8_t *minkey_replace, int8_t *ins)
{
void *addr;
size_t nnode = nsplitnode;
size_t j;
int *nent... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, -0x5c(%rbp)
movq %r8, -0x88(%rbp)
movq %rcx, -0x80(%rbp)
movq %rdx, -0x30(%rbp)
movq %rsi, -0x90(%rbp)
movq %rdi, %rbx
movq 0x18(%rbp), %r12
leaq (,%r12,4), %rdx
movq %rsp, %rdi
leaq 0xf(,%r12,4), %rax
andq $-0... | /ForestDB-KVStore[P]forestdb/src/btree.cc |
btree_prev | btree_result btree_prev(struct btree_iterator *it, void *key_buf,
void *value_buf)
{
btree_result br = _btree_prev(it, key_buf, value_buf, it->btree.height-1);
if (br == BTREE_RESULT_SUCCESS) {
BTREE_ITR_SET_REV(it);
} else {
BTREE_ITR_SET_NONE(it);
}
return b... | pushq %rbx
movq %rdi, %rbx
movzwl 0x2(%rdi), %ecx
decl %ecx
callq 0xb817
movb 0x60(%rbx), %cl
andb $-0x4, %cl
leal 0x2(%rcx), %edx
testl %eax, %eax
movzbl %cl, %ecx
movzbl %dl, %edx
cmovnel %ecx, %edx
movb %dl, 0x60(%rbx)
popq %rbx
retq
| /ForestDB-KVStore[P]forestdb/src/btree.cc |
btree_next | btree_result btree_next(struct btree_iterator *it, void *key_buf,
void *value_buf)
{
btree_result br = _btree_next(it, key_buf, value_buf, it->btree.height-1);
if (br == BTREE_RESULT_SUCCESS) {
BTREE_ITR_SET_FWD(it);
} else {
BTREE_ITR_SET_NONE(it);
}
return b... | pushq %rbx
movq %rdi, %rbx
movzwl 0x2(%rdi), %ecx
decl %ecx
callq 0xbc57
testl %eax, %eax
sete %cl
movb 0x60(%rbx), %dl
andb $-0x4, %dl
orb %cl, %dl
movb %dl, 0x60(%rbx)
popq %rbx
retq
| /ForestDB-KVStore[P]forestdb/src/btree.cc |
btree_next(btree_iterator*, void*, void*, int) | static btree_result _btree_next(struct btree_iterator *it, void *key_buf,
void *value_buf, int depth)
{
struct btree *btree;
btree = &it->btree;
int i;
uint8_t *k = alca(uint8_t, btree->ksize);
uint8_t *v = alca(uint8_t, btree->vsize);
void *addr;
struct bnode... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r13d
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %rbx
movzbl (%rdi), %eax
movq %rsp, %r14
addl $0xf, %eax
andl $-0x10, %eax
subq %rax, %r14
movq %r14, %rsp
movzbl 0x1(%rdi), %eax
movq %rsp, %r15
a... | /ForestDB-KVStore[P]forestdb/src/btree.cc |
btree_kv_get_kb64_vb64 | struct btree_kv_ops * btree_kv_get_kb64_vb64(struct btree_kv_ops *kv_ops)
{
struct btree_kv_ops *btree_kv_ops;
if (kv_ops) {
btree_kv_ops = kv_ops;
}else{
btree_kv_ops = (struct btree_kv_ops *)malloc(sizeof(struct btree_kv_ops));
}
btree_kv_ops->get_kv = _get_kv;
btree_kv_ops->s... | pushq %rax
movq %rdi, %rax
testq %rdi, %rdi
jne 0xc72b
movl $0x78, %edi
callq 0x34b0
leaq 0x208(%rip), %rcx # 0xc93a
movq %rcx, (%rax)
leaq 0x260(%rip), %rcx # 0xc99c
movq %rcx, 0x8(%rax)
leaq 0x2a6(%rip), %rcx # 0xc9ed
movq %rcx, 0x10(%rax)
leaq 0x34c(%rip), %rcx # 0xca9e
movq %rcx, 0x18(%rax)
... | /ForestDB-KVStore[P]forestdb/src/btree_kv.cc |
btree_kv_get_kbn_vb64 | struct btree_kv_ops * btree_kv_get_kbn_vb64(struct btree_kv_ops *kv_ops)
{
struct btree_kv_ops *btree_kv_ops;
if (kv_ops) {
btree_kv_ops = kv_ops;
}else{
btree_kv_ops = (struct btree_kv_ops *)malloc(sizeof(struct btree_kv_ops));
}
btree_kv_ops->get_kv = _get_kv;
btree_kv_ops->se... | pushq %rax
movq %rdi, %rax
testq %rdi, %rdi
jne 0xc897
movl $0x78, %edi
callq 0x34b0
leaq 0x9c(%rip), %rcx # 0xc93a
movq %rcx, (%rax)
leaq 0xf4(%rip), %rcx # 0xc99c
movq %rcx, 0x8(%rax)
leaq 0x13a(%rip), %rcx # 0xc9ed
movq %rcx, 0x10(%rax)
leaq 0x1e0(%rip), %rcx # 0xca9e
movq %rcx, 0x18(%rax)
... | /ForestDB-KVStore[P]forestdb/src/btree_kv.cc |
set_kv(bnode*, unsigned short, void*, void*) | INLINE void _set_kv(struct bnode *node, idx_t idx, void *key, void *value)
{
int ksize, vsize;
void *ptr;
_get_kvsize(node->kvsize, ksize, vsize);
ptr = (uint8_t *)node->data + (idx * (ksize+vsize));
memcpy(ptr, key, ksize);
memcpy((uint8_t *)ptr + ksize, value, vsize);
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movzwl (%rdi), %eax
movzbl %al, %r14d
movl %eax, %r15d
shrl $0x8, %r15d
movl %r15d, %r12d
addl %r14d, %r12d
imull %esi, %r12d
addq 0x8(%rdi), %r12
movq %r12, %rdi
movq %rdx, %rsi
movq %r15, %rdx
callq 0x3300
addq %r15, %r12
movq %r12, %rdi
movq %rbx... | /ForestDB-KVStore[P]forestdb/src/btree_kv.cc |
copy_kv(bnode*, bnode*, unsigned short, unsigned short, unsigned short) | INLINE void _copy_kv(
struct bnode *node_dst, struct bnode *node_src, idx_t dst_idx, idx_t src_idx, idx_t len)
{
int ksize, vsize, kvsize;
void *ptr_src, *ptr_dst;
if (node_dst == node_src) {
return;
}
_get_kvsize(node_src->kvsize, ksize, vsize);
kvsize = ksize + vsize;
ptr_sr... | cmpq %rsi, %rdi
je 0xcad9
movzwl (%rsi), %eax
movzbl %al, %r9d
shrl $0x8, %eax
addl %eax, %r9d
movzwl %dx, %eax
imull %r9d, %eax
addq 0x8(%rdi), %rax
movzwl %cx, %ecx
imull %r9d, %ecx
addq 0x8(%rsi), %rcx
movzwl %r8w, %edx
imull %r9d, %edx
movq %rax, %rdi
movq %rcx, %rsi
jmp 0x3300
retq
| /ForestDB-KVStore[P]forestdb/src/btree_kv.cc |
cmp_binary64(void*, void*, void*) | INLINE uint64_t deref64(const void *ptr)
{
#ifdef _ALIGN_MEM_ACCESS
// 8-byte align check (rightmost 3 bits must be '000')
// Not sure whether 8-byte integer should be aligned in
// 8-byte boundary or just 4-byte boundary.
if ( (size_t)ptr & 0x7 ) {
uint64_t value;
memcpy(&value, ptr, si... | movq (%rdi), %rdi
movq %rdi, %rcx
bswapq %rcx
movq (%rsi), %rsi
movq %rsi, %rax
bswapq %rax
movq %rax, %rdx
xorq %rcx, %rdx
movq %rdx, %r8
shrq $0x3f, %r8
leal -0x1(%r8), %r9d
subq %rax, %rcx
shrq $0x20, %rcx
xorl %r10d, %r10d
cmpq %rsi, %rdi
setne %r10b
orl %r10d, %ecx
andl %r9d, %ecx
shrq $0x20, %rdx
movl $0x80000000... | /ForestDB-KVStore[P]forestdb/src/btree_kv.h |
cmp_binary32(void*, void*, void*) | INLINE uint32_t deref32(const void *ptr)
{
#ifdef _ALIGN_MEM_ACCESS
// 4-byte align check (rightmost 2 bits must be '00')
if ( (size_t)ptr & 0x3 ) {
uint32_t value;
memcpy(&value, ptr, sizeof(uint32_t));
return value;
}
#endif
return *(uint32_t*)ptr;
} | movl (%rdi), %ecx
movl %ecx, %eax
bswapl %eax
movl (%rsi), %edx
movl %edx, %esi
bswapl %esi
subq %rsi, %rax
shrq $0x20, %rax
xorl %esi, %esi
cmpl %edx, %ecx
setne %sil
orl %esi, %eax
retq
| /ForestDB-KVStore[P]forestdb/src/btree_kv.h |
cmp_uint64_t(void*, void*, void*) | INLINE uint64_t deref64(const void *ptr)
{
#ifdef _ALIGN_MEM_ACCESS
// 8-byte align check (rightmost 3 bits must be '000')
// Not sure whether 8-byte integer should be aligned in
// 8-byte boundary or just 4-byte boundary.
if ( (size_t)ptr & 0x7 ) {
uint64_t value;
memcpy(&value, ptr, si... | movq (%rdi), %rcx
movq (%rsi), %rax
movq %rax, %rdx
xorq %rcx, %rdx
movq %rdx, %rsi
shrq $0x3f, %rsi
leal -0x1(%rsi), %edi
xorl %r8d, %r8d
subq %rax, %rcx
setne %r8b
shrq $0x20, %rcx
orl %r8d, %ecx
andl %edi, %ecx
shrq $0x20, %rdx
movl $0x80000000, %edi # imm = 0x80000000
andl %edi, %edx
orl %esi, %edx
shrq $0x20... | /ForestDB-KVStore[P]forestdb/src/btree_kv.h |
cmp_uint32_t(void*, void*, void*) | INLINE uint32_t deref32(const void *ptr)
{
#ifdef _ALIGN_MEM_ACCESS
// 4-byte align check (rightmost 2 bits must be '00')
if ( (size_t)ptr & 0x3 ) {
uint32_t value;
memcpy(&value, ptr, sizeof(uint32_t));
return value;
}
#endif
return *(uint32_t*)ptr;
} | movl (%rdi), %ecx
movl (%rsi), %edx
movq %rcx, %rsi
subq %rdx, %rsi
shrq $0x20, %rsi
xorl %eax, %eax
cmpl %edx, %ecx
setne %al
orl %esi, %eax
retq
nop
| /ForestDB-KVStore[P]forestdb/src/btree_kv.h |
btree_str_kv_set_inf_key | void btree_str_kv_set_inf_key(void *key)
{
void *key_ptr;
key_len_t keylen;
key_len_t _keylen;
// just containing length (0xff..) info
key_ptr = (void *)malloc(sizeof(key_len_t));
memset(&keylen, 0xff, sizeof(key_len_t));
_keylen = _endian_encode(keylen);
memcpy(key_ptr, &_keylen, sizeo... | pushq %rbx
movq %rdi, %rbx
movl $0x2, %edi
callq 0x34b0
movw $0xffff, (%rax) # imm = 0xFFFF
movq %rax, (%rbx)
popq %rbx
retq
| /ForestDB-KVStore[P]forestdb/src/btree_str_kv.cc |
btree_str_kv_get_key | void btree_str_kv_get_key(void *key, void *strbuf, size_t *len)
{
void *key_ptr;
key_len_t keylen, inflen;
key_len_t _keylen;
memset(&inflen, 0xff, sizeof(key_len_t));
memcpy(&key_ptr, key, sizeof(void *));
if (key_ptr) {
memcpy(&_keylen, key_ptr, sizeof(key_len_t));
keylen = _... | pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0xcd46
movzwl (%rax), %ecx
rolw $0x8, %cx
addq $0x2, %rax
movzwl %cx, %r14d
movq %rsi, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x3300
jmp 0xcd49
xorl %r14d, %r14d
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| /ForestDB-KVStore[P]forestdb/src/btree_str_kv.cc |
cmp_str64(void*, void*, void*) | int _cmp_str64(void *key1, void *key2, void* aux)
{
(void) aux;
void *key_ptr1, *key_ptr2;
key_len_t keylen1, keylen2, inflen;
key_len_t _keylen1, _keylen2;
memcpy(&key_ptr1, key1, sizeof(void *));
memcpy(&key_ptr2, key2, sizeof(void *));
if (key_ptr1 == NULL && key_ptr2 == NULL) {
... | pushq %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq (%rsi), %rsi
testq %rsi, %rsi
sete %al
xorl %ebx, %ebx
movq %rdi, %rcx
orq %rsi, %rcx
sete %bl
decl %ebx
testq %rdi, %rdi
sete %cl
movl $0x1, %edx
cmovnel %edx, %ebx
orb %al, %cl
jne 0xce03
movzwl (%rdi), %eax
movl $0x1, %ebx
cmpw $-0x1, %ax
je 0xce03
movzwl (%rsi... | /ForestDB-KVStore[P]forestdb/src/btree_str_kv.cc |
btree_str_kv_get_kb64_vb64 | struct btree_kv_ops * btree_str_kv_get_kb64_vb64(struct btree_kv_ops *kv_ops)
{
struct btree_kv_ops *btree_kv_ops;
if (kv_ops) {
btree_kv_ops = kv_ops;
}else{
btree_kv_ops = (struct btree_kv_ops *)malloc(sizeof(struct btree_kv_ops));
}
btree_kv_ops->get_kv = _get_str_kv;
btree_k... | pushq %rax
movq %rdi, %rax
testq %rdi, %rdi
jne 0xce1f
movl $0x78, %edi
callq 0x34b0
leaq 0x9f(%rip), %rcx # 0xcec5
movq %rcx, (%rax)
leaq 0x150(%rip), %rcx # 0xcf80
movq %rcx, 0x8(%rax)
leaq 0x272(%rip), %rcx # 0xd0ad
movq %rcx, 0x10(%rax)
leaq 0x3ca(%rip), %rcx # 0xd210
movq %rcx, 0x18(%rax)
... | /ForestDB-KVStore[P]forestdb/src/btree_str_kv.cc |
get_str_kv(bnode*, unsigned short, void*, void*) | static void _get_str_kv(struct bnode *node, idx_t idx, void *key, void *value)
{
int ksize, vsize, i;
void *key_ptr, *ptr;
key_len_t keylen, _keylen;
size_t offset;
_get_kvsize(node->kvsize, ksize, vsize);
ksize = sizeof(void *);
ptr = node->data;
offset = 0;
// linear search
f... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movzbl (%rdi), %eax
movq 0x8(%rdi), %r15
testl %esi, %esi
movq %rax, (%rsp)
je 0xcf04
addq $0x2, %rax
xorl %r12d, %r12d
movzwl (%r15,%r12), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
addq %rax, %r12
addq %rcx, %r12
de... | /ForestDB-KVStore[P]forestdb/src/btree_str_kv.cc |
set_str_kv(bnode*, unsigned short, void*, void*) | static void _set_str_kv(struct bnode *node, idx_t idx, void *key, void *value)
{
int ksize, vsize, i;
void *key_ptr, *ptr;
key_len_t keylen, keylen_ins, keylen_idx = 0;
key_len_t _keylen, _keylen_ins;
size_t offset = 0, offset_idx, offset_next = 0, next_len;
_get_kvsize(node->kvsize, ksize, vsi... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movzbl (%rdi), %eax
movq 0x8(%rdi), %r14
testl %esi, %esi
je 0xcfc3
movq %rax, %r8
addq $0x2, %r8
xorl %r13d, %r13d
movl %esi, %r9d
movzwl (%r14,%r13), %ecx
rolw $0x8, %cx
movzwl %cx, %r10d
addq %r8, %r13
addq %r10, %r13
... | /ForestDB-KVStore[P]forestdb/src/btree_str_kv.cc |
ins_str_kv(bnode*, unsigned short, void*, void*) | static void _ins_str_kv(struct bnode *node, idx_t idx, void *key, void *value)
{
int ksize, vsize, i;
void *key_ptr, *ptr;
key_len_t keylen, keylen_ins;
key_len_t _keylen, _keylen_ins;
size_t offset = 0, offset_idx, offset_next = 0, next_len;
_get_kvsize(node->kvsize, ksize, vsize);
ksize =... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdi, %rax
movzbl (%rdi), %ecx
movq 0x8(%rdi), %rbx
testl %esi, %esi
je 0xd0ed
leaq 0x2(%rcx), %r8
xorl %edi, %edi
movl %esi, %r9d
movzwl (%rbx,%rdi), %r10d
rolw $0x8, %r10w
movzwl %r10w, %r10d
addq %r8, %rdi
addq %r10, %r... | /ForestDB-KVStore[P]forestdb/src/btree_str_kv.cc |
copy_str_kv(bnode*, bnode*, unsigned short, unsigned short, unsigned short) | static void _copy_str_kv(struct bnode *node_dst,
struct bnode *node_src,
idx_t dst_idx,
idx_t src_idx,
idx_t len)
{
int i;
int ksize, vsize;
void *ptr_src, *ptr_dst;
key_len_t keylen, _keylen;
size_t ... | cmpq %rsi, %rdi
je 0xd24a
pushq %rbx
movzbl (%rsi), %r9d
movq 0x8(%rsi), %rsi
movzwl %cx, %ecx
testw %cx, %cx
je 0xd24b
movq %r9, %r10
addq $0x2, %r10
xorl %eax, %eax
movl %ecx, %r11d
movzwl (%rsi,%rax), %ebx
rolw $0x8, %bx
movzwl %bx, %ebx
addq %r10, %rax
addq %rbx, %rax
decl %r11d
jne 0xd232
jmp 0xd24d
retq
xorl %eax... | /ForestDB-KVStore[P]forestdb/src/btree_str_kv.cc |
get_str_data_size(bnode*, void*, void*, void*, unsigned long) | static size_t _get_str_data_size(
struct bnode *node, void *new_minkey, void *key_arr, void *value_arr, size_t len)
{
int ksize, vsize;
void *ptr, *key_ptr;
size_t offset, size, i;
key_len_t keylen, _keylen;
_get_kvsize(node->kvsize, ksize, vsize);
ksize = sizeof(void *);
ptr = node->d... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movzbl (%rdi), %r9d
movzwl 0x6(%rdi), %r10d
testq %r10, %r10
je 0xd3aa
movq 0x8(%rdi), %rdi
leaq 0x2(%r9), %r11
xorl %ebx, %ebx
xorl %eax, %eax
xorl %r14d, %r14d
testq %rsi, %rsi
sete %bpl
movzwl (%rdi,%r14), %r15d
rolw $0x8, %r15w
movzwl %r15w, %r15d
testq %rbx, %... | /ForestDB-KVStore[P]forestdb/src/btree_str_kv.cc |
btree_fast_str_kv_set_key | void btree_fast_str_kv_set_key(void *key, void *str, size_t len)
{
void *key_ptr;
key_len_t keylen = len;
key_len_t _keylen;
key_ptr = (void *)malloc(sizeof(key_len_t) + keylen);
_keylen = _endian_encode(keylen);
memcpy(key_ptr, &_keylen, sizeof(key_len_t));
memcpy((uint8_t*)key_ptr + sizeo... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl %dx, %r15d
leaq 0x2(%r15), %rdi
callq 0x34b0
movq %rax, %r12
movl %r15d, %eax
rolw $0x8, %ax
movw %ax, (%r12)
leaq 0x2(%r12), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3300
movq %r12, (%r14)
addq $0x8, %rsp
popq %rbx
popq %... | /ForestDB-KVStore[P]forestdb/src/btree_fast_str_kv.cc |
btree_fast_str_kv_set_inf_key | void btree_fast_str_kv_set_inf_key(void *key)
{
void *key_ptr;
key_len_t keylen;
key_len_t _keylen;
// just containing length (0xff..) info
key_ptr = (void *)malloc(sizeof(key_len_t));
memset(&keylen, 0xff, sizeof(key_len_t));
_keylen = _endian_encode(keylen);
memcpy(key_ptr, &_keylen, ... | pushq %rbx
movq %rdi, %rbx
movl $0x2, %edi
callq 0x34b0
movw $0xffff, (%rax) # imm = 0xFFFF
movq %rax, (%rbx)
popq %rbx
retq
| /ForestDB-KVStore[P]forestdb/src/btree_fast_str_kv.cc |
btree_fast_str_kv_is_inf_key | int btree_fast_str_kv_is_inf_key(void *key)
{
void *key_ptr;
key_len_t keylen, inflen;
key_len_t _keylen;
memset(&inflen, 0xff, sizeof(key_len_t));
memcpy(&key_ptr, key, sizeof(void *));
if (key_ptr) {
memcpy(&_keylen, key_ptr, sizeof(key_len_t));
keylen = _endian_decode(_keylen... | movq (%rdi), %rax
testq %rax, %rax
je 0xd523
cmpw $-0x1, (%rax)
je 0xd526
xorl %eax, %eax
retq
movl $0x1, %eax
retq
| /ForestDB-KVStore[P]forestdb/src/btree_fast_str_kv.cc |
set_fast_str_kv(bnode*, unsigned short, void*, void*) | static void _set_fast_str_kv(struct bnode *node, idx_t idx, void *key, void *value)
{
int ksize, vsize, i;
void *key_ptr, *ptr;
key_len_t *_offset_arr, offset;
key_len_t keylen_ins, keylen_idx;
key_len_t _keylen_ins;
key_len_t offset_idx, offset_next, next_len;
_get_kvsize(node->kvsize, ksi... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movl %esi, %ebp
movq %rdi, %r13
movzbl (%rdi), %ebx
movq (%rdx), %r9
movzwl (%r9), %r14d
rolw $0x8, %r14w
movq 0x8(%rdi), %r15
movzwl 0x6(%rdi), %ecx
movzwl %cx, %eax
cmpw %bp, %ax
jbe 0xd88b
movq %r12, 0x10(%rsp)
movl %e... | /ForestDB-KVStore[P]forestdb/src/btree_fast_str_kv.cc |
copy_fast_str_kv(bnode*, bnode*, unsigned short, unsigned short, unsigned short) | static void _copy_fast_str_kv(struct bnode *node_dst,
struct bnode *node_src,
idx_t dst_idx,
idx_t src_idx,
idx_t len)
{
int i;
int ksize, vsize;
void *ptr_src, *ptr_dst, *ptr_swap;
key_len_t *_src_offset... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testl %edx, %edx
jne 0xdcb8
movq 0x8(%rsi), %rbx
movq 0x8(%rdi), %r13
movzwl %cx, %eax
movzwl (%rbx,%rax,2), %r14d
rolw $0x8, %r14w
movzwl %r8w, %r15d
leal 0x2(,%r8,2), %ebp
movq %rax, 0x10(%rsp)
addl %r15d, %eax
movzwl (%rbx,%rax,2), %r... | /ForestDB-KVStore[P]forestdb/src/btree_fast_str_kv.cc |
get_fast_str_data_size(bnode*, void*, void*, void*, unsigned long) | static size_t _get_fast_str_data_size(
struct bnode *node, void *new_minkey, void *key_arr, void *value_arr, size_t len)
{
int ksize, vsize;
void *ptr, *key_ptr;
size_t size, i;
key_len_t *_offset_arr;
key_len_t keylen, _keylen;
_get_kvsize(node->kvsize, ksize, vsize);
ksize = sizeof(vo... | movzbl (%rdi), %r9d
movzwl 0x6(%rdi), %eax
testq %rax, %rax
je 0xdda7
movq 0x8(%rdi), %rdi
movzwl (%rdi,%rax,2), %eax
rolw $0x8, %ax
movzwl %ax, %eax
testq %rsi, %rsi
je 0xdda9
movzwl (%rdi), %r10d
movzwl 0x2(%rdi), %edi
rolw $0x8, %di
movzwl %di, %edi
rolw $0x8, %r10w
movzwl %r10w, %r10d
movq (%rsi), %rsi
movzwl (%rsi... | /ForestDB-KVStore[P]forestdb/src/btree_fast_str_kv.cc |
get_fast_str_kv_size(btree*, void*, void*) | static size_t _get_fast_str_kv_size(struct btree *tree, void *key, void *value)
{
void *key_ptr;
key_len_t keylen, _keylen;
if (key) {
memcpy(&key_ptr, key, sizeof(void *));
memcpy(&_keylen, key_ptr, sizeof(key_len_t));
keylen = _endian_decode(_keylen);
}
return ((key)?(siz... | testq %rsi, %rsi
je 0xde03
movq (%rsi), %rax
movzwl (%rax), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
addq $0x2, %rcx
jmp 0xde05
xorl %ecx, %ecx
testq %rdx, %rdx
je 0xde10
movzbl 0x1(%rdi), %eax
jmp 0xde12
xorl %eax, %eax
addq %rcx, %rax
retq
| /ForestDB-KVStore[P]forestdb/src/btree_fast_str_kv.cc |
free_fast_str_kv_var(btree*, void*, void*) | static void _free_fast_str_kv_var(struct btree *tree, void *key, void *value)
{
void *key_ptr;
memcpy(&key_ptr, key, sizeof(void *));
if (key_ptr) {
free(key_ptr);
key_ptr = NULL;
memcpy(key, &key_ptr, sizeof(void *));
}
} | movq (%rsi), %rdi
testq %rdi, %rdi
je 0xde2f
pushq %rbx
movq %rsi, %rbx
callq 0x3430
movq $0x0, (%rbx)
popq %rbx
retq
| /ForestDB-KVStore[P]forestdb/src/btree_fast_str_kv.cc |
btreeblk_move(void*, unsigned long, unsigned long*) | void * btreeblk_move(void *voidhandle, bid_t bid, bid_t *new_bid)
{
struct btreeblk_handle *handle = (struct btreeblk_handle *)voidhandle;
void *old_addr, *new_addr;
bid_t _old_bid, _new_bid;
int i, subblock;
size_t sb, old_sb_idx, new_sb_idx;
old_addr = new_addr = NULL;
sb = old_sb_idx = 0... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %r15
shrq $0x30, %r15
testb %r15b, %r15b
je 0xe03f
movq %r14, 0x10(%rsp)
movabsq $0xffffffffffff, %rax # imm = 0xFFFFFFFFFFFF
movq %r12, %r14
shrq $0x35, %r14
andl $0x7, %r14d
... | /ForestDB-KVStore[P]forestdb/src/btreeblock.cc |
btreeblk_set_dirty(void*, unsigned long) | void btreeblk_set_dirty(void *voidhandle, bid_t bid)
{
struct btreeblk_handle *handle = (struct btreeblk_handle *)voidhandle;
struct list_elem *e;
struct btreeblk_block *block;
bid_t _bid;
bid_t filebid;
size_t sb, idx;
sb = idx = 0;
subbid2bid(bid, &sb, &idx, &_bid);
filebid = _bid... | movabsq $0xffffffffffff, %rax # imm = 0xFFFFFFFFFFFF
andq %rsi, %rax
movzwl 0x4(%rdi), %ecx
xorl %edx, %edx
divq %rcx
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0xe170
cmpq %rax, -0x20(%rcx)
je 0xe16c
movq 0x8(%rcx), %rcx
jmp 0xe15b
movb $0x1, -0x10(%rcx)
retq
| /ForestDB-KVStore[P]forestdb/src/btreeblock.cc |
btreeblk_alloc_sub(void*, unsigned long*) | void * btreeblk_alloc_sub(void *voidhandle, bid_t *bid)
{
int i;
void *addr;
struct btreeblk_handle *handle = (struct btreeblk_handle *)voidhandle;
if (handle->nsb == 0) {
return btreeblk_alloc(voidhandle, bid);
}
// check current block is available
if (handle->sb[0].bid != BLK_NOT... | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, 0x58(%rdi)
je 0xe2b6
movabsq $0x20000000000000, %r12 # imm = 0x20000000000000
movq 0x60(%rbx), %rsi
movq (%rsi), %rax
cmpq $-0x1, %rax
je 0xe30e
movq 0x38(%rbx), %rdi
movq %rax, %rsi
callq 0x13b46
movq 0x60(%rbx), %rsi
mov... | /ForestDB-KVStore[P]forestdb/src/btreeblock.cc |
btreeblk_operation_end(void*) | fdb_status btreeblk_operation_end(void *voidhandle)
{
// flush and write all items in allocation list
struct btreeblk_handle *handle = (struct btreeblk_handle *)voidhandle;
struct list_elem *e;
struct btreeblk_block *block;
int writable;
fdb_status status = FDB_RESULT_SUCCESS;
// write and ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r14
testq %r14, %r14
je 0xe92f
leaq 0x18(%rbx), %r15
leaq 0x28(%rbx), %r12
leaq -0x20(%r14), %r13
movq 0x38(%rbx), %rdi
movq -0x20(%r14), %rsi
callq 0x13b46
testl %eax, %eax
je 0xe9c6
movq %rbx, %rdi
movq %r13... | /ForestDB-KVStore[P]forestdb/src/btreeblock.cc |
btreeblk_free | void btreeblk_free(struct btreeblk_handle *handle)
{
struct list_elem *e;
struct btreeblk_block *block;
// free all blocks in alc list
e = list_begin(&handle->alc_list);
while(e) {
block = _get_entry(e, struct btreeblk_block, le);
e = list_remove(&handle->alc_list, &block->le);
... | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %r14
testq %r14, %r14
je 0xed49
leaq 0x18(%rbx), %r15
leaq 0x48(%rbx), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x326c0
movq %rax, %r13
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0xed35
movq -0x8(%r14), %rax
movq %rax, (%rsi)
addq ... | /ForestDB-KVStore[P]forestdb/src/btreeblock.cc |
btreeblk_read(void*, unsigned long, int) | INLINE void * _btreeblk_read(void *voidhandle, bid_t bid, int sb_no)
{
struct list_elem *elm = NULL;
struct btreeblk_block *block = NULL;
struct btreeblk_handle *handle = (struct btreeblk_handle *)voidhandle;
bid_t _bid, filebid;
int subblock;
int offset;
size_t sb, idx;
sb = idx = 0;
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rdi, %r14
movabsq $0xffffffffffff, %rax # imm = 0xFFFFFFFFFFFF
andq %rsi, %rax
movzwl 0x4(%rdi), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %r12
movq %rsi, %rdi
movq %rsi, %r8
shrq $0x30, %r8
shrq $0x35, %rdi
andl ... | /ForestDB-KVStore[P]forestdb/src/btreeblock.cc |
perform_integrity_check(unsigned char const*, unsigned long, unsigned int, crc_mode_e) | bool perform_integrity_check(const uint8_t* buf,
size_t buf_len,
uint32_t checksum,
crc_mode_e mode) {
bool success = false;
#ifdef _CRC32C
if (mode == CRC_UNKNOWN || mode == CRC32C) {
success = checksum == crc32c(buf, b... | pushq %rbx
movl %edx, %ebx
xorl %edx, %edx
callq 0x3ba54
cmpl %ebx, %eax
sete %al
popq %rbx
retq
| /ForestDB-KVStore[P]forestdb/src/checksum.cc |
detect_and_check_crc(unsigned char const*, unsigned long, unsigned int, crc_mode_e*) | bool detect_and_check_crc(const uint8_t* buf,
size_t buf_len,
uint32_t checksum,
crc_mode_e* mode) {
*mode = CRC_UNKNOWN;
#ifdef _CRC32C
if (perform_integrity_check(buf, buf_len, checksum, CRC32C)) {
*mode = CRC32C;
re... | pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebx
movl $0x0, (%rcx)
xorl %edx, %edx
callq 0x3ba54
cmpl %ebx, %eax
jne 0xf4f1
movl $0x1, (%r14)
cmpl %ebx, %eax
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| /ForestDB-KVStore[P]forestdb/src/checksum.cc |
compactor_init | void compactor_init(struct compactor_config *config)
{
if (!compactor_initialized) {
// Note that this function is synchronized by the spin lock in fdb_init API.
mutex_init(&cpt_lock);
mutex_lock(&cpt_lock);
if (!compactor_initialized) {
// initialize
compact... | cmpb $0x0, 0x42cea(%rip) # 0x527a8
je 0xfac1
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x42c45(%rip), %r14 # 0x52718
movq %r14, %rdi
xorl %esi, %esi
callq 0x3560
movq %r14, %rdi
callq 0x3550
cmpb $0x0, 0x42cbc(%rip) # 0x527a8
jne 0xfbba
movq $0x400, 0x42cb3(%rip) # imm... | /ForestDB-KVStore[P]forestdb/src/compactor.cc |
compactor_shutdown | void compactor_shutdown()
{
void *ret;
struct avl_node *a = NULL;
struct openfiles_elem *elem;
if (!compactor_tids) {
return;
}
// set terminate signal
mutex_lock(&sync_mutex);
compactor_terminate_signal = 1;
thread_cond_broadcast(&sync_cond);
mutex_unlock(&sync_mutex);... | cmpq $0x0, 0x42bdf(%rip) # 0x527b8
je 0xfd3f
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x42b5d(%rip), %rbx # 0x52750
movq %rbx, %rdi
callq 0x3550
movb $0x1, %al
xchgb %al, 0x42bbd(%rip) # 0x527c0
leaq 0x42b6e(%rip), %rdi # 0x52778
callq 0x3140
movq %rbx, %rdi
callq 0x... | /ForestDB-KVStore[P]forestdb/src/compactor.cc |
compactor_register_file | fdb_status compactor_register_file(struct filemgr *file,
fdb_config *config,
err_log_callback *log_callback)
{
file_status_t fstatus;
fdb_status fs = FDB_RESULT_SUCCESS;
struct avl_node *a = NULL;
struct openfiles_elem query, *elem;
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd50, %rsp # imm = 0xD50
movb 0x108(%rdi), %al
xorl %ebp, %ebp
cmpb $0x1, %al
je 0xfeb9
movzbl %al, %eax
cmpl $0x4, %eax
je 0xfeb9
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0x410(%rsp), %rdi
callq 0x3380
leaq 0x4298d(%... | /ForestDB-KVStore[P]forestdb/src/compactor.cc |
compactor_convert_dbfile_to_metafile(char*, char*) | static void _compactor_convert_dbfile_to_metafile(char *dbfile, char *metafile)
{
int prefix_len = _compactor_prefix_len(dbfile);
if (prefix_len > 0) {
strncpy(metafile, dbfile, prefix_len);
metafile[prefix_len] = 0;
strcat(metafile, "meta");
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3180
movl %eax, %eax
testl %eax, %eax
jle 0xff24
leaq -0x1(%rax), %r15
cmpb $0x2e, -0x1(%r14,%rax)
movq %r15, %rax
jne 0xfedf
incl %r15d
andl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
movq %rbx, %rdi
movq %r14, %rsi
movq %r1... | /ForestDB-KVStore[P]forestdb/src/compactor.cc |
compactor_set_compaction_interval | fdb_status compactor_set_compaction_interval(struct filemgr *file,
size_t interval)
{
struct avl_node *a = NULL;
struct openfiles_elem query, *elem;
fdb_status result = FDB_RESULT_SUCCESS;
strcpy(query.filename, file->filename);
mutex_lock(&cpt_lock);
... | pushq %rbx
subq $0x540, %rsp # imm = 0x540
movq %rsi, %rbx
movq (%rdi), %rsi
movq %rsp, %rdi
callq 0x3380
leaq 0x42471(%rip), %rdi # 0x52718
callq 0x3550
leaq 0x510(%rsp), %rsi
leaq 0x42485(%rip), %rdi # 0x52740
leaq -0xdc2(%rip), %rdx # 0xf500
callq 0x625e
testq %rax, %rax
je 0x102d4
movq %rbx,... | /ForestDB-KVStore[P]forestdb/src/compactor.cc |
compactor_read_metafile(char*, compactor_meta*, err_log_callback*) | struct compactor_meta * _compactor_read_metafile(char *metafile,
struct compactor_meta *metadata,
err_log_callback *log_callback)
{
int fd_meta, fd_db;
ssize_t ret;
uint8_t *buf = alca(uint8_t, sizeof(struct co... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc38, %rsp # imm = 0xC38
movq %rsi, %r15
movq %rdi, %r13
callq 0x198d8
movq %rax, %r14
movq %r13, %rdi
xorl %esi, %esi
movl $0x1a4, %edx # imm = 0x1A4
callq *(%rax)
testl %eax, %eax
js 0x10427
movl %eax, %ebp
leaq 0x420(%rsp)... | /ForestDB-KVStore[P]forestdb/src/compactor.cc |
compactor_switch_file | void compactor_switch_file(struct filemgr *old_file, struct filemgr *new_file,
err_log_callback *log_callback)
{
struct avl_node *a = NULL;
struct openfiles_elem query, *elem;
struct compactor_meta meta;
strcpy(query.filename, old_file->filename);
mutex_lock(&cpt_lock);
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd50, %rsp # imm = 0xD50
movq %rsi, %rbx
movq (%rdi), %rsi
leaq 0x410(%rsp), %rdi
callq 0x3380
leaq 0x421e4(%rip), %rdi # 0x52718
callq 0x3550
leaq 0x920(%rsp), %rsi
leaq 0x421f8(%rip), %rdi # 0x52740
leaq -0x104f(%rip), %rdx # 0xf500
... | /ForestDB-KVStore[P]forestdb/src/compactor.cc |
compactor_get_actual_filename | fdb_status compactor_get_actual_filename(const char *filename,
char *actual_filename,
fdb_compaction_mode_t comp_mode,
err_log_callback *log_callback)
{
int i;
int filename_len;
int dir... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1428, %rsp # imm = 0x1428
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r14
leaq 0x2dd30(%rip), %rsi # 0x3e3c7
leaq 0x1020(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3090
leaq 0xc18(%rsp), %rsi
movq %rbx, %rdi... | /ForestDB-KVStore[P]forestdb/src/compactor.cc |
compactor_is_valid_mode | bool compactor_is_valid_mode(const char *filename, fdb_config *config)
{
int fd;
char path[MAX_FNAMELEN];
struct filemgr_ops *ops;
ops = get_filemgr_ops();
if (config->compaction_mode == FDB_COMPACTION_AUTO) {
// auto compaction mode: invalid when
// the file '[filename]' exists
... | pushq %r15
pushq %r14
pushq %rbx
subq $0x400, %rsp # imm = 0x400
movq %rsi, %r15
movq %rdi, %r14
callq 0x198d8
movq %rax, %rbx
movzbl 0x2e(%r15), %eax
testl %eax, %eax
je 0x108c2
cmpl $0x1, %eax
jne 0x108f1
movq %r14, %rdi
jmp 0x108dc
leaq 0x2dafe(%rip), %rsi # 0x3e3c7
movq %rsp, %r15
movq %r15, %rdi
mov... | /ForestDB-KVStore[P]forestdb/src/compactor.cc |
compactor_is_threshold_satisfied(openfiles_elem*) | INLINE bool _compactor_is_threshold_satisfied(struct openfiles_elem *elem)
{
uint64_t filesize;
uint64_t active_data;
int threshold;
if (elem->compaction_flag || filemgr_is_rollback_on(elem->file)) {
// do not perform compaction if the file is already being compacted or
// in rollback.
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x0, 0x504(%rdi)
jne 0x10b21
movq %rdi, %rbx
movq 0x400(%rdi), %rdi
callq 0x1803a
testb %al, %al
je 0x10b36
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %... | /ForestDB-KVStore[P]forestdb/src/compactor.cc |
docio_init | fdb_status docio_init(struct docio_handle *handle,
struct filemgr *file,
bool compress_document_body)
{
handle->file = file;
handle->curblock = BLK_NOT_FOUND;
handle->curpos = 0;
handle->cur_bmp_revnum_hash = 0;
handle->lastbid = BLK_NOT_FOUND;
handle-... | pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq $-0x1, %rax
movq %rax, 0x8(%rdi)
movl $0x0, 0x10(%rdi)
movw $0x0, 0x14(%rdi)
movq %rax, 0x18(%rdi)
movq $0x0, 0x20(%rdi)
movb %dl, 0x38(%rdi)
leaq 0x28(%rdi), %r14
movl 0x10(%rsi), %edx
movl $0x200, %esi # imm = 0x200
movq %r14, %rdi
cal... | /ForestDB-KVStore[P]forestdb/src/docio.cc |
docio_append_commit_mark | bid_t docio_append_commit_mark(struct docio_handle *handle, uint64_t doc_offset)
{
// Note: should adapt DOCIO_COMMIT_MARK_SIZE if this function is modified.
uint32_t offset = 0;
uint64_t docsize;
uint64_t _doc_offset;
void *buf;
bid_t ret_offset;
struct docio_length length, _length;
me... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x18, %edi
callq 0x34b0
movq %rax, %r14
xorl %r12d, %r12d
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
movabsq $0x1000000000, %rax # imm = 0x1000000000
movq %rax, 0x8(%rdi)
movq (%rbx), %rax
movl 0x228(%rax), %edx
movl $0xc... | /ForestDB-KVStore[P]forestdb/src/docio.cc |
docio_read_length(docio_handle*, unsigned long, docio_length*, err_log_callback*, bool) | static int64_t _docio_read_length(struct docio_handle *handle,
uint64_t offset,
struct docio_length *length,
err_log_callback *log_callback,
bool read_on_cache_miss)
{
size_t block... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %r14d
movq %rcx, 0x30(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %rax
movl 0x10(%rax), %r12d
movq 0x190(%rax), %rdi
callq 0x36d3e
leaq -0x10(%r12), %rdx
leaq -0x1(%r12), %rcx
movb %al, 0xf(%rsp)
t... | /ForestDB-KVStore[P]forestdb/src/docio.cc |
free_docio_object | void free_docio_object(struct docio_object *doc, uint8_t key_alloc,
uint8_t meta_alloc, uint8_t body_alloc) {
if (!doc) {
return;
}
if (key_alloc) {
free(doc->key);
doc->key = NULL;
}
if (meta_alloc) {
free(doc->meta);
doc->meta = NULL;... | testq %rdi, %rdi
je 0x1259e
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movq %rdi, %rbx
testb %sil, %sil
je 0x1256e
movq 0x18(%rbx), %rdi
callq 0x3430
movq $0x0, 0x18(%rbx)
testb %r14b, %r14b
je 0x12584
movq 0x28(%rbx), %rdi
callq 0x3430
movq $0x0, 0x28(%rbx)
testb %bpl, %bpl
je 0x1259a
movq 0x30(... | /ForestDB-KVStore[P]forestdb/src/docio.cc |
docio_read_doc | int64_t docio_read_doc(struct docio_handle *handle, uint64_t offset,
struct docio_object *doc,
bool read_on_cache_miss)
{
uint8_t checksum;
int64_t _offset;
int key_alloc = 0;
int meta_alloc = 0;
int body_alloc = 0;
fdb_seqnum_t _seqnum;
timestam... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
pxor %xmm0, %xmm0
leaq 0x30(%rsp), %rdx
movdqa %xmm0, (%rdx)
movq 0x30(%rdi), %r15
movq %r15, %rcx
movl %ebp, %r8d
callq 0x11caa
movq %rax, %rbx
testq %rax, %rax
js 0x12bf6
... | /ForestDB-KVStore[P]forestdb/src/docio.cc |
docio_batch_read_docs | size_t docio_batch_read_docs(struct docio_handle *handle,
uint64_t *offset_array,
struct docio_object *doc_array,
size_t array_size,
size_t data_size_threshold,
size_t batch_s... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x10(%rsp)
cmpq %r9, %rcx
cmovaeq %r9, %rcx
movq %rcx, 0x30(%rsp)
testq %rcx, %rcx
sete %al
movq %r8, 0x28(%rsp)
testq %r8, %r8
sete %cl
orb %al, %cl
jne 0x133dd
movq %rdx, %r14
movq %r9, 0x18(%rsp)
movq 0x70(%rsp), %rdx
movq ... | /ForestDB-KVStore[P]forestdb/src/docio.cc |
docio_check_buffer | bool docio_check_buffer(struct docio_handle *handle,
bid_t bid,
uint64_t sb_bmp_revnum)
{
err_log_callback *log_callback = handle->log_callback;
_docio_read_through_buffer(handle, bid, log_callback, true);
return _docio_check_buffer(handle, sb_bmp_revnum);
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x30(%rdi), %r12
movq $-0x1, %r13
cmpq $-0x1, 0x18(%rdi)
je 0x13475
movq (%r14), %rdi
callq 0x13b92
cmpq 0x20(%r14), %rax
jne 0x1346d
movq 0x18(%r14), %r13
jmp 0x13475
movq $-0x1, 0x18(%r14)
cmpq %r15, %r13
je 0x... | /ForestDB-KVStore[P]forestdb/src/docio.cc |
fdb_init_encryptor(encryptor*, fdb_encryption_key const*) | fdb_status fdb_init_encryptor(encryptor *e,
const fdb_encryption_key *key)
{
if (key->algorithm == FDB_ENCRYPTION_NONE) {
e->ops = NULL;
return FDB_RESULT_SUCCESS;
}
#ifdef FDB_LOG_CRYPTO
fprintf(stderr, "CRYPT: Initializing context for key %d:%llx\n",
... | movl (%rsi), %eax
cmpl $-0x1, %eax
je 0x13787
cmpl $0x1, %eax
je 0x1377e
testl %eax, %eax
jne 0x137b0
movq $0x0, (%rdi)
xorl %eax, %eax
retq
leaq 0x2bb13(%rip), %rax # 0x3f298
jmp 0x1378e
leaq 0x3e5aa(%rip), %rax # 0x51d38
movq (%rax), %rax
movq %rax, (%rdi)
testq %rax, %rax
je 0x137b7
movl 0x20(%rsi), %ecx
mov... | /ForestDB-KVStore[P]forestdb/src/encryption.cc |
fdb_error_msg | LIBFDB_API
const char* fdb_error_msg(fdb_status err_code)
{
switch (err_code)
{
case FDB_RESULT_SUCCESS:
return "success";
case FDB_RESULT_INVALID_ARGS:
return "invalid arguments";
case FDB_RESULT_OPEN_FAIL:
return "error opening file";
case... | addl $0x49, %edi
cmpl $0x49, %edi
ja 0x138a5
movl %edi, %eax
leaq 0x2c3d7(%rip), %rcx # 0x3fc74
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
leaq 0x2c3ba(%rip), %rax # 0x3fc66
retq
nopl (%rax)
| /ForestDB-KVStore[P]forestdb/src/fdb_errors.cc |
filemgr_write_blocks | ssize_t filemgr_write_blocks(struct filemgr *file, void *buf, unsigned num_blocks, bid_t start_bid) {
size_t blocksize = file->blocksize;
cs_off_t offset = start_bid * blocksize;
size_t nbytes = num_blocks * blocksize;
if (file->encryption.ops == NULL) {
return file->ops->pwrite(file->fd, buf, n... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r9
movl %edx, %r12d
movq %rsi, %rdx
movq %rdi, %r15
movl 0x10(%rdi), %ebx
movq %rbx, %rcx
imulq %r9, %rcx
movl %r12d, %r14d
imulq %rbx, %r14
cmpq $0x0, 0x230(%rdi)
je 0x13ac7
movq %rcx, -0x48(%rbp)
leaq 0x230(... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_get_bcache_used_space | uint64_t filemgr_get_bcache_used_space(void)
{
uint64_t bcache_free_space = 0;
if (global_config.ncacheblock) { // If buffer cache is indeed configured
bcache_free_space = bcache_get_num_free_blocks();
bcache_free_space = (global_config.ncacheblock - bcache_free_space)
... | cmpl $0x0, 0x3ec2b(%rip) # 0x52814
je 0x13c0b
pushq %rax
callq 0x8a91
movslq 0x3ec1c(%rip), %rcx # 0x52814
subq %rax, %rcx
movslq 0x3ec0e(%rip), %rax # 0x52810
imulq %rcx, %rax
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
| /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_prefetch_thread(void*) | static void *_filemgr_prefetch_thread(void *voidargs)
{
struct filemgr_prefetch_args *args = (struct filemgr_prefetch_args*)voidargs;
uint8_t *buf = alca(uint8_t, args->file->blocksize);
uint64_t cur_pos = 0, i;
uint64_t bcache_free_space;
bid_t bid;
bool terminate = false;
struct timeval be... | pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
movl 0x10(%rdi), %eax
movq %rsp, %r14
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
movl $0x1a0, %r15d # imm = 0x1A0
addq %r15, %rdi
callq 0x3310
movq (%rbx)... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_does_file_exist(char*) | fdb_status filemgr_does_file_exist(char *filename) {
struct filemgr_ops *ops = get_filemgr_ops();
int fd = ops->open(filename, O_RDONLY, 0444);
if (fd < 0) {
return (fdb_status) fd;
}
ops->close(fd);
return FDB_RESULT_SUCCESS;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
callq 0x198d8
movq %rax, %r14
xorl %ebx, %ebx
movq %r15, %rdi
xorl %esi, %esi
movl $0x124, %edx # imm = 0x124
callq *(%rax)
testl %eax, %eax
js 0x13e6f
movl %eax, %edi
callq *0x18(%r14)
jmp 0x13e71
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_fetch_header | fdb_status filemgr_fetch_header(struct filemgr *file, uint64_t bid,
void *buf, size_t *len, fdb_seqnum_t *seqnum,
filemgr_header_revnum_t *header_revnum,
uint64_t *deltasize, uint64_t *version,
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq $0x0, (%rcx)
leaq 0x1(%rsi), %rax
xorl %r15d, %r15d
cmpq $0x2, %rax
jb 0x152e3
movq %rcx, %rbx
movq %rsi, %r12
movq %rdi, %rbp
movq %rdx, 0x10(%rsp)
movq %r9, 0x18(%rsp)
movq %r8, 0x20(%rsp)
movq 0x78(%rsp), %r13
callq 0x152f5
movq ... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_read | fdb_status filemgr_read(struct filemgr *file, bid_t bid, void *buf,
err_log_callback *log_callback,
bool read_on_cache_miss)
{
thread_local void* buf_aligned = alloc_buf_for_readahead();
thread_local FdbGcFunc gc([&](){ free_align(buf_aligned); });
size_t loc... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, (%rsp)
cmpb $0x0, %fs:-0xc8
je 0x15931
cmpb $0x0, %fs:-0x98
je 0x1593b
movl 0x10(%rbx), %r10d
imulq %r12, %r10
movq 0x18(%rbx), %r11
cmpq %r11, %r... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_close | fdb_status filemgr_close(struct filemgr *file, bool cleanup_cache_onclose,
const char *orig_file_name,
err_log_callback *log_callback)
{
int rv = FDB_RESULT_SUCCESS;
if (atomic_decr_uint32_t(&file->ref_count) > 0) {
// File is still accessed by other re... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5e8, %rsp # imm = 0x5E8
xorl %ebp, %ebp
lock
decl 0x8(%rdi)
jne 0x1609d
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %rbx
movl 0x8(%rdi), %r10d
subq $0x8, %rsp
leaq 0x2a509(%rip), %r11 # 0x40282
leaq 0x2a208(%rip), %... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_dirty_update_free | void filemgr_dirty_update_free(struct filemgr *file)
{
struct avl_node *a = avl_first(&file->dirty_update_idx);
struct filemgr_dirty_update_node *node;
while (a) {
node = _get_entry(a, struct filemgr_dirty_update_node, avl);
a = avl_next(a);
avl_remove(&file->dirty_update_idx, &node... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x2b0(%rdi), %r14
movq %r14, %rdi
callq 0x61d0
testq %rax, %rax
je 0x1613e
movq %rax, %r15
movq %r15, %rdi
callq 0x61f4
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x66ab
movq %r15, %rdi
callq 0x18652
movq %r12, %r15
testq %r12, %r12
... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_clear_stale_list | void filemgr_clear_stale_list(struct filemgr *file)
{
if (file->stale_list) {
// if the items in the list are not freed yet, release them first.
struct list_elem *e;
struct stale_data *item;
e = list_begin(file->stale_list);
while (e) {
item = _get_entry(e, struc... | movq 0x280(%rdi), %rax
testq %rax, %rax
je 0x161f2
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rax), %r14
testq %r14, %r14
je 0x161e2
leaq -0x10(%r14), %r15
movq 0x280(%rbx), %rdi
movq %r14, %rsi
callq 0x326c0
movq %rax, %r14
movq %r15, %rdi
callq 0x3430
jmp 0x161bd
movq $0x0, 0x280(%rbx)
popq %rbx
popq %r1... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_alloc_multiple | void filemgr_alloc_multiple(struct filemgr *file, int nblock, bid_t *begin,
bid_t *end, err_log_callback *log_callback)
{
spin_lock(&file->lock);
*begin = atomic_get_uint64_t(&file->pos) / file->blocksize;
*end = *begin + nblock - 1;
atomic_add_uint64_t(&file->pos, file->bloc... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movl %esi, %ebp
movq %rdi, %r15
leaq 0x1a0(%rdi), %rbx
movq %rbx, %rdi
callq 0x3310
movq 0x18(%r15), %rax
movl 0x10(%r15), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, (%r13)
movslq %ebp, %rdx
addq %... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_read_block(filemgr*, void*, unsigned long) | static ssize_t filemgr_read_block(struct filemgr *file, void *buf, bid_t bid) {
ssize_t result = file->ops->pread(file->fd, buf, file->blocksize,
file->blocksize*bid);
if (file->encryption.ops && result > 0) {
if (result != (ssize_t)file->blocksize)
retu... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0xe8(%rdi), %rax
movl 0x10(%rdi), %edx
movl 0x14(%rdi), %edi
movq %rdx, %rcx
imulq %rbx, %rcx
callq *0x10(%rax)
movq %rax, %r12
testq %rax, %rax
jle 0x16c60
cmpq $0x0, 0x230(%r15)
je 0x16c60
movl 0x10(%r15), %ecx... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_write_offset | fdb_status filemgr_write_offset(struct filemgr *file, bid_t bid,
uint64_t offset, uint64_t len, void *buf,
bool final_write,
err_log_callback *log_callback)
{
size_t lock_no;
ssize_t r = 0;
uint64_t pos = bid * f... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r13
movq %rdi, %rbx
movq 0x60(%rsp), %rdi
movq %rsi, 0x10(%rsp)
movl 0x10(%rbx), %ebp
movq 0x28(%rbx), %r10
leaq (%rcx,%rdx), %rax
movl 0x10(%rbx), %r11d
cmpq %r11, %rax
jbe 0x16ced
subq $0x8, %rsp
leaq 0x2999... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_add_stale_block | void filemgr_add_stale_block(struct filemgr *file,
bid_t pos,
size_t len)
{
if (file->stale_list) {
struct stale_data *item;
struct list_elem *e;
e = list_end(file->stale_list);
if (e) {
item = _get_entry(e, stru... | pushq %r15
pushq %r14
pushq %rbx
movq 0x280(%rdi), %r14
testq %r14, %r14
je 0x1759e
movq %rdx, %rbx
movq %rsi, %r15
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x175a4
movl -0x8(%rax), %ecx
movq -0x10(%rax), %rdx
addq %rcx, %rdx
cmpq %r15, %rdx
jne 0x175a4
addl %ecx, %ebx
movl %ebx, -0x8(%rax)
popq %rbx
popq %r14
popq %r1... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_copy_file_range | fdb_status filemgr_copy_file_range(struct filemgr *src_file,
struct filemgr *dst_file,
bid_t src_bid, bid_t dst_bid,
bid_t clone_len)
{
uint32_t blocksize = src_file->blocksize;
fdb_status fs = (fdb_status)d... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %rcx
movq %rsi, %r14
movl 0x10(%rdi), %r12d
movl 0x14(%rdi), %esi
movq 0xe8(%r14), %rax
movl 0x16c(%rdi), %edi
movl 0x14(%r14), %edx
imulq %r12, %rcx
movq %r12, %r8
imulq %r15, %r8
movq %r12, %r9
imulq %rbx, %r9
callq *0x78... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_update_file_linkage | bool filemgr_update_file_linkage(struct filemgr *file,
const char *old_filename,
const char *new_filename)
{
bool ret = true;
spin_lock(&file->lock);
if (old_filename) {
if (!file->old_filename) {
assign_old_filename(file... | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
leaq 0x1a0(%rdi), %rbx
movq %rbx, %rdi
callq 0x3310
movb $0x1, %r12b
testq %r13, %r13
je 0x1774b
cmpq $0x0, 0x118(%r15)
je 0x1771c
movl 0x8(%r15), %eax
testl %eax, %eax
je 0x17729
xorl %r12d, %r12d
jmp 0x1774b
movq %r... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_set_kv_header | bool filemgr_set_kv_header(struct filemgr *file, struct kvs_header *kv_header,
void (*free_kv_header)(struct filemgr *file))
{
bool ret;
spin_lock(&file->lock);
if (!file->kv_header) {
file->kv_header = kv_header;
file->free_kv_header = free_kv_header;
ret... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq 0x1a0(%rdi), %rbx
movq %rbx, %rdi
callq 0x3310
movq 0x170(%r15), %rax
testq %rax, %rax
jne 0x178e9
movq %r12, 0x170(%r15)
movq %r14, 0x178(%r15)
testq %rax, %rax
sete %bpl
movq %rbx, %rdi
callq 0x30b0
movl %ebp, ... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_search_stale_links | struct filemgr *filemgr_search_stale_links(struct filemgr *cur_file) {
struct filemgr *very_old_file;
spin_lock(&filemgr_openlock);
very_old_file = (struct filemgr *)hash_scan(&hash,
_filemgr_check_stale_link, cur_file);
spin_unlock(&filemgr_openlock);
return... | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3af6b(%rip), %r14 # 0x528ac
movq %r14, %rdi
callq 0x3310
leaq 0x3af20(%rip), %rdi # 0x52870
leaq 0x1e(%rip), %rsi # 0x17975
movq %rbx, %rdx
callq 0x275ca
movq %rax, %rbx
movq %r14, %rdi
callq 0x30b0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r1... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_check_stale_link(hash_elem*, void*) | static
void *_filemgr_check_stale_link(struct hash_elem *h, void *ctx) {
struct filemgr *cur_file = (struct filemgr *)ctx;
struct filemgr *file = _get_entry(h, struct filemgr, e);
spin_lock(&file->lock);
if (atomic_get_uint8_t(&file->status) == FILE_REMOVED_PENDING &&
!strcmp(file->new_filename,... | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xb0(%rdi), %r14
movq %r14, %rdi
callq 0x3310
movb 0x18(%rbx), %al
cmpb $0x4, %al
jne 0x179a6
movq 0x30(%rbx), %rdi
movq (%r15), %rsi
callq 0x34f0
testl %eax, %eax
je 0x179b9
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x30b0
movq %rbx, %rax
popq %rbx
popq... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
Subsets and Splits
SQL Console for LLM4Binary/decompile-bench
Filters out entries with file names ending in .cpp, providing a basic subset of the dataset that excludes C++ files.