JDK-8293669 : SA: Remove unnecssary "InstanceStackChunkKlass: InstanceStackChunkKlass" output when scanning heap
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: svc-agent
  • Affected Version: 19,20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-09-12
  • Updated: 2022-09-19
  • Resolved: 2022-09-12
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 20
20 b15Fixed
Description
When executing clhsdb commands that walk the heap, such as scanoops or dumpheap, you will see the following in the output just once (and only the first time the command is executed):

InstanceStackChunkKlass: InstanceStackChunkKlass

It comes from InstanceStackChunkKlass.initialize():

  private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
    // Just make sure it's there for now
    Type type = db.lookupType("InstanceStackChunkKlass");
    java.lang.Thread.currentThread().dumpStack();
    System.out.println("InstanceStackChunkKlass: " + type);
  }

It's purpose was really just a reminder that SA still does not scan virtual thread StackChunks. We have JDK-8261848 to cover that. Note the presence of the output happens even if virtual threads are not used, so it should be removed.
Comments
Changeset: 526eb54f Author: Chris Plummer <cjplummer@openjdk.org> Date: 2022-09-12 23:56:45 +0000 URL: https://git.openjdk.org/jdk/commit/526eb54fc3d0a96e228a57e20facfccd83fb8081
12-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/10245 Date: 2022-09-12 21:11:37 +0000
12-09-2022