diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2013-09-20 11:10:56 -0300 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2013-09-20 11:54:58 -0300 |
commit | 322dea08387167e3c3a9c9b60325ebafa264bd77 (patch) | |
tree | 7239f9202a5035c424b38196868cec5cb28b45a4 /manual/probes.texi | |
parent | 655673f312318a9d95b71ef9f95a59ff36b0a487 (diff) | |
download | glibc-322dea08387167e3c3a9c9b60325ebafa264bd77.tar.gz glibc-322dea08387167e3c3a9c9b60325ebafa264bd77.tar.xz glibc-322dea08387167e3c3a9c9b60325ebafa264bd77.zip |
Add malloc probes for sbrk and heap resizing.
for ChangeLog * malloc/arena.c (new_heap): New memory_heap_new probe. (grow_heap): New memory_heap_more probe. (shrink_heap): New memory_heap_less probe. (heap_trim): New memory_heap_free probe. * malloc/malloc.c (sysmalloc): New memory_sbrk_more probe. (systrim): New memory_sbrk_less probe. * manual/probes.texi: Document them.
Diffstat (limited to 'manual/probes.texi')
-rw-r--r-- | manual/probes.texi | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/manual/probes.texi b/manual/probes.texi index 696525da48..1a45c69b91 100644 --- a/manual/probes.texi +++ b/manual/probes.texi @@ -26,6 +26,47 @@ the virtual memory subsystem of @theglibc{}. The location and the availability of some probes depend on whether per-thread arenas are enabled (the default) or disabled at the time @theglibc{} is compiled. +@deftp Probe memory_sbrk_more (void *@var{$arg1}, size_t @var{$arg2}) +This probe is triggered after the main arena is extended by calling +@code{sbrk}. Argument @var{$arg1} is the additional size requested to +@code{sbrk}, and @var{$arg2} is the pointer that marks the end of the +@code{sbrk} area, returned in response to the request. +@end deftp + +@deftp Probe memory_sbrk_less (void *@var{$arg1}, size_t @var{$arg2}) +This probe is triggered after the size of the main arena is decreased by +calling @code{sbrk}. Argument @var{$arg1} is the size released by +@code{sbrk} (the positive value, rather than the negative value passed +to @code{sbrk}), and @var{$arg2} is the pointer that marks the end of +the @code{sbrk} area, returned in response to the request. +@end deftp + +@deftp Probe memory_heap_new (void *@var{$arg1}, size_t @var{$arg2}) +This probe is triggered after a new heap is @code{mmap}ed. Argument +@var{$arg1} is a pointer to the base of the memory area, where the +@code{heap_info} data structure is held, and @var{$arg2} is the size of +the heap. +@end deftp + +@deftp Probe memory_heap_free (void *@var{$arg1}, size_t @var{$arg2}) +This probe is triggered @emph{before} (unlike the other sbrk and heap +probes) a heap is completely removed via @code{munmap}. Argument +@var{$arg1} is a pointer to the heap, and @var{$arg2} is the size of the +heap. +@end deftp + +@deftp Probe memory_heap_more (void *@var{$arg1}, size_t @var{$arg2}) +This probe is triggered after a trailing portion of an @code{mmap}ed +heap is extended. Argument @var{$arg1} is a pointer to the heap, and +@var{$arg2} is the new size of the heap. +@end deftp + +@deftp Probe memory_heap_less (void *@var{$arg1}, size_t @var{$arg2}) +This probe is triggered after a trailing portion of an @code{mmap}ed +heap is released. Argument @var{$arg1} is a pointer to the heap, and +@var{$arg2} is the new size of the heap. +@end deftp + @deftp Probe memory_malloc_retry (size_t @var{$arg1}) @deftpx Probe memory_realloc_retry (size_t @var{$arg1}, void *@var{$arg2}) @deftpx Probe memory_memalign_retry (size_t @var{$arg1}, size_t @var{$arg2}) |