StarPU Handbook - StarPU Applications
Performance Monitoring Counters

This section describes the interface to access performance monitoring counters. More...

API

enum  starpu_perf_counter_scope { starpu_perf_counter_scope_undefined , starpu_perf_counter_scope_global , starpu_perf_counter_scope_per_worker , starpu_perf_counter_scope_per_codelet }
 
enum  starpu_perf_counter_type {
  starpu_perf_counter_type_undefined , starpu_perf_counter_type_int32 , starpu_perf_counter_type_int64 , starpu_perf_counter_type_float ,
  starpu_perf_counter_type_double
}
 
void starpu_perf_counter_collection_start (void)
 
void starpu_perf_counter_collection_stop (void)
 

Scope Related Routines

int starpu_perf_counter_scope_name_to_id (const char *name)
 
const char * starpu_perf_counter_scope_id_to_name (enum starpu_perf_counter_scope scope)
 

Type Related Routines

int starpu_perf_counter_type_name_to_id (const char *name)
 
const char * starpu_perf_counter_type_id_to_name (enum starpu_perf_counter_type type)
 

Counter Related Routines

int starpu_perf_counter_nb (enum starpu_perf_counter_scope scope)
 
int starpu_perf_counter_name_to_id (enum starpu_perf_counter_scope scope, const char *name)
 
int starpu_perf_counter_nth_to_id (enum starpu_perf_counter_scope scope, int nth)
 
const char * starpu_perf_counter_id_to_name (int id)
 
int starpu_perf_counter_get_type_id (int id)
 
const char * starpu_perf_counter_get_help_string (int id)
 

Listener Related Routines

void starpu_perf_counter_list_avail (enum starpu_perf_counter_scope scope)
 
void starpu_perf_counter_list_all_avail (void)
 
struct starpu_perf_counter_set * starpu_perf_counter_set_alloc (enum starpu_perf_counter_scope scope)
 
void starpu_perf_counter_set_free (struct starpu_perf_counter_set *set)
 
void starpu_perf_counter_set_enable_id (struct starpu_perf_counter_set *set, int id)
 
void starpu_perf_counter_set_disable_id (struct starpu_perf_counter_set *set, int id)
 
struct starpu_perf_counter_listener * starpu_perf_counter_listener_init (struct starpu_perf_counter_set *set, void(*callback)(struct starpu_perf_counter_listener *listener, struct starpu_perf_counter_sample *sample, void *context), void *user_arg)
 
void starpu_perf_counter_listener_exit (struct starpu_perf_counter_listener *listener)
 
void starpu_perf_counter_set_global_listener (struct starpu_perf_counter_listener *listener)
 
void starpu_perf_counter_set_per_worker_listener (unsigned workerid, struct starpu_perf_counter_listener *listener)
 
void starpu_perf_counter_set_all_per_worker_listeners (struct starpu_perf_counter_listener *listener)
 
void starpu_perf_counter_set_per_codelet_listener (struct starpu_codelet *cl, struct starpu_perf_counter_listener *listener)
 
void starpu_perf_counter_unset_global_listener (void)
 
void starpu_perf_counter_unset_per_worker_listener (unsigned workerid)
 
void starpu_perf_counter_unset_all_per_worker_listeners (void)
 
void starpu_perf_counter_unset_per_codelet_listener (struct starpu_codelet *cl)
 

Sample Related Routines

int32_t starpu_perf_counter_sample_get_int32_value (struct starpu_perf_counter_sample *sample, const int counter_id)
 
int64_t starpu_perf_counter_sample_get_int64_value (struct starpu_perf_counter_sample *sample, const int counter_id)
 
float starpu_perf_counter_sample_get_float_value (struct starpu_perf_counter_sample *sample, const int counter_id)
 
double starpu_perf_counter_sample_get_double_value (struct starpu_perf_counter_sample *sample, const int counter_id)
 

Detailed Description

This section describes the interface to access performance monitoring counters.

Enumeration Type Documentation

◆ starpu_perf_counter_scope

Enum of all possible performance counter scopes.

Enumerator
starpu_perf_counter_scope_undefined 

undefined scope

starpu_perf_counter_scope_global 

global scope

starpu_perf_counter_scope_per_worker 

per-worker scope

starpu_perf_counter_scope_per_codelet 

per-codelet scope

◆ starpu_perf_counter_type

Enum of all possible performance counter value type.

Enumerator
starpu_perf_counter_type_undefined 

underfined value type

starpu_perf_counter_type_int32 

signed 32-bit integer value

starpu_perf_counter_type_int64 

signed 64-bit integer value

starpu_perf_counter_type_float 

32-bit single precision floating-point value

starpu_perf_counter_type_double 

64-bit double precision floating-point value

Function Documentation

◆ starpu_perf_counter_collection_start()

void starpu_perf_counter_collection_start ( void  )

Start collecting performance counter values.

◆ starpu_perf_counter_collection_stop()

void starpu_perf_counter_collection_stop ( void  )

Stop collecting performance counter values.

◆ starpu_perf_counter_scope_name_to_id()

int starpu_perf_counter_scope_name_to_id ( const char *  name)

Translate scope name constant string to scope id.

◆ starpu_perf_counter_scope_id_to_name()

const char * starpu_perf_counter_scope_id_to_name ( enum starpu_perf_counter_scope  scope)

Translate scope id to scope name constant string.

◆ starpu_perf_counter_type_name_to_id()

