1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +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

@ -1878,6 +1878,8 @@ static int perturb_byte;
#define free_perturb(p, n) memset (p, perturb_byte & 0xff, n)
#include <stap-probe.h>
/* ------------------- Support for multiple arenas -------------------- */
#include "arena.c"
@ -4695,6 +4697,8 @@ int __libc_mallopt(int param_number, int value)
/* Ensure initialization/consolidation */
malloc_consolidate(av);
LIBC_PROBE (memory_mallopt, 2, param_number, value);
switch(param_number) {
case M_MXFAST:
if (value >= 0 && value <= MAX_FAST_SIZE) {