diff options
author | Qi Wang <interwq@gwu.edu> | 2017-08-25 13:24:49 -0700 |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2017-08-30 16:47:32 -0700 |
commit | e55c3ca26758bcb7f6f1621fd690caa245f16942 (patch) | |
tree | c6417b9418237c31395eb814a88f52d0ce7a478c /include | |
parent | 47b20bb6544de9cdd4ca7ab870d6ad257c0ce4ff (diff) | |
download | platform_external_jemalloc_new-e55c3ca26758bcb7f6f1621fd690caa245f16942.tar.gz platform_external_jemalloc_new-e55c3ca26758bcb7f6f1621fd690caa245f16942.tar.bz2 platform_external_jemalloc_new-e55c3ca26758bcb7f6f1621fd690caa245f16942.zip |
Add stats for metadata_thp.
Report number of THPs used in arena and aggregated stats.
Diffstat (limited to 'include')
-rw-r--r-- | include/jemalloc/internal/base_externs.h | 2 | ||||
-rw-r--r-- | include/jemalloc/internal/base_structs.h | 2 | ||||
-rw-r--r-- | include/jemalloc/internal/ctl.h | 1 | ||||
-rw-r--r-- | include/jemalloc/internal/stats.h | 1 |
4 files changed, 5 insertions, 1 deletions
diff --git a/include/jemalloc/internal/base_externs.h b/include/jemalloc/internal/base_externs.h index 6cd11877..7b705c9b 100644 --- a/include/jemalloc/internal/base_externs.h +++ b/include/jemalloc/internal/base_externs.h @@ -13,7 +13,7 @@ extent_hooks_t *base_extent_hooks_set(base_t *base, void *base_alloc(tsdn_t *tsdn, base_t *base, size_t size, size_t alignment); extent_t *base_alloc_extent(tsdn_t *tsdn, base_t *base); void base_stats_get(tsdn_t *tsdn, base_t *base, size_t *allocated, - size_t *resident, size_t *mapped); + size_t *resident, size_t *mapped, size_t *n_thp); void base_prefork(tsdn_t *tsdn, base_t *base); void base_postfork_parent(tsdn_t *tsdn, base_t *base); void base_postfork_child(tsdn_t *tsdn, base_t *base); diff --git a/include/jemalloc/internal/base_structs.h b/include/jemalloc/internal/base_structs.h index 18e227bd..b5421693 100644 --- a/include/jemalloc/internal/base_structs.h +++ b/include/jemalloc/internal/base_structs.h @@ -50,6 +50,8 @@ struct base_s { size_t allocated; size_t resident; size_t mapped; + /* Number of THP regions touched. */ + size_t n_thp; }; #endif /* JEMALLOC_INTERNAL_BASE_STRUCTS_H */ diff --git a/include/jemalloc/internal/ctl.h b/include/jemalloc/internal/ctl.h index a91c4cf5..a36feaff 100644 --- a/include/jemalloc/internal/ctl.h +++ b/include/jemalloc/internal/ctl.h @@ -48,6 +48,7 @@ typedef struct ctl_stats_s { size_t allocated; size_t active; size_t metadata; + size_t metadata_thp; size_t resident; size_t mapped; size_t retained; diff --git a/include/jemalloc/internal/stats.h b/include/jemalloc/internal/stats.h index ab872e59..f19df374 100644 --- a/include/jemalloc/internal/stats.h +++ b/include/jemalloc/internal/stats.h @@ -142,6 +142,7 @@ typedef struct arena_stats_s { atomic_zu_t base; /* Derived. */ atomic_zu_t internal; atomic_zu_t resident; /* Derived. */ + atomic_zu_t metadata_thp; atomic_zu_t allocated_large; /* Derived. */ arena_stats_u64_t nmalloc_large; /* Derived. */ |