GNU header update.
[cacao.git] / src / vm / statistics.h
1 /* statistics.h - exports global varables for statistics
2
3    Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
4    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
5    C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
6    Institut f. Computersprachen - TU Wien
7
8    This file is part of CACAO.
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2, or (at
13    your option) any later version.
14
15    This program is distributed in the hope that it will be useful, but
16    WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    General Public License for more details.
19
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23    02111-1307, USA.
24
25    Contact: cacao@complang.tuwien.ac.at
26
27    Authors: Christian Thalinger
28
29    $Id: statistics.h 1735 2004-12-07 14:33:27Z twisti $
30
31 */
32
33
34 #ifndef _STATISTICS_H
35 #define _STATISTICS_H
36
37
38 #include "global.h"
39
40
41 /* global variables */
42
43 extern s4 memoryusage;
44 extern s4 maxmemusage;
45 extern s4 maxdumpsize;
46
47 extern s4 globalallocateddumpsize;
48 extern s4 globaluseddumpsize;
49
50 extern int count_class_infos;           /* variables for measurements         */
51 extern int count_const_pool_len;
52 extern int count_vftbl_len;
53 extern int count_all_methods;
54 extern int count_methods_marked_used;  /*RTA*/
55 extern int count_vmcode_len;
56 extern int count_extable_len;
57 extern int count_class_loads;
58 extern int count_class_inits;
59
60 extern int count_utf_len;               /* size of utf hash                   */
61 extern int count_utf_new;
62 extern int count_utf_new_found;
63
64 extern int count_jit_calls;
65 extern int count_methods;
66 extern int count_spills;
67 extern int count_pcmd_activ;
68 extern int count_pcmd_drop;
69 extern int count_pcmd_zero;
70 extern int count_pcmd_const_store;
71 extern int count_pcmd_const_alu;
72 extern int count_pcmd_const_bra;
73 extern int count_pcmd_load;
74 extern int count_pcmd_move;
75 extern int count_load_instruction;
76 extern int count_pcmd_store;
77 extern int count_pcmd_store_comb;
78 extern int count_dup_instruction;
79 extern int count_pcmd_op;
80 extern int count_pcmd_mem;
81 extern int count_pcmd_met;
82 extern int count_pcmd_bra;
83 extern int count_pcmd_table;
84 extern int count_pcmd_return;
85 extern int count_pcmd_returnx;
86 extern int count_check_null;
87 extern int count_check_bound;
88 extern int count_max_basic_blocks;
89 extern int count_basic_blocks;
90 extern int count_max_javainstr;
91 extern int count_javainstr;
92 extern int count_javacodesize;
93 extern int count_javaexcsize;
94 extern int count_calls;
95 extern int count_tryblocks;
96 extern int count_code_len;
97 extern int count_data_len;
98 extern int count_cstub_len;
99 extern int count_nstub_len;
100 extern int count_max_new_stack;
101 extern int count_upper_bound_new_stack;
102 extern int *count_block_stack;
103 extern int *count_analyse_iterations;
104 extern int *count_method_bb_distribution;
105 extern int *count_block_size_distribution;
106 extern int *count_store_length;
107 extern int *count_store_depth;
108
109
110 /* function prototypes */
111
112 s8 getcputime();
113
114 void loadingtime_start();
115 void loadingtime_stop();
116 void compilingtime_start();
117 void compilingtime_stop();
118
119 void print_times();
120 void print_stats();
121
122 void mem_usagelog(bool givewarnings);
123  
124 #endif /* _STATISTICS_H */
125
126
127 /*
128  * These are local overrides for various environment variables in Emacs.
129  * Please do not remove this and leave it at the end of the file, where
130  * Emacs will automagically detect them.
131  * ---------------------------------------------------------------------
132  * Local variables:
133  * mode: c
134  * indent-tabs-mode: t
135  * c-basic-offset: 4
136  * tab-width: 4
137  * End:
138  */