RFR: 8365400: enhance JFR to emit file and module metadata for class loading

Alan Bateman alanb at openjdk.org
Fri Oct 10 15:16:03 UTC 2025


On Fri, 10 Oct 2025 14:44:04 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

> Can you please give an example URL for a class definition? I am concerned about whether this is high cardinality strings (for path/name.class) or a lot of reuse (for paths). We should only represent a URL once, which makes me think that the field type should be symbol instead of string.

Run with`-Xlog:class+load` to see examples of the code source. For classes loaded from modules in the run-time image then you'll see values of the form `jrt:/$MODULE`, e.g. `jrt:/java.base` or `jrt:/java.destop` (classes loaded from the AOT have something like "shared objects file"). The code source for classes loaded from JAR files is the path to the JAR file, e.g. 
`file:/lib/foo.jar`. When classes loaded from the file system then it will be the directory specified to the class path, e.g. `file:/d/classes/`.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/27738#issuecomment-3390702449


More information about the hotspot-dev mailing list