Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 /* reprentation of a counter group - */ 00036 00037 typedef struct { 00038 int * counter ; /* the array of counters - cumulative across PUs */ 00039 int * saved ; /* counter values from previous PU */ 00040 const int * flags ; /* flags associated with counter */ 00041 char ** string ; /* array of strings associated with counters */ 00042 char ** misc_str; /* array(3) of header string & 2 summation strs */ 00043 int num ; /* number of counters. */ 00044 int svd_sum ; /* previous SUM */ 00045 } CTR ; 00046 00047 00048 #define CTR_count(c1,c2) ((c1)->counter[c2]) 00049 #define CTR_saved(c1,c2) ((c1)->saved[c2]) 00050 #define CTR_str(c1,c2) ((c1)->string[c2]) 00051 #define CTR_misc_str(c1,c2)((c1)->misc_str[c2]) 00052 #define CTR_num(c1) ((c1)->num) 00053 #define CTR_saved_sum(c1) ((c1)->svd_sum) 00054 00055 #define ADDTOSUM 0x1 00056 00057 #define CTR_add_to_sum(c1,c2) ((c1)->flags[c2] & ADDTOSUM) 00058 00059 00060 /*........ TY counter group declaration.......... */ 00061 00062 int cwh_stat_ty_c[c_TY_LAST]; /* array of counters (external) */ 00063 00064 static int cwh_stat_ty_last[c_TY_LAST]; /* saved array of counters */ 00065 00066 static const int cwh_stat_ty_flags[c_TY_LAST] = { /* flags for printing counters */ 00067 ADDTOSUM, 00068 ADDTOSUM, 00069 ADDTOSUM, 00070 ADDTOSUM, 00071 ADDTOSUM, 00072 ADDTOSUM, 00073 ADDTOSUM, 00074 ADDTOSUM, 00075 ADDTOSUM, 00076 0,0,0,0,0,0} ; 00077 00078 static char * cwh_stat_ty_c_TY_string[c_TY_LAST] = { /* string printed with counter */ 00079 " array : %6d (+%4d) \n", 00080 " ptr : %6d (+%4d) \n", 00081 " f90ptr : %6d (+%4d) \n", 00082 " procedure : %6d (+%4d) \n", 00083 " mis + log : %6d (+%4d) \n", 00084 " struct : %6d (+%4d) \n", 00085 " ty_copy : %6d (+%4d) \n", 00086 " uniq ptr : %6d (+%4d) \n", 00087 " d_type : %6d (+%4d) \n", 00088 " match array : %6d (+%4d) \n", 00089 " match dope : %6d (+%4d) \n", 00090 " match other : %6d (+%4d) \n", 00091 " cleared : %6d (+%4d) \n", 00092 " reused : %6d (+%4d) \n", 00093 " f90ptr nomat: %6d (+%4d) \n", 00094 }; 00095 00096 static char * cwh_stat_ty_misc_string[3] = { /* header & summation string */ 00097 " TY details \n", 00098 " ----------------------------\n", 00099 " %6d (+%4d) \n\n" 00100 }; 00101 00102 static CTR ty_c = { cwh_stat_ty_c, /* details of TY counters */ 00103 cwh_stat_ty_last, 00104 cwh_stat_ty_flags, 00105 cwh_stat_ty_c_TY_string, 00106 cwh_stat_ty_misc_string, 00107 c_TY_LAST, 00108 0, 00109 } ; 00110 00111 00112 00113 /* forward definitions */ 00114 00115 static void cwh_stats_print_details( CTR * cp ) ; 00116 00117