author | stuefe |
Wed, 18 Sep 2019 07:46:02 +0200 | |
branch | stuefe-new-metaspace-branch |
changeset 58199 | 595fcbebaa77 |
parent 58063 | bdf136b8ae0e |
parent 58132 | caa25ab47aca |
child 58838 | 55ce65813b62 |
permissions | -rw-r--r-- |
50113 | 1 |
/* |
57644
446dcfc2a925
8228834: Regression caused by JDK-8214542 not installing complete checkpoint data to candidates
mgronlun
parents:
55571
diff
changeset
|
2 |
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
50113 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
* |
|
23 |
*/ |
|
24 |
||
25 |
#include "precompiled.hpp" |
|
26 |
#include "classfile/javaClasses.inline.hpp" |
|
27 |
#include "code/codeBlob.hpp" |
|
28 |
#include "code/codeCache.hpp" |
|
29 |
#include "gc/shared/gcCause.hpp" |
|
30 |
#include "gc/shared/gcName.hpp" |
|
31 |
#include "gc/shared/gcTrace.hpp" |
|
32 |
#include "gc/shared/gcWhen.hpp" |
|
33 |
#include "jfr/leakprofiler/leakProfiler.hpp" |
|
34 |
#include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp" |
|
35 |
#include "jfr/recorder/checkpoint/types/jfrType.hpp" |
|
36 |
#include "jfr/recorder/jfrRecorder.hpp" |
|
37 |
#include "jfr/recorder/checkpoint/types/jfrThreadGroup.hpp" |
|
38 |
#include "jfr/recorder/checkpoint/types/jfrThreadState.hpp" |
|
39 |
#include "jfr/recorder/checkpoint/types/jfrTypeSet.hpp" |
|
40 |
#include "jfr/support/jfrThreadLocal.hpp" |
|
41 |
#include "jfr/writers/jfrJavaEventWriter.hpp" |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
58003
diff
changeset
|
42 |
#include "memory/metaspace.hpp" |
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
58003
diff
changeset
|
43 |
#include "memory/metaspace/metaspaceEnums.hpp" |
50113 | 44 |
#include "memory/referenceType.hpp" |
45 |
#include "memory/universe.hpp" |
|
54780
f8d182aedc92
8223136: Move compressed oops functions to CompressedOops class
stefank
parents:
53897
diff
changeset
|
46 |
#include "oops/compressedOops.hpp" |
50113 | 47 |
#include "runtime/flags/jvmFlag.hpp" |
48 |
#include "runtime/mutexLocker.hpp" |
|
49 |
#include "runtime/osThread.hpp" |
|
50 |
#include "runtime/safepoint.hpp" |
|
51 |
#include "runtime/synchronizer.hpp" |
|
52 |
#include "runtime/thread.inline.hpp" |
|
52877
9e041366c764
8214850: Rename vm_operations.?pp files to vmOperations.?pp files
tschatzl
parents:
51004
diff
changeset
|
53 |
#include "runtime/vmOperations.hpp" |
50113 | 54 |
|
55 |
#ifdef COMPILER2 |
|
56 |
#include "opto/compile.hpp" |
|
57 |
#include "opto/node.hpp" |
|
58 |
#endif |
|
59 |
||
60 |
// Requires a ResourceMark for get_thread_name/as_utf8 |
|
61 |
class JfrCheckpointThreadClosure : public ThreadClosure { |
|
62 |
private: |
|
63 |
JfrCheckpointWriter& _writer; |
|
51004
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
64 |
JfrCheckpointContext _ctx; |
53897
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
52877
diff
changeset
|
65 |
const int64_t _count_position; |
51004
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
66 |
Thread* const _curthread; |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
67 |
u4 _count; |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
68 |
|
50113 | 69 |
public: |
51004
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
70 |
JfrCheckpointThreadClosure(JfrCheckpointWriter& writer) : _writer(writer), |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
71 |
_ctx(writer.context()), |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
72 |
_count_position(writer.reserve(sizeof(u4))), |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
73 |
_curthread(Thread::current()), |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
74 |
_count(0) { |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
75 |
} |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
76 |
|
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
77 |
~JfrCheckpointThreadClosure() { |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
78 |
if (_count == 0) { |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
79 |
// restore |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
80 |
_writer.set_context(_ctx); |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
81 |
return; |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
82 |
} |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
83 |
_writer.write_count(_count, _count_position); |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
84 |
} |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
85 |
|
50113 | 86 |
void do_thread(Thread* t); |
87 |
}; |
|
88 |
||
89 |
// Requires a ResourceMark for get_thread_name/as_utf8 |
|
90 |
void JfrCheckpointThreadClosure::do_thread(Thread* t) { |
|
91 |
assert(t != NULL, "invariant"); |
|
92 |
assert_locked_or_safepoint(Threads_lock); |
|
51004
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
93 |
const JfrThreadLocal* const tl = t->jfr_thread_local(); |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
94 |
assert(tl != NULL, "invariant"); |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
95 |
if (tl->is_dead()) { |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
96 |
return; |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
97 |
} |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
98 |
++_count; |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
99 |
_writer.write_key(tl->thread_id()); |
50113 | 100 |
_writer.write(t->name()); |
101 |
const OSThread* const os_thread = t->osthread(); |
|
51004
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
102 |
_writer.write<traceid>(os_thread != NULL ? os_thread->thread_id() : 0); |
50113 | 103 |
if (t->is_Java_thread()) { |
104 |
JavaThread* const jt = (JavaThread*)t; |
|
105 |
_writer.write(jt->name()); |
|
106 |
_writer.write(java_lang_Thread::thread_id(jt->threadObj())); |
|
107 |
_writer.write(JfrThreadGroup::thread_group_id(jt, _curthread)); |
|
108 |
// since we are iterating threads during a safepoint, also issue notification |
|
109 |
JfrJavaEventWriter::notify(jt); |
|
110 |
return; |
|
111 |
} |
|
112 |
_writer.write((const char*)NULL); // java name |
|
51004
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
113 |
_writer.write((traceid)0); // java thread id |
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
114 |
_writer.write((traceid)0); // java thread group |
50113 | 115 |
} |
116 |
||
117 |
void JfrThreadConstantSet::serialize(JfrCheckpointWriter& writer) { |
|
118 |
assert(SafepointSynchronize::is_at_safepoint(), "invariant"); |
|
119 |
JfrCheckpointThreadClosure tc(writer); |
|
120 |
Threads::threads_do(&tc); |
|
121 |
} |
|
122 |
||
123 |
void JfrThreadGroupConstant::serialize(JfrCheckpointWriter& writer) { |
|
124 |
assert(SafepointSynchronize::is_at_safepoint(), "invariant"); |
|
125 |
JfrThreadGroup::serialize(writer); |
|
126 |
} |
|
127 |
||
128 |
static const char* flag_value_origin_to_string(JVMFlag::Flags origin) { |
|
129 |
switch (origin) { |
|
130 |
case JVMFlag::DEFAULT: return "Default"; |
|
131 |
case JVMFlag::COMMAND_LINE: return "Command line"; |
|
132 |
case JVMFlag::ENVIRON_VAR: return "Environment variable"; |
|
133 |
case JVMFlag::CONFIG_FILE: return "Config file"; |
|
134 |
case JVMFlag::MANAGEMENT: return "Management"; |
|
135 |
case JVMFlag::ERGONOMIC: return "Ergonomic"; |
|
136 |
case JVMFlag::ATTACH_ON_DEMAND: return "Attach on demand"; |
|
137 |
case JVMFlag::INTERNAL: return "Internal"; |
|
138 |
default: ShouldNotReachHere(); return ""; |
|
139 |
} |
|
140 |
} |
|
141 |
||
142 |
void FlagValueOriginConstant::serialize(JfrCheckpointWriter& writer) { |
|
143 |
static const u4 nof_entries = JVMFlag::LAST_VALUE_ORIGIN + 1; |
|
144 |
writer.write_count(nof_entries); |
|
145 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
146 |
writer.write_key(i); |
|
147 |
writer.write(flag_value_origin_to_string((JVMFlag::Flags)i)); |
|
148 |
} |
|
149 |
} |
|
150 |
||
151 |
void MonitorInflateCauseConstant::serialize(JfrCheckpointWriter& writer) { |
|
152 |
static const u4 nof_entries = ObjectSynchronizer::inflate_cause_nof; |
|
153 |
writer.write_count(nof_entries); |
|
154 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
155 |
writer.write_key(i); |
|
156 |
writer.write(ObjectSynchronizer::inflate_cause_name((ObjectSynchronizer::InflateCause)i)); |
|
157 |
} |
|
158 |
} |
|
159 |
||
160 |
void GCCauseConstant::serialize(JfrCheckpointWriter& writer) { |
|
161 |
static const u4 nof_entries = GCCause::_last_gc_cause; |
|
162 |
writer.write_count(nof_entries); |
|
163 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
164 |
writer.write_key(i); |
|
165 |
writer.write(GCCause::to_string((GCCause::Cause)i)); |
|
166 |
} |
|
167 |
} |
|
168 |
||
169 |
void GCNameConstant::serialize(JfrCheckpointWriter& writer) { |
|
170 |
static const u4 nof_entries = GCNameEndSentinel; |
|
171 |
writer.write_count(nof_entries); |
|
172 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
173 |
writer.write_key(i); |
|
174 |
writer.write(GCNameHelper::to_string((GCName)i)); |
|
175 |
} |
|
176 |
} |
|
177 |
||
178 |
void GCWhenConstant::serialize(JfrCheckpointWriter& writer) { |
|
179 |
static const u4 nof_entries = GCWhen::GCWhenEndSentinel; |
|
180 |
writer.write_count(nof_entries); |
|
181 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
182 |
writer.write_key(i); |
|
183 |
writer.write(GCWhen::to_string((GCWhen::Type)i)); |
|
184 |
} |
|
185 |
} |
|
186 |
||
187 |
void GCThresholdUpdaterConstant::serialize(JfrCheckpointWriter& writer) { |
|
188 |
static const u4 nof_entries = MetaspaceGCThresholdUpdater::Last; |
|
189 |
writer.write_count(nof_entries); |
|
190 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
191 |
writer.write_key(i); |
|
192 |
writer.write(MetaspaceGCThresholdUpdater::to_string((MetaspaceGCThresholdUpdater::Type)i)); |
|
193 |
} |
|
194 |
} |
|
195 |
||
196 |
void MetadataTypeConstant::serialize(JfrCheckpointWriter& writer) { |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
58003
diff
changeset
|
197 |
static const u4 nof_entries = metaspace::MetadataTypeCount; |
50113 | 198 |
writer.write_count(nof_entries); |
199 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
200 |
writer.write_key(i); |
|
58063
bdf136b8ae0e
Initial changes for new metaspace. Only tested for Linux x64.
stuefe
parents:
58003
diff
changeset
|
201 |
writer.write(metaspace::describe_mdtype((metaspace::MetadataType)i)); |
50113 | 202 |
} |
203 |
} |
|
204 |
||
205 |
void MetaspaceObjectTypeConstant::serialize(JfrCheckpointWriter& writer) { |
|
206 |
static const u4 nof_entries = MetaspaceObj::_number_of_types; |
|
207 |
writer.write_count(nof_entries); |
|
208 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
209 |
writer.write_key(i); |
|
210 |
writer.write(MetaspaceObj::type_name((MetaspaceObj::Type)i)); |
|
211 |
} |
|
212 |
} |
|
213 |
||
214 |
static const char* reference_type_to_string(ReferenceType rt) { |
|
215 |
switch (rt) { |
|
216 |
case REF_NONE: return "None reference"; |
|
217 |
case REF_OTHER: return "Other reference"; |
|
218 |
case REF_SOFT: return "Soft reference"; |
|
219 |
case REF_WEAK: return "Weak reference"; |
|
220 |
case REF_FINAL: return "Final reference"; |
|
221 |
case REF_PHANTOM: return "Phantom reference"; |
|
222 |
default: |
|
223 |
ShouldNotReachHere(); |
|
224 |
return NULL; |
|
225 |
} |
|
226 |
} |
|
227 |
||
228 |
void ReferenceTypeConstant::serialize(JfrCheckpointWriter& writer) { |
|
229 |
static const u4 nof_entries = REF_PHANTOM + 1; |
|
230 |
writer.write_count(nof_entries); |
|
231 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
232 |
writer.write_key(i); |
|
233 |
writer.write(reference_type_to_string((ReferenceType)i)); |
|
234 |
} |
|
235 |
} |
|
236 |
||
237 |
void NarrowOopModeConstant::serialize(JfrCheckpointWriter& writer) { |
|
54780
f8d182aedc92
8223136: Move compressed oops functions to CompressedOops class
stefank
parents:
53897
diff
changeset
|
238 |
static const u4 nof_entries = CompressedOops::HeapBasedNarrowOop + 1; |
50113 | 239 |
writer.write_count(nof_entries); |
240 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
241 |
writer.write_key(i); |
|
54780
f8d182aedc92
8223136: Move compressed oops functions to CompressedOops class
stefank
parents:
53897
diff
changeset
|
242 |
writer.write(CompressedOops::mode_to_string((CompressedOops::Mode)i)); |
50113 | 243 |
} |
244 |
} |
|
245 |
||
246 |
void CompilerPhaseTypeConstant::serialize(JfrCheckpointWriter& writer) { |
|
247 |
#ifdef COMPILER2 |
|
248 |
static const u4 nof_entries = PHASE_NUM_TYPES; |
|
249 |
writer.write_count(nof_entries); |
|
250 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
251 |
writer.write_key(i); |
|
252 |
writer.write(CompilerPhaseTypeHelper::to_string((CompilerPhaseType)i)); |
|
253 |
} |
|
254 |
#endif |
|
255 |
} |
|
256 |
||
257 |
void CodeBlobTypeConstant::serialize(JfrCheckpointWriter& writer) { |
|
258 |
static const u4 nof_entries = CodeBlobType::NumTypes; |
|
259 |
writer.write_count(nof_entries); |
|
260 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
261 |
writer.write_key(i); |
|
262 |
writer.write(CodeCache::get_code_heap_name(i)); |
|
263 |
} |
|
264 |
}; |
|
265 |
||
266 |
void VMOperationTypeConstant::serialize(JfrCheckpointWriter& writer) { |
|
267 |
static const u4 nof_entries = VM_Operation::VMOp_Terminating; |
|
268 |
writer.write_count(nof_entries); |
|
269 |
for (u4 i = 0; i < nof_entries; ++i) { |
|
270 |
writer.write_key(i); |
|
271 |
writer.write(VM_Operation::name(VM_Operation::VMOp_Type(i))); |
|
272 |
} |
|
273 |
} |
|
274 |
||
275 |
class TypeSetSerialization { |
|
276 |
private: |
|
58132
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
58003
diff
changeset
|
277 |
JfrCheckpointWriter* _leakp_writer; |
50113 | 278 |
bool _class_unload; |
279 |
public: |
|
58132
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
58003
diff
changeset
|
280 |
TypeSetSerialization(bool class_unload, JfrCheckpointWriter* leakp_writer = NULL) : |
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
58003
diff
changeset
|
281 |
_leakp_writer(leakp_writer), _class_unload(class_unload) {} |
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
58003
diff
changeset
|
282 |
void write(JfrCheckpointWriter& writer) { |
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
58003
diff
changeset
|
283 |
JfrTypeSet::serialize(&writer, _leakp_writer, _class_unload); |
50113 | 284 |
} |
285 |
}; |
|
286 |
||
287 |
void ClassUnloadTypeSet::serialize(JfrCheckpointWriter& writer) { |
|
288 |
TypeSetSerialization type_set(true); |
|
58132
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
58003
diff
changeset
|
289 |
type_set.write(writer); |
50113 | 290 |
}; |
291 |
||
58132
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
58003
diff
changeset
|
292 |
TypeSet::TypeSet(JfrCheckpointWriter* leakp_writer) : _leakp_writer(leakp_writer) {} |
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
58003
diff
changeset
|
293 |
|
50113 | 294 |
void TypeSet::serialize(JfrCheckpointWriter& writer) { |
58132
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
58003
diff
changeset
|
295 |
TypeSetSerialization type_set(false, _leakp_writer); |
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
58003
diff
changeset
|
296 |
type_set.write(writer); |
50113 | 297 |
}; |
298 |
||
299 |
void ThreadStateConstant::serialize(JfrCheckpointWriter& writer) { |
|
300 |
JfrThreadState::serialize(writer); |
|
301 |
} |
|
302 |
||
303 |
void JfrThreadConstant::serialize(JfrCheckpointWriter& writer) { |
|
304 |
assert(_thread != NULL, "invariant"); |
|
305 |
assert(_thread == Thread::current(), "invariant"); |
|
306 |
assert(_thread->is_Java_thread(), "invariant"); |
|
307 |
ResourceMark rm(_thread); |
|
308 |
const oop threadObj = _thread->threadObj(); |
|
309 |
assert(threadObj != NULL, "invariant"); |
|
310 |
const u8 java_lang_thread_id = java_lang_Thread::thread_id(threadObj); |
|
311 |
const char* const thread_name = _thread->name(); |
|
312 |
const traceid thread_group_id = JfrThreadGroup::thread_group_id(_thread); |
|
313 |
writer.write_count(1); |
|
314 |
writer.write_key(_thread->jfr_thread_local()->thread_id()); |
|
315 |
writer.write(thread_name); |
|
51004
162867fa0f8d
8203943: eventThreadGroup was null in TestJavaBlockedEvent.java
mgronlun
parents:
50749
diff
changeset
|
316 |
writer.write((traceid)_thread->osthread()->thread_id()); |
50113 | 317 |
writer.write(thread_name); |
318 |
writer.write(java_lang_thread_id); |
|
319 |
writer.write(thread_group_id); |
|
320 |
JfrThreadGroup::serialize(&writer, thread_group_id); |
|
321 |
} |