148 STDERR_MSG(
"HPCToolkit: IDLE metric needs either a REALTIME, CPUTIME, WALLCLOCK, or PAPI_TOT_CYC source.");
149 monitor_real_exit(1);
153 STDERR_MSG(
"HPCToolkit: IDLE metric specified without a plugin that measures " 154 "idleness and work.\n" 155 "For dynamic binaries, specify an appropriate plugin with an argument to hpcrun.\n" 156 "For static binaries, specify an appropriate plugin with an argument to hpclink.\n");
157 monitor_real_exit(1);
205 TMSG(
IDLE,
"Metric ids = idle (%d), work(%d)",
221 printf(
"===========================================================================\n");
222 printf(
"NO Available IDLE preset events\n");
223 printf(
"===========================================================================\n");
234 #define ss_cls SS_SOFTWARE 253 int metric_value = metric_desc->
period * metric_incr;
259 double working_threads = (workers > 0 ? workers : 1.0 );
272 char * num_threads = getenv(
"OMP_NUM_THREADS");
301 if (td->
idle++ > 0)
return;
305 TMSG(
IDLE,
"blame shift idle after td->idle incr = %d", td->
idle);
325 TMSG(
IDLE,
"blame shift idle before td->idle decr = %d", td->
idle);
326 if (--td->
idle > 0)
return;
static int idle_metric_id
void idle_metric_register_blame_source()
static void hpcrun_safe_exit(void)
sample_val_t hpcrun_sample_callpath(void *context, int metricId, hpcrun_metricVal_t metricIncr, int skipInner, int isSync, sampling_info_t *data)
#define atomic_fetch_add_explicit(object, operand, order)
#define ATOMIC_VAR_INIT(value)
struct bs_fn_entry_t * next
#define atomic_load_explicit(object, order)
static void cct_metric_data_increment(int metric_id, cct_node_t *x, cct_metric_data_t incr)
#define atomic_store_explicit(object, desired, order)
static void idle_metric_process_blame_for_sample(void *arg, int metric_id, cct_node_t *node, int metric_value)
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 blame_shift_register(bs_fn_entry_t *entry)
int hpcrun_trace_isactive()
static bool idleness_blame_information_source_present
static int work_metric_id
static bs_fn_entry_t bs_entry
static void METHOD_FN(init)
void idle_metric_blame_shift_idle(void)
bool hpcrun_ev_is(const char *candidate, const char *event_name)
static void init_hack(void)
int blame_shift_source_available(bs_type bst)
int hpcrun_new_metric(void)
void idle_metric_blame_shift_work(void)
metric_desc_properties_t properties
static bool idleness_measurement_enabled
static int hpcrun_safe_enter(void)
static atomic_uintptr_t active_worker_count
metric_desc_t * hpcrun_id2metric(int metric_id)
thread_data_t *(* hpcrun_get_thread_data)(void)
#define metric_property_none