RFR(XXS): 8238180: RunThese30M failed "assert(t->jfr_thread_local()->shelved_buffer() == __null) failed: invariant"
Markus Gronlund
markus.gronlund at oracle.com
Thu Mar 5 22:48:04 UTC 2020
Greetings,
Please review this small adjustment to relax some assertions that can be triggered by the DeoptimizationEvent.
Bug: https://bugs.openjdk.java.net/browse/JDK-8238180
Testing: jdk_jfr
Description:
The newly introduced event for Deoptimization comes into flush from a previously unknown location. The flush path taken is the native path, but the thread has still its Java context, including its stored away regular buffer (its working with a large buffer lease on the Java side). There is nothing wrong in doing this, the native event can easily be accommodated after a regular flush, so the assertions should be relaxed.
Thanks
Markus
Change:
diff -r e804de2e6d4a -r 6c6e978c5f60 src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp
--- a/src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp Thu Mar 05 16:46:24 2020 -0500
+++ b/src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp Thu Mar 05 23:41:31 2020 +0100
@@ -464,7 +464,6 @@
static void assert_flush_regular_precondition(ConstBufferPtr cur, const u1* const cur_pos, size_t used, size_t req, const Thread* t) {
assert(t != NULL, "invariant");
- assert(t->jfr_thread_local()->shelved_buffer() == NULL, "invariant");
assert(cur != NULL, "invariant");
assert(!cur->lease(), "invariant");
assert(cur_pos != NULL, "invariant");
@@ -513,7 +512,6 @@
return cur;
}
}
- assert(t->jfr_thread_local()->shelved_buffer() == NULL, "invariant");
if (cur->free_size() >= req) {
// simplest case, no switching of buffers
if (used > 0) {
@@ -524,6 +522,7 @@
}
// Going for a "larger-than-regular" buffer.
// Shelve the current buffer to make room for a temporary lease.
+ assert(t->jfr_thread_local()->shelved_buffer() == NULL, "invariant");
t->jfr_thread_local()->shelve_buffer(cur);
return provision_large(cur, cur_pos, used, req, native, t);
}
More information about the hotspot-jfr-dev
mailing list