< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ExceptionHandlerStub.java

Print this page

        

*** 85,105 **** protected Object getConstantParameterValue(int index, String name) { if (index == 2) { return providers.getRegisters().getThreadRegister(); } assert index == 3; ! return options; } @Snippet ! private static void exceptionHandler(Object exception, Word exceptionPc, @ConstantParameter Register threadRegister, @ConstantParameter OptionValues options) { Word thread = registerAsWord(threadRegister); checkNoExceptionInThread(thread, assertionsEnabled(INJECTED_VMCONFIG)); checkExceptionNotNull(assertionsEnabled(INJECTED_VMCONFIG), exception); writeExceptionOop(thread, exception); writeExceptionPc(thread, exceptionPc); ! if (logging(options)) { printf("handling exception %p (", Word.objectToTrackedPointer(exception).rawValue()); decipher(Word.objectToTrackedPointer(exception).rawValue()); printf(") at %p (", exceptionPc.rawValue()); decipher(exceptionPc.rawValue()); printf(")\n"); --- 85,105 ---- protected Object getConstantParameterValue(int index, String name) { if (index == 2) { return providers.getRegisters().getThreadRegister(); } assert index == 3; ! return StubOptions.TraceExceptionHandlerStub.getValue(options); } @Snippet ! private static void exceptionHandler(Object exception, Word exceptionPc, @ConstantParameter Register threadRegister, @ConstantParameter boolean logging) { Word thread = registerAsWord(threadRegister); checkNoExceptionInThread(thread, assertionsEnabled(INJECTED_VMCONFIG)); checkExceptionNotNull(assertionsEnabled(INJECTED_VMCONFIG), exception); writeExceptionOop(thread, exception); writeExceptionPc(thread, exceptionPc); ! if (logging) { printf("handling exception %p (", Word.objectToTrackedPointer(exception).rawValue()); decipher(Word.objectToTrackedPointer(exception).rawValue()); printf(") at %p (", exceptionPc.rawValue()); decipher(exceptionPc.rawValue()); printf(")\n");
*** 108,118 **** // patch throwing pc into return address so that deoptimization finds the right debug info patchReturnAddress(exceptionPc); Word handlerPc = exceptionHandlerForPc(EXCEPTION_HANDLER_FOR_PC, thread); ! if (logging(options)) { printf("handler for exception %p at %p is at %p (", Word.objectToTrackedPointer(exception).rawValue(), exceptionPc.rawValue(), handlerPc.rawValue()); decipher(handlerPc.rawValue()); printf(")\n"); } --- 108,118 ---- // patch throwing pc into return address so that deoptimization finds the right debug info patchReturnAddress(exceptionPc); Word handlerPc = exceptionHandlerForPc(EXCEPTION_HANDLER_FOR_PC, thread); ! if (logging) { printf("handler for exception %p at %p is at %p (", Word.objectToTrackedPointer(exception).rawValue(), exceptionPc.rawValue(), handlerPc.rawValue()); decipher(handlerPc.rawValue()); printf(")\n"); }
*** 141,155 **** if (enabled && exception == null) { fatal("exception must not be null"); } } - @Fold - static boolean logging(OptionValues options) { - return StubOptions.TraceExceptionHandlerStub.getValue(options); - } - /** * Determines if either Java assertions are enabled for Graal or if this is a HotSpot build * where the ASSERT mechanism is enabled. */ @Fold --- 141,150 ----
< prev index next >