source: trunk/sys/libmemc/include/memc_perfmon.h @ 208

Last change on this file since 208 was 1, checked in by alain, 8 years ago

First import

File size: 2.2 KB
Line 
1/*
2 * memc_perfmon.h - TSAR MEMC Performance Monitor API
3 *
4 * Copyright (c) 2013 UPMC Sorbonne Universites
5 *
6 * This file is part of ALMOS.
7 *
8 * ALMOS is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2.0 of the License.
11 *
12 * ALMOS is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with ALMOS; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifndef _MEMC_PERFMON_H_
23#define _MEMC_PERFMON_H_
24
25struct memc_context_s;
26
27/**
28 * TSAR MEMC Performance Monitor, an opac
29 * perfmon context declaration.
30 **/
31struct memc_perfmon_s
32{
33        struct memc_context_s *tbl;
34        int count;
35};
36
37/**
38 * Initialize a perfmon context.
39 * (All online MEMC are handled)
40 *
41 * @perfmon        perfmon context to be initialized
42 * @return         Non-zero value in case of error
43 */
44int  memc_perfmon_init(struct memc_perfmon_s *perfmon);
45
46/**
47 * Start activity accounting.
48 *
49 * @perfmon        perfmon context holding counters
50 * @retrun         Non-zero value in case of error
51*/
52int  memc_perfmon_start(struct memc_perfmon_s *perfmon);
53
54/**
55 * Stop activity accounting.
56 *
57 * @perfmon        perfmon context holding counters
58 * @retrun         Non-zero value in case of error
59*/
60int  memc_perfmon_stop(struct memc_perfmon_s *perfmon);
61
62/**
63 * Print on stdout the value of perfmon counters.
64 * (All online MEMC are handled)
65 *
66 * @perfmon        perfmon context holding counters
67*/
68void memc_perfmon_print(struct memc_perfmon_s *perfmon);
69
70/**
71 * Print on stdout the value of internal perfmon counters.
72 * (All online MEMC are handled, START and STOP)
73 *
74 * @perfmon        perfmon context holding counters
75*/
76void memc_perfmon_dump(struct memc_perfmon_s *perfmon);
77
78/**
79 * Destroy a given perfmon and free all of its resources.
80 *
81 * @perfmon        perfmon context holding counters
82*/
83void memc_perfmon_destroy(struct memc_perfmon_s *perfmon);
84
85#endif  /* _MEMC_PERFMON_ */
Note: See TracBrowser for help on using the repository browser.