1 /* src/vmcore/statistics.h - exports global varables for statistics
3 Copyright (C) 1996-2005, 2006, 2007 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 $Id: statistics.h 7916 2007-05-18 14:24:21Z twisti $
36 #include "vm/global.h"
39 /* statistic macros ***********************************************************/
41 #if defined(ENABLE_STATISTICS)
42 #define STATISTICS(x) \
49 #define STATISTICS(x) /* nothing */
52 /* in_ inline statistics */
55 #define IN_UNIQUEVIRT 0x0000
56 #define IN_UNIQUE_INTERFACE 0x0001
57 #define IN_OUTSIDERS 0x0004
58 #define IN_MAXDEPTH 0x0008
59 #define IN_MAXCODE 0x0010
60 #define IN_JCODELENGTH 0x0020
61 #define IN_EXCEPTION 0x0040
62 #define IN_NOT_UNIQUE_VIRT 0x0080
63 #define IN_NOT_UNIQUE_INTERFACE 0x0100
65 #define N_UNIQUEVIRT 0
66 #define N_UNIQUE_INTERFACE 1
70 #define N_JCODELENGTH 5
72 #define N_NOT_UNIQUE_VIRT 7
73 #define N_NOT_UNIQUE_INTERFACE 8
76 /* global variables ***********************************************************/
78 extern s4 codememusage;
79 extern s4 maxcodememusage;
81 extern s4 memoryusage;
82 extern s4 maxmemusage;
84 extern s4 maxdumpsize;
86 extern s4 globalallocateddumpsize;
87 extern s4 globaluseddumpsize;
90 /* variables for measurements *************************************************/
92 extern s4 size_classinfo;
93 extern s4 size_fieldinfo;
94 extern s4 size_methodinfo;
95 extern s4 size_lineinfo;
96 extern s4 size_codeinfo;
98 extern s4 size_stub_native;
100 extern s4 size_stack_map;
101 extern s4 size_string;
103 extern s4 size_threadobject;
105 extern s4 size_lock_record;
106 extern s4 size_lock_hashtable;
107 extern s4 size_lock_waiter;
109 extern int count_const_pool_len;
110 extern int count_classref_len;
111 extern int count_parsed_desc_len;
112 extern int count_vftbl_len;
113 extern int count_all_methods;
114 extern int count_methods_marked_used; /*RTA*/
115 extern int count_vmcode_len;
116 extern int count_extable_len;
117 extern int count_class_loads;
118 extern int count_class_inits;
120 extern int count_utf_len; /* size of utf hash */
121 extern int count_utf_new;
122 extern int count_utf_new_found;
124 extern int count_locals_conflicts;
125 extern int count_locals_spilled;
126 extern int count_locals_register;
127 extern int count_ss_spilled;
128 extern int count_ss_register;
129 extern int count_methods_allocated_by_lsra;
130 extern int count_mem_move_bb;
131 extern int count_interface_size;
132 extern int count_argument_mem_ss;
133 extern int count_argument_reg_ss;
134 extern int count_method_in_register;
135 extern int count_mov_reg_reg;
136 extern int count_mov_mem_reg;
137 extern int count_mov_reg_mem;
138 extern int count_mov_mem_mem;
140 extern int count_jit_calls;
141 extern int count_methods;
142 extern int count_spills;
143 extern int count_spills_read;
144 extern int count_pcmd_activ;
145 extern int count_pcmd_drop;
146 extern int count_pcmd_zero;
147 extern int count_pcmd_const_store;
148 extern int count_pcmd_const_alu;
149 extern int count_pcmd_const_bra;
150 extern int count_pcmd_load;
151 extern int count_pcmd_move;
152 extern int count_load_instruction;
153 extern int count_pcmd_store;
154 extern int count_pcmd_store_comb;
155 extern int count_dup_instruction;
156 extern int count_pcmd_op;
157 extern int count_pcmd_mem;
158 extern int count_pcmd_met;
159 extern int count_pcmd_bra;
160 extern int count_pcmd_table;
161 extern int count_pcmd_return;
162 extern int count_pcmd_returnx;
163 extern int count_check_null;
164 extern int count_check_bound;
165 extern int count_max_basic_blocks;
166 extern int count_basic_blocks;
167 extern int count_max_javainstr;
168 extern int count_javainstr;
169 extern int count_javacodesize;
170 extern int count_javaexcsize;
171 extern int count_calls;
172 extern int count_tryblocks;
173 extern int count_code_len;
174 extern int count_data_len;
175 extern int count_cstub_len;
176 extern int count_max_new_stack;
177 extern int count_upper_bound_new_stack;
179 extern s4 count_branches_resolved;
180 extern s4 count_branches_unresolved;
182 extern int *count_block_stack;
183 extern int *count_analyse_iterations;
184 extern int *count_method_bb_distribution;
185 extern int *count_block_size_distribution;
186 extern int *count_store_length;
187 extern int *count_store_depth;
188 /* in_ inline statistics */
190 extern int count_in_uniqVirt;
191 extern int count_in_uniqIntf;
192 extern int count_in_rejected;
193 extern int count_in_rejected_mult;
194 extern int count_in_outsiders;
195 extern int count_in_uniqueVirt_not_inlined;
196 extern int count_in_uniqueInterface_not_inlined;
197 extern int count_in_maxDepth;
198 extern int count_in_maxMethods;
200 extern u2 count_in_not [512];
202 /* instruction scheduler statistics *******************************************/
204 extern s4 count_schedule_basic_blocks;
205 extern s4 count_schedule_nodes;
206 extern s4 count_schedule_leaders;
207 extern s4 count_schedule_max_leaders;
208 extern s4 count_schedule_critical_path;
211 /* function prototypes ********************************************************/
215 void loadingtime_start(void);
216 void loadingtime_stop(void);
217 void compilingtime_start(void);
218 void compilingtime_stop(void);
220 void print_times(void);
221 void print_stats(void);
223 void statistics_print_date(void);
224 void statistics_print_memory_usage(void);
225 void statistics_print_gc_memory_usage(void);
227 void mem_usagelog(bool givewarnings);
229 void nativeinvokation(void);
230 void compiledinvokation(void);
231 void jnicallXmethodnvokation(void);
232 void jniinvokation(void);
234 #endif /* _STATISTICS_H */
238 * These are local overrides for various environment variables in Emacs.
239 * Please do not remove this and leave it at the end of the file, where
240 * Emacs will automagically detect them.
241 * ---------------------------------------------------------------------
244 * indent-tabs-mode: t