HPCToolkit
hpcrun.cpp File Reference
#include <iostream>
#include <iomanip>
#include <string>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <include/hpctoolkit-config.h>
#include <include/uint.h>
#include "Args.hpp"
#include "hpcpapi.h"
#include "dlpapi.h"
#include "hpcrun.h"
#include <lib/support/diagnostics.h>
#include <lib/support/findinstall.h>
#include <lib/support/StrUtil.hpp>
Include dependency graph for hpcrun.cpp:

Go to the source code of this file.

Macros

#define LD_LIBRARY_PATH   "LD_LIBRARY_PATH"
 
#define LD_PRELOAD   "LD_PRELOAD"
 
#define SEPARATOR_MAJOR   setfill('=') << setw(77) << "" << "\n\n"
 
#define SEPARATOR_MINOR   setfill('-') << setw(77) << "" << "\n"
 

Functions

static int list_available_events (char *argv[], Args::EventList_t listType)
 
static void print_external_lib_paths ()
 
static int launch_with_profiling (const char *installpath, const Args &args)
 
static int prepare_ld_lib_path_for_papi ()
 
static int prepend_to_ld_lib_path (const char *str)
 
static int prepend_to_ld_preload (const char *str)
 
static int real_main (int argc, char *argv[])
 
int main (int argc, char *argv[])
 
static int prepare_env_for_profiling (const char *installpath, const Args &args)
 
static void list_available_events_helper (Args::EventList_t listType)
 
static int check_and_prepare_env_for_eventlisting ()
 
static void init_papi ()
 
static int prepend_to_env_var (const char *env_var, const char *str, char sep)
 

Macro Definition Documentation

◆ LD_LIBRARY_PATH

#define LD_LIBRARY_PATH   "LD_LIBRARY_PATH"

Definition at line 100 of file hpcrun.cpp.

◆ LD_PRELOAD

#define LD_PRELOAD   "LD_PRELOAD"

Definition at line 101 of file hpcrun.cpp.

◆ SEPARATOR_MAJOR

#define SEPARATOR_MAJOR   setfill('=') << setw(77) << "" << "\n\n"

◆ SEPARATOR_MINOR

#define SEPARATOR_MINOR   setfill('-') << setw(77) << "" << "\n"

Function Documentation

◆ check_and_prepare_env_for_eventlisting()

static int check_and_prepare_env_for_eventlisting ( )
static

Definition at line 527 of file hpcrun.cpp.

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

◆ init_papi()

static void init_papi ( )
static

Definition at line 534 of file hpcrun.cpp.

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

◆ launch_with_profiling()

static int launch_with_profiling ( const char *  installpath,
const Args args 
)
static

Definition at line 190 of file hpcrun.cpp.

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

◆ list_available_events()

static int list_available_events ( char *  argv[],
Args::EventList_t  listType 
)
static

Definition at line 337 of file hpcrun.cpp.

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

◆ list_available_events_helper()

static void list_available_events_helper ( Args::EventList_t  listType)
static

Definition at line 387 of file hpcrun.cpp.

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

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 132 of file hpcrun.cpp.

Here is the call graph for this function:

◆ prepare_env_for_profiling()

static int prepare_env_for_profiling ( const char *  installpath,
const Args args 
)
static

Definition at line 223 of file hpcrun.cpp.

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

◆ prepare_ld_lib_path_for_papi()

static int prepare_ld_lib_path_for_papi ( )
static

Definition at line 548 of file hpcrun.cpp.

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

◆ prepend_to_env_var()

static int prepend_to_env_var ( const char *  env_var,
const char *  str,
char  sep 
)
static

Definition at line 586 of file hpcrun.cpp.

Here is the caller graph for this function:

◆ prepend_to_ld_lib_path()

static int prepend_to_ld_lib_path ( const char *  str)
static

Definition at line 572 of file hpcrun.cpp.

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

◆ prepend_to_ld_preload()

static int prepend_to_ld_preload ( const char *  str)
static

Definition at line 579 of file hpcrun.cpp.

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

◆ print_external_lib_paths()

static void print_external_lib_paths ( )
static

Definition at line 558 of file hpcrun.cpp.

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

◆ real_main()

static int real_main ( int  argc,
char *  argv[] 
)
static

Definition at line 157 of file hpcrun.cpp.

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