JDK-8292880 : Improve debuggee logging for com/sun/jdi/ClassUnloadEventTest.java
  • Type: Sub-task
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-08-24
  • Updated: 2022-12-01
  • Resolved: 2022-08-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 20
17.0.6Fixed 20 b13Fixed
Description
The debuggee should log class unloads (-Xlog:class+unload=info) and the debugger should print the debuggee output.
Comments
Fix request [17u] on behalf of Andrew Dinn Required follow up of JDK-8256811.
28-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/827 Date: 2022-10-24 16:25:09 +0000
25-10-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/825 Date: 2022-10-24 15:54:58 +0000
24-10-2022

Changeset: 3e187730 Author: Chris Plummer <cjplummer@openjdk.org> Date: 2022-08-25 22:54:29 +0000 URL: https://git.openjdk.org/jdk/commit/3e187730162965981a5e6d238935e46d1015708e
25-08-2022

With these changes the output will look like this: ----------System.out:(28/2145)---------- Running debugger EventSet: event set, policy:2, count:1 = {VMStartEvent in thread main} EventSet: event set, policy:0, count:1 = {ClassUnloadEvent} EventSet: event set, policy:0, count:1 = {ClassUnloadEvent} EventSet: event set, policy:0, count:2 = {ClassUnloadEvent, ClassUnloadEvent} EventSet: event set, policy:0, count:2 = {ClassUnloadEvent, ClassUnloadEvent} EventSet: event set, policy:0, count:1 = {ClassUnloadEvent} EventSet: event set, policy:0, count:2 = {ClassUnloadEvent, ClassUnloadEvent} EventSet: event set, policy:0, count:2 = {ClassUnloadEvent, ClassUnloadEvent} EventSet: event set, policy:0, count:1 = {ClassUnloadEvent} EventSet: event set, policy:0, count:1 = {ClassUnloadEvent} EventSet: event set, policy:0, count:2 = {ClassUnloadEvent, ClassUnloadEvent} EventSet: event set, policy:0, count:1 = {VMDeathEvent} stdout: Running debuggee stdout: [0.536s][info][class,unload] unloading class SampleClass__9 0x0000000801003c30 stdout: [0.536s][info][class,unload] unloading class SampleClass__8 0x0000000801003a28 stdout: [0.536s][info][class,unload] unloading class SampleClass__7 0x0000000801003820 stdout: [0.536s][info][class,unload] unloading class SampleClass__6 0x0000000801003618 stdout: [0.536s][info][class,unload] unloading class SampleClass__5 0x0000000801003410 stdout: [0.536s][info][class,unload] unloading class SampleClass__Alt__4 0x0000000801003208 stdout: [0.536s][info][class,unload] unloading class SampleClass__Alt__3 0x0000000801003000 stdout: [0.536s][info][class,unload] unloading class SampleClass__Alt__2 0x0000000801002c10 stdout: [0.536s][info][class,unload] unloading class SampleClass__Alt__1 0x0000000801002a08 stdout: [0.536s][info][class,unload] unloading class SampleClass__Alt__0 0x0000000801002800 stdout: [0.536s][info][class,unload] unloading class java.lang.invoke.LambdaForm$MH/0x0000000801001c00 0x0000000801001c00 stdout: [0.536s][info][class,unload] unloading class java.lang.invoke.LambdaForm$MH/0x0000000801001800 0x0000000801001800 stdout: [0.536s][info][class,unload] unloading class java.lang.invoke.LambdaForm$MH/0x0000000801001000 0x0000000801001000 stdout: Exiting debuggee When it fails due to JDK-8292879 you only see: ----------System.out:(8/568)---------- Running debugger EventSet: event set, policy:2, count:1 = {VMStartEvent in thread main} EventSet: event set, policy:0, count:1 = {VMDeathEvent} stdout: Running debuggee stdout: [2.187s][info][class,unload] unloading class java.lang.invoke.LambdaForm$MH/0x0000000801001c00 0x0000000801001c00 stdout: [2.187s][info][class,unload] unloading class java.lang.invoke.LambdaForm$MH/0x0000000801001800 0x0000000801001800 stdout: [2.187s][info][class,unload] unloading class java.lang.invoke.LambdaForm$MH/0x0000000801001000 0x0000000801001000 stdout: Exiting debuggee
24-08-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10004 Date: 2022-08-24 18:57:13 +0000
24-08-2022