StarPU Internal Handbook
profiling.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2  *
3  * Copyright (C) 2010-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4  * Copyright (C) 2020 Federal University of Rio Grande do Sul (UFRGS)
5  *
6  * StarPU is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or (at
9  * your option) any later version.
10  *
11  * StarPU is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  *
15  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
16  */
17 
18 #ifndef __PROFILING_H__
19 #define __PROFILING_H__
20 
23 #include <starpu.h>
24 #include <starpu_profiling.h>
25 #include <starpu_util.h>
26 #include <common/config.h>
27 
28 #pragma GCC visibility push(hidden)
29 
31 
34 struct starpu_profiling_task_info *_starpu_allocate_profiling_info_if_needed(struct starpu_task *task);
35 
38 void _starpu_worker_update_profiling_info_executing(int workerid, int executed_tasks, uint64_t used_cycles, uint64_t stall_cycles, double consumed_energy, double flops);
39 
44 void _starpu_worker_start_state(int workerid, enum _starpu_worker_status_index index, struct timespec *start_time);
45 
46 /* Record the date when the worker left this state. This permits to measure
47  * how much time was spent in this state.
48  * stop_time is optional, if unspecified, _starpu_worker_start_state will just
49  * take the current time. */
50 void _starpu_worker_stop_state(int workerid, enum _starpu_worker_status_index index, struct timespec *stop_time);
51 
57 
61 int _starpu_register_bus(int src_node, int dst_node);
62 
65 void _starpu_bus_update_profiling_info(int src_node, int dst_node, size_t size);
66 
67 void _starpu_profiling_set_task_push_start_time(struct starpu_task *task);
68 void _starpu_profiling_set_task_push_end_time(struct starpu_task *task);
69 
70 #ifdef STARPU_PAPI
72 void _starpu_profiling_papi_task_start_counters(struct starpu_task *task);
73 void _starpu_profiling_papi_task_stop_counters(struct starpu_task *task);
74 #endif
75 
78 
81 
82 void _starpu_profiling_terminate(void);
83 
84 #pragma GCC visibility pop
85 
86 #endif // __PROFILING_H__
_starpu_worker_status_index
Definition: errorcheck.h:32
void _starpu_bus_update_profiling_info(int src_node, int dst_node, size_t size)
void _starpu_worker_start_state(int workerid, enum _starpu_worker_status_index index, struct timespec *start_time)
void _starpu_profiling_start(void)
void _starpu_initialize_busid_matrix(void)
void _starpu_worker_update_profiling_info_executing(int workerid, int executed_tasks, uint64_t used_cycles, uint64_t stall_cycles, double consumed_energy, double flops)
struct starpu_profiling_task_info * _starpu_allocate_profiling_info_if_needed(struct starpu_task *task)
void _starpu_profiling_init(void)
int _starpu_register_bus(int src_node, int dst_node)