< prev index next >
src/share/vm/jfr/recorder/storage/jfrStorageUtils.hpp
Print this page
rev 9053 : 8220293: Deadlock in JFR string pool
Reviewed-by: rehn, egahlin
@@ -90,11 +90,10 @@
ConcurrentWriteOpExcludeRetired(Operation& operation) : ConcurrentWriteOp<Operation>(operation) {}
bool process(Type* t);
size_t processed() const { return ConcurrentWriteOp<Operation>::processed(); }
};
-
template <typename Operation>
class MutexedWriteOp {
private:
Operation& _operation;
public:
@@ -102,10 +101,19 @@
MutexedWriteOp(Operation& operation) : _operation(operation) {}
bool process(Type* t);
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
};
< prev index next >