JDK-8350006 : IGV: show memory slices as type information
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-02-13
  • Updated: 2025-04-29
  • Resolved: 2025-02-19
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 25
25 b11Fixed
Related Reports
Relates :  
Description
When analyzing the memory subgraph, it is often useful to examine the memory slices of the different memory definitions. This information can be presented as part of the "Show types" filter that is already available in IGV.
Comments
Changeset: 0ef1c409 Branch: master Author: Roberto Castañeda Lozano <rcastanedalo@openjdk.org> Date: 2025-02-19 09:17:27 +0000 URL: https://git.openjdk.org/jdk/commit/0ef1c40991e703592fc79325bda1a6d2fc6caf4e
19-02-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23621 Date: 2025-02-13 19:47:25 +0000
14-02-2025

Here is a proof-of-concept of the "Show types" filter showing memory slices: // This filter appends simplified type information to the (possibly already // existing) extra-label line. // If the phase type is available, show it. If the bottom type is available and // differs from the bottom type, show it too (prefixed with 'B:'). // Simplify a reference type of the form // "[5:]my/package/Class (package1/Class1,package2/Class2,..)" // into // "[5:]Class" function simplify_reference_type(type) { // Clean up interface lists in reference types. var m = /(.*)\(.*\)(.*)/.exec(type); if (m != null && typeof m[1] != 'undefined' && typeof m[2] != 'undefined') { type = m[1] + m[2]; } // Remove package name in reference types. var m2 = /(\d+:)?.*\/(.*)/.exec(type); if (m2 != null && typeof m2[2] != 'undefined') { type = (typeof m2[1] != 'undefined' ? m2[1] : "") + m2[2]; } return type; } // Remove fixed input types for calls and simplify references. function simplifyType(type) { var callTypeStart = "{0:control, 1:abIO, 2:memory, 3:rawptr:BotPTR, 4:return_address"; if (type.startsWith(callTypeStart)) { // Exclude types of the first five outputs of call-like nodes. type = type.replace(callTypeStart, "").replace("}", ""); prefix = ", "; if (type.startsWith(prefix)) { type = type.slice(prefix.length); } components = type.split(", "); for (i = 0; i < components.length; i++) { components[i] = simplify_reference_type(components[i]); } type = "{" + components.join(", ") + "}"; } else { type = simplify_reference_type(type); } type = type.replace(">=", "≥").replace("<=", "≤"); return type; } // Merge a possibly existing extra label, bottom type, and phase type into a // new, single extra label. function mergeAndAppendTypeInfo(extra_label, bottom_type, phase_type, category, dump_spec) { if (category == "memory") { m = /idx=([^\s]+);/.exec(dump_spec); if (m != null) { new_extra_label = extra_label == null ? "" : (extra_label + " "); return new_extra_label + "mem: " + m[1]; } } if (phase_type == null && bottom_type == null) { return extra_label; } type = ""; // Always show phase type, if available. if (phase_type != null) { type += simplifyType(phase_type); } // Show bottom type, if available and different from phase type. if (bottom_type != null && bottom_type != phase_type) { if (phase_type != null) { type += " | "; } type += "B: "; type += simplifyType(bottom_type); } new_extra_label = extra_label == null ? "" : (extra_label + " "); return new_extra_label + type; } editProperty(not(or([matches("bottom_type", "bottom"), matches("bottom_type", "abIO")])), ["extra_label", "bottom_type", "phase_type", "category", "dump_spec"], "extra_label", function(propertyValues) {return mergeAndAppendTypeInfo(propertyValues[0], propertyValues[1], propertyValues[2], propertyValues[3], propertyValues[4]);});
13-02-2025