| /memcached-1.4.29/ |
| H A D | assoc.c | 78 item *assoc_find(const char *key, const size_t nkey, const uint32_t hv) { in assoc_find() argument 93 if ((nkey == it->nkey) && (memcmp(key, ITEM_key(it), nkey) == 0)) { in assoc_find() 100 MEMCACHED_ASSOC_FIND(key, nkey, depth); in assoc_find() 107 static item** _hashitem_before (const char *key, const size_t nkey, const uint32_t hv) { in _hashitem_before() argument 119 while (*pos && ((nkey != (*pos)->nkey) || memcmp(key, ITEM_key(*pos), nkey))) { in _hashitem_before() 178 MEMCACHED_ASSOC_INSERT(ITEM_key(it), it->nkey, hash_items); in assoc_insert() 182 void assoc_delete(const char *key, const size_t nkey, const uint32_t hv) { in assoc_delete() argument 183 item **before = _hashitem_before(key, nkey, hv); in assoc_delete() 193 MEMCACHED_ASSOC_DELETE(key, nkey, hash_items); in assoc_delete() 229 bucket = hash(ITEM_key(it), it->nkey) & hashmask(hashpower); in assoc_maintenance_thread()
|
| H A D | stats.h | 4 void stats_prefix_record_get(const char *key, const size_t nkey, const bool is_hit); 5 void stats_prefix_record_delete(const char *key, const size_t nkey); 6 void stats_prefix_record_set(const char *key, const size_t nkey);
|
| H A D | logger.c | 607 le->nkey = it->nkey; in _logger_log_evictions() 608 memcpy(le->key, ITEM_key(it), it->nkey); in _logger_log_evictions() 609 e->size = sizeof(struct logentry_eviction) + le->nkey; in _logger_log_evictions() 621 le->nkey = nkey; in _logger_log_item_get() 622 memcpy(le->key, key, nkey); in _logger_log_item_get() 623 e->size = sizeof(struct logentry_item_get) + nkey; in _logger_log_item_get() 627 const int comm, char *key, const int nkey) { in _logger_log_item_store() argument 631 le->nkey = nkey; in _logger_log_item_store() 632 memcpy(le->key, key, nkey); in _logger_log_item_store() 633 e->size = sizeof(struct logentry_item_store) + nkey; in _logger_log_item_store() [all …]
|
| H A D | items.h | 5 item *do_item_alloc(char *key, const size_t nkey, const unsigned int flags, const rel_time_t exptim… 7 bool item_size_ok(const size_t nkey, const int flags, const int nbytes); 32 item *do_item_get(const char *key, const size_t nkey, const uint32_t hv, conn *c); 33 item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime, const uint32_t hv, conn *…
|
| H A D | thread.c | 540 it = do_item_alloc(key, nkey, flags, exptime, nbytes); in item_alloc() 551 hv = hash(key, nkey); in item_get() 553 it = do_item_get(key, nkey, hv, c); in item_get() 561 hv = hash(key, nkey); in item_touch() 563 it = do_item_touch(key, nkey, exptime, hv, c); in item_touch() 575 hv = hash(ITEM_key(item), item->nkey); in item_link() 588 hv = hash(ITEM_key(item), item->nkey); in item_remove() 609 hv = hash(ITEM_key(item), item->nkey); in item_unlink() 620 hv = hash(ITEM_key(item), item->nkey); in item_update() 637 hv = hash(key, nkey); in add_delta() [all …]
|
| H A D | items.c | 156 return sizeof(item) + nkey + *nsuffix + nbytes; in item_make_header() 250 it->nkey = nkey; in do_item_alloc() 252 memcpy(ITEM_key(it), key, nkey); in do_item_alloc() 390 assoc_delete(ITEM_key(it), it->nkey, hv); in do_item_unlink() 406 assoc_delete(ITEM_key(it), it->nkey, hv); in do_item_unlink_nolock() 493 assert(it->nkey <= KEY_MAX_LENGTH); in item_cachedump() 494 if (it->nbytes == 0 && it->nkey == 0) { in item_cachedump() 753 item *it = assoc_find(key, nkey, hv); in do_item_get() 786 for (ii = 0; ii < nkey; ++ii) { in do_item_get() 831 item *it = do_item_get(key, nkey, hv, c); in do_item_touch() [all …]
|
| H A D | stats.c | 67 static PREFIX_STATS *stats_prefix_find(const char *key, const size_t nkey) { in stats_prefix_find() argument 75 for (length = 0; length < nkey && key[length] != '\0'; length++) { in stats_prefix_find() 122 void stats_prefix_record_get(const char *key, const size_t nkey, const bool is_hit) { in stats_prefix_record_get() argument 126 pfs = stats_prefix_find(key, nkey); in stats_prefix_record_get() 139 void stats_prefix_record_delete(const char *key, const size_t nkey) { in stats_prefix_record_delete() argument 143 pfs = stats_prefix_find(key, nkey); in stats_prefix_record_delete() 153 void stats_prefix_record_set(const char *key, const size_t nkey) { in stats_prefix_record_set() argument 157 pfs = stats_prefix_find(key, nkey); in stats_prefix_record_set()
|
| H A D | memcached.c | 1248 size_t nkey; in complete_incr_bin() local 1540 0, nkey, nkey); in process_bin_get_or_touch() 1679 if (nkey == 0) { in process_bin_stat() 1896 char mech[nkey+1]; in process_bin_complete_sasl_auth() 2173 int nkey; in process_bin_update() local 2272 int nkey; in process_bin_append_prepend() local 3145 size_t nkey; in process_get_command() local 3336 size_t nkey; in process_update_command() local 3430 size_t nkey; in process_touch_command() local 3475 size_t nkey; in process_arithmetic_command() local [all …]
|
| H A D | assoc.h | 3 item *assoc_find(const char *key, const size_t nkey, const uint32_t hv); 5 void assoc_delete(const char *key, const size_t nkey, const uint32_t hv);
|
| H A D | memcached.h | 105 #define ITEM_suffix(item) ((char*) &((item)->data) + (item)->nkey + 1 \ 108 #define ITEM_data(item) ((char*) &((item)->data) + (item)->nkey + 1 \ 112 #define ITEM_ntotal(item) (sizeof(struct _stritem) + (item)->nkey + 1 \ 409 uint8_t nkey; /* key length, w/terminating null and padding */ member 433 uint8_t nkey; /* key length, w/terminating null and padding */ member 593 const size_t nkey, const bool incr, 625 const size_t nkey, const int incr, 633 item *item_alloc(char *key, size_t nkey, int flags, rel_time_t exptime, int nbytes); 634 item *item_get(const char *key, const size_t nkey, conn *c); 635 item *item_touch(const char *key, const size_t nkey, uint32_t exptime, conn *c);
|
| H A D | logger.h | 51 uint8_t nkey; member 57 uint8_t nkey; member 64 uint8_t nkey; member
|
| H A D | slabs.h | 35 bool get_stats(const char *stat_type, int nkey, ADD_STAT add_stats, void *c);
|
| H A D | slabs.c | 438 bool get_stats(const char *stat_type, int nkey, ADD_STAT add_stats, void *c) { in get_stats() argument 455 } else if (nz_strcmp(nkey, stat_type, "items") == 0) { in get_stats() 457 } else if (nz_strcmp(nkey, stat_type, "slabs") == 0) { in get_stats() 459 } else if (nz_strcmp(nkey, stat_type, "sizes") == 0) { in get_stats() 461 } else if (nz_strcmp(nkey, stat_type, "sizes_enable") == 0) { in get_stats() 463 } else if (nz_strcmp(nkey, stat_type, "sizes_disable") == 0) { in get_stats() 821 hv = hash(ITEM_key(it), it->nkey); in slab_rebalance_move()
|