StarPU Internal Handbook
memstats.h
Go to the documentation of this file.
1/* StarPU --- Runtime system for heterogeneous multicore architectures.
2 *
3 * Copyright (C) 2009-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4 *
5 * StarPU is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; either version 2.1 of the License, or (at
8 * your option) any later version.
9 *
10 * StarPU is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 *
14 * See the GNU Lesser General Public License in COPYING.LGPL for more details.
15 */
16
17#ifndef __MEMSTATS_H__
18#define __MEMSTATS_H__
19
22#include <starpu.h>
23#include <common/config.h>
24
25#ifdef STARPU_MEMORY_STATS
26struct _starpu_memory_stats
27{
29 unsigned direct_access[STARPU_MAXNODES];
30 unsigned loaded_shared[STARPU_MAXNODES];
31 unsigned loaded_owner[STARPU_MAXNODES];
32 unsigned shared_to_owner[STARPU_MAXNODES];
33 unsigned invalidated[STARPU_MAXNODES];
34};
35
36typedef struct _starpu_memory_stats * _starpu_memory_stats_t;
37#else
38typedef void * _starpu_memory_stats_t;
39#endif
40
41void _starpu_memory_stats_init(starpu_data_handle_t handle);
42void _starpu_memory_stats_init_per_node(starpu_data_handle_t handle, unsigned node);
43
44void _starpu_memory_stats_free(starpu_data_handle_t handle);
45
46void _starpu_memory_display_handle_stats(FILE *stream, starpu_data_handle_t handle);
47
48void _starpu_memory_handle_stats_cache_hit(starpu_data_handle_t handle, unsigned node);
49void _starpu_memory_handle_stats_loaded_shared(starpu_data_handle_t handle, unsigned node);
50void _starpu_memory_handle_stats_loaded_owner(starpu_data_handle_t handle, unsigned node);
51void _starpu_memory_handle_stats_shared_to_owner(starpu_data_handle_t handle, unsigned node);
52void _starpu_memory_handle_stats_invalidated(starpu_data_handle_t handle, unsigned node);
53
54#endif /* __MEMSTATS_H__ */