PPL Logo

conv-core/memory-charmdebug.C File Reference

Go to the source code of this file.

Data Structures

struct  _Slot
 Struct Slot contains all of the information about a malloc buffer except for the contents of its memory. More...
struct  _SlotStack

Typedefs

typedef struct _Slot Slot
typedef struct _SlotStack SlotStack

Functions

static void * meta_malloc (size_t size)
static void * meta_calloc (size_t nelem, size_t size)
static void * meta_realloc (void *oldBuffer, size_t newSize)
static void * meta_memalign (size_t align, size_t size)
static int meta_posix_memalign (void **outptr, size_t align, size_t size)
static void * meta_aligned_alloc (size_t align, size_t size)
static void * meta_valloc (size_t size)
static void * meta_pvalloc (size_t size)
void CmiBacktraceRecordHuge (void **retPtrs, int *nLevels)
int get_memory_allocated_user_total ()
static char * SlotToUser (Slot *s)
static SlotUserToSlot (void *user)
static int isLeakSlot (Slot *s)
static int isProtected (Slot *s)
int Slot_ChareOwner (void *s)
int Slot_AllocatedSize (void *s)
int Slot_StackTrace (void *s, void ***stack)
static void printSlot (Slot *s)
size_t cpd_memory_length (void *lenParam)
 Returns the number of total blocks of memory allocated.
void cpd_memory_single_pup (CkHashtable_c h, pup_er p)
 PUP a single slot of memory for the debugger.

Variables

int nextChareID
int memory_chare_id
int memory_charmdebug_internal = 0
CkHashtable_c block_slots = NULL
Slot slot_first_storage = {&slot_first_storage, &slot_first_storage}
Slotslot_first = &slot_first_storage
int memory_allocated_user_total
void * lastMemoryAllocated = NULL
Slot ** allocatedSince = NULL
int allocatedSinceSize = 0
int allocatedSinceMaxSize = 0
int saveAllocationHistory = 0


Typedef Documentation

typedef struct _Slot Slot

Definition at line 43 of file memory-charmdebug.C.

typedef struct _SlotStack SlotStack

Definition at line 44 of file memory-charmdebug.C.


Function Documentation

static void* meta_malloc ( size_t  size  )  [static]

Definition at line 27 of file memory-lock.C.

Referenced by cpd_memory_single_pup(), malloc(), meta_calloc(), meta_malloc_hook(), and meta_realloc().

Here is the caller graph for this function:

static void* meta_calloc ( size_t  nelem,
size_t  size 
) [static]

Definition at line 40 of file memory-lock.C.

References CmiOutOfMemory(), and mm_calloc.

Referenced by calloc(), and cpd_memory_single_pup().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* meta_realloc ( void *  oldBuffer,
size_t  newSize 
) [static]

Definition at line 53 of file memory-lock.C.

Referenced by cpd_memory_single_pup(), meta_realloc_hook(), and realloc().

Here is the caller graph for this function:

static void* meta_memalign ( size_t  align,
size_t  size 
) [static]

Definition at line 60 of file memory-lock.C.

Referenced by cpd_memory_single_pup(), memalign(), meta_memalign_hook(), meta_pvalloc(), and meta_valloc().

Here is the caller graph for this function:

static int meta_posix_memalign ( void **  outptr,
size_t  align,
size_t  size 
) [static]

Definition at line 68 of file memory-lock.C.

References CmiOutOfMemory(), and mm_posix_memalign.

Referenced by cpd_memory_single_pup(), and posix_memalign().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* meta_aligned_alloc ( size_t  align,
size_t  size 
) [static]

Definition at line 76 of file memory-lock.C.

References CmiOutOfMemory(), and mm_aligned_alloc.

Referenced by aligned_alloc(), and cpd_memory_single_pup().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* meta_valloc ( size_t  size  )  [static]

Definition at line 84 of file memory-lock.C.

References CmiOutOfMemory(), and mm_valloc.

Referenced by cpd_memory_single_pup(), and valloc().

