src/share/vm/jfr/recorder/storage/jfrStorageUtils.hpp

changeset 9928
d2c2cd90513e
parent 9858
b985cbb00e68
equal deleted inserted replaced
9927:b273df69fbfe 9928:d2c2cd90513e
90 ConcurrentWriteOpExcludeRetired(Operation& operation) : ConcurrentWriteOp<Operation>(operation) {} 90 ConcurrentWriteOpExcludeRetired(Operation& operation) : ConcurrentWriteOp<Operation>(operation) {}
91 bool process(Type* t); 91 bool process(Type* t);
92 size_t processed() const { return ConcurrentWriteOp<Operation>::processed(); } 92 size_t processed() const { return ConcurrentWriteOp<Operation>::processed(); }
93 }; 93 };
94 94
95
96 template <typename Operation> 95 template <typename Operation>
97 class MutexedWriteOp { 96 class MutexedWriteOp {
98 private: 97 private:
99 Operation& _operation; 98 Operation& _operation;
100 public: 99 public:
101 typedef typename Operation::Type Type; 100 typedef typename Operation::Type Type;
102 MutexedWriteOp(Operation& operation) : _operation(operation) {} 101 MutexedWriteOp(Operation& operation) : _operation(operation) {}
103 bool process(Type* t); 102 bool process(Type* t);
104 size_t processed() const { return _operation.processed(); } 103 size_t processed() const { return _operation.processed(); }
104 };
105
106 template <typename Operation>
107 class ExclusiveOp : private MutexedWriteOp<Operation> {
108 public:
109 typedef typename Operation::Type Type;
110 ExclusiveOp(Operation& operation) : MutexedWriteOp<Operation>(operation) {}
111 bool process(Type* t);
112 size_t processed() const { return MutexedWriteOp<Operation>::processed(); }
105 }; 113 };
106 114
107 enum jfr_operation_mode { 115 enum jfr_operation_mode {
108 mutexed = 1, 116 mutexed = 1,
109 concurrent 117 concurrent

mercurial