name string | code string | asm string | file string |
|---|---|---|---|
eddsa_public | EdwardsPoint *eddsa_public(mp_int *private_key, const ssh_keyalg *alg)
{
const struct ecsign_extra *extra =
(const struct ecsign_extra *)alg->extra;
struct ec_curve *curve = extra->curve();
assert(curve->type == EC_EDWARDS);
ssh_hash *h = ssh_hash_new(extra->hash);
for (size_t i = 0; i < cu... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r14
movq 0xb8(%rsi), %rbp
callq *(%rbp)
cmpl $0x2, (%rax)
jne 0x1c5c0
movq %rax, %rbx
movq 0x8(%rbp), %rdi
callq 0x1c5df
movq %rax, %r15
xorl %r12d, %r12d
cmpq 0x20(%rbx), %r12
jae 0x1c573
movq 0x8(%r15), %r13
movq %r14, %rdi... | /codexns[P]putty/crypto/ecc-ssh.c |
eddsa_new_priv | static ssh_key *eddsa_new_priv(const ssh_keyalg *alg, ptrlen pub, ptrlen priv)
{
ssh_key *sshk = eddsa_new_pub(alg, pub);
if (!sshk)
return NULL;
struct eddsa_key *ek = container_of(sshk, struct eddsa_key, sshk);
BinarySource src[1];
BinarySource_BARE_INIT_PL(src, priv);
ek->privateKey ... | pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %r8, %r14
movq %rcx, %r15
callq 0x1c68b
movq %rax, %rbx
testq %rax, %rax
je 0x1c7b0
movq %rsp, %rdi
movq %r15, (%rdi)
movq %r14, 0x10(%rdi)
andq $0x0, 0x8(%rdi)
andl $0x0, 0x18(%rdi)
movq %rdi, 0x20(%rdi)
callq 0x1fe57
movq %rax, %rdi
movq %rdx, %rsi
callq 0x146fc
... | /codexns[P]putty/crypto/ecc-ssh.c |
eddsa_cache_str | static char *eddsa_cache_str(ssh_key *key)
{
struct eddsa_key *ek = container_of(key, struct eddsa_key, sshk);
mp_int *x, *y;
ecc_edwards_get_affine(ek->publicKey, &x, &y);
char *toret = ecc_cache_str_shared(ek->curve->name, x, y);
mp_free(x);
mp_free(y);
return toret;
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq -0x10(%rdi), %rdi
leaq 0x8(%rsp), %r14
movq %rsp, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x13972
movq -0x18(%rbx), %rax
movq 0x8(%rax), %rdi
movq (%r14), %rsi
movq (%r15), %rdx
callq 0x1dd2b
movq %rax, %rbx
movq (%r14), %rdi
callq 0x1452a
movq (... | /codexns[P]putty/crypto/ecc-ssh.c |
ecdsa_freekey | static void ecdsa_freekey(ssh_key *key)
{
struct ecdsa_key *ek = container_of(key, struct ecdsa_key, sshk);
if (ek->publicKey)
ecc_weierstrass_point_free(ek->publicKey);
if (ek->privateKey)
mp_free(ek->privateKey);
sfree(ek);
} | pushq %rbx
movq %rdi, %rbx
movq -0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x1d211
callq 0x11bf0
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1d21f
callq 0x1452a
addq $-0x18, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x20165
| /codexns[P]putty/crypto/ecc-ssh.c |
ecdsa_cache_str | static char *ecdsa_cache_str(ssh_key *key)
{
struct ecdsa_key *ek = container_of(key, struct ecdsa_key, sshk);
mp_int *x, *y;
ecc_weierstrass_get_affine(ek->publicKey, &x, &y);
char *toret = ecc_cache_str_shared(ek->curve->name, x, y);
mp_free(x);
mp_free(y);
return toret;
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq -0x10(%rdi), %rdi
leaq 0x8(%rsp), %r14
movq %rsp, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x126f7
movq -0x18(%rbx), %rax
movq 0x8(%rax), %rdi
movq (%r14), %rsi
movq (%r15), %rdx
callq 0x1dd2b
movq %rax, %rbx
movq (%r14), %rdi
callq 0x1452a
movq (... | /codexns[P]putty/crypto/ecc-ssh.c |
ec_alg_by_oid | const ssh_keyalg *ec_alg_by_oid(int len, const void *oid,
const struct ec_curve **curve)
{
static const ssh_keyalg *algs_with_oid[] = {
&ssh_ecdsa_nistp256,
&ssh_ecdsa_nistp384,
&ssh_ecdsa_nistp521,
};
int i;
for (i = 0; i < lenof(algs_wit... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movl %edi, %ebp
movslq %edi, %r15
xorl %r13d, %r13d
leaq 0x1a328(%rip), %rbx # 0x37ce0
cmpq $0x18, %r13
je 0x1d9ec
movq (%r13,%rbx), %r12
movq 0xb8(%r12), %r14
cmpl %ebp, 0x18(%r14)
jne 0x1d... | /codexns[P]putty/crypto/ecc-ssh.c |
key_components_free | void key_components_free(key_components *kc)
{
for (size_t i = 0; i < kc->ncomponents; i++) {
key_component *comp = &kc->components[i];
sfree(comp->name);
switch (comp->type) {
case KCT_MPINT:
mp_free(comp->mp);
break;
case KCT_TEXT:
case... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x10
popq %r15
xorl %r12d, %r12d
movq 0x10(%rbx), %r14
cmpq (%rbx), %r12
jae 0x1fa36
movq -0x10(%r14,%r15), %rdi
callq 0x20165
cmpl $0x2, -0x8(%r14,%r15)
jae 0x1fa22
movq (%r14,%r15), %rdi
callq 0x2089c
jmp 0x1fa2d
jne 0x1fa51
movq (%r14,%r15... | /codexns[P]putty/utils/key_components.c |
BinarySink_put_pstring | bool BinarySink_put_pstring(BinarySink *bs, const char *str)
{
size_t len = strlen(str);
if (len > 255)
return false; /* can't write a Pascal-style string this long */
BinarySink_put_byte(bs, len);
bs->write(bs, str, len);
return true;
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x6100
movq %rax, %r15
cmpq $0xff, %rax
ja 0x1fc3a
leaq 0xf(%rsp), %rsi
movb %r15b, (%rsi)
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq *(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *(%rbx)
cmpq $0x100,... | /codexns[P]putty/utils/marshal.c |
avl_next | struct avl_node* avl_next(struct avl_node *node)
{
if (node == NULL) return NULL;
#ifdef _AVL_NEXT_POINTER
return node->next;
#else
struct avl_node *p;
// smallest value of right subtree
if (node->right) {
p = node;
node = node->right;
while (node) {
p = node;
... | testq %rdi, %rdi
je 0x34a6
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x348f
movq %rcx, %rax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x3482
retq
movq (%rdi), %rax
andq $-0x4, %rax
je 0x34a6
cmpq %rdi, 0x8(%rax)
je 0x348e
movq %rax, %rdi
movq (%rax), %rax
jmp 0x3492
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 0x351e
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 0x3515
movl $0x10, %ecx
jns 0x3520
movq (%rbx,%rcx), %rbx
testq %rbx, %... | /ForestDB-KVStore[P]forestdb/src/avltree.cc |
balance_tree(avl_node*, int) | static struct avl_node* _balance_tree(struct avl_node *node, int bf)
{
int child_bf;
int height_diff= _get_balance(node) + bf;
if (node) {
__AVL_DEBUG_BAL_BEGIN(node, bf, height_diff);
if(height_diff < -1 && node->left) {
// balance left sub tree
if(_get_balance(nod... | movq (%rdi), %rax
movl %eax, %ecx
andl $0x3, %ecx
leal (%rcx,%rsi), %r9d
cmpl $0x80000001, %r9d # imm = 0x80000001
jb 0x37bf
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x380f
movq (%rcx), %rdx
testb $0x2, %dl
jne 0x3821
movq 0x10(%rcx), %r8
testb $0x1, %dl
jne 0x382b
xorl %edx, %edx
testq %r8, %r8
sete %r9b
setne %... | /ForestDB-KVStore[P]forestdb/src/avltree.cc |
rotate_LR(avl_node*, int) | INLINE struct avl_node* _rotate_LR(struct avl_node *parent, int parent_bf)
{
int child_bf, height_delta = 0;
struct avl_node *child = parent->left;
struct avl_node *ret;
if (child->right) {
child_bf = avl_bf(child->right);
parent->left = _rotate_RR(child, avl_bf(child), &child_bf, &heig... | pushq %rbp
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rcx
movq 0x10(%rcx), %rax
testq %rax, %rax
je 0x3b5c
movl (%rax), %edx
andl $0x3, %edx
movq (%rcx), %r10
movl %r10d, %r8d
andl $0x3, %r8d
decl %r8d
movl %edx, %ebp
movq 0x8(%rax), %r9
subl $0x1, %ebp
jae 0x3b71
xorl %edx, %edx
cmpq $0x0, 0x10(%rax)
setne %dl
movl %edx, ... | /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, 0x19087(%rip) # 0x1d388
je 0x43b9
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x528, %rsp # imm = 0x528
movq %rsi, %rbx
movq (%rdi), %rsi
movq %rsp, %rdi
callq 0x2300
leaq 0x19066(%rip), %rdi # 0x1d390
callq 0x2450
leaq 0x510(%rsp), %rsi
leaq 0x1907a(%rip), %rdi # 0x1d3b8
leaq -0... | /ForestDB-KVStore[P]forestdb/src/bgflusher.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 0x476a
movq %rsi, %rbx
leaq 0x28(%rsp), %r14
movq %rsi, -0x10(%r14)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x24a0
imulq $0xf4240, (%r15), %rax # imm = 0xF4240
addq 0x8(%r15), %rax
movq %rax, 0x68... | /ForestDB-KVStore[P]forestdb/src/blockcache.cc |
fname_create(filemgr*) | static struct fnamedic_item * _fname_create(struct filemgr *file) {
// TODO: we MUST NOT directly read file sturcture
struct fnamedic_item *fname_new;
// Before we create a new filename entry, garbage collect zombies
_garbage_collect_zombie_fnames();
fname_new = (struct fnamedic_item *)malloc(sizeo... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x59b7
movl $0x78, %edi
callq 0x23f0
movq %rax, %rbx
movq (%r14), %r15
movq %r15, %rdi
callq 0x2140
movw %ax, 0x8(%rbx)
movzwl %ax, %r12d
leaq 0x1(%r12), %rdi
callq 0x23f0
movq %rax, %r13
movq %rax, (%rbx)
movq %rax, %rdi... | /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 0x59ce
testb %al, %al
je 0x5a94
movl 0x48(%rbx), %eax
testl %eax, %eax
je 0x5a9a
popq %rbx
popq %r14
popq %r15
retq
cmpq $0x0, 0x70(%rbx)
je 0x5ad1
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x18(%rbx), %rax
leaq (%rax,%r14), %rdi
addq $0x38, %rdi
callq 0xcf25
movq 0... | /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 |
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 0x121d8
cmpl %ebx, %eax
jne 0x6825
movl $0x1, (%r14)
cmpl %ebx, %eax
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| /ForestDB-KVStore[P]forestdb/src/checksum.cc |
get_encryption_ops(int) | const encryption_ops* get_encryption_ops(fdb_encryption_algorithm_t algorithm) {
switch (algorithm) {
case FDB_ENCRYPTION_AES256:
return fdb_encryption_ops_aes;
case FDB_ENCRYPTION_BOGUS:
return fdb_encryption_ops_bogus;
default:
return NULL;
}
} | cmpl $-0x1, %edi
je 0x68a0
cmpl $0x1, %edi
jne 0x68ab
leaq 0xce02(%rip), %rax # 0x136a0
jmp 0x68a7
leaq 0x164f1(%rip), %rax # 0x1cd98
movq (%rax), %rax
retq
xorl %eax, %eax
retq
| /ForestDB-KVStore[P]forestdb/src/encryption.cc |
bogus_crypt(encryptor*, bool, void*, void const*, unsigned long, unsigned long) | static fdb_status bogus_crypt(encryptor *e,
bool encrypt,
void *dst_buf,
const void *src_buf,
size_t size,
bid_t bid)
{
int8_t delta = (bid & 0xFF) ^ e->key.bytes[0];... | xorb 0xc(%rdi), %r9b
movzbl %r9b, %edi
negb %r9b
movzbl %r9b, %eax
testl %esi, %esi
cmovnel %edi, %eax
testq %r8, %r8
je 0x6959
xorl %esi, %esi
movb (%rcx,%rsi), %dil
addb %al, %dil
movb %dil, (%rdx,%rsi)
incq %rsi
cmpq %rsi, %r8
jne 0x6946
xorl %eax, %eax
retq
| /ForestDB-KVStore[P]forestdb/src/encryption_bogus.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 0x22a0
movq (%rbx)... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_get_instance | struct filemgr* filemgr_get_instance(const char* filename)
{
spin_lock(&filemgr_openlock);
struct filemgr *file = get_instance_UNLOCKED(filename);
spin_unlock(&filemgr_openlock);
return file;
} | pushq %rbx
subq $0x2f0, %rsp # imm = 0x2F0
movq %rdi, %rbx
leaq 0x1669d(%rip), %rdi # 0x1d5d4
callq 0x22a0
testq %rbx, %rbx
je 0x6f6c
leaq 0xf0(%rsp), %rsi
movq %rbx, -0xf0(%rsi)
leaq 0x16641(%rip), %rdi # 0x1d598
callq 0xce17
leaq -0xf0(%rax), %rbx
testq %rax, %rax
cmoveq %rax, %rbx
jmp 0x6f6e
xorl ... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_free_func | void filemgr_free_func(struct hash_elem *h)
{
struct filemgr *file = _get_entry(h, struct filemgr, e);
filemgr_prefetch_status_t prefetch_state =
atomic_get_uint8_t(&file->prefetch_status);
atomic_store_uint8_t(&file->prefetch_status, FILEMGR_PREFETCH_ABORT);
if (prefetch... | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb 0x94(%rdi), %al
movb $0x2, %cl
xchgb %cl, 0x94(%rdi)
cmpb $0x1, %al
jne 0x77cc
movq 0x98(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x22c0
leaq -0xf0(%rbx), %r14
cmpl $0x0, 0x15d62(%rip) # 0x1d53c
jle 0x7805
movq 0x38(%rbx), %rax
testq %rax, %rax
je... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
block_is_overlapped(void*, void*, void*, void*, void*) | static int _block_is_overlapped(void *pbid1, void *pis_writer1,
void *pbid2, void *pis_writer2,
void *aux)
{
(void)aux;
bid_t bid1, is_writer1, bid2, is_writer2;
bid1 = *(bid_t*)pbid1;
is_writer1 = *(bid_t*)pis_writer1;
bid2 = *(bid_t*)... | movq (%rdi), %rdi
xorl %eax, %eax
cmpq (%rdx), %rdi
jne 0x7a47
movq (%rcx), %rcx
xorl %eax, %eax
orq (%rsi), %rcx
setne %al
retq
| /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_read_header(filemgr*, err_log_callback*) | static fdb_status _filemgr_read_header(struct filemgr *file,
err_log_callback *log_callback)
{
uint8_t marker[BLK_MARKER_SIZE];
filemgr_magic_t magic = ver_get_latest_magic();
filemgr_header_len_t len;
uint8_t *buf;
uint32_t crc, crc_file;
bool check_crc32_... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, (%rsp)
movq %rdi, %rbp
callq 0x83a1
movq %rax, %rbx
movl 0x228(%rbp), %esi
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %ecx
xorl %r12d, %r12d
xorl %edx, %edx
divq %rcx
movq %rax, %r13
decq %r13
movq 0x198(%rbp), %rdx
testq %rdx, %r... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_get_header | void* filemgr_get_header(struct filemgr *file, void *buf, size_t *len,
bid_t *header_bid, fdb_seqnum_t *seqnum,
filemgr_header_revnum_t *header_revnum)
{
spin_lock(&file->lock);
if (file->header.size > 0) {
if (buf == NULL) {
buf = (void*)ma... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r14
movq %rcx, %rbp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
addq $0x1a0, %rdi # imm = 0x1A0
movq %rdi, 0x8(%rsp)
callq 0x22a0
movzwl 0x50(%r12), %r13d
testq %r13, %r13
je 0x80ff
testq %r... | /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:-0x38
je 0x89dd
cmpb $0x0, %fs:-0x8
je 0x89e7
movl 0x10(%rbx), %r10d
imulq %r12, %r10
movq 0x18(%rbx), %r11
cmpq %r11, %r10
... | /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 0x9149
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %rbx
movl 0x8(%rdi), %r10d
subq $0x8, %rsp
leaq 0xad8d(%rip), %r11 # 0x13bb2
leaq 0xaa8c(%rip), %rc... | /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 0x929e
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rax), %r14
testq %r14, %r14
je 0x928e
leaq -0x10(%r14), %r15
movq 0x280(%rbx), %rdi
movq %r14, %rsi
callq 0xd150
movq %rax, %r14
movq %r15, %rdi
callq 0x2370
jmp 0x9269
movq $0x0, 0x280(%rbx)
popq %rbx
popq %r14
po... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_is_closed(hash_elem*, void*) | static
void *_filemgr_is_closed(struct hash_elem *h, void *ctx) {
struct filemgr *file = _get_entry(h, struct filemgr, e);
void *ret;
spin_lock(&file->lock);
if (atomic_get_uint32_t(&file->ref_count) != 0) {
ret = (void *)file;
} else {
ret = NULL;
}
spin_unlock(&file->lock);... | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xb0(%rdi), %r14
movq %r14, %rdi
callq 0x22a0
movl -0xe8(%rbx), %eax
addq $-0xf0, %rbx
xorl %r15d, %r15d
testl %eax, %eax
cmovneq %rbx, %r15
movq %r14, %rdi
callq 0x2090
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
| /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 0x22a0
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_is_fully_resident | bool filemgr_is_fully_resident(struct filemgr *file)
{
bool ret = false;
if (global_config.ncacheblock > 0) {
//TODO: A better thing to do is to track number of document blocks
// and only compare those with the cached document block count
double num_cached_blocks = (double)bcache_get_nu... | cmpl $0x0, 0x13d13(%rip) # 0x1d53c
jle 0x9893
pushq %rbx
movq %rdi, %rbx
callq 0x5d19
movq %rax, %xmm0
movq 0x9e6f(%rip), %xmm1 # 0x136b0
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x9e73(%rip), %xmm2 # 0x136c0
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3 ... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
alloc_buf_for_readahead() | void* alloc_buf_for_readahead() {
void* ret = nullptr;
if (!global_config.num_blocks_readahead) return ret;
malloc_align( ret,
FDB_SECTOR_SIZE,
global_config.blocksize * global_config.num_blocks_readahead );
return ret;
} | pushq %rax
movq $0x0, (%rsp)
movl 0x13c88(%rip), %edx # 0x1d594
testl %edx, %edx
je 0x992e
imull 0x13c21(%rip), %edx # 0x1d538
movq %rsp, %rdi
movl $0x200, %esi # imm = 0x200
callq 0x21a0
testl %eax, %eax
jne 0x992e
movq (%rsp), %rax
jmp 0x9930
xorl %eax, %eax
popq %rcx
retq
| /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 0x9d0c
cmpq $0x0, 0x230(%r15)
je 0x9d0c
movl 0x10(%r15), %ecx
m... | /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 0xa64a
movq %rdx, %rbx
movq %rsi, %r15
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xa650
movl -0x8(%rax), %ecx
movq -0x10(%rax), %rdx
addq %rcx, %rdx
cmpq %r15, %rdx
jne 0xa650
addl %ecx, %ebx
movl %ebx, -0x8(%rax)
popq %rbx
popq %r14
popq %r15
r... | /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 0x22a0
movb $0x1, %r12b
testq %r13, %r13
je 0xa7f7
cmpq $0x0, 0x118(%r15)
je 0xa7c8
movl 0x8(%r15), %eax
testl %eax, %eax
je 0xa7d5
xorl %r12d, %r12d
jmp 0xa7f7
movq %r15, ... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
assign_new_filename(filemgr*, char const*) | static void assign_new_filename(struct filemgr *file, const char *new_filename)
{
free(file->new_filename);
if (new_filename) {
file->new_filename = (char*)malloc(strlen(new_filename) + 1);
strcpy(file->new_filename, new_filename);
} else {
file->new_filename = NULL;
}
} | pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x120(%rdi), %rdi
callq 0x2370
testq %rbx, %rbx
je 0xa8b9
movq %rbx, %rdi
callq 0x2140
leaq 0x1(%rax), %rdi
callq 0x23f0
movq %rax, 0x120(%r14)
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2300
movq $0x0, 0x120(%r14)
addq... | /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 0x22a0
movq 0x170(%r15), %rax
testq %rax, %rax
jne 0xa995
movq %r12, 0x170(%r15)
movq %r14, 0x178(%r15)
testq %rax, %rax
sete %bpl
movq %rbx, %rdi
callq 0x2090
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 0x12be7(%rip), %r14 # 0x1d5d4
movq %r14, %rdi
callq 0x22a0
leaq 0x12b9c(%rip), %rdi # 0x1d598
leaq 0x1e(%rip), %rsi # 0xaa21
movq %rbx, %rdx
callq 0xce66
movq %rax, %rbx
movq %r14, %rdi
callq 0x2090
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_remove_pending | void filemgr_remove_pending(struct filemgr *old_file,
struct filemgr *new_file,
err_log_callback *log_callback)
{
if (new_file == NULL) {
return;
}
spin_lock(&old_file->lock);
if (atomic_get_uint32_t(&old_file->ref_count) > 0) {
//... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xac16
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x1a0(%rdi), %r12
movq %r12, %rdi
callq 0x22a0
movl 0x8(%rbx), %eax
testl %eax, %eax
je 0xac22
movq (%r15), %rsi
movq %rbx, %rdi
callq 0xa874
movb $0x4, %al
xchgb %al, 0x108(%rbx)
movq ... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_set_cancel_compaction | void filemgr_set_cancel_compaction(struct filemgr *file, bool cancel)
{
spin_lock(&file->lock);
if (cancel) {
file->fflags |= FILEMGR_CANCEL_COMPACTION;
} else {
file->fflags &= ~FILEMGR_CANCEL_COMPACTION;
}
spin_unlock(&file->lock);
} | pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x1a0(%rdi), %r15
movq %r15, %rdi
callq 0x22a0
movb 0xc(%r14), %al
andb $-0x41, %al
shlb $0x6, %bl
orb %al, %bl
movb %bl, 0xc(%r14)
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2090
| /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_actual_stale_length(filemgr*, unsigned long, unsigned long) | size_t filemgr_actual_stale_length(struct filemgr *file,
bid_t offset,
size_t length)
{
size_t actual_len;
bid_t start_bid, end_bid;
start_bid = offset / file->blocksize;
end_bid = (offset + length) / file->blocksize;
actual_len... | movq %rdx, %rcx
movl 0x10(%rdi), %r9d
movq %rsi, %rax
xorl %edx, %edx
divq %r9
movq %rax, %rdi
leaq (%rcx,%rsi), %rax
xorl %edx, %edx
divq %r9
movq %rax, %r8
subq %rdi, %r8
addq %rcx, %r8
leaq (%rsi,%r8), %rax
xorl %edx, %edx
divq %r9
leal -0x1(%r9), %ecx
xorl %eax, %eax
cmpl %ecx, %edx
sete %al
addq %r8, %rax
retq
| /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_mark_stale | void filemgr_mark_stale(struct filemgr *file,
bid_t offset,
size_t length)
{
if (file->stale_list && length) {
size_t i;
struct stale_regions sr;
sr = filemgr_actual_stale_regions(file, offset, length);
if (sr.n_regions > 1) {
... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rcx
testq %rdx, %rdx
je 0xb5ea
movq %rdi, %rbx
cmpq $0x0, 0x280(%rdi)
je 0xb5ea
movq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb398
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq $0x2, %r15
jb 0xb5ca
leaq 0x8(%r14), %r12... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_dirty_update_new_node | struct filemgr_dirty_update_node *filemgr_dirty_update_new_node(struct filemgr *file)
{
struct filemgr_dirty_update_node *node;
node = (struct filemgr_dirty_update_node *)
calloc(1, sizeof(struct filemgr_dirty_update_node));
node->id = atomic_incr_uint64_t(&file->dirty_update_counter);
node-... | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %r15d
movl $0x1, %edi
movl $0x50, %esi
callq 0x2210
lock
xaddq %r15, 0x2c0(%rbx)
movq %rax, %r14
incq %r15
movq %r15, 0x18(%rax)
movw $0x0, 0x20(%rax)
xorl %eax, %eax
xchgl %eax, 0x24(%r14)
leaq 0x38(%r14), %rdi
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x28(%r14)
xo... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_dirty_update_commit | void filemgr_dirty_update_commit(struct filemgr *file,
struct filemgr_dirty_update_node *commit_node,
err_log_callback *log_callback)
{
struct avl_node *a;
struct filemgr_dirty_update_node *node;
struct list remove_queue;
struct list_elem... | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
testq %rsi, %rsi
je 0xb8b2
movq %rdx, %r15
movq %rsi, %r14
leaq 0x38(%rsi), %rdi
callq 0x3450
testq %rax, %rax
je 0xb8ad
movq %rax, %r13
movq %r13, %rdi
callq 0x3474
movq %rax, %r12
movq 0... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_write_dirty | fdb_status filemgr_write_dirty(struct filemgr *file, bid_t bid, void *buf,
struct filemgr_dirty_update_node *node,
err_log_callback *log_callback)
{
struct avl_node *a;
struct filemgr_dirty_update_block *block, query;
query.bid = bid;
a = av... | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
leaq 0x10(%rsp), %rsi
movq %r12, 0x20(%rsi)
addq $0x38, %r15
leaq 0xc7f(%rip), %rdx # 0xc892
movq %r15, %rdi
callq 0x34de
movq %rax, %r13
testq %rax, %rax
jne 0xbc7f
movl $0x1, %... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
kvs_stat_set | void _kvs_stat_set(struct filemgr *file,
fdb_kvs_id_t kv_id,
struct kvs_stat stat)
{
if (kv_id == 0) {
spin_lock(&file->lock);
file->header.stat = stat;
spin_unlock(&file->lock);
} else {
struct avl_node *a;
struct kvs_node query, *no... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x100(%rsp), %r15
testq %rsi, %rsi
je 0xbdcf
movq %rsi, %r14
movq 0x170(%rbx), %r12
leaq 0x38(%r12), %rbx
movq %rbx, %rdi
callq 0x22a0
leaq 0xc0(%rsp), %rsi
movq %r14, -0xb0(%rsi)
movq 0x20(%r12), %rdi
leaq 0x96(%rip), %rdx # 0xbe2... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
kvs_stat_get_kv_header | int _kvs_stat_get_kv_header(struct kvs_header *kv_header,
fdb_kvs_id_t kv_id,
struct kvs_stat *stat)
{
int ret = 0;
struct avl_node *a;
struct kvs_node query, *node;
query.id = kv_id;
a = avl_search(kv_header->idx_id, &query.avl_id, _kvs_stat_... | pushq %rbx
subq $0xd0, %rsp
movq %rdx, %rbx
leaq 0xb8(%rsp), %rax
movq %rsi, -0xb0(%rax)
movq 0x20(%rdi), %rdi
leaq -0x1a2(%rip), %rdx # 0xbe22
movq %rax, %rsi
callq 0x34de
testq %rax, %rax
je 0xbff4
movq -0x20(%rax), %rcx
movq %rcx, 0x30(%rbx)
movups -0x50(%rax), %xmm0
movups -0x40(%rax), %xmm1
movups -0x30(%rax)... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
kvs_stat_get | int _kvs_stat_get(struct filemgr *file,
fdb_kvs_id_t kv_id,
struct kvs_stat *stat)
{
int ret = 0;
if (kv_id == 0) {
spin_lock(&file->lock);
*stat = file->header.stat;
spin_unlock(&file->lock);
} else {
struct kvs_header *kv_header = file->... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %rbx
movq %rdi, %r14
testq %rsi, %rsi
je 0xc0f6
movq %rsi, %r15
movq 0x170(%r14), %r12
leaq 0x38(%r12), %r14
movq %r14, %rdi
callq 0x22a0
leaq 0xc0(%rsp), %rsi
movq %r15, -0xb0(%rsi)
movq 0x20(%r12), %rdi
leaq -0x2a7(%rip), %rdx # 0xbe22
callq... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
kvs_ops_stat_get_kv_header | int _kvs_ops_stat_get_kv_header(struct kvs_header *kv_header,
fdb_kvs_id_t kv_id,
struct kvs_ops_stat *stat)
{
int ret = 0;
struct avl_node *a;
struct kvs_node query, *node;
query.id = kv_id;
a = avl_search(kv_header->idx_id, &query.av... | pushq %rbx
subq $0xd0, %rsp
movq %rdx, %rbx
leaq 0xb8(%rsp), %rax
movq %rsi, -0xb0(%rax)
movq 0x20(%rdi), %rdi
leaq -0x446(%rip), %rdx # 0xbe22
movq %rax, %rsi
callq 0x34de
testq %rax, %rax
je 0xc2b3
movq -0x88(%rax), %rcx
movq %rcx, (%rbx)
movq -0x80(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq -0x78(%rax), %rcx
movq %r... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_get_ops_stats | struct kvs_ops_stat *filemgr_get_ops_stats(struct filemgr *file,
struct kvs_info *kvs)
{
struct kvs_ops_stat *stat = NULL;
if (!kvs || (kvs && kvs->id == 0)) {
return &file->header.op_stat;
} else {
struct kvs_header *kv_header = file->kv_header;
... | pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0xc3d4
movq %rsi, %r14
cmpq $0x0, 0x8(%rsi)
je 0xc3d4
movq 0x170(%rbx), %rbx
leaq 0x38(%rbx), %r15
movq %r15, %rdi
callq 0x22a0
movq 0x8(%r14), %rax
leaq 0xb8(%rsp), %rsi
movq %rax, -0xb0(%rsi)
movq 0x20(%rbx), %rdi
leaq -0x593(%rip),... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_latency_stat_name | const char *filemgr_latency_stat_name(fdb_latency_stat_type stat)
{
switch(stat) {
case FDB_LATENCY_SETS: return "sets ";
case FDB_LATENCY_GETS: return "gets ";
case FDB_LATENCY_SNAP_INMEM: return "in-mem_snapshot ";
case FDB_LATENCY_SNAP_DU... | cmpb $0x12, %dil
ja 0xc401
movzbl %dil, %eax
leaq 0x746f(%rip), %rcx # 0x13868
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
xorl %eax, %eax
retq
| /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
kvid2buf | void kvid2buf(size_t chunksize, fdb_kvs_id_t id, void *buf)
{
size_t size_id = sizeof(fdb_kvs_id_t);
id = _endian_encode(id);
if (chunksize == size_id) {
memcpy(buf, &id, size_id);
} else if (chunksize < size_id) {
memcpy(buf, (uint8_t*)&id + (size_id - chunksize), chunksize);
} els... | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
bswapq %r15
movq %r15, 0x8(%rsp)
cmpq $0x8, %rdi
jne 0xc46e
movq %r15, (%rbx)
jmp 0xc49f
movq %rdi, %r14
jae 0xc48c
leaq 0x8(%rsp), %rsi
subq %r14, %rsi
addq $0x8, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2280
jmp 0xc49f
leaq -0x8(%r1... | /ForestDB-KVStore[P]forestdb/src/filemgr.cc |
filemgr_config::operator=(filemgr_config const&) | filemgr_config& operator=(const filemgr_config& config) {
blocksize = config.blocksize;
ncacheblock = config.ncacheblock;
flag = config.flag;
seqtree_opt = config.seqtree_opt;
chunksize = config.chunksize;
options = config.options;
prefetch_duration = config.prefe... | movq %rdi, %rax
movq (%rsi), %rcx
movq %rcx, (%rdi)
movl 0x8(%rsi), %ecx
movl %ecx, 0x8(%rdi)
movb 0x11(%rsi), %cl
movb %cl, 0x11(%rdi)
movl 0xc(%rsi), %ecx
movl %ecx, 0xc(%rdi)
movb 0x10(%rsi), %cl
movb %cl, 0x10(%rdi)
movq 0x18(%rsi), %rcx
movq %rcx, 0x18(%rdi)
movl 0x20(%rsi), %ecx
movl %ecx, 0x20(%rdi)
movups 0x24(... | /ForestDB-KVStore[P]forestdb/src/filemgr.h |
fhandle_idx_cmp(avl_node*, avl_node*, void*) | INLINE int _fhandle_idx_cmp(struct avl_node *a, struct avl_node *b, void *aux)
{
uint64_t aaa, bbb;
struct filemgr_fhandle_idx_node *aa, *bb;
aa = _get_entry(a, struct filemgr_fhandle_idx_node, avl);
bb = _get_entry(b, struct filemgr_fhandle_idx_node, avl);
aaa = (uint64_t)aa->fhandle;
bbb = (ui... | 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/filemgr.cc |
filemgr_linux_pwrite(int, void*, unsigned long, long) | ssize_t _filemgr_linux_pwrite(int fd, void *buf, size_t count, cs_off_t offset)
{
ssize_t rv;
volatile ssize_t local_errno;
int num_retry = 0;
do {
do {
rv = pwrite(fd, buf, count, offset);
} while (rv == -1 && errno == EINTR); // LCOV_EXCL_LINE
// TODO: need to chec... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %ebp
xorl %r13d, %r13d
movl %ebp, %edi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x20d0
movq %rax, %r14
cmpq $-0x1, %rax
jne 0xca10
callq 0x2030
cmpl $0x4, (%rax)
je 0xc9ed... | /ForestDB-KVStore[P]forestdb/src/filemgr_ops_linux.cc |
filemgr_linux_fsync(int) | int _filemgr_linux_fsync(int fd)
{
int rv;
do {
rv = fsync(fd);
} while (rv == -1 && errno == EINTR); // LCOV_EXCL_LINE
if (rv == -1) {
return (int) convert_errno_to_fdb_status(errno, // LCOV_EXCL_LINE
FDB_RESULT_FSYNC_FAIL);
}
r... | pushq %rbx
movl %edi, %ebx
movl %ebx, %edi
callq 0x22b0
cmpl $-0x1, %eax
jne 0xcbad
callq 0x2030
movl (%rax), %edi
cmpl $0x4, %edi
je 0xcb8a
movl $0xfffffff2, %esi # imm = 0xFFFFFFF2
popq %rbx
jmp 0xc4fb
xorl %eax, %eax
popq %rbx
retq
| /ForestDB-KVStore[P]forestdb/src/filemgr_ops_linux.cc |
filemgr_linux_fdatasync(int) | int _filemgr_linux_fdatasync(int fd)
{
#if defined(__linux__) && !defined(__ANDROID__)
int rv;
do {
rv = fdatasync(fd);
} while (rv == -1 && errno == EINTR);
if (rv == -1) {
return (int) convert_errno_to_fdb_status(errno, // LCOV_EXCL_LINE
... | pushq %rbx
movl %edi, %ebx
movl %ebx, %edi
callq 0x2190
cmpl $-0x1, %eax
jne 0xcbd7
callq 0x2030
movl (%rax), %edi
cmpl $0x4, %edi
je 0xcbb4
movl $0xfffffff2, %esi # imm = 0xFFFFFFF2
popq %rbx
jmp 0xc4fb
xorl %eax, %eax
popq %rbx
retq
| /ForestDB-KVStore[P]forestdb/src/filemgr_ops_linux.cc |
filemgr_linux_get_errno_str(char*, unsigned long) | void _filemgr_linux_get_errno_str(char *buf, size_t size) {
if (!buf) {
return;
} else {
char *tbuf = alca(char, size);
#ifdef _POSIX_SOURCE
char *ret = strerror_r(errno, tbuf, size);
snprintf(buf, size, "errno = %d: '%s'", errno, ret);
#else
(void)strerror_r(errno, tbuf,... | testq %rdi, %rdi
je 0xcc3e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
leaq 0xf(%rsi), %rax
andq $-0x10, %rax
subq %rax, %r15
movq %r15, %rsp
callq 0x2030
movq %rax, %r12
movl (%rax), %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x20a0
movl (%r12)... | /ForestDB-KVStore[P]forestdb/src/filemgr_ops_linux.cc |
filemgr_aio_prep_read(async_io_handle*, unsigned long, unsigned long, unsigned long) | int _filemgr_aio_prep_read(struct async_io_handle *aio_handle, size_t aio_idx,
size_t read_size, uint64_t offset)
{
#ifdef _ASYNC_IO
if (!aio_handle) {
return FDB_RESULT_INVALID_ARGS;
}
io_prep_pread(aio_handle->ioq[aio_idx], aio_handle->fd,
aio_handle->a... | movl $0xffffffd8, %eax # imm = 0xFFFFFFD8
retq
| /ForestDB-KVStore[P]forestdb/src/filemgr_ops_linux.cc |
filemgr_aio_getevents(async_io_handle*, int, int, unsigned int) | int _filemgr_aio_getevents(struct async_io_handle *aio_handle, int min,
int max, unsigned int timeout)
{
#ifdef _ASYNC_IO
if (!aio_handle) {
return FDB_RESULT_INVALID_ARGS;
}
// Passing max timeout (ms) means that it waits until at least 'min' events
// have been seen... | movl $0xffffffd8, %eax # imm = 0xFFFFFFD8
retq
| /ForestDB-KVStore[P]forestdb/src/filemgr_ops_linux.cc |
filemgr_linux_copy_file_range(int, int, int, unsigned long, unsigned long, unsigned long) | int _filemgr_linux_copy_file_range(int fs_type,
int src_fd, int dst_fd, uint64_t src_off,
uint64_t dst_off, uint64_t len)
{
int ret = (int)FDB_RESULT_INVALID_ARGS;
#ifndef __sun
if (fs_type == FILEMGR_FS_BTRFS) {
struct btrfs_ioctl_cl... | cmpl $0x2, %edi
je 0xcd4e
pushq %rbx
subq $0x20, %rsp
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpl $0x3, %edi
jne 0xcd46
movslq %esi, %rsi
movq %rsp, %rax
movq %rsi, (%rax)
movq %rcx, 0x8(%rax)
movq %r9, 0x10(%rax)
movq %r8, 0x18(%rax)
xorl %ebx, %ebx
movl $0x4020940d, %esi # imm = 0x4020940D
movl %edx, %... | /ForestDB-KVStore[P]forestdb/src/filemgr_ops_linux.cc |
hash_remove | struct hash_elem * hash_remove(struct hash *hash, struct hash_elem *e)
{
int bucket = hash->hash_func(hash, e);
struct hash_elem *hash_elem;
IFDEF_LOCK( spin_lock(hash->locks + bucket) );
#ifdef _HASH_TREE
struct avl_node *node;
node = avl_search(hash->buckets + bucket, &e->avl, _hash_cmp_wrap);
... | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq *0x10(%rdi)
movslq %eax, %r14
shlq $0x4, %r14
movq 0x8(%rbx), %rdi
addq %r14, %rdi
leaq 0x28(%rip), %rdx # 0xcf1f
movq %r15, %rsi
callq 0x34de
movq %rax, %r15
testq %rax, %rax
je 0xcf16
addq 0x8(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
cal... | /ForestDB-KVStore[P]forestdb/src/hash.cc |
hash_djb2_last8 | uint32_t hash_djb2_last8(uint8_t *value, int len)
{
int min = MIN(len, 8), c;
unsigned hash = 5381;
c = min;
while(c--){
hash = ((hash << 5) + hash) + *((uint8_t*)value + (len - min) + c);
}
return hash;
} | testl %esi, %esi
je 0xd00e
cmpl $0x8, %esi
movl $0x8, %eax
cmovll %esi, %eax
movslq %eax, %rcx
negq %rcx
movslq %esi, %rax
leaq (%rax,%rdi), %rdx
decq %rdx
movl $0x1505, %eax # imm = 0x1505
xorl %esi, %esi
movl %eax, %edi
shll $0x5, %edi
addl %eax, %edi
movzbl (%rdx,%rsi), %eax
addl %edi, %eax
decq %rsi
cmpq ... | /ForestDB-KVStore[P]forestdb/src/hash_functions.cc |
list_insert_before | void list_insert_before(struct list *list, struct list_elem *before, struct list_elem *e)
{
IFDEF_LOCK( spin_lock(&list->lock); );
e->prev = before->prev;
e->next = before;
if (before->prev) before->prev->next = e;
else list->head = e;
before->prev = e;
IFDEF_LOCK( spin_unlock(&list->lock); ... | movq (%rsi), %rax
movq %rax, (%rdx)
movq %rsi, 0x8(%rdx)
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %rdi, %rcx
movq %rdx, (%rcx)
movq %rdx, (%rsi)
retq
| /ForestDB-KVStore[P]forestdb/src/list.cc |
list_pop_front | struct list_elem *list_pop_front(struct list *list)
{
IFDEF_LOCK( spin_lock(&list->lock); );
struct list_elem *e = list->head;
if (e) {
// if not NULL
if (e->next) e->next->prev = e->prev;
if (e->prev) e->prev->next = e->next;
if (list->head == e) list->head = e->next;
... | movq (%rdi), %rax
testq %rax, %rax
je 0xd1f0
movq (%rax), %rcx
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0xd1da
movq %rcx, (%rdx)
testq %rcx, %rcx
je 0xd1e7
movq %rdx, 0x8(%rcx)
movq 0x8(%rax), %rdx
movq %rdx, (%rdi)
cmpq %rax, 0x8(%rdi)
je 0xd1f1
retq
movq %rcx, 0x8(%rdi)
retq
| /ForestDB-KVStore[P]forestdb/src/list.cc |
wal_init | fdb_status wal_init(struct filemgr *file, int nbucket)
{
size_t num_shards;
atomic_init_uint8_t(&file->wal->isPopulated, 0);
file->wal->flag = WAL_FLAG_INITIALIZED;
atomic_init_uint32_t(&file->wal->size, 0);
atomic_init_uint32_t(&file->wal->num_flushable, 0);
atomic_init_uint64_t(&file->wal->dat... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %rax
xorl %ecx, %ecx
xchgb %cl, 0x1(%rax)
movq 0x48(%rdi), %rax
movb $0x1, (%rax)
xorl %ecx, %ecx
xchgl %ecx, 0x4(%rax)
movq 0x48(%rdi), %rax
xorl %ecx, %ecx
xchgl %ecx, 0x8(%rax)
movq 0x48(%rdi), %rax
xorl %ec... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_snapshot_open | fdb_status wal_snapshot_open(struct filemgr *file,
fdb_txn *txn,
fdb_kvs_id_t kv_id,
fdb_seqnum_t seqnum,
_fdb_key_cmp_info *key_cmp_info,
struct snap_handle **shandle)
{
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %rbp
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movq 0x48(%rdi), %r15
leaq 0x60(%r15), %rdi
movq %rdi, 0x8(%rsp)
callq 0x22a0
leaq 0x18(%rsp), %rsi
movq $0x0, 0x20(%rsi)
leaq 0x1(%r14),... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_dur_snapshot_open | fdb_status wal_dur_snapshot_open(fdb_seqnum_t seqnum,
_fdb_key_cmp_info *key_cmp_info,
struct filemgr *file, fdb_txn *txn,
struct snap_handle **shandle)
{
struct snap_handle *_shandle;
fdb_kvs_id_t kv_id;
fdb_... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r12
cmpq $-0x1, %rdi
jne 0xedcb
movq 0x18(%r13), %r8
leaq 0x58eb(%rip), %rdi # 0x1469e
leaq 0x57c1(%rip), %rsi # 0x1457b
movl $0x739, %edx # imm ... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_snap_insert | fdb_status wal_snap_insert(struct snap_handle *shandle,
fdb_doc *doc,
uint64_t offset,
wal_item_action action)
{
struct wal_item query;
struct wal_item_header query_hdr;
struct wal_item *item;
struct avl_node *node;
que... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movq %rsp, %rcx
movq %rax, 0x18(%rcx)
movzwl (%rsi), %eax
movw %ax, 0x20(%rcx)
leaq 0xa0(%rsp), %rsi
movq %rcx, -0x40(%rsi)
leaq 0xc0(%rdi), %r13
leaq ... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_copyto_snapshot | fdb_status wal_copyto_snapshot(struct filemgr *file,
struct snap_handle *shandle,
bool is_multi_kv)
{
struct list_elem *ee;
struct avl_node *a;
struct wal_item *item;
struct wal_item_header *header;
fdb_kvs_id_t kv_id = 0;
fdb_doc doc... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq $0x0, 0x8(%rsp)
movq 0x48(%rdi), %rax
movq 0x48(%rax), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rsi)
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0xf2b2
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x130(%rdi), %r15
xorl %r1... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_itr_search_greater | struct wal_item* wal_itr_search_greater(struct wal_iterator *wal_itr,
struct wal_item *query)
{
if (wal_itr->shandle->is_persisted_snapshot) {
struct avl_node *a;
if (wal_itr->by_key) {
a = avl_search_greater(&wal_itr->shandle->key_tree,
... | pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
cmpb $0x1, 0x33(%rdi)
jne 0xf497
cmpb $0x1, 0x20(%rbx)
jne 0xf4ae
addq $0xc0, %rdi
addq $0x68, %rsi
leaq 0x27f2(%rip), %rdx # 0x11c77
callq 0x352f
movq %rax, %rcx
movq %rax, 0x38(%rbx)
addq $-0x68, %rax
jmp 0xf4d0
cmpq $0x0, 0x20(%rdi)
je 0xf4d9
movb $0x1, 0x22(%rbx)... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_itr_search_greater_byseq(wal_iterator*, wal_item*) | static
struct wal_item *_wal_itr_search_greater_byseq(struct wal_iterator *wal_itr,
struct wal_item *query)
{
struct avl_node *a = NULL;
struct wal_cursor *cursor;
// search is a stateless operation, so re-initialize shard's merge-sort tree
avl_init(&wal_i... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
addq $0x28, %rdi
movl $0xa0, %esi
addq 0x8(%rbx), %rsi
movq %rdi, 0x8(%rsp)
callq 0x3621
cmpq $0x0, 0x18(%rbx)
je 0xf92a
movq 0x10(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x18(%rsp)
xorl %r12d, %r12d... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_itr_search_smaller | struct wal_item* wal_itr_search_smaller(struct wal_iterator *wal_itr,
struct wal_item *query)
{
if (wal_itr->shandle->is_persisted_snapshot) {
struct avl_node *a;
if (wal_itr->by_key) {
a = avl_search_smaller(&wal_itr->shandle->key_tree,
... | pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
cmpb $0x1, 0x33(%rdi)
jne 0xf990
cmpb $0x1, 0x20(%rbx)
jne 0xf9aa
addq $0xc0, %rdi
addq $0x68, %rsi
leaq 0x22f9(%rip), %rdx # 0x11c77
callq 0x35a8
movq %rax, %rcx
movq %rax, 0x38(%rbx)
addq $-0x68, %rax
jmp 0xf9cc
cmpq $0x0, 0x20(%rdi)
je 0xf9d5
movb $0x2, 0x22(%rbx)... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_itr_search_smaller_bykey(wal_iterator*, wal_item*) | static
struct wal_item* _wal_itr_search_smaller_bykey(struct wal_iterator *wal_itr,
struct wal_item *query)
{
struct avl_node *a = NULL;
struct wal_cursor *cursor;
// search is a stateless operation, so re-initialize shard's merge-sort tree
avl_init(&wal_i... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
addq $0x28, %rdi
movl $0xa0, %eax
movq 0x8(%rbx), %rsi
addq %rax, %rsi
movq %rdi, 0x8(%rsp)
callq 0x3621
cmpq $0x0, 0x18(%rbx)
je 0xfe12
xorl %ebp, %ebp
leaq 0x10(%rsp), %r13
movq 0x10(%rbx), %rax
leaq (,%... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_itr_next | struct wal_item* wal_itr_next(struct wal_iterator *wal_itr)
{
struct wal_item *result = NULL;
if (wal_itr->shandle->is_persisted_snapshot) {
wal_itr->cursor_pos = avl_next(wal_itr->cursor_pos);
if (wal_itr->by_key) {
return wal_itr->cursor_pos ? _get_entry(wal_itr->cursor_pos,
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpb $0x1, 0x33(%rax)
jne 0xfe7e
movq 0x38(%rbx), %rdi
callq 0x3474
movq %rax, %rcx
movq %rax, 0x38(%rbx)
cmpb $0x1, 0x20(%rbx)
jne 0x10041
leaq -0x68(%rcx), %rax
jmp 0x10045
cmpq $0x0, 0x20(%rax)
je ... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_itr_first | struct wal_item* wal_itr_first(struct wal_iterator *wal_itr) {
if (wal_itr->shandle->is_persisted_snapshot) {
struct avl_node *a;
if (wal_itr->by_key) {
a = avl_first(&wal_itr->shandle->key_tree);
wal_itr->cursor_pos = a;
return a ? _get_entry(a, struct wal_item, ... | pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
cmpb $0x1, 0x33(%rdi)
jne 0x10823
cmpb $0x1, 0x20(%rbx)
jne 0x1083d
addq $0xc0, %rdi
callq 0x3450
movq %rax, %rcx
movq %rax, 0x38(%rbx)
addq $-0x68, %rax
jmp 0x10854
cmpq $0x0, 0x20(%rdi)
je 0x1085d
movb $0x1, 0x22(%rbx)
cmpb $0x1, 0x20(%rbx)
jne 0x10861
movq %rbx, %rdi
p... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
wal_discard | fdb_status wal_discard(struct filemgr *file, fdb_txn *txn)
{
struct wal_item *item;
struct list_elem *e;
size_t shard_num, seq_shard_num;
uint64_t mem_overhead = 0;
e = list_begin(txn->items);
while(e) {
item = _get_entry(e, struct wal_item, list_elem_txn);
shard_num = get_check... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
movq 0x20(%rsi), %rax
movq (%rax), %r15
xorl %ebp, %ebp
testq %r15, %r15
je 0x10ae4
movq -0x40(%r15), %rax
movq 0x18(%rax), %rdi
movzwl 0x20(%rax), %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x67d8
movl %eax, ... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
_wal_cmp_bykey(wal_item_header*, wal_item_header*, void*) | INLINE int __wal_cmp_bykey(struct wal_item_header *aa,
struct wal_item_header *bb,
void *aux)
{
struct _fdb_key_cmp_info *info = (struct _fdb_key_cmp_info *)aux;
if (info->kvs_config.custom_cmp) {
// custom compare function for variable-length key
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdx), %rax
testq %rax, %rax
je 0x11db5
movq %rdx, %rbx
movq 0x18(%rdx), %rcx
testq %rcx, %rcx
je 0x11de3
movq 0x10(%rcx), %rax
movzwl 0x70(%rax), %r12d
movq 0x18(%r15), %rsi
leaq 0x10(%rsp), %rbp... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
_wal_cmp_byseq(wal_item*, wal_item*) | INLINE int __wal_cmp_byseq(struct wal_item *aa, struct wal_item *bb) {
if (aa->flag & WAL_ITEM_MULTI_KV_INS_MODE) {
// multi KV instance mode
int size_chunk = aa->header->chunksize;
fdb_kvs_id_t id_aa, id_bb;
// KV ID is stored at the first 8 bytes in the key
buf2kvid(size_ch... | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb 0x49(%rdi), %al
testb $0x4, %al
jne 0x11fd6
movq 0x58(%r14), %rcx
movq 0x58(%rbx), %rax
movq %rax, %rdx
xorq %rcx, %rdx
movq %rdx, %rsi
shrq $0x3f, %rsi
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
addl %esi,... | /ForestDB-KVStore[P]forestdb/src/wal.cc |
ver_get_version_string(unsigned long) | const char* ver_get_version_string(filemgr_magic_t magic) {
switch (magic) {
case FILEMGR_MAGIC_000:
return "ForestDB v1.x format";
case FILEMGR_MAGIC_001:
return "ForestDB v1.x format";
case FILEMGR_MAGIC_002:
return "ForestDB v2.x format";
}
return "unknown";
} | leaq 0x2629(%rip), %rax # 0x14792
movabsq $-0x2152350141104111, %rcx # imm = 0xDEADCAFEBEEFBEEF
cmpq %rcx, %rdi
je 0x121a5
movabsq $-0x2152350141103fff, %rcx # imm = 0xDEADCAFEBEEFC001
cmpq %rcx, %rdi
je 0x121a5
movabsq $-0x2152350141103ffe, %rax # imm = 0xDEADCAFEBEEFC002
cmpq %rax, %rdi
jne 0x1219e
leaq 0x260a(%... | /ForestDB-KVStore[P]forestdb/src/version.cc |
crc32_8 | uint32_t crc32_8(const void* data, size_t len, uint32_t prev_value)
{
uint32_t *cur = (uint32_t*) data;
uint32_t crc = ~prev_value;
while (len >= 8) {
#ifdef _BIG_ENDIAN
uint32_t one = *cur++ ^ bitswap32(crc);
uint32_t two = *cur++;
crc =
crc_lookup[7][(one>>24) & 0xFF] ... | notl %edx
cmpq $0x8, %rsi
jb 0x12284
movl $0xff, %eax
leaq 0x25e0(%rip), %rcx # 0x147d0
movl $0x3fc, %r8d # imm = 0x3FC
xorl (%rdi), %edx
movl 0x4(%rdi), %r9d
movl %edx, %r11d
andl %eax, %r11d
movl %edx, %r10d
shrl $0x8, %r10d
andl %eax, %r10d
movl 0x1800(%rcx,%r10,4), %r10d
xorl 0x1c00(%rcx,%r11,4), %r... | /ForestDB-KVStore[P]forestdb/utils/crc32.cc |
memleak_cmp(avl_node*, avl_node*, void*) | int memleak_cmp(struct avl_node *a, struct avl_node *b, void *aux)
{
struct memleak_item *aa, *bb;
aa = _get_entry(a, struct memleak_item, avl);
bb = _get_entry(b, struct memleak_item, avl);
if (aa->addr < bb->addr) return -1;
else if (aa->addr > bb->addr) return 1;
else return 0;
} | movq -0x20(%rdi), %rax
xorl %ecx, %ecx
cmpq -0x20(%rsi), %rax
seta %cl
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovael %ecx, %eax
retq
| /ForestDB-KVStore[P]forestdb/utils/memleak.cc |
memleak_add_to_index(void*, unsigned long, char*, unsigned long, unsigned char) | void _memleak_add_to_index(void *addr, size_t size, char *file, size_t line, uint8_t init_val)
{
DBG("malloc at %s:%ld, size %ld\n", file, line, size);
struct memleak_item *item = (struct memleak_item *)malloc(sizeof(struct memleak_item));
item->addr = (uint64_t)addr;
item->file = file;
item->line =... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
movl $0x38, %edi
callq 0x23f0
movq %rax, %rbx
movq %r15, (%rax)
movq %r13, 0x8(%rax)
movq %r12, 0x18(%rax)
movq %r14, 0x10(%rax)
cmpl $0x77, %ebp
jne 0x1265a
movq ... | /ForestDB-KVStore[P]forestdb/utils/memleak.cc |
memleak_calloc | LIBMEMLEAK_API
void * memleak_calloc(size_t nmemb, size_t size, char *file, size_t line)
{
void *addr = (void *)calloc(nmemb, size);
if (addr && start_sw) {
spin_lock(&lock);
_memleak_add_to_index(addr, size, file, line, 0x0);
spin_unlock(&lock);
}
return addr;
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
callq 0x2210
movq %rax, %rbx
testq %rax, %rax
je 0x1278a
testb $0x1, 0xc0af(%rip) # 0x1e7f0
je 0x1278a
leaq 0xc08e(%rip), %r13 # 0x1e7d8
movq %r13, %rdi
callq 0x22a0
movl $0x38, %edi
callq 0x23f0
movq %rbx, ... | /ForestDB-KVStore[P]forestdb/utils/memleak.cc |
memleak_realloc | LIBMEMLEAK_API
void *memleak_realloc(void *ptr, size_t size)
{
void *addr = (void *)realloc(ptr, size);
if (addr && start_sw) {
spin_lock(&lock);
struct avl_node *a;
struct memleak_item *item, query;
query.addr = (uint64_t)ptr;
a = avl_search(&tree_index, &query.avl, me... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %r15
callq 0x24b0
movq %rax, %rbx
testq %rax, %rax
je 0x128f8
testb $0x1, 0xbf8f(%rip) # 0x1e7f0
je 0x128f8
leaq 0xbf6a(%rip), %rdi # 0x1e7d8
callq 0x22a0
leaq 0x20(%rsp), %rsi
movq %r15, -0x20(%rsi)
... | /ForestDB-KVStore[P]forestdb/utils/memleak.cc |
convert_reltime_to_abstime | struct timespec convert_reltime_to_abstime(unsigned int ms) {
struct timespec ts;
struct timeval tp;
uint64_t wakeup;
memset(&ts, 0, sizeof(ts));
/*
* Unfortunately pthread_cond_timedwait doesn't support relative sleeps
* so we need to convert back to an absolute time.
*/
gettim... | pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x24a0
imulq $0x3e8, (%r14), %rdi # imm = 0x3E8
movq 0x8(%r14), %rcx
movl %ebx, %esi
movabsq $0x20c49ba5e353f7cf, %r8 # imm = 0x20C49BA5E353F7CF
movq %rcx, %rax
imulq %r8
movq %rdx, %rax
shrq $0x3f, %rax... | /ForestDB-KVStore[P]forestdb/utils/time_utils.cc |
void Logger::log<unsigned char>(char const*, unsigned long, unsigned long, unsigned char const&) | void log(const char * id, uint64_t pTime, uint64_t pThread, const Ts&... ts)
{
if (mLogful)
{
logful_context_t ctx;
uint8_t logbuff[4096*2];
int flen = std::sprintf((char*)logbuff, "%lluus %llut ", (unsigned long long)pTime, (unsigned long long)pThread);
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2028, %rsp # imm = 0x2028
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
cmpb $0x1, 0x8(%rdi)
jne 0x4f79
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x13e8(%r... | /therooftopprinz[P]Logless/src/logless/Logger.hpp |
testing::TestSuite::TestSuite(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*, void (*)(), void (*)()) | TestSuite::TestSuite(const std::string& a_name, const char* a_type_param,
internal::SetUpTestSuiteFunc set_up_tc,
internal::TearDownTestSuiteFunc tear_down_tc)
: name_(a_name),
type_param_(a_type_param ? new std::string(a_type_param) : nullptr),
set_up_tc_(set_u... | pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
leaq 0x6e25a(%rip), %rax # 0x88db8
addq $0x10, %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, -0x60(%rbp)
movq ... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.cc |
testing::internal::ShouldUseColor(bool) | bool ShouldUseColor(bool stdout_is_tty) {
std::string c = GTEST_FLAG_GET(color);
const char* const gtest_color = c.c_str();
if (String::CaseInsensitiveCStringEquals(gtest_color, "auto")) {
#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW)
// On Windows the TERM variable is usually not set, bu... | pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x2(%rbp)
leaq 0x6f356(%rip), %rsi # 0x8a780
leaq -0x28(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x92a0
movq -0xb0(%rbp), %rdi
callq 0x9270
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x4631b(%rip), %rsi # 0x61770
callq ... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.cc |
testing::internal::ColoredPrintf(testing::internal::(anonymous namespace)::GTestColor, char const*, ...) | static void ColoredPrintf(GTestColor color, const char* fmt, ...) {
va_list args;
va_start(args, fmt);
static const bool in_color_mode =
// We don't condition this on GTEST_HAS_FILE_SYSTEM because we still need
// to be able to detect terminal I/O regardless.
ShouldUseColor(posix::IsATTY(posix:... | pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
testb %al, %al
je 0x1bb5b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.cc |
testing::internal::PrettyUnitTestResultPrinter::OnTestCaseStart(testing::TestSuite const&) | void PrettyUnitTestResultPrinter::OnTestCaseStart(const TestCase& test_case) {
const std::string counts =
FormatCountableNoun(test_case.test_to_run_count(), "test", "tests");
ColoredPrintf(GTestColor::kGreen, "[----------] ");
printf("%s from %s", counts.c_str(), test_case.name());
if (test_case.type_para... | pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x141d0
movl %eax, %esi
leaq 0x47ad5(%rip), %rdx # 0x64017
leaq 0x451ff(%rip), %rcx # 0x61748
leaq -0x30(%rbp), %rdi
callq 0x1c640
leaq 0x45e52(%rip), %rsi # 0x623ab
xorl %eax, %eax
movl $0x... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.cc |
testing::internal::BriefUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int) | void BriefUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
int /*iteration*/) {
ColoredPrintf(GTestColor::kGreen, "[==========] ");
printf("%s from %s ran.",
FormatTestCount(unit_test.test_to_run_count()).c_str(),
FormatTestSu... | pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x44ceb(%rip), %rsi # 0x62388
xorl %eax, %eax
movl $0x2, %edi
callq 0x1bb20
movq -0x10(%rbp), %rdi
callq 0x1c430
movl %eax, %esi
leaq -0x38(%rbp), %rdi
movq %rdi, -0xf0(%rbp... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.cc |
testing::internal::XmlUnitTestResultPrinter::PrintXmlTestsList(std::ostream*, std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*>> const&) | void XmlUnitTestResultPrinter::PrintXmlTestsList(
std::ostream* stream, const std::vector<TestSuite*>& test_suites) {
const std::string kTestsuites = "testsuites";
*stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
*stream << "<" << kTestsuites;
int total_tests = 0;
for (auto test_suite : test_s... | pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x9c90
movq -0x128(%rbp), %rdx
leaq 0x433f2(%rip), %rsi # 0x62753
leaq -0x30(%rbp), %rdi
callq 0xb210
jmp 0x1f36c
leaq -0x31(%rbp), %rdi
callq 0x973... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.cc |
testing::internal::FormatEpochTimeInMillisAsIso8601[abi:cxx11](long) | std::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms) {
struct tm time_struct;
if (!PortableLocaltime(static_cast<time_t>(ms / 1000), &time_struct))
return "";
// YYYY-MM-DDThh:mm:ss.sss
return StreamableToString(time_struct.tm_year + 1900) + "-" +
String::FormatIntWidth2(time_struct.tm_mon... | pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp # imm = 0x2D0
movq %rdi, -0x2b8(%rbp)
movq %rdi, %rax
movq %rax, -0x2b0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rdi
leaq -0x48(%rbp), %rsi
callq 0x201c0
testb ... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.cc |
testing::internal::XmlUnitTestResultPrinter::OutputXmlTestSuiteForTestResult(std::ostream*, testing::TestResult const&) | void XmlUnitTestResultPrinter::OutputXmlTestSuiteForTestResult(
::std::ostream* stream, const TestResult& result) {
// Output the boilerplate for a minimal test suite with one test.
*stream << " <testsuite";
OutputXmlAttribute(stream, "testsuite", "name", "NonTestSuiteFailure");
OutputXmlAttribute(stream, ... | pushq %rbp
movq %rsp, %rbp
subq $0x850, %rsp # imm = 0x850
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x41f89(%rip), %rsi # 0x62637
callq 0x9660
movq -0x8(%rbp), %rax
movq %rax, -0x6a0(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x698(%rbp)
callq 0x9c90
movq -0x698(%rbp), %rdx
l... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.cc |
testing::internal::XmlUnitTestResultPrinter::OutputXmlTestResult(std::ostream*, testing::TestResult const&) | void XmlUnitTestResultPrinter::OutputXmlTestResult(::std::ostream* stream,
const TestResult& result) {
int failures = 0;
int skips = 0;
for (int i = 0; i < result.total_part_count(); ++i) {
const TestPartResult& part = result.GetTestPartResult(i);
if (par... | pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp # imm = 0x2B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x224(%rbp)
movq -0x10(%rbp), %rdi
callq 0x18a40
movl %eax, %ecx
movl -0x224(%rbp), %eax
cmpl %ecx, %... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.cc |
testing::internal::JsonUnitTestResultPrinter::PrintJsonUnitTest(std::ostream*, testing::UnitTest const&) | void JsonUnitTestResultPrinter::PrintJsonUnitTest(std::ostream* stream,
const UnitTest& unit_test) {
const std::string kTestsuites = "testsuites";
const std::string kIndent = Indent(2);
*stream << "{\n";
OutputJsonKey(stream, kTestsuites, "tests", unit_test.rep... | pushq %rbp
movq %rsp, %rbp
subq $0x380, %rsp # imm = 0x380
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0x9c90
movq -0x238(%rbp), %rdx
leaq 0x3e2f2(%rip), %rsi # 0x62753
leaq -0x30(%rbp), %rdi
callq 0xb210
jmp 0x2446c
leaq -0x31(%rbp), %rdi
callq 0x973... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.cc |
testing::internal::JsonUnitTestResultPrinter::OutputJsonTestSuiteForTestResult(std::ostream*, testing::TestResult const&) | void JsonUnitTestResultPrinter::OutputJsonTestSuiteForTestResult(
::std::ostream* stream, const TestResult& result) {
// Output the boilerplate for a new test suite.
*stream << Indent(4) << "{\n";
OutputJsonKey(stream, "testsuite", "name", "NonTestSuiteFailure", Indent(6));
OutputJsonKey(stream, "testsuite"... | pushq %rbp
movq %rsp, %rbp
subq $0xa90, %rsp # imm = 0xA90
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x880(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x878(%rbp)
movl $0x4, %esi
callq 0x27050
movq -0x880(%rbp), %rdi
movq -0x878(%rbp), %rsi
callq 0x95c0
movq %rax, -0x870(%rb... | /alk[P]gperftools/vendor/googletest/googletest/src/gtest.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.