File tree 2 files changed +7
-9
lines changed
src/hotspot/share/logging
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -116,10 +116,7 @@ AsyncLogWriter::AsyncLogWriter()
116
116
117
117
void AsyncLogWriter::write () {
118
118
ResourceMark rm;
119
- // Similar to AsyncLogMap but on resource_area
120
- ResourceHashtable<LogFileStreamOutput*, uint32_t ,
121
- 17 /* table_size*/ , ResourceObj::RESOURCE_AREA,
122
- mtLogging> snapshot;
119
+ AsyncLogMap<ResourceObj::RESOURCE_AREA> snapshot;
123
120
124
121
// lock protection. This guarantees I/O jobs don't block logsites.
125
122
{
Original file line number Diff line number Diff line change @@ -58,11 +58,12 @@ class AsyncLogWriter : public NonJavaThread {
58
58
friend class AsyncLogTest ;
59
59
friend class AsyncLogTest_logBuffer_vm_Test ;
60
60
class AsyncLogLocker ;
61
+
62
+ // account for dropped messages
63
+ template <ResourceObj::allocation_type ALLOC_TYPE>
61
64
using AsyncLogMap = ResourceHashtable<LogFileStreamOutput*,
62
- uint32_t ,
63
- 17 , /* table_size*/
64
- ResourceObj::C_HEAP,
65
- mtLogging>;
65
+ uint32_t , 17 , /* table_size*/
66
+ ALLOC_TYPE, mtLogging>;
66
67
67
68
// Messsage is the envelop of a log line and its associative data.
68
69
// Its length is variable because of the zero-terminated c-str. It is only valid when we create it using placement new
@@ -154,7 +155,7 @@ class AsyncLogWriter : public NonJavaThread {
154
155
PlatformMonitor _lock;
155
156
bool _data_available;
156
157
volatile bool _initialized;
157
- AsyncLogMap _stats; // statistics for dropped messages
158
+ AsyncLogMap<ResourceObj::C_HEAP> _stats;
158
159
159
160
// ping-pong buffers
160
161
Buffer* _buffer;
You can’t perform that action at this time.
0 commit comments