summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/mutex_prof.h
diff options
context:
space:
mode:
authorJoerg Koenig <jck@techsat.com>2018-01-19 10:53:15 (GMT)
committerJoerg Koenig <jck@techsat.com>2018-01-19 10:53:15 (GMT)
commitaa502047980c13cdbe5a1adb7f024199c367254d (patch)
tree8cc6a214bde51a42beb77ac92fe0d00dd44c0c90 /include/jemalloc/internal/mutex_prof.h
parent3f5049340e66c6929c3270f7359617f62e053b11 (diff)
parentf78d4ca3fbff6cab0c704c787706a53ddafcbe13 (diff)
downloadjemalloc-master.zip
jemalloc-master.tar.gz
jemalloc-master.tar.bz2
Merge https://github.com/jemalloc/jemallocmaster
Change-Id: I44881ca21f4710f7ad5154a45c4a7204ae71c84c
Diffstat (limited to 'include/jemalloc/internal/mutex_prof.h')
-rw-r--r--include/jemalloc/internal/mutex_prof.h31
1 files changed, 22 insertions, 9 deletions
diff --git a/include/jemalloc/internal/mutex_prof.h b/include/jemalloc/internal/mutex_prof.h
index 3358bcf..735c0ad 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_COUNTERS \
+#define MUTEX_PROF_UINT64_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(num_spin_acq, uint64_t) \
+ OP(num_owner_switch, uint64_t) \
+ OP(total_wait_time, uint64_t) \
+ OP(max_wait_time, uint64_t)
+
+#define MUTEX_PROF_UINT32_COUNTERS \
OP(max_num_thds, uint32_t)
-typedef enum {
+#define MUTEX_PROF_COUNTERS \
+ MUTEX_PROF_UINT64_COUNTERS \
+ MUTEX_PROF_UINT32_COUNTERS
+
#define OP(counter, type) mutex_counter_##counter,
- MUTEX_PROF_COUNTERS
+
+#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 {
/*