Loading...
Searching...
No Matches
starpu_perf_monitoring.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2019-2023 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
*
* StarPU is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* StarPU is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU Lesser General Public License in COPYING.LGPL for more details.
*/
#ifndef __STARPU_PERF_MONITORING_H__
#define __STARPU_PERF_MONITORING_H__
#include <starpu.h>
#ifdef __cplusplus
extern "C" {
#endif
enum starpu_perf_counter_scope
{
starpu_perf_counter_scope_undefined = 0,
starpu_perf_counter_scope_global = 2,
starpu_perf_counter_scope_per_worker = 4,
starpu_perf_counter_scope_per_codelet = 6
};
enum starpu_perf_counter_type
{
starpu_perf_counter_type_undefined = 0,
starpu_perf_counter_type_int32 = 1,
starpu_perf_counter_type_int64 = 2,
starpu_perf_counter_type_float = 3,
starpu_perf_counter_type_double = 4
};
struct starpu_perf_counter_listener;
struct starpu_perf_counter_sample;
struct starpu_perf_counter_set;
void starpu_perf_counter_collection_start(void);
void starpu_perf_counter_collection_stop(void);
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);
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);
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);
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);
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);
#ifdef __cplusplus
}
#endif
#endif /* __STARPU_PERF_MONITORING_H__ */
starpu_codelet
Definition starpu_task.h:338
starpu_perf_counter_scope_name_to_id
int starpu_perf_counter_scope_name_to_id(const char *name)
starpu_perf_counter_get_type_id
int starpu_perf_counter_get_type_id(int id)
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)
starpu_perf_counter_list_all_avail
void starpu_perf_counter_list_all_avail(void)
starpu_perf_counter_set_all_per_worker_listeners
void starpu_perf_counter_set_all_per_worker_listeners(struct starpu_perf_counter_listener *listener)
starpu_perf_counter_type
starpu_perf_counter_type
Definition starpu_perf_monitoring.h:53
starpu_perf_counter_id_to_name
const char * starpu_perf_counter_id_to_name(int id)
starpu_perf_counter_get_help_string
const char * starpu_perf_counter_get_help_string(int id)
starpu_perf_counter_nb
int starpu_perf_counter_nb(enum starpu_perf_counter_scope scope)
starpu_perf_counter_collection_stop
void starpu_perf_counter_collection_stop(void)
starpu_perf_counter_unset_global_listener
void starpu_perf_counter_unset_global_listener(void)
starpu_perf_counter_unset_all_per_worker_listeners
void starpu_perf_counter_unset_all_per_worker_listeners(void)
starpu_perf_counter_set_per_worker_listener
void starpu_perf_counter_set_per_worker_listener(unsigned workerid, struct starpu_perf_counter_listener *listener)
starpu_perf_counter_list_avail
void starpu_perf_counter_list_avail(enum starpu_perf_counter_scope scope)
starpu_perf_counter_type_id_to_name
const char * starpu_perf_counter_type_id_to_name(enum starpu_perf_counter_type type)
starpu_perf_counter_type_name_to_id
int starpu_perf_counter_type_name_to_id(const char *name)
starpu_perf_counter_listener_exit
void starpu_perf_counter_listener_exit(struct starpu_perf_counter_listener *listener)
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)
starpu_perf_counter_nth_to_id
int starpu_perf_counter_nth_to_id(enum starpu_perf_counter_scope scope, int nth)
starpu_perf_counter_set_global_listener
void starpu_perf_counter_set_global_listener(struct starpu_perf_counter_listener *listener)
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)
starpu_perf_counter_unset_per_codelet_listener
void starpu_perf_counter_unset_per_codelet_listener(struct starpu_codelet *cl)
starpu_perf_counter_set_enable_id
void starpu_perf_counter_set_enable_id(struct starpu_perf_counter_set *set, int id)
starpu_perf_counter_scope
starpu_perf_counter_scope
Definition starpu_perf_monitoring.h:42
starpu_perf_counter_listener_init
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)
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)
starpu_perf_counter_name_to_id
int starpu_perf_counter_name_to_id(enum starpu_perf_counter_scope scope, const char *name)
starpu_perf_counter_collection_start
void starpu_perf_counter_collection_start(void)
starpu_perf_counter_set_free
void starpu_perf_counter_set_free(struct starpu_perf_counter_set *set)
starpu_perf_counter_scope_id_to_name
const char * starpu_perf_counter_scope_id_to_name(enum starpu_perf_counter_scope scope)
starpu_perf_counter_set_disable_id
void starpu_perf_counter_set_disable_id(struct starpu_perf_counter_set *set, int id)
starpu_perf_counter_unset_per_worker_listener
void starpu_perf_counter_unset_per_worker_listener(unsigned workerid)
starpu_perf_counter_set_alloc
struct starpu_perf_counter_set * starpu_perf_counter_set_alloc(enum starpu_perf_counter_scope scope)
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)
starpu_perf_counter_type_double
@ starpu_perf_counter_type_double
Definition starpu_perf_monitoring.h:58
starpu_perf_counter_type_int32
@ starpu_perf_counter_type_int32
Definition starpu_perf_monitoring.h:55
starpu_perf_counter_type_undefined
@ starpu_perf_counter_type_undefined
Definition starpu_perf_monitoring.h:54
starpu_perf_counter_type_float
@ starpu_perf_counter_type_float
Definition starpu_perf_monitoring.h:57
starpu_perf_counter_type_int64
@ starpu_perf_counter_type_int64
Definition starpu_perf_monitoring.h:56
starpu_perf_counter_scope_per_worker
@ starpu_perf_counter_scope_per_worker
Definition starpu_perf_monitoring.h:45
starpu_perf_counter_scope_per_codelet
@ starpu_perf_counter_scope_per_codelet
Definition starpu_perf_monitoring.h:46
starpu_perf_counter_scope_global
@ starpu_perf_counter_scope_global
Definition starpu_perf_monitoring.h:44
starpu_perf_counter_scope_undefined
@ starpu_perf_counter_scope_undefined
Definition starpu_perf_monitoring.h:43
starpu.h