@@ -752,7 +752,7 @@ private static int determineITableStartingIndex(DynamicHub thisHub, int interfac
752752 }
753753
754754 public static Object dispatchInvocation (InterpreterResolvedJavaMethod seedMethod , Object [] calleeArgs , boolean isVirtual0 , boolean forceStayInInterpreter , boolean preferStayInInterpreter ,
755- boolean isInvokeInterface )
755+ boolean isInvokeInterface , boolean quiet )
756756 throws SemanticJavaException {
757757 boolean goThroughPLT ;
758758 boolean isVirtual = isVirtual0 ;
@@ -779,7 +779,9 @@ public static Object dispatchInvocation(InterpreterResolvedJavaMethod seedMethod
779779 if (goThroughPLT ) {
780780 if (seedMethod .hasNativeEntryPoint ()) {
781781 calleeFtnPtr = seedMethod .getNativeEntryPoint ();
782- traceInterpreter ("got native entry point: " ).hex (calleeFtnPtr ).newline ();
782+ if (!quiet ) {
783+ traceInterpreter ("got native entry point: " ).hex (calleeFtnPtr ).newline ();
784+ }
783785 } else if (seedMethod .getVTableIndex () == VTBL_NO_ENTRY ) {
784786 /*
785787 * does not always hold. Counter example: j.io.BufferedWriter::min, because it gets
@@ -790,15 +792,15 @@ public static Object dispatchInvocation(InterpreterResolvedJavaMethod seedMethod
790792 goThroughPLT = false ;
791793
792794 /* arguments to Log methods might have side-effects */
793- if (InterpreterTraceSupport .getValue ()) {
795+ if (InterpreterTraceSupport .getValue () && ! quiet ) {
794796 traceInterpreter ("fall back to interp for compile entry " ).string (seedMethod .toString ()).string (" because it has not been compiled." ).newline ();
795797 }
796798 } else if (seedMethod .getVTableIndex () == VTBL_ONE_IMPL ) {
797799 goThroughPLT = seedMethod .getOneImplementation ().hasNativeEntryPoint ();
798800 } else if (!isVirtual && seedMethod .hasVTableIndex ()) {
799801 goThroughPLT = false ;
800802 /* arguments to Log methods might have side-effects */
801- if (InterpreterTraceSupport .getValue ()) {
803+ if (InterpreterTraceSupport .getValue () && ! quiet ) {
802804 traceInterpreter ("invokespecial: " ).string (seedMethod .toString ()).newline ();
803805 }
804806 } else if (isVirtual && !seedMethod .hasVTableIndex ()) {
@@ -810,7 +812,7 @@ public static Object dispatchInvocation(InterpreterResolvedJavaMethod seedMethod
810812 if (isVirtual && (seedMethod .isFinalFlagSet () || calleeArgs [0 ].getClass ().isArray () || seedDeclaringClass .isLeaf () || seedMethod .isPrivate ())) {
811813 isVirtual = false ;
812814 /* arguments to Log methods might have side-effects */
813- if (InterpreterTraceSupport .getValue ()) {
815+ if (InterpreterTraceSupport .getValue () && ! quiet ) {
814816 traceInterpreter ("reverting virtual call to invokespecial: " ).string (seedMethod .toString ()).newline ();
815817 }
816818 }
@@ -835,7 +837,7 @@ public static Object dispatchInvocation(InterpreterResolvedJavaMethod seedMethod
835837 goThroughPLT = false ;
836838
837839 /* arguments to Log methods might have side-effects */
838- if (InterpreterTraceSupport .getValue ()) {
840+ if (InterpreterTraceSupport .getValue () && ! quiet ) {
839841 traceInterpreter ("fall back to interp (vtable entry) for compile entry " ).string (seedMethod .toString ()).string (" because it has not been compiled." ).newline ();
840842 }
841843 }
@@ -846,7 +848,7 @@ public static Object dispatchInvocation(InterpreterResolvedJavaMethod seedMethod
846848 } else if (seedMethod .getVTableIndex () == VTBL_ONE_IMPL ) {
847849 targetMethod = seedMethod .getOneImplementation ();
848850 /* arguments to Log methods might have side-effects */
849- if (InterpreterTraceSupport .getValue ()) {
851+ if (InterpreterTraceSupport .getValue () && ! quiet ) {
850852 traceInterpreter ("found oneImpl: " ).string (targetMethod .toString ());
851853 if (goThroughPLT ) {
852854 calleeFtnPtr = targetMethod .getNativeEntryPoint ();
@@ -860,7 +862,7 @@ public static Object dispatchInvocation(InterpreterResolvedJavaMethod seedMethod
860862 if (!targetMethod .hasBytecodes () && !goThroughPLT && calleeFtnPtr .isNonNull ()) {
861863 goThroughPLT = true ;
862864 /* arguments to Log methods might have side-effects */
863- if (InterpreterTraceSupport .getValue ()) {
865+ if (InterpreterTraceSupport .getValue () && ! quiet ) {
864866 traceInterpreter ("cannot interpret " ).string (targetMethod .toString ()).string (" falling back to compiled version " ).hex (calleeFtnPtr ).newline ();
865867 }
866868 }
@@ -874,7 +876,7 @@ public static Object dispatchInvocation(InterpreterResolvedJavaMethod seedMethod
874876 }
875877
876878 /* arguments to Log methods might have side-effects */
877- if (InterpreterOptions .InterpreterTraceSupport .getValue ()) {
879+ if (InterpreterOptions .InterpreterTraceSupport .getValue () && ! quiet ) {
878880 traceInterpreter (" " .repeat (Interpreter .logIndent .get ()))
879881 .string (" -> calling (" )
880882 .string (goThroughPLT ? "plt" : "interp" ).string (") " )
0 commit comments