int starpu_perf_counter_type_name_to_id ( const char *  name)

Translate type name constant string to type id.

◆ starpu_perf_counter_type_id_to_name()

const char * starpu_perf_counter_type_id_to_name ( enum starpu_perf_counter_type  type)

Translate type id to type name constant string.

◆ starpu_perf_counter_nb()

int starpu_perf_counter_nb ( enum starpu_perf_counter_scope  scope)

Return the number of performance counters for the given scope.

◆ starpu_perf_counter_name_to_id()

int starpu_perf_counter_name_to_id ( enum starpu_perf_counter_scope  scope,
const char *  name 
)

Translate a performance counter name to its id.

◆ starpu_perf_counter_nth_to_id()

int starpu_perf_counter_nth_to_id ( enum starpu_perf_counter_scope  scope,
int  nth 
)

Translate a performance counter rank in its scope to its counter id.

◆ starpu_perf_counter_id_to_name()

const char * starpu_perf_counter_id_to_name ( int  id)

Translate a counter id to its name constant string.

◆ starpu_perf_counter_get_type_id()

int starpu_perf_counter_get_type_id ( int  id)

Return the counter's type id.

◆ starpu_perf_counter_get_help_string()

const char * starpu_perf_counter_get_help_string ( int  id)

Return the counter's help string.

◆ starpu_perf_counter_list_avail()

void starpu_perf_counter_list_avail ( enum starpu_perf_counter_scope  scope)

Display the list of counters defined in the given scope.

◆ starpu_perf_counter_list_all_avail()

void starpu_perf_counter_list_all_avail ( void  )

Display the list of counters defined in all scopes.

◆ starpu_perf_counter_set_alloc()

struct starpu_perf_counter_set * starpu_perf_counter_set_alloc ( enum starpu_perf_counter_scope  scope)

Allocate a new performance counter set.

◆ starpu_perf_counter_set_free()

void starpu_perf_counter_set_free ( struct starpu_perf_counter_set *  set)

Free a performance counter set.

◆ starpu_perf_counter_set_enable_id()

void starpu_perf_counter_set_enable_id ( struct starpu_perf_counter_set *  set,
int  id 
)

Enable a given counter in the set.

◆ starpu_perf_counter_set_disable_id()

void starpu_perf_counter_set_disable_id ( struct starpu_perf_counter_set *  set,
int  id 
)

Disable a given counter in the set.

◆ starpu_perf_counter_listener_init()

struct starpu_perf_counter_listener * starpu_perf_counter_listener_init ( struct starpu_perf_counter_set *  set,
void(*)(struct starpu_perf_counter_listener *listener, struct starpu_perf_counter_sample *sample, void *context)  callback,
void *  user_arg 
)

Initialize a new performance counter listener.

◆ starpu_perf_counter_listener_exit()

void starpu_perf_counter_listener_exit ( struct starpu_perf_counter_listener *  listener)

End a performance counter listener.

◆ starpu_perf_counter_set_global_listener()

void starpu_perf_counter_set_global_listener ( struct starpu_perf_counter_listener *  listener)

Set a listener for the global scope.

◆ starpu_perf_counter_set_per_worker_listener()

void starpu_perf_counter_set_per_worker_listener ( unsigned  workerid,
struct starpu_perf_counter_listener *  listener 
)

Set a listener for the per_worker scope on a given worker.

◆ starpu_perf_counter_set_all_per_worker_listeners()

void starpu_perf_counter_set_all_per_worker_listeners ( struct starpu_perf_counter_listener *  listener)

Set a common listener for all workers.

◆ starpu_perf_counter_set_per_codelet_listener()

void starpu_perf_counter_set_per_codelet_listener ( struct starpu_codelet cl,
struct starpu_perf_counter_listener *  listener 
)

Set a per_codelet listener for a codelet.

◆ starpu_perf_counter_unset_global_listener()

void starpu_perf_counter_unset_global_listener ( void  )

Unset the global listener.

◆ starpu_perf_counter_unset_per_worker_listener()

void starpu_perf_counter_unset_per_worker_listener ( unsigned  workerid)

Unset the per_worker listener.

◆ starpu_perf_counter_unset_all_per_worker_listeners()

void starpu_perf_counter_unset_all_per_worker_listeners ( void  )

Unset all per_worker listeners.

◆ starpu_perf_counter_unset_per_codelet_listener()

void starpu_perf_counter_unset_per_codelet_listener ( struct starpu_codelet cl)

Unset a per_codelet listener.

◆ starpu_perf_counter_sample_get_int32_value()

int32_t starpu_perf_counter_sample_get_int32_value ( struct starpu_perf_counter_sample *  sample,
const int  counter_id 
)

Read an int32 counter value from a sample.

◆ starpu_perf_counter_sample_get_int64_value()

int64_t starpu_perf_counter_sample_get_int64_value ( struct starpu_perf_counter_sample *  sample,
const int  counter_id 
)

Read an int64 counter value from a sample.

◆ starpu_perf_counter_sample_get_float_value()

float starpu_perf_counter_sample_get_float_value ( struct starpu_perf_counter_sample *  sample,
const int  counter_id 
)

Read a float counter value from a sample.

◆ starpu_perf_counter_sample_get_double_value()

double starpu_perf_counter_sample_get_double_value ( struct starpu_perf_counter_sample *  sample,
const int  counter_id 
)

Read a double counter value from a sample.