# HG changeset patch # User mgronlun # Date 1573138405 -3600 # Node ID 6c6cce0f149da61dc85f2e92e231a6bddef9c877 # Parent 86c8b22945a16244198f18218a8848a10ec16d8f 8233416: JFR: assert((((((klass)->trace_id()) & (((1 << 1) << 8) | (JfrTraceIdEpoch::in_use_this_epoch_bit()))) != 0))) failed: invariant Reviewed-by: egahlin diff -r 86c8b22945a1 -r 6c6cce0f149d src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp --- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp Thu Nov 07 15:48:43 2019 +0100 +++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp Thu Nov 07 15:53:25 2019 +0100 @@ -42,7 +42,10 @@ template inline traceid set_used_and_get(const T* type) { assert(type != NULL, "invariant"); - SET_USED_THIS_EPOCH(type); + if (SHOULD_TAG(type)) { + SET_USED_THIS_EPOCH(type); + JfrTraceIdEpoch::set_changed_tag_state(); + } assert(USED_THIS_EPOCH(type), "invariant"); return TRACE_ID(type); } @@ -58,19 +61,10 @@ } inline traceid JfrTraceId::use(const Klass* klass) { - assert(klass != NULL, "invariant"); - if (SHOULD_TAG(klass)) { - SET_USED_THIS_EPOCH(klass); - assert(USED_THIS_EPOCH(klass), "invariant"); - JfrTraceIdEpoch::set_changed_tag_state(); - return get(klass); - } - assert(USED_THIS_EPOCH(klass), "invariant"); - return TRACE_ID(klass); + return set_used_and_get(klass); } inline traceid JfrTraceId::use(const Method* method) { - assert(method != NULL, "invariant"); return use(method->method_holder(), method); } @@ -91,12 +85,10 @@ } inline traceid JfrTraceId::use(const ModuleEntry* module) { - assert(module != NULL, "invariant"); return set_used_and_get(module); } inline traceid JfrTraceId::use(const PackageEntry* package) { - assert(package != NULL, "invariant"); return set_used_and_get(package); } diff -r 86c8b22945a1 -r 6c6cce0f149d src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp --- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp Thu Nov 07 15:48:43 2019 +0100 +++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp Thu Nov 07 15:53:25 2019 +0100 @@ -40,10 +40,8 @@ inline void set_bits(jbyte bits, jbyte volatile* const dest) { assert(dest != NULL, "invariant"); - if (bits != (*dest & bits)) { - *dest |= bits; - OrderAccess::storestore(); - } + *dest |= bits; + OrderAccess::storestore(); } inline jbyte traceid_and(jbyte current, jbyte bits) {