Multi-ApplicationOnlineProfiling  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Utils

Various utilities. More...

Functions

static int MALP_Trace_check_dir (const char *path)
 Checks if a path is a directory. More...
 
static void MALP_Trace_try_mkdir (char *path)
 Creates a directory without failing if it already exists. More...
 
static int MALP_Trace_file_exists (const char *path)
 Checks if a file exists. More...
 
static int MALP_Trace_fast_strcmp (char *haystack, char *needle)
 Fast string comparison. More...
 
static int MALP_Trace_is_numeric (char *number)
 Checks if a string contains a numerical element. More...
 
static int MALP_Trace_line_begins_with_sharp (char *line)
 Checks if the first not space char of a string is a #. More...
 
static uint64_t MALP_Trace_total_mem ()
 Getter on the total amount of memory available on current node. More...
 
static uint64_t MALP_Trace_mem_per_core ()
 Getter on the per core memory on the current node. More...
 
static char * my_pad (char *val)
 Removes starting and ending spaces from a string. More...
 

Detailed Description

Various utilities.

Function Documentation

static int MALP_Trace_check_dir ( const char *  path)
inlinestatic

Checks if a path is a directory.

Parameters
paththe path to check
Returns
1 if path is a directory, 0 otherwise

Definition at line 38 of file Utils.h.

Here is the caller graph for this function:

static int MALP_Trace_fast_strcmp ( char *  haystack,
char *  needle 
)
inlinestatic

Fast string comparison.

Parameters
haystackfirst string to compare
needlesecond string to compare
Returns
1 if the strings are identical, 0 otherwise

Definition at line 89 of file Utils.h.

Here is the caller graph for this function:

static int MALP_Trace_file_exists ( const char *  path)
inlinestatic

Checks if a file exists.

Parameters
paththe path to the file to check
Returns
1 if the file exists, 0 otherwise

Definition at line 72 of file Utils.h.

static int MALP_Trace_is_numeric ( char *  number)
inlinestatic

Checks if a string contains a numerical element.

Parameters
numberthe string ti check
Returns
1 if the string represents a numeric, 0 otherwise

Definition at line 113 of file Utils.h.

Here is the caller graph for this function:

static int MALP_Trace_line_begins_with_sharp ( char *  line)
inlinestatic

Checks if the first not space char of a string is a #.

Parameters
linethe string to check
Returns
1 if the string starts with a #, 0 otherwise

Definition at line 129 of file Utils.h.

Here is the caller graph for this function:

static uint64_t MALP_Trace_mem_per_core ( )
inlinestatic

Getter on the per core memory on the current node.

Returns
the per core memory

Definition at line 162 of file Utils.h.

Here is the call graph for this function:

static uint64_t MALP_Trace_total_mem ( )
inlinestatic

Getter on the total amount of memory available on current node.

Returns
the total memory

Definition at line 153 of file Utils.h.

Here is the caller graph for this function:

static void MALP_Trace_try_mkdir ( char *  path)
inlinestatic

Creates a directory without failing if it already exists.

Parameters
paththe path to the directory do create

Definition at line 57 of file Utils.h.

Here is the call graph for this function:

static char* my_pad ( char *  val)
inlinestatic

Removes starting and ending spaces from a string.

Parameters
valthe string where to removes spaces
Returns
the same string as val with spaces removed

Definition at line 173 of file Utils.h.