summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/mutex_prof.h
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2018-05-08 19:12:50 (GMT)
committerQi Wang <interwq@gwu.edu>2018-05-08 19:12:50 (GMT)
commit61efbda7098de6fe64c362d309824864308c36d4 (patch)
tree62b8cec5495df891b28fbb139b0c01cdbf9f3fb3 /include/jemalloc/internal/mutex_prof.h
parent3f5049340e66c6929c3270f7359617f62e053b11 (diff)
parent1c51381b7cc62b6e0e77d02c42925c3776dbc4a2 (diff)
downloadjemalloc-5.1.0.zip
jemalloc-5.1.0.tar.gz
jemalloc-5.1.0.tar.bz2
Merge branch 'dev'5.1.0
Diffstat (limited to 'include/jemalloc/internal/mutex_prof.h')
-rw-r--r--include/jemalloc/internal/mutex_prof.h37
1 files changed, 25 insertions, 12 deletions
diff --git a/include/jemalloc/internal/mutex_prof.h b/include/jemalloc/internal/mutex_prof.h
index 3358bcf..ce183d3 100644
--- a/include/jemalloc/internal/mutex_prof.h
+++ b/include/jemalloc/internal/mutex_prof.h
@@ -35,21 +35,34 @@ typedef enum {
mutex_prof_num_arena_mutexes
} mutex_prof_arena_ind_t;
+#define MUTEX_PROF_UINT64_COUNTERS \
+ OP(num_ops, uint64_t, "n_lock_ops") \
+ OP(num_wait, uint64_t, "n_waiting") \
+ OP(num_spin_acq, uint64_t, "n_spin_acq") \
+ OP(num_owner_switch, uint64_t, "n_owner_switch") \
+ OP(total_wait_time, uint64_t, "total_wait_ns") \
+ OP(max_wait_time, uint64_t, "max_wait_ns")
+
+#define MUTEX_PROF_UINT32_COUNTERS \
+ OP(max_num_thds, uint32_t, "max_n_thds")
+
#define MUTEX_PROF_COUNTERS \
- OP(num_ops, uint64_t) \
- OP(num_wait, uint64_t) \
- OP(num_spin_acq, uint64_t) \
- OP(num_owner_switch, uint64_t) \
- OP(total_wait_time, uint64_t) \
- OP(max_wait_time, uint64_t) \
- OP(max_num_thds, uint32_t)
+ MUTEX_PROF_UINT64_COUNTERS \
+ MUTEX_PROF_UINT32_COUNTERS
-typedef enum {
-#define OP(counter, type) mutex_counter_##counter,
- MUTEX_PROF_COUNTERS
+#define OP(counter, type, human) mutex_counter_##counter,
+
+#define COUNTER_ENUM(counter_list, t) \
+ typedef enum { \
+ counter_list \
+ mutex_prof_num_##t##_counters \
+ } mutex_prof_##t##_counter_ind_t;
+
+COUNTER_ENUM(MUTEX_PROF_UINT64_COUNTERS, uint64_t)
+COUNTER_ENUM(MUTEX_PROF_UINT32_COUNTERS, uint32_t)
+
+#undef COUNTER_ENUM
#undef OP
- mutex_prof_num_counters
-} mutex_prof_counter_ind_t;
typedef struct {
/*