--- a/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.hpp Tue May 21 13:06:52 2019 -0400
+++ b/src/hotspot/share/jfr/recorder/storage/jfrStorageUtils.hpp Tue May 21 20:53:27 2019 +0200
@@ -92,7 +92,6 @@
size_t processed() const { return ConcurrentWriteOp<Operation>::processed(); }
};
-
template <typename Operation>
class MutexedWriteOp {
private:
@@ -104,6 +103,15 @@
size_t processed() const { return _operation.processed(); }
};
+template <typename Operation>
+class ExclusiveOp : private MutexedWriteOp<Operation> {
+ public:
+ typedef typename Operation::Type Type;
+ ExclusiveOp(Operation& operation) : MutexedWriteOp<Operation>(operation) {}
+ bool process(Type* t);
+ size_t processed() const { return MutexedWriteOp<Operation>::processed(); }
+};
+
enum jfr_operation_mode {
mutexed = 1,
concurrent