[jdk8u-dev] RFR: 8260589: Crash in JfrTraceIdLoadBarrier::load(_jclass*) [v2]
Long Yang
duke at openjdk.java.net
Mon May 30 06:57:44 UTC 2022
> Hi!
>
> Please review the backport of JDK-8260589 to 8u.
> This crash problem is easy to reproduce, so I feel it is necessary to backport it to 8u.
>
> 3 months ago, I launched webrev and it has been reviewed by Zhengyu Gu ([the review mail link](https://mail.openjdk.java.net/pipermail/jdk8u-dev/2022-March/014715.html)), thanks a lot to Zhengyu and Mario.
> Recently, I learned that the review method of 8u was changed to github, so I re-launched it in the new way.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8260589
> 11u commit: https://github.com/openjdk/jdk11u-dev/commit/1d204c554ffe969567161cc05992486ff47d346d
> Test: jdk/test/jdk/jfr/jvm/TestPrimitiveClasses.java passed.
>
> Due to the differences between JFR in 11u and 17, Denghui made some changes when backporting this fix to 11u.
> Denghui's changes also apply to 8u, so I directly quote Denghui's list here. (4 in total)
> 1. use MaxJfrEventId + 101 instead of LAST_TYPE_ID + 1 as the klass id of void.class
> 2. jdk 11 doesn't support jfr streaming, so I removed the call `JfrTraceIdEpoch::set_changed_tag_state()` in `load_primitive`
> 3. the Class in jdk 11 doesn't have the field 'hidden', so I removed `writer->write<bool>(false);` in `write_primitive`
> 4. there are many differences in the API of JfrTraceId between 11u and tip
>
> In addition to the above differences, I also make supplementary explanations for the modifications I made.
> 1. The static global variable clear_artifacts in 11u was introduced by the bugfix https://bugs.openjdk.java.net/browse/JDK-8231081, but this fix has not been backported to 8u, so I removed the code related to clear_artifacts. In 8u, the metadata of the primitive types will be written into the previous chunk on every chunk rotation.
> 2. In 11u, _artifacts and _class_unload are static global variables, but in 8u, they are static member variables of JfrTypeSet, so I also made necessary changes to the functions that use these two variables.
>
> Thanks
Long Yang has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
Backport a9d2267f8d306522522c999ff584ccaa34c46456
Reviewed-by: Zhengyu Gu
Backport-of: a9d2267f8d306522522c999ff584ccaa34c46456
-------------
Changes:
- all: https://git.openjdk.java.net/jdk8u-dev/pull/36/files
- new: https://git.openjdk.java.net/jdk8u-dev/pull/36/files/1ca0c4a5..8a41ed27
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk8u-dev&pr=36&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk8u-dev&pr=36&range=00-01
Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk8u-dev/pull/36.diff
Fetch: git fetch https://git.openjdk.java.net/jdk8u-dev pull/36/head:pull/36
PR: https://git.openjdk.java.net/jdk8u-dev/pull/36
More information about the jdk8u-dev
mailing list