1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00

Add probes for malloc arena changes.

for ChangeLog

	* malloc/arena.c (get_free_list): Add probe
	memory_arena_reuse_free_list.
	(reused_arena) [PER_THREAD]: Add probes memory_arena_reuse_wait
	and memory_arena_reuse.
	(arena_get2) [!PER_THREAD]: Likewise.
	* malloc/malloc.c (__libc_realloc) [!PER_THREAD]: Add probe
	memory_arena_reuse_realloc.
	* manual/probes.texi: Document them.
This commit is contained in:
Alexandre Oliva
2013-09-20 11:10:55 -03:00
parent 0653427fdb
commit 6999d38c95
4 changed files with 75 additions and 0 deletions

View File

@ -2977,6 +2977,7 @@ __libc_realloc(void* oldmem, size_t bytes)
#endif
#if !defined PER_THREAD
LIBC_PROBE (memory_arena_reuse_realloc, 1, ar_ptr);
/* As in malloc(), remember this arena for the next allocation. */
tsd_setspecific(arena_key, (void *)ar_ptr);
#endif