Add optional stack traces to {Allocate|Free}Page[Run] tracing.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43185 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2011-11-04 17:58:50 +00:00
parent 448d8d6fcb
commit 865a0be1c0
2 changed files with 12 additions and 3 deletions

View File

@ -35,6 +35,7 @@
#define NET_BUFFER_TRACING 0
#define NET_BUFFER_TRACING_STACK_TRACE 0 /* stack trace depth */
#define PAGE_ALLOCATION_TRACING 0
#define PAGE_ALLOCATION_TRACING_STACK_TRACE 0 /* stack trace depth */
#define PAGE_DAEMON_TRACING 0
#define PAGE_STATE_TRACING 0
#define PAGE_STATE_TRACING_STACK_TRACE 0 /* stack trace depth */

View File

@ -272,9 +272,12 @@ private:
};
class AllocatePage : public AbstractTraceEntry {
class AllocatePage
: public TRACE_ENTRY_SELECTOR(PAGE_ALLOCATION_TRACING_STACK_TRACE) {
public:
AllocatePage()
:
TraceEntryBase(PAGE_ALLOCATION_TRACING_STACK_TRACE, 0, true)
{
Initialized();
}
@ -286,10 +289,12 @@ public:
};
class AllocatePageRun : public AbstractTraceEntry {
class AllocatePageRun
: public TRACE_ENTRY_SELECTOR(PAGE_ALLOCATION_TRACING_STACK_TRACE) {
public:
AllocatePageRun(uint32 length)
:
TraceEntryBase(PAGE_ALLOCATION_TRACING_STACK_TRACE, 0, true),
fLength(length)
{
Initialized();
@ -305,9 +310,12 @@ private:
};
class FreePage : public AbstractTraceEntry {
class FreePage
: public TRACE_ENTRY_SELECTOR(PAGE_ALLOCATION_TRACING_STACK_TRACE) {
public:
FreePage()
:
TraceEntryBase(PAGE_ALLOCATION_TRACING_STACK_TRACE, 0, true)
{
Initialized();
}