1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Add first set of memory probes.

for ChangeLog

	* malloc/malloc.c: Include stap-probe.h.
	(__libc_mallopt): Add memory_mallopt probe.
	* malloc/arena.c (_int_new_arena): Add memory_arena_new probe.
	* manual/probes.texi: New.
	* manual/Makefile (chapters): Add probes.
	* manual/threads.texi: Set next node.
This commit is contained in:
Alexandre Oliva
2013-09-20 11:10:54 -03:00
parent 3e181ddac9
commit 3ea5be5436
6 changed files with 57 additions and 2 deletions

View File

@@ -736,6 +736,7 @@ _int_new_arena(size_t size)
top(a) = (mchunkptr)ptr;
set_head(top(a), (((char*)h + h->size) - ptr) | PREV_INUSE);
LIBC_PROBE (memory_arena_new, 2, a, size);
tsd_setspecific(arena_key, (void *)a);
mutex_init(&a->mutex);
(void)mutex_lock(&a->mutex);