222 TMSG(YOUR_MSG_CLASS,
"your debug message about the sample source being started");
239 if (sample_source_start == FAIL) {
240 EMSG(
"YOUR ERROR MESSAGE HERE: (%d): %s", YOUR_errno, YOUR_errorstring);
276 if (sample_source_stop == FAIL) {
277 EMSG(
"YOUR ERROR MESSAGE HERE: (%d): %s", YOUR_errno, YOUR_errorstring);
282 TMSG(YOUR_MESSAGE_CLASS,
"your stop message %p : %s", your_optional_arg1, your_optional_arg2);
376 for (
int i=0; i < NUM_METRICS_FOR_EVENT(event); i++) {
380 if (METRIC_IS_STANDARD) {
385 HPCRUN_MetricFlag_Async,
393 YOUR_FLAG_VALUES, thresh,
423 sigemptyset(&sigset_generic);
424 sigaddset(&sigset_generic, HPCRUN_GENERIC_SIGNAL);
435 printf(
"===========================================================================\n");
436 printf(
"Available generic events\n");
437 printf(
"===========================================================================\n");
438 printf(
"Name\t\tDescription\n");
439 printf(
"---------------------------------------------------------------------------\n");
440 printf(
"GENERIC EVENT\tWhat the generic event does\n");
459 #define ss_name generic 460 #define ss_cls SS_HARDWARE 494 for (EACH _EVENT e IN THIS SAMPLE) {
495 for (EACH METRIC m FOR THIS EVENT) {
504 int metric_id = MY_METRIC_ID(e, m);
541 monitor_real_sigprocmask(SIG_UNBLOCK, &sigset_generic,
NULL);
558 loc->
i = (loc->
i + datum) / 2;
sample_val_t hpcrun_sample_callpath(void *context, int metricId, hpcrun_metricVal_t metricIncr, int skipInner, int isSync, sampling_info_t *data)
#define HPCTOOLKIT_APPLICATION_ERRNO_RESTORE()
static const int MAX_EVENTS
static bool hpcrun_is_sampling_disabled(void)
static int generic_signal_handler(int sig, siginfo_t *siginfo, void *context)
bool(* hpcrun_td_avail)(void)
void hpcrun_stats_num_samples_blocked_async_inc(void)
static struct SOME_STRUCT ss_specific_data
metric_desc_t * hpcrun_set_metric_info_and_period(int metric_id, const char *name, MetricFlags_ValFmt_t valFmt, size_t period, metric_desc_properties_t prop)
void generic_special_metric_update_proc(int metric_id, cct_metric_data_t *loc, cct_metric_data_t datum)
static void METHOD_FN(init)
char * start_tok(char *lst)
void hpcrun_ssfail_start(char *source)
bool hpcrun_ev_is(const char *candidate, const char *event_name)
int hpcrun_extract_ev_thresh(const char *in, int evlen, char *ev, long *th, long def)
static int hpcrun_safe_enter_async(void *pc)
static struct event_info local_event[MAX_EVENTS]
#define METHOD_CALL(obj, meth,...)
static const long DEFAULT_THRESHOLD
int metrics[MAX_EVENTS][MAX_METRICS]
metric_desc_t * hpcrun_set_metric_info_w_fn(int metric_id, const char *name, MetricFlags_ValFmt_t valFmt, size_t period, metric_upd_proc_t upd_fn, metric_desc_properties_t prop)
int hpcrun_new_metric(void)
#define HPCTOOLKIT_APPLICATION_ERRNO_SAVE()
void * hpcrun_context_pc(void *context)
#define metric_property_none