@@ -464,7 +464,6 @@ static void assert_flush_precondition(ConstBufferPtr cur, size_t used, bool nati
464
464
465
465
static void assert_flush_regular_precondition (ConstBufferPtr cur, const u1* const cur_pos, size_t used, size_t req, const Thread* t) {
466
466
assert (t != NULL , " invariant" );
467
- assert (t->jfr_thread_local ()->shelved_buffer () == NULL , " invariant" );
468
467
assert (cur != NULL , " invariant" );
469
468
assert (!cur->lease (), " invariant" );
470
469
assert (cur_pos != NULL , " invariant" );
@@ -513,7 +512,6 @@ BufferPtr JfrStorage::flush_regular(BufferPtr cur, const u1* const cur_pos, size
513
512
return cur;
514
513
}
515
514
}
516
- assert (t->jfr_thread_local ()->shelved_buffer () == NULL , " invariant" );
517
515
if (cur->free_size () >= req) {
518
516
// simplest case, no switching of buffers
519
517
if (used > 0 ) {
@@ -524,6 +522,7 @@ BufferPtr JfrStorage::flush_regular(BufferPtr cur, const u1* const cur_pos, size
524
522
}
525
523
// Going for a "larger-than-regular" buffer.
526
524
// Shelve the current buffer to make room for a temporary lease.
525
+ assert (t->jfr_thread_local ()->shelved_buffer () == NULL , " invariant" );
527
526
t->jfr_thread_local ()->shelve_buffer (cur);
528
527
return provision_large (cur, cur_pos, used, req, native, t);
529
528
}
0 commit comments