79 #define THREAD_DOINIT 0 80 #define THREAD_NOSAMPLING 1 81 #define THREAD_SAMPLING 2 87 #define _AS0(n, necessary) \ 89 hpcrun_all_sources_ ##n(void) \ 91 if (necessary) { if (ignore_this_thread()) return; } \ 92 TMSG(SS_ALL, "calling function %s", __func__); \ 93 for(sample_source_t* ss = sample_sources; ss; ss = ss->next_sel) { \ 94 TMSG(SS_ALL,"sample source (%s) method call: %s", \ 100 #define _AS1(n,t,arg) \ 102 hpcrun_all_sources_ ##n(t arg) \ 104 for(sample_source_t* ss = sample_sources; ss; ss = ss->next_sel) { \ 105 METHOD_CALL(ss, n, arg); \ 111 hpcrun_all_sources_ ##n(void) \ 113 TMSG(SS_ALL, "checking %d sources",n_sources); \ 114 for(sample_source_t* ss = sample_sources; ss; ss = ss->next_sel) { \ 115 if (! METHOD_CALL(ss, n)) { \ 116 TMSG(SS_ALL, "%s not started",ss->name); \ 147 char *
string = getenv(
"HPCRUN_IGNORE_THREAD");
152 sprintf(all_str,
",%s,",
string);
154 int myid = monitor_get_thread_num();
156 sprintf(myid_str,
",%d,", myid);
158 if (strstr(all_str, myid_str)) {
160 TMSG(IGNORE,
"Thread %d ignore sampling", myid);
176 if (strcmp(ss->name, src) == 0) {
187 if (strcmp(ss->name, src) == 0) {
216 TMSG(SS_ALL,
"Sample source %s has selection index %d", ss->
name, ss->
sel_idx);
237 TMSG(EVENTS,
"evl (before processing) = |%s|",evl);
241 if (strcasecmp(event,
"LIST") == 0) {
259 _AS0(thread_init_action, 0)
262 _AS0(thread_fini_action, 0)
bool hpcrun_check_named_source(const char *src)
void hpcrun_sample_sources_from_eventlist(char *evl)
struct sample_source_t * next_sel
size_t hpcrun_get_num_sample_sources(void)
void hpcrun_ssfail_unknown(char *event)
static sample_source_t * sample_sources
#define THREAD_NOSAMPLING
static void add_source(sample_source_t *ss)
static __thread int ignore_thread
static bool in_sources(sample_source_t *ss_in)
char * start_tok(char *lst)
void hpcrun_ssfail_none(void)
static sample_source_t ** ss_insert
#define METHOD_CALL(obj, meth,...)
sample_source_t * hpcrun_source_can_process(char *event)
sample_source_t * hpcrun_fetch_source_by_name(const char *src)
#define _AS0(n, necessary)
static int ignore_this_thread()
void hpcrun_display_avail_events(void)