X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fjit%2Finline%2FparseRTstats.c;h=f5285b7675e0b597ffd39e5b8b3dc3f57714427e;hb=c9f54ea803349bce494c1f344846c07a36218590;hp=a3ce7b3c5b284fab529caf4bbed5cc66ef7c385a;hpb=8e6c9c1f3519fcd22ff2edc3589489a7c3547208;p=cacao.git diff --git a/src/vm/jit/inline/parseRTstats.c b/src/vm/jit/inline/parseRTstats.c index a3ce7b3c5..f5285b767 100644 --- a/src/vm/jit/inline/parseRTstats.c +++ b/src/vm/jit/inline/parseRTstats.c @@ -26,12 +26,15 @@ 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 ----------------------------------------------------------*/ @@ -76,28 +79,12 @@ int RTmethodAbstract = 0; 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); @@ -106,8 +93,9 @@ void printXTACallgraph () method_display(XTAcallgraph[i]); } + printf("----- end of XTA Callgraph Worklist:<%i>\n",methXTAlast); printf("\n\n"); - } +// } } /*-----------------------------------------------------------------------------------------------*/ @@ -127,7 +115,7 @@ void printCallgraph () printf("\n\n"); } /*--------------------------------------------------------------*/ -void printObjectClassHeirarchy1() { +void printObjectClassHeirarchyAll() { if (pStats >= 1) { unRTclassHeirCnt=0; unRTmethodCnt = 0; @@ -197,7 +185,7 @@ int subdefd(methodinfo *meth) { /*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) { @@ -341,10 +329,15 @@ void printRTClassHeirarchy(classinfo *class) { 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); + } } } } @@ -438,7 +431,7 @@ void printRTInterfaceClasses() { 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; @@ -509,6 +502,7 @@ void printRThierarchyInfo(methodinfo *m) { } if (pClassHeirStatsOnly >= 1) { /*-- statistic results --*/ + if (opt_rt) printRTInterfaceClasses(); printf("\n >>>>>>>>>>>>>>>>>>>> Analysed Class Hierarchy Statistics:\n");