Authors: Carolyn Oates
- $Id: parseRTstats.c 601 2003-11-11 19:03:30Z carolyn $
+ $Id: parseRTstats.c 1235 2004-06-30 19:52:18Z twisti $
*/
-#include "parseRT.h"
+#include "options.h"
+#include "jit/parseRT.h"
+#include "jit/parseRTstats.h"
+
/*--- Statistics ----------------------------------------------------------*/
int subRedefsCnt =0;
int subRedefsCntUsed =0;
-/*------------- RTAprint flags ------------------------------------------------------------------*/
-int pCallgraph = 0; /* 0 - dont print 1 - print at end from main */
- /* 2 - print at end of RT parse call */
- /* 3- print after each method RT parse */
-int pClassHeir = 1; /* 0 - dont print 1 - print at end from main */
- /* 2 - print at end of RT parse call 3-print after each method RT parse */
-int pClassHeirStatsOnly = 1; /* usually 2 Print only the statistical summary info for class heirarchy */
-
-int pOpcodes = 0; /* 0 - don't print 1- print in parse RT 2- print in parse */
- /* 3 - print in both */
-int pWhenMarked = 0; /* 0 - don't print 1 - print when added to callgraph + when native parsed*/
- /* 2 - print when marked+methods called */
- /* 3 - print when class/method looked at */
-int pStats = 0; /* 0 - don't print; 1= analysis only; 2= whole unanalysed class heirarchy*/
-
-/*-----------------------------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------------------------------*/
-void printXTACallgraph ()
+void printXTACallgraph()
{
int i;
- if (XTAdebug >= 1) {
+// if (XTAdebug >= 1) {
printf("----- XTA Callgraph Worklist:<%i>\n",methXTAlast);
for (i=0;i<=methXTAlast;i++) {
printf(" (%i): ",i);
method_display(XTAcallgraph[i]);
}
+ printf("----- end of XTA Callgraph Worklist:<%i>\n",methXTAlast);
printf("\n\n");
- }
+// }
}
/*-----------------------------------------------------------------------------------------------*/
printf("\n\n");
}
/*--------------------------------------------------------------*/
-void printObjectClassHeirarchy1() {
+void printObjectClassHeirarchyAll() {
if (pStats >= 1) {
unRTclassHeirCnt=0;
unRTmethodCnt = 0;
/*printf("s exist for:");utf_display(meth->class->name);printf(".");method_display(meth);*/
for (subs = meth->class->sub;subs != NULL;subs = subs->nextsub) {
- submeth = class_findmethod(subs, meth->name, meth->descriptor);
+ submeth = class_fetchmethod(subs, meth->name, meth->descriptor);
if (submeth != NULL) {
subRedefsCnt++;
if (submeth->methodUsed == USED) {
printf("\t\t");
if (meth->monoPoly != MONO) printf("\t\tRedefs used/total<%i/%i>\t", meth->subRedefsUsed, meth->subRedefs);
if ( (XTAOPTbypass3) || (opt_xta)) {
- if (meth->xta->XTAclassSet == NULL)
+ if (meth->xta == NULL) {
printf("class set never created\n");
- else
- printSet(meth->xta->XTAclassSet->head);
+ }
+ else {
+ if (meth->xta->XTAclassSet == NULL)
+ printf("class set never created\n");
+ else
+ printSet(meth->xta->XTAclassSet->head);
+ }
}
}
}
inBy = ici->impldBy;
cii = inBy->classType;
- mii = class_findmethod(cii, imi->name, imi->descriptor);
+ mii = class_fetchmethod(cii, imi->name, imi->descriptor);
if (mii == NULL) {
/* assume its resolved up the heirarchy and just 1 possiblity so MONO1 */
imi->monoPoly = MONO1;
}
if (pClassHeirStatsOnly >= 1) {
/*-- statistic results --*/
+ if (opt_rt)
printRTInterfaceClasses();
printf("\n >>>>>>>>>>>>>>>>>>>> Analysed Class Hierarchy Statistics:\n");