Stepping in debugger switches to interpretation mode

Maksim Zuev maksim.zuev at jetbrains.com
Fri May 31 12:44:23 UTC 2024


Dear Sir/Madam,

I encountered a problem while debugging the code. I am attaching the
reproducer to this email in the* Main.java file*.

When running it with the debugger without stepping, the application runs in
less than a second (see jdb output in the *jdb_run.txt *file). However,
after performing a single step, the application is running in
interpretation mode, becoming very slow (see jdb output in the
*jdb_step.txt* file).

I assume running in the interpreter mode, as I see
*InterpreterRuntime::post_method_exit*
calls in the profiler.

Could you please help me figure out what causes the application to run in
the interpreter mode? Is this a bug or an expected behavior? Are there any
ways to work around this issue?

Best regards,
Maksim Zuev
Software developer at JetBrains
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/serviceability-dev/attachments/20240531/8295fd61/attachment.htm>
-------------- next part --------------
Initializing jdb ...
> stop at Main:7
Deferring breakpoint Main:7.
It will be set after the class is loaded.
> run
run Main
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Set deferred breakpoint Main:7

Breakpoint hit: "thread=main", Main.main(), line=7 bci=0
7            int x = 1;

main[1] cont
> 3cc8b2e70ead788fba06f607b827bd8dcb06c6b3b234578b1200b793c75ef999
173ms

The application exited
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main.java
Type: application/octet-stream
Size: 962 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/serviceability-dev/attachments/20240531/8295fd61/Main.java>
-------------- next part --------------
Initializing jdb ...
> stop at Main:7
Deferring breakpoint Main:7.
It will be set after the class is loaded.
> run
run Main
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
>
VM Started: Set deferred breakpoint Main:7

Breakpoint hit: "thread=main", Main.main(), line=7 bci=0
7            int x = 1;

main[1] next
>
Step completed: "thread=main", Main.main(), line=9 bci=2
9            long start = System.currentTimeMillis();

main[1] cont
> 3cc8b2e70ead788fba06f607b827bd8dcb06c6b3b234578b1200b793c75ef999
51212ms

The application exited


More information about the serviceability-dev mailing list