1 /* src/vm/statistics.h - exports global varables for statistics
3 Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
4 C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 J. Wenninger, Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA
25 Contact: cacao@cacaojvm.org
27 Authors: Christian Thalinger
31 $Id: statistics.h 5093 2006-07-10 13:36:47Z twisti $
42 #include "vm/global.h"
45 /* statistic macros ***********************************************************/
47 #if defined(ENABLE_STATISTICS)
48 #define STATISTICS(x) \
55 #define STATISTICS(x) /* nothing */
58 /* in_ inline statistics */
61 #define IN_UNIQUEVIRT 0x0000
62 #define IN_UNIQUE_INTERFACE 0x0001
63 #define IN_OUTSIDERS 0x0004
64 #define IN_MAXDEPTH 0x0008
65 #define IN_MAXCODE 0x0010
66 #define IN_JCODELENGTH 0x0020
67 #define IN_EXCEPTION 0x0040
68 #define IN_NOT_UNIQUE_VIRT 0x0080
69 #define IN_NOT_UNIQUE_INTERFACE 0x0100
71 #define N_UNIQUEVIRT 0
72 #define N_UNIQUE_INTERFACE 1
76 #define N_JCODELENGTH 5
78 #define N_NOT_UNIQUE_VIRT 7
79 #define N_NOT_UNIQUE_INTERFACE 8
82 /* global variables ***********************************************************/
84 extern s4 codememusage;
85 extern s4 maxcodememusage;
87 extern s4 memoryusage;
88 extern s4 maxmemusage;
90 extern s4 maxdumpsize;
92 extern s4 globalallocateddumpsize;
93 extern s4 globaluseddumpsize;
96 /* variables for measurements *************************************************/
98 extern s4 size_classinfo;
99 extern s4 size_fieldinfo;
100 extern s4 size_methodinfo;
101 extern s4 size_codeinfo;
103 extern int count_const_pool_len;
104 extern int count_classref_len;
105 extern int count_parsed_desc_len;
106 extern int count_vftbl_len;
107 extern int count_all_methods;
108 extern int count_methods_marked_used; /*RTA*/
109 extern int count_vmcode_len;
110 extern int count_extable_len;
111 extern int count_class_loads;
112 extern int count_class_inits;
114 extern int count_utf_len; /* size of utf hash */
115 extern int count_utf_new;
116 extern int count_utf_new_found;
118 extern int count_locals_conflicts;
119 extern int count_locals_spilled;
120 extern int count_locals_register;
121 extern int count_ss_spilled;
122 extern int count_ss_register;
123 extern int count_methods_allocated_by_lsra;
124 extern int count_mem_move_bb;
125 extern int count_interface_size;
126 extern int count_argument_mem_ss;
127 extern int count_argument_reg_ss;
128 extern int count_method_in_register;
129 extern int count_mov_reg_reg;
130 extern int count_mov_mem_reg;
131 extern int count_mov_reg_mem;
132 extern int count_mov_mem_mem;
134 extern int count_jit_calls;
135 extern int count_methods;
136 extern int count_spills;
137 extern int count_spills_read;
138 extern int count_pcmd_activ;
139 extern int count_pcmd_drop;
140 extern int count_pcmd_zero;
141 extern int count_pcmd_const_store;
142 extern int count_pcmd_const_alu;
143 extern int count_pcmd_const_bra;
144 extern int count_pcmd_load;
145 extern int count_pcmd_move;
146 extern int count_load_instruction;
147 extern int count_pcmd_store;
148 extern int count_pcmd_store_comb;
149 extern int count_dup_instruction;
150 extern int count_pcmd_op;
151 extern int count_pcmd_mem;
152 extern int count_pcmd_met;
153 extern int count_pcmd_bra;
154 extern int count_pcmd_table;
155 extern int count_pcmd_return;
156 extern int count_pcmd_returnx;
157 extern int count_check_null;
158 extern int count_check_bound;
159 extern int count_max_basic_blocks;
160 extern int count_basic_blocks;
161 extern int count_max_javainstr;
162 extern int count_javainstr;
163 extern int count_javacodesize;
164 extern int count_javaexcsize;
165 extern int count_calls;
166 extern int count_tryblocks;
167 extern int count_code_len;
168 extern int count_data_len;
169 extern int count_cstub_len;
170 extern int count_nstub_len;
171 extern int count_max_new_stack;
172 extern int count_upper_bound_new_stack;
173 extern int *count_block_stack;
174 extern int *count_analyse_iterations;
175 extern int *count_method_bb_distribution;
176 extern int *count_block_size_distribution;
177 extern int *count_store_length;
178 extern int *count_store_depth;
179 /* in_ inline statistics */
181 extern int count_in_uniqVirt;
182 extern int count_in_uniqIntf;
183 extern int count_in_rejected;
184 extern int count_in_rejected_mult;
185 extern int count_in_outsiders;
186 extern int count_in_uniqueVirt_not_inlined;
187 extern int count_in_uniqueInterface_not_inlined;
188 extern int count_in_maxDepth;
189 extern int count_in_maxMethods;
191 extern u2 count_in_not [512];
193 /* instruction scheduler statistics *******************************************/
195 extern s4 count_schedule_basic_blocks;
196 extern s4 count_schedule_nodes;
197 extern s4 count_schedule_leaders;
198 extern s4 count_schedule_max_leaders;
199 extern s4 count_schedule_critical_path;
202 /* function prototypes ********************************************************/
206 void loadingtime_start(void);
207 void loadingtime_stop(void);
208 void compilingtime_start(void);
209 void compilingtime_stop(void);
211 void print_times(void);
212 void print_stats(void);
214 void mem_usagelog(bool givewarnings);
217 void nativeinvokation(void);
218 void compiledinvokation(void);
219 void jnicallXmethodnvokation(void);
220 void jniinvokation(void);
222 #endif /* _STATISTICS_H */
226 * These are local overrides for various environment variables in Emacs.
227 * Please do not remove this and leave it at the end of the file, where
228 * Emacs will automagically detect them.
229 * ---------------------------------------------------------------------
232 * indent-tabs-mode: t