HPCToolkit
memleak.c File Reference
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <assert.h>
#include <unistd.h>
#include <monitor.h>
#include <hpcrun/hpcrun_options.h>
#include <hpcrun/disabled.h>
#include <hpcrun/metrics.h>
#include <sample_event.h>
#include "sample_source_obj.h"
#include "common.h"
#include <main.h>
#include <hpcrun/sample_sources_registered.h>
#include "simple_oo.h"
#include <hpcrun/thread_data.h>
#include <messages/messages.h>
#include <utilities/tokenize.h>
#include "ss_obj.h"
Include dependency graph for memleak.c:

Go to the source code of this file.

Macros

#define ss_name   memleak
 
#define ss_cls   SS_SOFTWARE
 
#define ss_sort_order   30
 

Functions

static void METHOD_FN (init)
 
static void METHOD_FN (thread_init)
 
static void METHOD_FN (thread_init_action)
 
static void METHOD_FN (start)
 
static void METHOD_FN (thread_fini_action)
 
static void METHOD_FN (stop)
 
static void METHOD_FN (shutdown)
 
static bool METHOD_FN (supports_event, const char *ev_str)
 
static void METHOD_FN (process_event_list, int lush_metrics)
 
static void METHOD_FN (gen_event_set, int lush_metrics)
 
static void METHOD_FN (display_events)
 
int hpcrun_memleak_alloc_id ()
 
int hpcrun_memleak_active ()
 
void hpcrun_alloc_inc (cct_node_t *node, int incr)
 
void hpcrun_free_inc (cct_node_t *node, int incr)
 

Variables

static const unsigned int MAX_CHAR_FORMULA = 32
 
static int alloc_metric_id = -1
 
static int free_metric_id = -1
 
static int leak_metric_id = -1
 

Macro Definition Documentation

◆ ss_cls

#define ss_cls   SS_SOFTWARE

Definition at line 216 of file memleak.c.

◆ ss_name

#define ss_name   memleak

Definition at line 215 of file memleak.c.

◆ ss_sort_order

#define ss_sort_order   30

Definition at line 217 of file memleak.c.

Function Documentation

◆ hpcrun_alloc_inc()

void hpcrun_alloc_inc ( cct_node_t node,
int  incr 
)

Definition at line 255 of file memleak.c.

Here is the call graph for this function:

◆ hpcrun_free_inc()

void hpcrun_free_inc ( cct_node_t node,
int  incr 
)

Definition at line 268 of file memleak.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hpcrun_memleak_active()

int hpcrun_memleak_active ( )

Definition at line 241 of file memleak.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hpcrun_memleak_alloc_id()

int hpcrun_memleak_alloc_id ( )

Definition at line 234 of file memleak.c.

Here is the caller graph for this function:

◆ METHOD_FN() [1/11]

static void METHOD_FN ( init  )
static

Definition at line 98 of file memleak.c.

◆ METHOD_FN() [2/11]

static void METHOD_FN ( thread_init  )
static

Definition at line 110 of file memleak.c.

◆ METHOD_FN() [3/11]

static void METHOD_FN ( thread_init_action  )
static

Definition at line 116 of file memleak.c.

◆ METHOD_FN() [4/11]

static void METHOD_FN ( start  )
static

Definition at line 122 of file memleak.c.

◆ METHOD_FN() [5/11]

static void METHOD_FN ( thread_fini_action  )
static

Definition at line 130 of file memleak.c.

◆ METHOD_FN() [6/11]

static void METHOD_FN ( stop  )
static

Definition at line 136 of file memleak.c.

◆ METHOD_FN() [7/11]

static void METHOD_FN ( shutdown  )
static

Definition at line 144 of file memleak.c.

◆ METHOD_FN() [8/11]

static bool METHOD_FN ( supports_event  ,
const char *  ev_str 
)
static

Definition at line 152 of file memleak.c.

Here is the call graph for this function:

◆ METHOD_FN() [9/11]

static void METHOD_FN ( process_event_list  ,
int  lush_metrics 
)
static

Definition at line 161 of file memleak.c.

Here is the call graph for this function:

◆ METHOD_FN() [10/11]

static void METHOD_FN ( gen_event_set  ,
int  lush_metrics 
)
static

Definition at line 187 of file memleak.c.

◆ METHOD_FN() [11/11]

static void METHOD_FN ( display_events  )
static

Definition at line 196 of file memleak.c.

Variable Documentation

◆ alloc_metric_id

int alloc_metric_id = -1
static

Definition at line 88 of file memleak.c.

◆ free_metric_id

int free_metric_id = -1
static

Definition at line 89 of file memleak.c.

◆ leak_metric_id

int leak_metric_id = -1
static

Definition at line 90 of file memleak.c.

◆ MAX_CHAR_FORMULA

const unsigned int MAX_CHAR_FORMULA = 32
static

Definition at line 86 of file memleak.c.