< prev index next >

src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp

Print this page
rev 57511 : [mq]: metaspace-improvement


  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/checkpoint/objectSampleCheckpoint.hpp"
  34 #include "jfr/leakprofiler/leakProfiler.hpp"
  35 #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp"
  36 #include "jfr/recorder/checkpoint/types/jfrType.hpp"
  37 #include "jfr/recorder/jfrRecorder.hpp"
  38 #include "jfr/recorder/checkpoint/types/jfrThreadGroup.hpp"
  39 #include "jfr/recorder/checkpoint/types/jfrThreadState.hpp"
  40 #include "jfr/recorder/checkpoint/types/jfrTypeSet.hpp"
  41 #include "jfr/support/jfrThreadLocal.hpp"
  42 #include "jfr/writers/jfrJavaEventWriter.hpp"
  43 #include "memory/metaspaceGCThresholdUpdater.hpp"

  44 #include "memory/referenceType.hpp"
  45 #include "memory/universe.hpp"
  46 #include "oops/compressedOops.hpp"
  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"
  53 #include "runtime/vmOperations.hpp"
  54 
  55 #ifdef COMPILER2
  56 #include "opto/compile.hpp"
  57 #include "opto/node.hpp"
  58 #endif
  59 #if INCLUDE_G1GC
  60 #include "gc/g1/g1HeapRegionTraceType.hpp"
  61 #include "gc/g1/g1YCTypes.hpp"
  62 #endif
  63 


 190 
 191 void G1HeapRegionTypeConstant::serialize(JfrCheckpointWriter& writer) {
 192   static const u4 nof_entries = G1HeapRegionTraceType::G1HeapRegionTypeEndSentinel;
 193   writer.write_count(nof_entries);
 194   for (u4 i = 0; i < nof_entries; ++i) {
 195     writer.write_key(i);
 196     writer.write(G1HeapRegionTraceType::to_string((G1HeapRegionTraceType::Type)i));
 197   }
 198 }
 199 
 200 void GCThresholdUpdaterConstant::serialize(JfrCheckpointWriter& writer) {
 201   static const u4 nof_entries = MetaspaceGCThresholdUpdater::Last;
 202   writer.write_count(nof_entries);
 203   for (u4 i = 0; i < nof_entries; ++i) {
 204     writer.write_key(i);
 205     writer.write(MetaspaceGCThresholdUpdater::to_string((MetaspaceGCThresholdUpdater::Type)i));
 206   }
 207 }
 208 
 209 void MetadataTypeConstant::serialize(JfrCheckpointWriter& writer) {
 210   static const u4 nof_entries = Metaspace::MetadataTypeCount;
 211   writer.write_count(nof_entries);
 212   for (u4 i = 0; i < nof_entries; ++i) {
 213     writer.write_key(i);
 214     writer.write(Metaspace::metadata_type_name((Metaspace::MetadataType)i));
 215   }
 216 }
 217 
 218 void MetaspaceObjectTypeConstant::serialize(JfrCheckpointWriter& writer) {
 219   static const u4 nof_entries = MetaspaceObj::_number_of_types;
 220   writer.write_count(nof_entries);
 221   for (u4 i = 0; i < nof_entries; ++i) {
 222     writer.write_key(i);
 223     writer.write(MetaspaceObj::type_name((MetaspaceObj::Type)i));
 224   }
 225 }
 226 
 227 void G1YCTypeConstant::serialize(JfrCheckpointWriter& writer) {
 228 #if INCLUDE_G1GC
 229   static const u4 nof_entries = G1YCTypeEndSentinel;
 230   writer.write_count(nof_entries);
 231   for (u4 i = 0; i < nof_entries; ++i) {
 232     writer.write_key(i);
 233     writer.write(G1YCTypeHelper::to_string((G1YCType)i));
 234   }




  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/checkpoint/objectSampleCheckpoint.hpp"
  34 #include "jfr/leakprofiler/leakProfiler.hpp"
  35 #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp"
  36 #include "jfr/recorder/checkpoint/types/jfrType.hpp"
  37 #include "jfr/recorder/jfrRecorder.hpp"
  38 #include "jfr/recorder/checkpoint/types/jfrThreadGroup.hpp"
  39 #include "jfr/recorder/checkpoint/types/jfrThreadState.hpp"
  40 #include "jfr/recorder/checkpoint/types/jfrTypeSet.hpp"
  41 #include "jfr/support/jfrThreadLocal.hpp"
  42 #include "jfr/writers/jfrJavaEventWriter.hpp"
  43 #include "memory/metaspace.hpp"
  44 #include "memory/metaspace/metaspaceEnums.hpp"
  45 #include "memory/referenceType.hpp"
  46 #include "memory/universe.hpp"
  47 #include "oops/compressedOops.hpp"
  48 #include "runtime/flags/jvmFlag.hpp"
  49 #include "runtime/mutexLocker.hpp"
  50 #include "runtime/osThread.hpp"
  51 #include "runtime/safepoint.hpp"
  52 #include "runtime/synchronizer.hpp"
  53 #include "runtime/thread.inline.hpp"
  54 #include "runtime/vmOperations.hpp"
  55 
  56 #ifdef COMPILER2
  57 #include "opto/compile.hpp"
  58 #include "opto/node.hpp"
  59 #endif
  60 #if INCLUDE_G1GC
  61 #include "gc/g1/g1HeapRegionTraceType.hpp"
  62 #include "gc/g1/g1YCTypes.hpp"
  63 #endif
  64 


 191 
 192 void G1HeapRegionTypeConstant::serialize(JfrCheckpointWriter& writer) {
 193   static const u4 nof_entries = G1HeapRegionTraceType::G1HeapRegionTypeEndSentinel;
 194   writer.write_count(nof_entries);
 195   for (u4 i = 0; i < nof_entries; ++i) {
 196     writer.write_key(i);
 197     writer.write(G1HeapRegionTraceType::to_string((G1HeapRegionTraceType::Type)i));
 198   }
 199 }
 200 
 201 void GCThresholdUpdaterConstant::serialize(JfrCheckpointWriter& writer) {
 202   static const u4 nof_entries = MetaspaceGCThresholdUpdater::Last;
 203   writer.write_count(nof_entries);
 204   for (u4 i = 0; i < nof_entries; ++i) {
 205     writer.write_key(i);
 206     writer.write(MetaspaceGCThresholdUpdater::to_string((MetaspaceGCThresholdUpdater::Type)i));
 207   }
 208 }
 209 
 210 void MetadataTypeConstant::serialize(JfrCheckpointWriter& writer) {
 211   static const u4 nof_entries = metaspace::MetadataTypeCount;
 212   writer.write_count(nof_entries);
 213   for (u4 i = 0; i < nof_entries; ++i) {
 214     writer.write_key(i);
 215     writer.write(metaspace::describe_mdtype((metaspace::MetadataType)i));
 216   }
 217 }
 218 
 219 void MetaspaceObjectTypeConstant::serialize(JfrCheckpointWriter& writer) {
 220   static const u4 nof_entries = MetaspaceObj::_number_of_types;
 221   writer.write_count(nof_entries);
 222   for (u4 i = 0; i < nof_entries; ++i) {
 223     writer.write_key(i);
 224     writer.write(MetaspaceObj::type_name((MetaspaceObj::Type)i));
 225   }
 226 }
 227 
 228 void G1YCTypeConstant::serialize(JfrCheckpointWriter& writer) {
 229 #if INCLUDE_G1GC
 230   static const u4 nof_entries = G1YCTypeEndSentinel;
 231   writer.write_count(nof_entries);
 232   for (u4 i = 0; i < nof_entries; ++i) {
 233     writer.write_key(i);
 234     writer.write(G1YCTypeHelper::to_string((G1YCType)i));
 235   }


< prev index next >