library: remove useless code for 2 'stacks_fetch' guys
These changes are an outgrowth of the research/testing behind the previous commit. There is no commingling of select/reap stacks in interfaces beyond the <pids> api since there's no need to support any 'reset' function. However, those <pids> changes prompted a review of all interfaces offering that 'stacks_fetch' function, thus revealing 2 instances of useless logic/wasted efforts. Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
f87fc7dc83
commit
22a3bcbd6d
@ -485,21 +485,6 @@ static inline struct diskstats_result *diskstats_itemize_stack (
|
||||
} // end: diskstats_itemize_stack
|
||||
|
||||
|
||||
static void diskstats_itemize_stacks_all (
|
||||
struct ext_support *this)
|
||||
{
|
||||
struct stacks_extent *ext = this->extents;
|
||||
|
||||
while (ext) {
|
||||
int i;
|
||||
for (i = 0; ext->stacks[i]; i++)
|
||||
diskstats_itemize_stack(ext->stacks[i]->head, this->numitems, this->items);
|
||||
ext = ext->next;
|
||||
};
|
||||
this->dirty_stacks = 0;
|
||||
} // end: diskstats_itemize_stacks_all
|
||||
|
||||
|
||||
static inline int diskstats_items_check_failed (
|
||||
enum diskstats_item *items,
|
||||
int numitems)
|
||||
@ -666,9 +651,7 @@ static int diskstats_stacks_fetch (
|
||||
if (!info->fetch_ext.extents) {
|
||||
if (!(ext = diskstats_stacks_alloc(&info->fetch_ext, n_alloc)))
|
||||
return -1; // here, errno was set to ENOMEM
|
||||
memset(info->fetch.anchor, 0, sizeof(void *) * n_alloc);
|
||||
memcpy(info->fetch.anchor, ext->stacks, sizeof(void *) * n_alloc);
|
||||
diskstats_itemize_stacks_all(&info->fetch_ext);
|
||||
}
|
||||
diskstats_cleanup_stacks_all(&info->fetch_ext);
|
||||
|
||||
|
@ -568,21 +568,6 @@ static inline struct slabinfo_result *slabinfo_itemize_stack (
|
||||
} // end: slabinfo_itemize_stack
|
||||
|
||||
|
||||
static void slabinfo_itemize_stacks_all (
|
||||
struct ext_support *this)
|
||||
{
|
||||
struct stacks_extent *ext = this->extents;
|
||||
|
||||
while (ext) {
|
||||
int i;
|
||||
for (i = 0; ext->stacks[i]; i++)
|
||||
slabinfo_itemize_stack(ext->stacks[i]->head, this->numitems, this->items);
|
||||
ext = ext->next;
|
||||
};
|
||||
this->dirty_stacks = 0;
|
||||
} // end: slabinfo_itemize_stacks_all
|
||||
|
||||
|
||||
static inline int slabinfo_items_check_failed (
|
||||
struct ext_support *this,
|
||||
enum slabinfo_item *items,
|
||||
@ -697,9 +682,7 @@ static int slabinfo_stacks_fetch (
|
||||
if (!info->fetch_ext.extents) {
|
||||
if (!(ext = slabinfo_stacks_alloc(&info->fetch_ext, n_alloc)))
|
||||
return -1; // here, errno was set to ENOMEM
|
||||
memset(info->fetch.anchor, 0, sizeof(void *) * n_alloc);
|
||||
memcpy(info->fetch.anchor, ext->stacks, sizeof(void *) * n_alloc);
|
||||
slabinfo_itemize_stacks_all(&info->fetch_ext);
|
||||
}
|
||||
slabinfo_cleanup_stacks_all(&info->fetch_ext);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user