--- a/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp Tue Sep 17 12:02:49 2019 +0200
+++ b/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp Tue Sep 17 12:06:48 2019 +0200
@@ -410,15 +410,12 @@
GrowableArray<jlong> allocated(initial_size);
GrowableArray<traceid> thread_ids(initial_size);
JfrTicks time_stamp = JfrTicks::now();
-
- {
- JfrJavaThreadIterator iter;
- while (iter.has_next()) {
- JavaThread* const jt = iter.next();
- assert(jt != NULL, "invariant");
- allocated.append(jt->cooked_allocated_bytes());
- thread_ids.append(JFR_THREAD_ID(jt));
- }
+ JfrJavaThreadIterator iter;
+ while (iter.has_next()) {
+ JavaThread* const jt = iter.next();
+ assert(jt != NULL, "invariant");
+ allocated.append(jt->cooked_allocated_bytes());
+ thread_ids.append(JFR_THREAD_ID(jt));
}
// Write allocation statistics to buffer.