Here is the call graph for this function:

Here is the caller graph for this function:

static void* meta_pvalloc ( size_t  size  )  [static]

Definition at line 92 of file memory-lock.C.

References CmiOutOfMemory(), and mm_pvalloc.

Referenced by cpd_memory_single_pup(), and pvalloc().

Here is the call graph for this function:

Here is the caller graph for this function:

void CmiBacktraceRecordHuge ( void **  retPtrs,
int nLevels 
)

Definition at line 35 of file cmibacktrace.C.

Referenced by cpd_memory_single_pup().

Here is the caller graph for this function:

int get_memory_allocated_user_total ( void   ) 

Definition at line 116 of file memory-charmdebug.C.

References memory_allocated_user_total.

static char* SlotToUser ( Slot s  )  [static]

Definition at line 125 of file memory-charmdebug.C.

Referenced by cpd_memory_single_pup(), and printSlot().

Here is the caller graph for this function:

static Slot* UserToSlot ( void *  user  )  [static]

Definition at line 136 of file memory-charmdebug.C.

References block_slots, CkHashtableGet(), and PUP::s.

Referenced by cpd_memory_single_pup().

Here is the call graph for this function:

Here is the caller graph for this function:

static int isLeakSlot ( Slot s  )  [static]

Definition at line 146 of file memory-charmdebug.C.

References Slot::magic.

Referenced by cpd_memory_single_pup().

Here is the caller graph for this function:

static int isProtected ( Slot s  )  [static]

Definition at line 150 of file memory-charmdebug.C.

References Slot::magic.

Referenced by cpd_memory_single_pup().

Here is the caller graph for this function:

int Slot_ChareOwner ( void *  s  ) 

Definition at line 154 of file memory-charmdebug.C.

Referenced by CpdNotify().

Here is the caller graph for this function:

int Slot_AllocatedSize ( void *  s  ) 

Definition at line 158 of file memory-charmdebug.C.

int Slot_StackTrace ( void *  s,
void ***  stack 
)

Definition at line 162 of file memory-charmdebug.C.

Referenced by CpdNotify().

Here is the caller graph for this function:

static void printSlot ( Slot s  )  [static]

Definition at line 167 of file memory-charmdebug.C.

References CmiBacktracePrint(), CmiMyPe(), CmiPrintf(), Slot::from, SlotToUser(), and Slot::userSize.

Referenced by CmiMemorySweep().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t cpd_memory_length ( void *  lenParam  ) 

Returns the number of total blocks of memory allocated.

Definition at line 176 of file memory-charmdebug.C.

References block_slots, CkHashtableSize(), n, and Slot::next.

Here is the call graph for this function:

void cpd_memory_single_pup ( CkHashtable_c  h,
pup_er  p 
)

PUP a single slot of memory for the debugger.

This includes the information about the slot (like size and location), but not the allocated data itself.

PUP the entire information about the allocated memory to the debugger

Returns the content of a block of memory (i.e the user data). This request must always be at the beginning of an allocated block (not for example an object part of an array)

Perform a scan of all the memory to find all the memory that is reacheable from either the stack or the global variables.

Called before the entry method: resets all current memory for the chare receiving the message.

Called after the entry method to check if the chare that just received the message has corrupted the memory of some other chare, or some system memory.

Definition at line 193 of file memory-charmdebug.C.

