Split up and standardize naming of stats code.

The arena-associated stats are now all prefixed with arena_stats_, and live in
their own file.  Likewise, malloc_bin_stats_t -> bin_stats_t, also in its own
file.
This commit is contained in:
David T. Goldblatt
2017-11-04 12:50:19 -07:00
committed by David Goldblatt
parent 901d94a2b0
commit 7f1b02e3fa
10 changed files with 342 additions and 333 deletions

View File

@@ -4,7 +4,7 @@
#include "jemalloc/internal/extent_types.h"
#include "jemalloc/internal/extent_structs.h"
#include "jemalloc/internal/mutex.h"
#include "jemalloc/internal/stats.h"
#include "jemalloc/internal/bin_stats.h"
/*
* A bin contains a set of extents that are currently being used for slab
@@ -75,7 +75,7 @@ struct bin_s {
extent_list_t slabs_full;
/* Bin statistics. */
malloc_bin_stats_t stats;
bin_stats_t stats;
};
/* Initializes a bin to empty. Returns true on error. */
@@ -88,7 +88,7 @@ void bin_postfork_child(tsdn_t *tsdn, bin_t *bin);
/* Stats. */
static inline void
bin_stats_merge(tsdn_t *tsdn, malloc_bin_stats_t *dst_bin_stats, bin_t *bin) {
bin_stats_merge(tsdn_t *tsdn, bin_stats_t *dst_bin_stats, bin_t *bin) {
malloc_mutex_lock(tsdn, &bin->lock);
malloc_mutex_prof_read(tsdn, &dst_bin_stats->mutex_data, &bin->lock);
dst_bin_stats->nmalloc += bin->stats.nmalloc;