History log of /haiku/src/system/kernel/slab/slab_debug.h
Revision Date Author Comments
# 75088a86 04-Nov-2011 Michael Lotz <mmlr@mlotz.ch>

Move AllocationTrackingInfo into a header. This way it can be re-used outside
of the slab code. It is generic as it only contains the link to a tracing entry
and not any application specific info.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43188 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f606e8fd 01-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

mmlr + bonefish:
* AllocationTrackingCallback::ProcessTrackingInfo(): Also pass the
allocation pointer.
* "allocations_per_caller" KDL command: Add option "-d". When given,
each allocation for the specified caller is printed, including the
respective stack trace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43087 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 50175c99 01-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

mmlr + bonefish:
Refactor the "allocations_per_caller" KDL command related functions.
They expect an instance of a class implementing the new
AllocationTrackingCallback interface, now. The only implementation ATM
is AllocationCollectorCallback, which does the work the now removed
slab_debug_add_allocation_for_caller() did before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43082 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f908ff9b 01-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

mmlr + bonefish:
* Fix build broken in r43078. The slab_debug_add_allocation_for_caller()
wasn't guarded correctly.
* slab_debug_add_allocation_for_caller(): Add bool resetAllocationInfos
parameter, which makes the function clear the allocation tracking
infos after processing the data.
* "allocations_per_caller" KDL command: Add option "-r" to reset the
allocation tracking infos. The next invocation of the command will
only show the allocations made after the reset.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43079 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0422a0f3 01-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

mmlr + bonefish:
* dump_allocations_per_caller(): Compute the total allocation count and
size from the caller infos instead of using return arguments in the
helper functions called.
* Move caller info update code from analyze_allocation_callers() to new
function slab_debug_add_allocation_for_caller(), so it can be reused.
* Add MemoryManager::AnalyzeAllocationCallers() to collect the
allocation information for the memory manager.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43078 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1c6140e 01-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

mmlr + bonefish:
* Add optional stack trace capturing for slab memory manager tracing.
* Add allocation tracking for the slab allocator (enabled via
SLAB_ALLOCATION_TRACKING). The allocation tracking requires tracing
with stack traces to be enabled for object caches and/or the memory
manager.
- Add class AllocationTrackingInfo that associates an allocation with
its respective tracing entry. The structure is added to the end of
an allocation done by the memory manager. For the object caches
there's a separate array for each slab.
- Add code range markers to the slab code, so that the first caller
into the slab code can be retrieved from the stack traces.
- Add KDL command "allocations_per_caller" that lists all allocations
summarized by caller.
* Move debug definitions from slab_private.h to slab_debug.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43072 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 75088a863bbfcdc967650b9cad8284b623020154 04-Nov-2011 Michael Lotz <mmlr@mlotz.ch>

Move AllocationTrackingInfo into a header. This way it can be re-used outside
of the slab code. It is generic as it only contains the link to a tracing entry
and not any application specific info.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43188 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f606e8fd79b26ccfa5a7a50e3caeb560ab1ac9a9 01-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

mmlr + bonefish:
* AllocationTrackingCallback::ProcessTrackingInfo(): Also pass the
allocation pointer.
* "allocations_per_caller" KDL command: Add option "-d". When given,
each allocation for the specified caller is printed, including the
respective stack trace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43087 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 50175c99c4747dcc83dcdeff24c259500cbf7478 01-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

mmlr + bonefish:
Refactor the "allocations_per_caller" KDL command related functions.
They expect an instance of a class implementing the new
AllocationTrackingCallback interface, now. The only implementation ATM
is AllocationCollectorCallback, which does the work the now removed
slab_debug_add_allocation_for_caller() did before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43082 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f908ff9bb658aa86aa53760c51070415e69f951d 01-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

mmlr + bonefish:
* Fix build broken in r43078. The slab_debug_add_allocation_for_caller()
wasn't guarded correctly.
* slab_debug_add_allocation_for_caller(): Add bool resetAllocationInfos
parameter, which makes the function clear the allocation tracking
infos after processing the data.
* "allocations_per_caller" KDL command: Add option "-r" to reset the
allocation tracking infos. The next invocation of the command will
only show the allocations made after the reset.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43079 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0422a0f3ae8f12f32bd27868a7e742293786f0a0 01-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

mmlr + bonefish:
* dump_allocations_per_caller(): Compute the total allocation count and
size from the caller infos instead of using return arguments in the
helper functions called.
* Move caller info update code from analyze_allocation_callers() to new
function slab_debug_add_allocation_for_caller(), so it can be reused.
* Add MemoryManager::AnalyzeAllocationCallers() to collect the
allocation information for the memory manager.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43078 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1c6140eaa641aa95fc6d82f0d5c53cf4fe41a16 01-Nov-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

mmlr + bonefish:
* Add optional stack trace capturing for slab memory manager tracing.
* Add allocation tracking for the slab allocator (enabled via
SLAB_ALLOCATION_TRACKING). The allocation tracking requires tracing
with stack traces to be enabled for object caches and/or the memory
manager.
- Add class AllocationTrackingInfo that associates an allocation with
its respective tracing entry. The structure is added to the end of
an allocation done by the memory manager. For the object caches
there's a separate array for each slab.
- Add code range markers to the slab code, so that the first caller
into the slab code can be retrieved from the stack traces.
- Add KDL command "allocations_per_caller" that lists all allocations
summarized by caller.
* Move debug definitions from slab_private.h to slab_debug.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43072 a95241bf-73f2-0310-859d-f6bbb57e9c96