HPCToolkit
idle.c File Reference
#include <pthread.h>
#include <monitor.h>
#include "simple_oo.h"
#include "sample_source_obj.h"
#include "common.h"
#include <sample-sources/blame-shift/blame-shift.h>
#include <hpcrun/hpcrun_options.h>
#include <hpcrun/metrics.h>
#include <hpcrun/sample_sources_registered.h>
#include <hpcrun/safe-sampling.h>
#include <hpcrun/sample_event.h>
#include <hpcrun/thread_data.h>
#include <hpcrun/trace.h>
#include <messages/messages.h>
#include <utilities/tokenize.h>
#include "ss_obj.h"
Include dependency graph for idle.c:

Go to the source code of this file.

Macros

#define TMSG(...)
 
#define ss_name   idle
 
#define ss_cls   SS_SOFTWARE
 

Functions

static void idle_metric_process_blame_for_sample (void *arg, int metric_id, cct_node_t *node, int metric_value)
 
static void init_hack (void)
 
static void METHOD_FN (init)
 
static void METHOD_FN (thread_init)
 
static void METHOD_FN (thread_init_action)
 
static void METHOD_FN (start)
 
static void METHOD_FN (thread_fini_action)
 
static void METHOD_FN (stop)
 
static void METHOD_FN (shutdown)
 
static bool METHOD_FN (supports_event, const char *ev_str)
 
static void METHOD_FN (process_event_list, int lush_metrics)
 
static void METHOD_FN (gen_event_set, int lush_metrics)
 
static void METHOD_FN (display_events)
 
void idle_metric_register_blame_source ()
 
void idle_metric_blame_shift_idle (void)
 
void idle_metric_blame_shift_work (void)
 

Variables

static atomic_uintptr_t active_worker_count = ATOMIC_VAR_INIT(1)
 
static int idle_metric_id = -1
 
static int work_metric_id = -1
 
static bs_fn_entry_t bs_entry
 
static bool idleness_measurement_enabled = false
 
static bool idleness_blame_information_source_present = false
 
double total_threads
 

Macro Definition Documentation

◆ ss_cls

#define ss_cls   SS_SOFTWARE

Definition at line 234 of file idle.c.

◆ ss_name

#define ss_name   idle

Definition at line 233 of file idle.c.

◆ TMSG

#define TMSG (   ...)

Definition at line 91 of file idle.c.

Function Documentation

◆ idle_metric_blame_shift_idle()

void idle_metric_blame_shift_idle ( void  )

Definition at line 296 of file idle.c.

Here is the call graph for this function:

◆ idle_metric_blame_shift_work()

void idle_metric_blame_shift_work ( void  )

Definition at line 320 of file idle.c.

Here is the call graph for this function:

◆ idle_metric_process_blame_for_sample()

static void idle_metric_process_blame_for_sample ( void *  arg,
int  metric_id,
cct_node_t node,
int  metric_value 
)
static

Definition at line 245 of file idle.c.

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

◆ idle_metric_register_blame_source()

void idle_metric_register_blame_source ( void  )

Definition at line 289 of file idle.c.

Here is the caller graph for this function:

◆ init_hack()

static void init_hack ( void  )
static

Definition at line 270 of file idle.c.

Here is the caller graph for this function:

◆ METHOD_FN() [1/11]

static void METHOD_FN ( init  )
static

Definition at line 126 of file idle.c.

◆ METHOD_FN() [2/11]

static void METHOD_FN ( thread_init  )
static

Definition at line 133 of file idle.c.

◆ METHOD_FN() [3/11]

static void METHOD_FN ( thread_init_action  )
static

Definition at line 139 of file idle.c.

◆ METHOD_FN() [4/11]

static void METHOD_FN ( start  )
static

Definition at line 145 of file idle.c.

Here is the call graph for this function:

◆ METHOD_FN() [5/11]

static void METHOD_FN ( thread_fini_action  )
static

Definition at line 163 of file idle.c.

◆ METHOD_FN() [6/11]

static void METHOD_FN ( stop  )
static

Definition at line 169 of file idle.c.

◆ METHOD_FN() [7/11]

static void METHOD_FN ( shutdown  )
static

Definition at line 175 of file idle.c.

◆ METHOD_FN() [8/11]

static bool METHOD_FN ( supports_event  ,
const char *  ev_str 
)
static

Definition at line 183 of file idle.c.

Here is the call graph for this function:

◆ METHOD_FN() [9/11]

static void METHOD_FN ( process_event_list  ,
int  lush_metrics 
)
static

Definition at line 189 of file idle.c.

Here is the call graph for this function:

◆ METHOD_FN() [10/11]

static void METHOD_FN ( gen_event_set  ,
int  lush_metrics 
)
static

Definition at line 213 of file idle.c.

◆ METHOD_FN() [11/11]

static void METHOD_FN ( display_events  )
static

Definition at line 219 of file idle.c.

Variable Documentation

◆ active_worker_count

atomic_uintptr_t active_worker_count = ATOMIC_VAR_INIT(1)
static

Definition at line 108 of file idle.c.

◆ bs_entry

bs_fn_entry_t bs_entry
static

Definition at line 113 of file idle.c.

◆ idle_metric_id

int idle_metric_id = -1
static

Definition at line 110 of file idle.c.

◆ idleness_blame_information_source_present

bool idleness_blame_information_source_present = false
static

Definition at line 115 of file idle.c.

◆ idleness_measurement_enabled

bool idleness_measurement_enabled = false
static

Definition at line 114 of file idle.c.

◆ total_threads

double total_threads

Definition at line 117 of file idle.c.

◆ work_metric_id

int work_metric_id = -1
static

Definition at line 111 of file idle.c.