Re: RFR: 8334781: JFR crash: assert(((((JfrTraceIdBits::load(klass)) & ((JfrTraceIdEpoch::this_epoch_method_and_class_bits()))) != 0))) failed: invariant
On Sat, 13 Jul 2024 14:47:21 GMT, Markus Grönlund <mgronlun@openjdk.org> wrote:
Greetings,
Please help review this adjustment, which fixes rare situations where methods that have been retransformed or redefined can be perceived as being tagged by JFR when they, in fact, are not. The fix unconditionally sets the metatag clear bits on artefact initialization and adds assertions about the JFR bit tag state machine.
Testing: jdk_jfr, stress testing
Thanks Markus
src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp line 47:
45: #define RESTORE_ID(k) JfrTraceId::restore(k); 46: 47: static constexpr const uint16_t cleared_epoch_bits = 512 | 256;
Q: Could the `EPOCH_CLEARED_BITS` be used instead? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20171#discussion_r1678533638
On Tue, 16 Jul 2024 00:05:36 GMT, Serguei Spitsyn <sspitsyn@openjdk.org> wrote:
Greetings,
Please help review this adjustment, which fixes rare situations where methods that have been retransformed or redefined can be perceived as being tagged by JFR when they, in fact, are not. The fix unconditionally sets the metatag clear bits on artefact initialization and adds assertions about the JFR bit tag state machine.
Testing: jdk_jfr, stress testing
Thanks Markus
src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp line 47:
45: #define RESTORE_ID(k) JfrTraceId::restore(k); 46: 47: static constexpr const uint16_t cleared_epoch_bits = 512 | 256;
Q: Could the `EPOCH_CLEARED_BITS` be used instead?
No. because I want to avoid dragging in all of the definitions in jfrTraceIdMarcros.hpp. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20171#discussion_r1679179786
participants (2)
-
Markus Grönlund
-
Serguei Spitsyn