#include <trace-memory.h>
Public Member Functions | |
TraceMemory (char **argv) | |
void | traceBegin () |
void | traceClose () |
void | malloc (void *where, int size, void **stack, int stackSize) |
void | free (void *where, int size) |
Private Member Functions | |
void | checkFlush (int add) |
void | flush () |
Private Attributes | |
bool | firstTime |
bool | recordStack |
bool | traceDisabled |
int | logBufSize |
int | usedBuffer |
char * | logBuffer |
Currently works only in conjunction with "-memory charmdebug".
Definition at line 38 of file trace-memory.h.
TraceMemory::TraceMemory | ( | char ** | argv | ) |
Definition at line 45 of file trace-memory.C.
References Converse::CkMyPe(), CmiGetArgFlagDesc(), CmiGetArgIntDesc(), CmiPrintf(), firstTime, logBuffer, logBufSize, malloc(), recordStack, traceDisabled, and usedBuffer.
void TraceMemory::checkFlush | ( | int | add | ) | [inline, private] |
Definition at line 65 of file trace-memory.C.
References flush(), logBufSize, and usedBuffer.
Referenced by free(), malloc(), and traceBegin().
void TraceMemory::flush | ( | void | ) | [inline, private] |
Definition at line 71 of file trace-memory.C.
References Converse::CkMyPe(), CmiAbort(), firstTime, xi::fname, logBuffer, traceDisabled, and usedBuffer.
Referenced by checkFlush(), and traceClose().
void TraceMemory::traceBegin | ( | void | ) | [virtual] |
Reimplemented from Trace.
Definition at line 102 of file trace-memory.C.
References checkFlush(), get_memory_allocated_user_total(), logBuffer, and usedBuffer.
void TraceMemory::traceClose | ( | void | ) | [virtual] |
Reimplemented from Trace.
Definition at line 98 of file trace-memory.C.
References flush().
Reimplemented from Trace.
Definition at line 109 of file trace-memory.C.
References checkFlush(), logBuffer, recordStack, traceDisabled, and usedBuffer.
Referenced by TraceMemory().
void TraceMemory::free | ( | void * | where, | |
int | size | |||
) | [virtual] |
Reimplemented from Trace.
Definition at line 120 of file trace-memory.C.
References checkFlush(), logBuffer, traceDisabled, and usedBuffer.
bool TraceMemory::firstTime [private] |
bool TraceMemory::recordStack [private] |
bool TraceMemory::traceDisabled [private] |
Definition at line 42 of file trace-memory.h.
Referenced by flush(), free(), malloc(), and TraceMemory().
int TraceMemory::logBufSize [private] |
int TraceMemory::usedBuffer [private] |
Definition at line 44 of file trace-memory.h.
Referenced by checkFlush(), flush(), free(), malloc(), traceBegin(), and TraceMemory().
char* TraceMemory::logBuffer [private] |
Definition at line 45 of file trace-memory.h.
Referenced by flush(), free(), malloc(), traceBegin(), and TraceMemory().