some stuff JEP-349-branch
authormgronlun
Mon, 16 Sep 2019 14:57:11 +0200
branchJEP-349-branch
changeset 58167 38b5442bcab4
parent 58166 105d32b27809
child 58168 945212abbac0
some stuff
src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp
src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp
src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.inline.hpp
--- a/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp	Mon Sep 16 13:50:20 2019 +0200
+++ b/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp	Mon Sep 16 14:57:11 2019 +0200
@@ -237,14 +237,12 @@
   cw.reserve(sizeof(u4));
   cw.write<u8>(EVENT_CHECKPOINT);
   cw.write(JfrTicks::now());
-  cw.write((int64_t)0); // duration
+  cw.write<u8>(0); // duration
   cw.write(delta_to_last_checkpoint);
-  cw.write<bool>(false); // flushpoint
-  cw.write((u4)1); // nof types in this checkpoint
+  cw.write<u4>(GENERIC); // checkpoint type
+  cw.write<u4>(1); // nof types in this checkpoint
   cw.write(type_id);
-  const int64_t number_of_elements_offset = cw.current_offset();
-  cw.reserve(sizeof(u4));
-  return number_of_elements_offset;
+  return cw.reserve(sizeof(u4));
 }
 
 template <typename Content>
--- a/src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp	Mon Sep 16 13:50:20 2019 +0200
+++ b/src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp	Mon Sep 16 14:57:11 2019 +0200
@@ -314,7 +314,7 @@
   assert(buffer != NULL, "invariant");
   assert(buffer->retired(), "invariant");
   const size_t unflushed_size = buffer->unflushed_size();
-  buffer->reinitialize();
+  buffer->concurrent_reinitialization();
   log_registration_failure(unflushed_size);
 }
 
--- a/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.inline.hpp	Mon Sep 16 13:50:20 2019 +0200
+++ b/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.inline.hpp	Mon Sep 16 14:57:11 2019 +0200
@@ -47,7 +47,7 @@
 inline bool ConcurrentWriteOp<Operation>::process(typename Operation::Type* t) {
   const u1* const current_top = t->concurrent_top();
   const size_t unflushed_size = t->pos() - current_top;
-  if (unflushed_size == 0 || t->excluded()) {
+  if (unflushed_size == 0) {
     t->set_concurrent_top(current_top);
     return true;
   }
@@ -58,8 +58,7 @@
 
 template <typename Operation>
 inline bool ConcurrentWriteOpExcludeRetired<Operation>::process(typename Operation::Type* t) {
-  if (t->retired()) {
-    assert(t->empty(), "invariant");
+  if (t->retired() || t->excluded()) {
     return true;
   }
   return ConcurrentWriteOp<Operation>::process(t);
@@ -70,7 +69,7 @@
   assert(t != NULL, "invariant");
   const u1* const current_top = t->top();
   const size_t unflushed_size = t->pos() - current_top;
-  if (unflushed_size == 0 || t->excluded()) {
+  if (unflushed_size == 0) {
     return true;
   }
   const bool result = _operation.write(t, current_top, unflushed_size);