59 char *evl =
self->evl.evl_spec;
61 TMSG(SS_COMMON,
"add event %s to evl |%s|", ev, evl);
64 TMSG(SS_COMMON,
"evl after event added = |%s|",evl);
70 TMSG(SAMPLE_SOURCE,
"%s: store event %d thresh = %ld", self->name, event_id, thresh);
80 CMETHOD_FN(store_event_and_info,
int event_id,
long thresh,
81 int metric_id,
void *info)
83 TMSG(SAMPLE_SOURCE,
"%s: store event and info %d thresh = %ld", self->name, event_id, thresh);
90 EMSG(
"Too many events entered for sample source. Event code %d ignored", event_id);
95 current_event->
event = event_id;
96 current_event->
thresh = thresh;
102 TMSG(SAMPLE_SOURCE,
"%s now has %d events", self->name, *ev);
111 TMSG(SAMPLE_SOURCE,
"%s event[%d] = metric_id %d", self->name, event_idx, metric_id);
115 if (event_idx >= n_events) {
116 EMSG(
"Trying to store metric_id(=%d) for an invalid event index(=%d)." 117 "Only %d events recorded for sample source %s", metric_id, event_idx, n_events, self->name);
129 return (self->evl).evl_spec;
145 TMSG(SAMPLE_SOURCE,
"%s fetching metric_id for event %d", ss->
name, event_idx);
149 if (event_idx >= n_events) {
150 EMSG(
"Trying to fetch metric id an invalid event index." 151 "Only %d events recorded for sample source %s. Returning 0", event_idx, n_events, ss->
name);
156 TMSG(SAMPLE_SOURCE,
"Fetched metric id = %d", current_event->
metric_id);
164 static char *
prefix =
"HPCToolkit fatal error";
167 "If running a dynamically-linked program with hpcrun, use 'hpcrun -L <program>' for a list of available events.\n\n" 168 "If running a statically-linked program built with hpclink, set HPCRUN_EVENT_LIST=LIST in your environment and\n" 169 "run your program to see a list of available events.\n\n" 170 "Note: Either of the aforementioned methods will exit after listing available events. Arguments to your program\n" 171 "will be ignored. Thus, an execution to list events can be run on a single core and it will execute for only a few\n" 193 STDERR_MSG(
"%s: PAPI_library_init() failed as unavailable.\n" 194 "Probably, the kernel is missing a module for accessing the hardware\n" 195 "performance counters (perf_events, perfmon or perfctr).\n",
199 STDERR_MSG(
"%s: PAPI_library_init() failed with version mismatch.\n" 200 "Probably, HPCToolkit is out of sync with PAPI, or else PAPI is\n" 201 "out of sync with the kernel.\n",
211 STDERR_MSG(
"%s: no sampling source specified.\n" 212 "Set HPCRUN_EVENT_LIST to a comma-separated list of EVENT@PERIOD pairs\n" 213 "and rerun your program. If you truly want to run with no events, then\n" 214 "set HPCRUN_EVENT_LIST=NONE.\n%s",
224 STDERR_MSG(
"%s: event %s is unknown or unsupported.\n%s",
232 EEMSG(
"%s: %s event %s is not supported on this platform.\n%s",
240 EEMSG(
"%s: %s event %s is a derived event and thus cannot be profiled.\n%s",
248 EEMSG(
"%s: All %s events are derived. To use proxy sampling,\n" 249 "at least one event must support hardware overflow (eg, PAPI_TOT_CYC).\n",
257 EEMSG(
"%s: %s event %s cannot be profiled in this sequence.\n" 258 "Either it conflicts with another event, or it exceeds the number of\n" 259 "hardware counters.\n%s",
267 EEMSG(
"%s: sample source %s failed to start.\n" 268 "Check the event list and the HPCToolkit installation and try again.\n%s",
void hpcrun_ssfail_derived(char *source, char *event)
void hpcrun_save_papi_error(int error)
void hpcrun_ssfail_all_derived(char *source)
void hpcrun_ssfail_unknown(char *event)
void hpcrun_ssfail_unsupported(char *source, char *event)
void CMETHOD_FN(add_event, const char *ev)
void hpcrun_ssfail_none(void)
void hpcrun_ssfail_start(char *source)
int hpcrun_event2metric(sample_source_t *ss, int event_idx)
#define METHOD_CALL(obj, meth,...)
static void hpcrun_display_papi_error(void)
#define HPCRUN_PAPI_ERROR_VERSION
#define HPCRUN_PAPI_ERROR_UNAVAIL
void hpcrun_ssfail_conflict(char *source, char *event)