1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-09-11 12:10:50 +03:00

Remove THREAD_STATS.

A THREAD_STATS macro duplicates gathering information that could be
obtained by systemtap probes instead.
This commit is contained in:
Ondřej Bílka
2014-02-10 12:25:04 +01:00
parent d674667cba
commit bdfe308a16
3 changed files with 7 additions and 60 deletions

View File

@@ -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;