old ARGVAR handling in stack.c eliminated
[cacao.git] / src / vm / statistics.h
1 /* src/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 2211 2005-04-04 10:39:36Z christian $
30
31 */
32
33
34 #ifndef _STATISTICS_H
35 #define _STATISTICS_H
36
37
38 #include "vm/global.h"
39                                 /* in_  inline statistics */
40
41 #define IN_MAX  9
42 #define IN_UNIQUEVIRT           0x0000 
43 #define IN_UNIQUE_INTERFACE     0x0001
44 #define IN_OUTSIDERS            0x0004
45 #define IN_MAXDEPTH             0x0008
46 #define IN_MAXCODE              0x0010
47 #define IN_JCODELENGTH          0x0020
48 #define IN_EXCEPTION            0x0040
49 #define IN_NOT_UNIQUE_VIRT      0x0080
50 #define IN_NOT_UNIQUE_INTERFACE 0x0100
51
52 #define N_UNIQUEVIRT            0
53 #define N_UNIQUE_INTERFACE      1
54 #define N_OUTSIDERS             2
55 #define N_MAXDEPTH              3       
56 #define N_MAXCODE               4 
57 #define N_JCODELENGTH           5 
58 #define N_EXCEPTION            6 
59 #define N_NOT_UNIQUE_VIRT       7 
60 #define N_NOT_UNIQUE_INTERFACE  8 
61
62
63
64 /* global variables ***********************************************************/
65
66 extern s4 memoryusage;
67 extern s4 maxmemusage;
68 extern s4 maxdumpsize;
69
70 extern s4 globalallocateddumpsize;
71 extern s4 globaluseddumpsize;
72
73 extern int count_class_infos;           /* variables for measurements         */
74 extern int count_const_pool_len;
75 extern int count_classref_len;
76 extern int count_parsed_desc_len;
77 extern int count_vftbl_len;
78 extern int count_all_methods;
79 extern int count_methods_marked_used;  /*RTA*/
80 extern int count_vmcode_len;
81 extern int count_extable_len;
82 extern int count_class_loads;
83 extern int count_class_inits;
84
85 extern int count_utf_len;               /* size of utf hash                   */
86 extern int count_utf_new;
87 extern int count_utf_new_found;
88
89 extern int count_locals_conflicts;
90 extern int count_locals_spilled;
91 extern int count_locals_register;
92 extern int count_ss_spilled;
93 extern int count_ss_register;
94 extern int count_methods_allocated_by_lsra;
95 extern int count_mem_move_bb;
96 extern int count_interface_size;
97 extern int count_argument_mem_ss;
98 extern int count_argument_reg_ss;
99 extern int count_method_in_register;
100 extern int count_mov_reg_reg;
101 extern int count_mov_mem_reg;
102 extern int count_mov_reg_mem;
103 extern int count_mov_mem_mem;
104
105 extern int count_jit_calls;
106 extern int count_methods;
107 extern int count_spills;
108 extern int count_spills_read;
109 extern int count_pcmd_activ;
110 extern int count_pcmd_drop;
111 extern int count_pcmd_zero;
112 extern int count_pcmd_const_store;
113 extern int count_pcmd_const_alu;
114 extern int count_pcmd_const_bra;
115 extern int count_pcmd_load;
116 extern int count_pcmd_move;
117 extern int count_load_instruction;
118 extern int count_pcmd_store;
119 extern int count_pcmd_store_comb;
120 extern int count_dup_instruction;
121 extern int count_pcmd_op;
122 extern int count_pcmd_mem;
123 extern int count_pcmd_met;
124 extern int count_pcmd_bra;
125 extern int count_pcmd_table;
126 extern int count_pcmd_return;
127 extern int count_pcmd_returnx;
128 extern int count_check_null;
129 extern int count_check_bound;
130 extern int count_max_basic_blocks;
131 extern int count_basic_blocks;
132 extern int count_max_javainstr;
133 extern int count_javainstr;
134 extern int count_javacodesize;
135 extern int count_javaexcsize;
136 extern int count_calls;
137 extern int count_tryblocks;
138 extern int count_code_len;
139 extern int count_data_len;
140 extern int count_cstub_len;
141 extern int count_nstub_len;
142 extern int count_max_new_stack;
143 extern int count_upper_bound_new_stack;
144 extern int *count_block_stack;
145 extern int *count_analyse_iterations;
146 extern int *count_method_bb_distribution;
147 extern int *count_block_size_distribution;
148 extern int *count_store_length;
149 extern int *count_store_depth;
150                                 /* in_  inline statistics */
151 extern int count_in;
152 extern int count_in_uniqVirt;
153 extern int count_in_uniqIntf;
154 extern int count_in_rejected;
155 extern int count_in_rejected_mult;
156 extern int count_in_outsiders;
157 extern int count_in_uniqueVirt_not_inlined;
158 extern int count_in_uniqueInterface_not_inlined;
159 extern int count_in_maxDepth;
160 extern int count_in_maxMethods;
161
162 extern u2 count_in_not   [512];
163
164 /* instruction scheduler statistics *******************************************/
165
166 extern s4 count_schedule_basic_blocks;
167 extern s4 count_schedule_nodes;
168 extern s4 count_schedule_leaders;
169 extern s4 count_schedule_max_leaders;
170 extern s4 count_schedule_critical_path;
171
172
173 /* function prototypes ********************************************************/
174
175 s8 getcputime();
176
177 void loadingtime_start();
178 void loadingtime_stop();
179 void compilingtime_start();
180 void compilingtime_stop();
181
182 void print_times();
183 void print_stats();
184
185 void mem_usagelog(bool givewarnings);
186  
187 #endif /* _STATISTICS_H */
188
189
190 /*
191  * These are local overrides for various environment variables in Emacs.
192  * Please do not remove this and leave it at the end of the file, where
193  * Emacs will automagically detect them.
194  * ---------------------------------------------------------------------
195  * Local variables:
196  * mode: c
197  * indent-tabs-mode: t
198  * c-basic-offset: 4
199  * tab-width: 4
200  * End:
201  */