References allocatedSinceMaxSize, allocatedSinceSize, argv, array, LeakSearchInfo::begin_bss, LeakSearchInfo::begin_data, block_slots, buf, check_memory_leaks(), CkCreateHashtable_pointer(), CkDeleteHashtable(), CkHashtableGet(), CkHashtableGetIterator(), CkHashtableIteratorNext(), CkHashtableIteratorSeekStart(), CkHashtablePut(), CkHashtableRemove(), CmiAbort(), CmiArgGivingUsage(), CmiBacktraceRecordHuge(), CmiFree(), CmiGetArgFlagDesc(), CmiGetPageSize(), CmiMemoryIs_flag, CmiMyPe(), CmiMyRank(), CmiPrintf(), count, CPD_CROSSCORRUPTION, cpd_memory_get(), cpd_memory_getLength(), cpd_memory_pup(), CpdCheckMemory(), CpdDebug_deleteAllocationPoint, CpdDebug_deleteMemStat, CpdDebug_MergeAllocationTree, CpdDebug_mergeMemStat, CpdDebug_pupAllocationPoint, CpdDebug_pupMemStat, CpdDebugGetAllocationTree, CpdDebugGetMemStat, CpdFreeze(), cpdInSystem, CpdListBeginItem(), CpdMemoryMarkClean(), CpdNotify(), CpdResetMemory(), CpdSetInitializeMemory(), CpdSystemEnter(), CpdSystemExit(), crc32_initial(), crc32_update(), data, LeakSearchInfo::end_bss, LeakSearchInfo::end_data, fd, flag, freeSlot(), Slot::from, getCharmEnvelopeSize(), CpdListItemsRequest::hi, idx, info, isLeakSlot(), isProtected(), key, PUP::l, lastMemoryAllocated, len, list, CpdListItemsRequest::lo, PUP::m, Slot::magic, memory_allocated_user_total, memory_chare_id, memory_charmdebug_internal, memory_stack_top, memory_status_info, memoryBackup, MemoryToSlot(), meta_aligned_alloc(), meta_calloc(), meta_cfree(), meta_free(), meta_init(), meta_malloc(), meta_memalign(), meta_posix_memalign(), meta_pvalloc(), meta_realloc(), meta_valloc(), mm_aligned_alloc, mm_calloc, mm_free, mm_malloc, mm_memalign, mm_posix_memalign, msg, Slot::next, nextChareID, parent(), PCQueueCreate(), PCQueueDestroy(), PCQueuePop(), PCQueuePush(), Slot::prev, pup_bytes(), pup_comment, pup_destroy(), pup_fmt_sync_begin_array, pup_fmt_sync_begin_object, pup_fmt_sync_end_array(), pup_fmt_sync_end_object(), pup_fmt_sync_item, pup_isPacking, pup_isUnpacking(), pup_new_fromMem(), pup_pointers(), pup_sync_begin_array, pup_sync_end_array, pup_syncComment(), LeakSearchInfo::quick, r, root, PUP::s, saveAllocationHistory, setMemoryChareID(), setMemoryChareIDFromPtr(), setMemoryOwnedBy(), setMemoryTypeChare(), setMemoryTypeMessage(), setProtection(), setSlot(), size, sizes, SlotToUser(), status, traceFree_c(), traceMalloc_c(), Slot::userSize, and UserToSlot().


Variable Documentation

Definition at line 46 of file memory-charmdebug.C.

Referenced by cpd_memory_single_pup().

Definition at line 49 of file memory-charmdebug.C.

Referenced by cpd_memory_single_pup().

Definition at line 109 of file memory-charmdebug.C.

Referenced by cpd_memory_length(), cpd_memory_single_pup(), and UserToSlot().

Definition at line 111 of file memory-charmdebug.C.

Definition at line 112 of file memory-charmdebug.C.

Definition at line 115 of file memory-charmdebug.C.

Referenced by cpd_memory_single_pup(), and get_memory_allocated_user_total().

void* lastMemoryAllocated = NULL

Definition at line 118 of file memory-charmdebug.C.

Referenced by cpd_memory_single_pup().

Slot** allocatedSince = NULL

Definition at line 119 of file memory-charmdebug.C.

Definition at line 120 of file memory-charmdebug.C.

Referenced by cpd_memory_single_pup().

Definition at line 121 of file memory-charmdebug.C.

Referenced by cpd_memory_single_pup().

Definition at line 122 of file memory-charmdebug.C.

Referenced by cpd_memory_single_pup().


Generated on Mon Sep 21 08:02:04 2020 for Charm++ by  doxygen 1.5.5