summaryrefslogtreecommitdiff
path: root/examples/redis-unstable/deps/jemalloc/src/prof_stats.c
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-21 22:52:54 +0100
commitdcacc00e3750300617ba6e16eb346713f91a783a (patch)
tree38e2d4fb5ed9d119711d4295c6eda4b014af73fd /examples/redis-unstable/deps/jemalloc/src/prof_stats.c
parent58dac10aeb8f5a041c46bddbeaf4c7966a99b998 (diff)
downloadcrep-dcacc00e3750300617ba6e16eb346713f91a783a.tar.gz
Remove testing data
Diffstat (limited to 'examples/redis-unstable/deps/jemalloc/src/prof_stats.c')
-rw-r--r--examples/redis-unstable/deps/jemalloc/src/prof_stats.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/examples/redis-unstable/deps/jemalloc/src/prof_stats.c b/examples/redis-unstable/deps/jemalloc/src/prof_stats.c
deleted file mode 100644
index 5d1a506..0000000
--- a/examples/redis-unstable/deps/jemalloc/src/prof_stats.c
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "jemalloc/internal/jemalloc_preamble.h"
-#include "jemalloc/internal/jemalloc_internal_includes.h"
-
-#include "jemalloc/internal/prof_stats.h"
-
-bool opt_prof_stats = false;
-malloc_mutex_t prof_stats_mtx;
-static prof_stats_t prof_stats_live[PROF_SC_NSIZES];
-static prof_stats_t prof_stats_accum[PROF_SC_NSIZES];
-
-static void
-prof_stats_enter(tsd_t *tsd, szind_t ind) {
- assert(opt_prof && opt_prof_stats);
- assert(ind < SC_NSIZES);
- malloc_mutex_lock(tsd_tsdn(tsd), &prof_stats_mtx);
-}
-
-static void
-prof_stats_leave(tsd_t *tsd) {
- malloc_mutex_unlock(tsd_tsdn(tsd), &prof_stats_mtx);
-}
-
-void
-prof_stats_inc(tsd_t *tsd, szind_t ind, size_t size) {
- cassert(config_prof);
- prof_stats_enter(tsd, ind);
- prof_stats_live[ind].req_sum += size;
- prof_stats_live[ind].count++;
- prof_stats_accum[ind].req_sum += size;
- prof_stats_accum[ind].count++;
- prof_stats_leave(tsd);
-}
-
-void
-prof_stats_dec(tsd_t *tsd, szind_t ind, size_t size) {
- cassert(config_prof);
- prof_stats_enter(tsd, ind);
- prof_stats_live[ind].req_sum -= size;
- prof_stats_live[ind].count--;
- prof_stats_leave(tsd);
-}
-
-void
-prof_stats_get_live(tsd_t *tsd, szind_t ind, prof_stats_t *stats) {
- cassert(config_prof);
- prof_stats_enter(tsd, ind);
- memcpy(stats, &prof_stats_live[ind], sizeof(prof_stats_t));
- prof_stats_leave(tsd);
-}
-
-void
-prof_stats_get_accum(tsd_t *tsd, szind_t ind, prof_stats_t *stats) {
- cassert(config_prof);
- prof_stats_enter(tsd, ind);
- memcpy(stats, &prof_stats_accum[ind], sizeof(prof_stats_t));
- prof_stats_leave(tsd);
-}