cleanup: Fix typos in comments.
[libfirm] / include / libfirm / firmstat.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   Statistics for Firm.
23  * @author  Michael Beck
24  */
25 #ifndef FIRM_STAT_FIRMSTAT_H
26 #define FIRM_STAT_FIRMSTAT_H
27
28 #include "firm_types.h"
29 #include "begin.h"
30
31 /**
32  * Dump a snapshot of the statistic values.
33  * Never called from libFirm should be called from user.
34  *
35  * @param fname  base name of the statistic output file
36  * @param phase  a phase name. Prefix will be firmstat-\<phase\>-
37  */
38 FIRM_API void stat_dump_snapshot(const char *fname, const char *phase);
39
40 /**
41  * Creates an ir_prog pass for stat_dump_snapshot().
42  *
43  * @param name    the name of this pass or NULL
44  * @param fname   base name of the statistic output file
45  * @param phase   a phase name. Prefix will be firmstat-\<phase\>-
46  *
47  * @return  the newly created ir_prog pass
48  */
49 FIRM_API ir_prog_pass_t *stat_dump_snapshot_pass(
50         const char *name, const char *fname, const char *phase);
51
52 /**
53  * initialize the statistics module.
54  * Should be called directly after ir_init
55  */
56 FIRM_API void firm_init_stat(void);
57
58 /**
59  * terminates the statistics module, frees all memory
60  */
61 FIRM_API void stat_term(void);
62
63 /**
64  * returns 1 if statistic module is active, 0 otherwise
65  */
66 FIRM_API int stat_is_active(void);
67
68 #include "end.h"
69
70 #endif