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#pragma GCC visibility push(hidden)
26
27#ifdef STARPU_MEMORY_STATS
28struct _starpu_memory_stats
29{
31 unsigned direct_access[STARPU_MAXNODES];
32 unsigned loaded_shared[STARPU_MAXNODES];
33 unsigned loaded_owner[STARPU_MAXNODES];
34 unsigned shared_to_owner[STARPU_MAXNODES];
35 unsigned invalidated[STARPU_MAXNODES];
36};
37
38typedef struct _starpu_memory_stats * _starpu_memory_stats_t;
39#else
40typedef void * _starpu_memory_stats_t;
41#endif
42
43void _starpu_memory_stats_init(starpu_data_handle_t handle);
44void _starpu_memory_stats_init_per_node(starpu_data_handle_t handle, unsigned node);
45
46void _starpu_memory_stats_free(starpu_data_handle_t handle);
47
48void _starpu_memory_display_handle_stats(FILE *stream, starpu_data_handle_t handle);
49
50void _starpu_memory_handle_stats_cache_hit(starpu_data_handle_t handle, unsigned node);
51void _starpu_memory_handle_stats_loaded_shared(starpu_data_handle_t handle, unsigned node);
52void _starpu_memory_handle_stats_loaded_owner(starpu_data_handle_t handle, unsigned node);
53void _starpu_memory_handle_stats_shared_to_owner(starpu_data_handle_t handle, unsigned node);
54void _starpu_memory_handle_stats_invalidated(starpu_data_handle_t handle, unsigned node);
55
56#pragma GCC visibility pop
57
58#endif /* __MEMSTATS_H__ */
#define STARPU_MAXNODES
Definition: starpu_config.h:229