a7882e684f6232667d48d6718f3495fdc26860e7
[cacao.git] / src / vm / statistics.h
1 /* vm/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 1953 2005-02-17 13:42:23Z christian $
30
31 */
32
33
34 #ifndef _STATISTICS_H
35 #define _STATISTICS_H
36
37
38 #include "vm/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_locals_conflicts;
65 extern int count_locals_spilled;
66 extern int count_locals_register;
67 extern int count_ss_spilled;
68 extern int count_ss_register;
69 extern int count_methods_allocated_by_lsra;
70 extern int count_mem_move_bb;
71
72 extern int count_jit_calls;
73 extern int count_methods;
74 extern int count_spills;
75 extern int count_spills_read;
76 extern int count_pcmd_activ;
77 extern int count_pcmd_drop;
78 extern int count_pcmd_zero;
79 extern int count_pcmd_const_store;
80 extern int count_pcmd_const_alu;
81 extern int count_pcmd_const_bra;
82 extern int count_pcmd_load;
83 extern int count_pcmd_move;
84 extern int count_load_instruction;
85 extern int count_pcmd_store;
86 extern int count_pcmd_store_comb;
87 extern int count_dup_instruction;
88 extern int count_pcmd_op;
89 extern int count_pcmd_mem;
90 extern int count_pcmd_met;
91 extern int count_pcmd_bra;
92 extern int count_pcmd_table;
93 extern int count_pcmd_return;
94 extern int count_pcmd_returnx;
95 extern int count_check_null;
96 extern int count_check_bound;
97 extern int count_max_basic_blocks;
98 extern int count_basic_blocks;
99 extern int count_max_javainstr;
100 extern int count_javainstr;
101 extern int count_javacodesize;
102 extern int count_javaexcsize;
103 extern int count_calls;
104 extern int count_tryblocks;
105 extern int count_code_len;
106 extern int count_data_len;
107 extern int count_cstub_len;
108 extern int count_nstub_len;
109 extern int count_max_new_stack;
110 extern int count_upper_bound_new_stack;
111 extern int *count_block_stack;
112 extern int *count_analyse_iterations;
113 extern int *count_method_bb_distribution;
114 extern int *count_block_size_distribution;
115 extern int *count_store_length;
116 extern int *count_store_depth;
117
118
119 /* function prototypes ********************************************************/
120
121 s8 getcputime();
122
123 void loadingtime_start();
124 void loadingtime_stop();
125 void compilingtime_start();
126 void compilingtime_stop();
127
128 void print_times();
129 void print_stats();
130
131 void mem_usagelog(bool givewarnings);
132  
133 #endif /* _STATISTICS_H */
134
135
136 /*
137  * These are local overrides for various environment variables in Emacs.
138  * Please do not remove this and leave it at the end of the file, where
139  * Emacs will automagically detect them.
140  * ---------------------------------------------------------------------
141  * Local variables:
142  * mode: c
143  * indent-tabs-mode: t
144  * c-basic-offset: 4
145  * tab-width: 4
146  * End:
147  */