X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fstatistics.h;h=fbe035a9eb877a6e9495dff2223604311c64d916;hb=71f58437848c55c6080febb791b2646b4de46e95;hp=43b76eb5c6ba4c65502aabbd0d12d361c53e13cc;hpb=d75b6037acf17c342166b9c9bd6e657dfdd12cd9;p=cacao.git diff --git a/src/vm/statistics.h b/src/vm/statistics.h index 43b76eb5c..fbe035a9e 100644 --- a/src/vm/statistics.h +++ b/src/vm/statistics.h @@ -1,9 +1,9 @@ -/* statistics.h - exports global varables for statistics +/* src/vm/statistics.h - exports global varables for statistics - Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates, - R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner, - C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger, - Institut f. Computersprachen - TU Wien + Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel, + C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, + E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, + J. Wenninger, Institut f. Computersprachen - TU Wien This file is part of CACAO. @@ -19,14 +19,14 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. - Contact: cacao@complang.tuwien.ac.at + Contact: cacao@cacaojvm.org Authors: Christian Thalinger - $Id: statistics.h 1735 2004-12-07 14:33:27Z twisti $ + $Id: statistics.h 6080 2006-11-28 22:28:52Z twisti $ */ @@ -34,21 +34,73 @@ #ifndef _STATISTICS_H #define _STATISTICS_H +#include "config.h" +#include "vm/types.h" -#include "global.h" +#include "vm/global.h" -/* global variables */ +/* statistic macros ***********************************************************/ + +#if defined(ENABLE_STATISTICS) +#define STATISTICS(x) \ + do { \ + if (opt_stat) { \ + x; \ + } \ + } while (0) +#else +#define STATISTICS(x) /* nothing */ +#endif + +/* in_ inline statistics */ + +#define IN_MAX 9 +#define IN_UNIQUEVIRT 0x0000 +#define IN_UNIQUE_INTERFACE 0x0001 +#define IN_OUTSIDERS 0x0004 +#define IN_MAXDEPTH 0x0008 +#define IN_MAXCODE 0x0010 +#define IN_JCODELENGTH 0x0020 +#define IN_EXCEPTION 0x0040 +#define IN_NOT_UNIQUE_VIRT 0x0080 +#define IN_NOT_UNIQUE_INTERFACE 0x0100 + +#define N_UNIQUEVIRT 0 +#define N_UNIQUE_INTERFACE 1 +#define N_OUTSIDERS 2 +#define N_MAXDEPTH 3 +#define N_MAXCODE 4 +#define N_JCODELENGTH 5 +#define N_EXCEPTION 6 +#define N_NOT_UNIQUE_VIRT 7 +#define N_NOT_UNIQUE_INTERFACE 8 + + +/* global variables ***********************************************************/ + +extern s4 codememusage; +extern s4 maxcodememusage; extern s4 memoryusage; extern s4 maxmemusage; + extern s4 maxdumpsize; extern s4 globalallocateddumpsize; extern s4 globaluseddumpsize; -extern int count_class_infos; /* variables for measurements */ + +/* variables for measurements *************************************************/ + +extern s4 size_classinfo; +extern s4 size_fieldinfo; +extern s4 size_methodinfo; +extern s4 size_codeinfo; + extern int count_const_pool_len; +extern int count_classref_len; +extern int count_parsed_desc_len; extern int count_vftbl_len; extern int count_all_methods; extern int count_methods_marked_used; /*RTA*/ @@ -61,9 +113,26 @@ extern int count_utf_len; /* size of utf hash */ extern int count_utf_new; extern int count_utf_new_found; +extern int count_locals_conflicts; +extern int count_locals_spilled; +extern int count_locals_register; +extern int count_ss_spilled; +extern int count_ss_register; +extern int count_methods_allocated_by_lsra; +extern int count_mem_move_bb; +extern int count_interface_size; +extern int count_argument_mem_ss; +extern int count_argument_reg_ss; +extern int count_method_in_register; +extern int count_mov_reg_reg; +extern int count_mov_mem_reg; +extern int count_mov_reg_mem; +extern int count_mov_mem_mem; + extern int count_jit_calls; extern int count_methods; extern int count_spills; +extern int count_spills_read; extern int count_pcmd_activ; extern int count_pcmd_drop; extern int count_pcmd_zero; @@ -99,28 +168,59 @@ extern int count_cstub_len; extern int count_nstub_len; extern int count_max_new_stack; extern int count_upper_bound_new_stack; + +extern s4 count_branches_resolved; +extern s4 count_branches_unresolved; + extern int *count_block_stack; extern int *count_analyse_iterations; extern int *count_method_bb_distribution; extern int *count_block_size_distribution; extern int *count_store_length; extern int *count_store_depth; + /* in_ inline statistics */ +extern int count_in; +extern int count_in_uniqVirt; +extern int count_in_uniqIntf; +extern int count_in_rejected; +extern int count_in_rejected_mult; +extern int count_in_outsiders; +extern int count_in_uniqueVirt_not_inlined; +extern int count_in_uniqueInterface_not_inlined; +extern int count_in_maxDepth; +extern int count_in_maxMethods; + +extern u2 count_in_not [512]; +/* instruction scheduler statistics *******************************************/ -/* function prototypes */ +extern s4 count_schedule_basic_blocks; +extern s4 count_schedule_nodes; +extern s4 count_schedule_leaders; +extern s4 count_schedule_max_leaders; +extern s4 count_schedule_critical_path; -s8 getcputime(); -void loadingtime_start(); -void loadingtime_stop(); -void compilingtime_start(); -void compilingtime_stop(); +/* function prototypes ********************************************************/ -void print_times(); -void print_stats(); +s8 getcputime(void); + +void loadingtime_start(void); +void loadingtime_stop(void); +void compilingtime_start(void); +void compilingtime_stop(void); + +void print_times(void); +void print_stats(void); void mem_usagelog(bool givewarnings); - + + +void nativeinvokation(void); +void compiledinvokation(void); +void jnicallXmethodnvokation(void); +void jniinvokation(void); + #endif /* _STATISTICS_H */