summaryrefslogtreecommitdiff
path: root/malloc/arena.c
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-10 12:25:04 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-10 12:25:04 +0100
commitbdfe308a166b433a841d5c9ae256560c18bce640 (patch)
treeaf44bb0ab52aee61a9f067f193817f1807d369c7 /malloc/arena.c
parentd674667cbaa84ff4cf82cfedacad0665ae6cb440 (diff)
downloadglibc-bdfe308a166b433a841d5c9ae256560c18bce640.tar.gz
Remove THREAD_STATS.
A THREAD_STATS macro duplicates gathering information that could be obtained by systemtap probes instead.
Diffstat (limited to 'malloc/arena.c')
-rw-r--r--malloc/arena.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/malloc/arena.c b/malloc/arena.c
index 5088a253ec..71678a9dc4 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -37,14 +37,6 @@
mmap threshold, so that requests with a size just below that
threshold can be fulfilled without creating too many heaps. */
-
-#ifndef THREAD_STATS
-# define THREAD_STATS 0
-#endif
-
-/* If THREAD_STATS is non-zero, some statistics on mutex locking are
- computed. */
-
/***************************************************************************/
#define top(ar_ptr) ((ar_ptr)->top)
@@ -79,13 +71,6 @@ static mutex_t list_lock = MUTEX_INITIALIZER;
static size_t narenas = 1;
static mstate free_list;
-#if THREAD_STATS
-static int stat_n_heaps;
-# define THREAD_STAT(x) x
-#else
-# define THREAD_STAT(x) do ; while (0)
-#endif
-
/* Mapped memory in non-main arenas (reliable only for NO_THREADS). */
static unsigned long arena_mem;
@@ -593,7 +578,6 @@ new_heap (size_t size, size_t top_pad)
h = (heap_info *) p2;
h->size = size;
h->mprotect_size = size;
- THREAD_STAT (stat_n_heaps++);
LIBC_PROBE (memory_heap_new, 2, h, h->size);
return h;
}
@@ -777,8 +761,6 @@ _int_new_arena (size_t size)
(void) mutex_unlock (&list_lock);
- THREAD_STAT (++(a->stat_lock_loop));
-
return a;
}
@@ -800,7 +782,6 @@ get_free_list (void)
LIBC_PROBE (memory_arena_reuse_free_list, 1, result);
(void) mutex_lock (&result->mutex);
tsd_setspecific (arena_key, (void *) result);
- THREAD_STAT (++(result->stat_lock_loop));
}
}
@@ -840,7 +821,6 @@ reused_arena (mstate avoid_arena)
out:
LIBC_PROBE (memory_arena_reuse, 2, result, avoid_arena);
tsd_setspecific (arena_key, (void *) result);
- THREAD_STAT (++(result->stat_lock_loop));
next_to_use = result->next;
return result;