equal
deleted
inserted
replaced
52 |
52 |
53 #ifdef COMPILER2 |
53 #ifdef COMPILER2 |
54 #include "opto/compile.hpp" |
54 #include "opto/compile.hpp" |
55 #include "opto/node.hpp" |
55 #include "opto/node.hpp" |
56 #endif |
56 #endif |
57 #if INCLUDE_G1GC |
|
58 #include "gc/g1/g1HeapRegionTraceType.hpp" |
|
59 #include "gc/g1/g1YCTypes.hpp" |
|
60 #endif |
|
61 |
57 |
62 // Requires a ResourceMark for get_thread_name/as_utf8 |
58 // Requires a ResourceMark for get_thread_name/as_utf8 |
63 class JfrCheckpointThreadClosure : public ThreadClosure { |
59 class JfrCheckpointThreadClosure : public ThreadClosure { |
64 private: |
60 private: |
65 JfrCheckpointWriter& _writer; |
61 JfrCheckpointWriter& _writer; |
180 writer.write_key(i); |
176 writer.write_key(i); |
181 writer.write(GCWhen::to_string((GCWhen::Type)i)); |
177 writer.write(GCWhen::to_string((GCWhen::Type)i)); |
182 } |
178 } |
183 } |
179 } |
184 |
180 |
185 void G1HeapRegionTypeConstant::serialize(JfrCheckpointWriter& writer) { |
|
186 static const u4 nof_entries = G1HeapRegionTraceType::G1HeapRegionTypeEndSentinel; |
|
187 writer.write_count(nof_entries); |
|
188 for (u4 i = 0; i < nof_entries; ++i) { |
|
189 writer.write_key(i); |
|
190 writer.write(G1HeapRegionTraceType::to_string((G1HeapRegionTraceType::Type)i)); |
|
191 } |
|
192 } |
|
193 |
|
194 void GCThresholdUpdaterConstant::serialize(JfrCheckpointWriter& writer) { |
181 void GCThresholdUpdaterConstant::serialize(JfrCheckpointWriter& writer) { |
195 static const u4 nof_entries = MetaspaceGCThresholdUpdater::Last; |
182 static const u4 nof_entries = MetaspaceGCThresholdUpdater::Last; |
196 writer.write_count(nof_entries); |
183 writer.write_count(nof_entries); |
197 for (u4 i = 0; i < nof_entries; ++i) { |
184 for (u4 i = 0; i < nof_entries; ++i) { |
198 writer.write_key(i); |
185 writer.write_key(i); |
214 writer.write_count(nof_entries); |
201 writer.write_count(nof_entries); |
215 for (u4 i = 0; i < nof_entries; ++i) { |
202 for (u4 i = 0; i < nof_entries; ++i) { |
216 writer.write_key(i); |
203 writer.write_key(i); |
217 writer.write(MetaspaceObj::type_name((MetaspaceObj::Type)i)); |
204 writer.write(MetaspaceObj::type_name((MetaspaceObj::Type)i)); |
218 } |
205 } |
219 } |
|
220 |
|
221 void G1YCTypeConstant::serialize(JfrCheckpointWriter& writer) { |
|
222 #if INCLUDE_G1GC |
|
223 static const u4 nof_entries = G1YCTypeEndSentinel; |
|
224 writer.write_count(nof_entries); |
|
225 for (u4 i = 0; i < nof_entries; ++i) { |
|
226 writer.write_key(i); |
|
227 writer.write(G1YCTypeHelper::to_string((G1YCType)i)); |
|
228 } |
|
229 #endif |
|
230 } |
206 } |
231 |
207 |
232 static const char* reference_type_to_string(ReferenceType rt) { |
208 static const char* reference_type_to_string(ReferenceType rt) { |
233 switch (rt) { |
209 switch (rt) { |
234 case REF_NONE: return "None reference"; |
210 case REF_NONE: return "None reference"; |