Introduction

The following are the events for OpenJDK 26 (jdk-26+20, permalink, 21-October-2025). The events are collected from the event configuration and the source code. Visit the jfreventcollector repository for more information. This is also the place you can contribute additional event descriptions, if you don't want to contribute them directly to the OpenJDK. The site generator lives on GitHub, too.

This page is maintained by Johannes Bechberger of the SapMachine team at SAP and contributors.

Some events have fake end times/durations; these are hidden in the event description here.

Flight Recorder

DumpReason

default profiling startTime 11 17 21 25 26

Category: Flight Recorder

Who requested the recording and why

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp:

static void post_events(bool emit_old_object_samples, bool emit_event_shutdown, Thread* thread) {
  if (emit_old_object_samples) {
    LeakProfiler::emit_events(max_jlong, false, false);
  }
  if (emit_event_shutdown) {
    EventShutdown e;
    e.set_reason("VM Error");
    e.commit();
  }
  EventDumpReason event;
  event.set_reason(emit_old_object_samples ? "Out of Memory" : "Crash");
  event.set_recordingId(-1);
  event.commit();
}

static volatile traceid _jfr_shutdown_tid = 0;

static bool guard_reentrancy() {
  const traceid shutdown_tid = AtomicAccess::load(&_jfr_shutdown_tid);
  if (shutdown_tid == max_julong) {
    // Someone tried but did not have a proper thread for the purpose.

Configuration enabled
default true
profiling true

Field Type Description
reason string Reason Reason for writing recording data to disk
recordingId int Recording Id Id of the recording that triggered the dump, or -1 if it was not related to a recording

DataLoss

default profiling startTime 11 17 21 25 26

Category: Flight Recorder

Data could not be copied out from a buffer, typically because of contention

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/jni/jfrJniMethod.cpp:

JVM_ENTRY_NO_ENV(jlong, jfr_host_total_swap_memory(JNIEnv* env, jclass jvm))
#ifdef LINUX
  // We want the host swap memory, not the container value.
  return os::Linux::host_swap();
#else
  physical_memory_size_type total_swap_space = 0;
  // Return value ignored - defaulting to 0 on failure.
  (void)os::total_swap_space(total_swap_space);
  return static_cast<jlong>(total_swap_space);
#endif
JVM_END

JVM_ENTRY_NO_ENV(void, jfr_emit_data_loss(JNIEnv* env, jclass jvm, jlong bytes))
  EventDataLoss::commit(bytes, min_jlong);
JVM_END

JVM_ENTRY_NO_ENV(jlong, jfr_register_stack_filter(JNIEnv* env,  jclass jvm, jobjectArray classes, jobjectArray methods))
  return JfrStackFilterRegistry::add(classes, methods, thread);
JVM_END

JVM_ENTRY_NO_ENV(void, jfr_unregister_stack_filter(JNIEnv* env,  jclass jvm, jlong id))
  JfrStackFilterRegistry::remove(id);
JVM_END

NO_TRANSITION(jlong, jfr_nanos_now(JNIEnv* env, jclass jvm))

src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp:

      assert(!buffer->transient(), "invariant");
      assert(buffer->lease(), "invariant");
      storage_instance.control().increment_leased();
      return buffer;
    }
  }
  return acquire_transient(size, thread);
}

static void write_data_loss_event(JfrBuffer* buffer, u8 unflushed_size, Thread* thread) {
  assert(buffer != nullptr, "invariant");
  assert(buffer->empty(), "invariant");
  const u8 total_data_loss = thread->jfr_thread_local()->add_data_lost(unflushed_size);
  if (EventDataLoss::is_enabled()) {
    JfrNativeEventWriter writer(buffer, thread);
    writer.begin_event_write(false);
    writer.write<u8>(EventDataLoss::eventId);
    writer.write(JfrTicks::now());
    writer.write(unflushed_size);
    writer.write(total_data_loss);
    writer.end_event_write(false);
  }
}

static void write_data_loss(BufferPtr buffer, Thread* thread) {
  assert(buffer != nullptr, "invariant");
  const size_t unflushed_size = buffer->unflushed_size();
  buffer->reinitialize();

Configuration enabled
default true
profiling true

Field Type Description
amount ulong: bytes Amount Amount lost data
total ulong: bytes Total Total lost amount for thread

Flush

experimental startTime duration 14 17 21 25 26

Category: Flight Recorder

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp:

template <typename Functor>
static u4 invoke(Functor& f) {
  f.process();
  return f.elements();
}

template <typename Functor>
static u4 invoke_with_flush_event(Functor& f) {
  const u4 elements = invoke(f);
  EventFlush e(UNTIMED);
  e.set_starttime(f.start_time());
  e.set_endtime(f.end_time());
  e.set_flushId(flushpoint_id);
  e.set_elements(f.elements());
  e.set_size(f.size());
  e.commit();
  return elements;
}

class StackTraceRepository : public StackObj {
 private:

Configuration enabled threshold
default false 0 ns
profiling false 0 ns

Field Type Description
flushId ulong Flush Identifier
elements ulong Elements Written
size ulong: bytes Size Written

Examples 3
elements ulong
2578
flushId ulong
140
size ulong: bytes
705196
startTime long: millis
218005250916
elements ulong
1043
flushId ulong
136
size ulong: bytes
319819
startTime long: millis
264963517667
elements ulong
2876
flushId ulong
117
size ulong: bytes
1024668
startTime long: millis
232778090167

ActiveRecording

default profiling startTime duration stackTrace 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ActiveRecordingEvent.java

Category: Flight Recorder

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

public final class JDKEvents {

    private static final Class<?>[] eventClasses = {
        ActiveSettingEvent.class,
        ActiveRecordingEvent.class,
        // jdk.internal.event.* classes need their mirror
        // event class to be listed in the MirrorEvents class.
        jdk.internal.event.DeserializationEvent.class,
        jdk.internal.event.ErrorThrownEvent.class,
        jdk.internal.event.ExceptionStatisticsEvent.class,
        jdk.internal.event.ExceptionThrownEvent.class,
        jdk.internal.event.FileForceEvent.class,
        jdk.internal.event.FileReadEvent.class,
        jdk.internal.event.FileWriteEvent.class,
        jdk.internal.event.ProcessStartEvent.class,
        jdk.internal.event.SecurityPropertyModificationEvent.class,

src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java:

                // and check for missing files. This will emit more error logs that can be seen in subsequent recordings.
                for (PlatformRecording r : getRecordings()) {
                    r.removeNonExistantPaths();
                }
            }
        }
        // Decrease initial reference count
        chunk.release();
        FilePurger.purge();
    }

    private void writeMetaEvents() {
        long timestamp = JVM.counterTime();
        if (ActiveRecordingEvent.enabled()) {
            for (PlatformRecording r : getRecordings()) {
                if (r.getState() == RecordingState.RUNNING && r.shouldWriteMetadataEvent()) {
                    WriteablePath path = r.getDestination();
                    Duration age = r.getMaxAge();
                    Duration flush = r.getFlushInterval();
                    Long size = r.getMaxSize();
                    Instant rStart = r.getStartTime();
                    Duration rDuration = r.getDuration();
                    ActiveRecordingEvent.commit(
                        timestamp,
                        r.getId(),
                        r.getName(),
                        path == null ? null : path.getRealPathText(),
                        r.isToDisk(),
                        age == null ? Long.MAX_VALUE : age.toMillis(),
                        flush == null ? Long.MAX_VALUE : flush.toMillis(),
                        size == null ? Long.MAX_VALUE : size,
                        rStart == null ? Long.MAX_VALUE : rStart.toEpochMilli(),
                        rDuration == null ? Long.MAX_VALUE : rDuration.toMillis()
                    );

src/jdk.jfr/share/classes/jdk/jfr/events/ActiveRecordingEvent.java:

@Name(Type.EVENT_NAME_PREFIX + "ActiveRecording")
@Label("Flight Recording")
@Category("Flight Recorder")
@RemoveFields({"duration", "eventThread", "stackTrace"})
public final class ActiveRecordingEvent extends AbstractJDKEvent {

    // The order of these fields must be the same as the parameters in
    // commit(... , long, String, String, long, long, long, long, long)

    @Label("Id")
    public long id;

    @Label("Name")
    public String name;

    @Label("Destination")

Configuration enabled
default true
profiling true

Field Type Description
id long Id
name string Name Consider contributing a description to jfreventcollector.
destination string Destination Consider contributing a description to jfreventcollector.
disk boolean 21+ To Disk
maxAge long: millis Max Age
flushInterval long: millis 14+ Flush Interval
maxSize long: bytes Max Size
recordingStart long: epochmillis Start Time
recordingDuration long: millis Recording Duration

Examples 3
destination string
[...]_1/code/experiments/jfreventcollector/jfr/sample_UseSerialGC.jfr
disk boolean
true
flushInterval long: millis
1000
id long
1
maxAge long: millis
9223372036854775807
maxSize long: bytes
262144000
name string
1
recordingDuration long: millis
9223372036854775807
recordingStart long: epochmillis
1754910820635
stackTrace StackTrace
null
startTime long: millis
275944365875
destination string
[...]_1/code/experiments/jfreventcollector/jfr/sample_UseParallelGC.jfr
disk boolean
true
flushInterval long: millis
1000
id long
1
maxAge long: millis
9223372036854775807
maxSize long: bytes
262144000
name string
1
recordingDuration long: millis
9223372036854775807
recordingStart long: epochmillis
1754910547922
stackTrace StackTrace
null
startTime long: millis
237254381625
destination string
[...]_1/code/experiments/jfreventcollector/jfr/sample_UseG1GC.jfr
disk boolean
true
flushInterval long: millis
1000
id long
1
maxAge long: millis
9223372036854775807
maxSize long: bytes
262144000
name string
1
recordingDuration long: millis
9223372036854775807
recordingStart long: epochmillis
1754910293748
stackTrace StackTrace
null
startTime long: millis
251756859541

ActiveSetting

default profiling startTime duration stackTrace 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ActiveSettingEvent.java

Category: Flight Recorder

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/EventControl.java:

    void writeActiveSettingEvent(long timestamp) {
        if (!type.isRegistered()) {
            return;
        }
        for (NamedControl nc : namedControls) {
            if (nc.control.isVisible(type.hasEventHook()) && type.isVisible()) {
                String value = nc.control.getLastValue();
                if (value == null) {
                    value = nc.control.getDefaultValue();
                }
                if (ActiveSettingEvent.enabled()) {
                    ActiveSettingEvent.commit(timestamp, type.getId(), nc.name(), value);
                }
            }
        }
    }

    public ArrayList<NamedControl> getNamedControls() {
        return namedControls;
    }

    public PlatformEventType getEventType() {
        return type;

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

public final class JDKEvents {

    private static final Class<?>[] eventClasses = {
        ActiveSettingEvent.class,
        ActiveRecordingEvent.class,
        // jdk.internal.event.* classes need their mirror
        // event class to be listed in the MirrorEvents class.
        jdk.internal.event.DeserializationEvent.class,
        jdk.internal.event.ErrorThrownEvent.class,
        jdk.internal.event.ExceptionStatisticsEvent.class,
        jdk.internal.event.ExceptionThrownEvent.class,
        jdk.internal.event.FileForceEvent.class,
        jdk.internal.event.FileReadEvent.class,
        jdk.internal.event.FileWriteEvent.class,
        jdk.internal.event.ProcessStartEvent.class,

src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java:

                        r.getId(),
                        r.getName(),
                        path == null ? null : path.getRealPathText(),
                        r.isToDisk(),
                        age == null ? Long.MAX_VALUE : age.toMillis(),
                        flush == null ? Long.MAX_VALUE : flush.toMillis(),
                        size == null ? Long.MAX_VALUE : size,
                        rStart == null ? Long.MAX_VALUE : rStart.toEpochMilli(),
                        rDuration == null ? Long.MAX_VALUE : rDuration.toMillis()
                    );
                }
            }
        }
        if (ActiveSettingEvent.enabled()) {
            for (EventControl ec : MetadataRepository.getInstance().getEventControls()) {
                ec.writeActiveSettingEvent(timestamp);
            }
        }
    }

    private void periodicTask() {
        if (!JVMSupport.hasJFR()) {
            return;
        }
        while (true) {

src/jdk.jfr/share/classes/jdk/jfr/events/ActiveSettingEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.RemoveFields;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "ActiveSetting")
@Label("Recording Setting")
@Category("Flight Recorder")
@RemoveFields({"duration", "eventThread", "stackTrace"})
public final class ActiveSettingEvent extends AbstractJDKEvent {

    // The order of these fields must be the same as the parameters in
    // commit(... , long, String, String)

    @Label("Event Id")
    public long id;

    @Label("Setting Name")
    public String name;

    @Label("Setting Value")

Configuration enabled
default true
profiling true

Field Type Description
id long Event Id
name string Setting Name
value string Setting Value

Examples 3
id long
101
name string
period
stackTrace StackTrace
null
startTime long: millis
242182403167
value string
beginChunk
id long
48
name string
enabled
stackTrace StackTrace
null
startTime long: millis
230196648958
value string
true
id long
47
name string
enabled
stackTrace StackTrace
null
startTime long: millis
199115347333
value string
true

JVM

JVMInformation

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine

Description of JVM and the Java application

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

PeriodicType JfrPeriodicEventSet::type(void) {
  return _type;
}

TRACE_REQUEST_FUNC(ResidentSetSize) {
  os::jfr_report_memory_info();
}

TRACE_REQUEST_FUNC(JVMInformation) {
  ResourceMark rm;
  EventJVMInformation event;
  event.set_jvmName(VM_Version::vm_name());
  event.set_jvmVersion(VM_Version::internal_vm_info_string());
  event.set_javaArguments(Arguments::java_command());
  event.set_jvmArguments(Arguments::jvm_args());
  event.set_jvmFlags(Arguments::jvm_flags());
  event.set_jvmStartTime(Management::vm_init_done_time());
  event.set_pid(os::current_process_id());
  event.commit();
 }

TRACE_REQUEST_FUNC(OSInformation) {

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
jvmName string JVM Name
jvmVersion string JVM Version
jvmArguments string JVM Command Line Arguments
jvmFlags string JVM Settings File Arguments
javaArguments string Java Application Arguments
jvmStartTime long: epochmillis JVM Start Time
pid long Process Identifier

Examples 3
javaArguments string
[...]_1/code/experiments/jfreventcollector/.cache/renaissance.jar -t 5 -r 1 all
jvmArguments string
-XX:StartFlightRecording=filename=[...]_1/code/experiments/jfreventcollector/jfr/sample_UseSerialGC.jfr,settings=[...]_1/code/experiments/jfreventcollector/.cache/jfc.jfc -XX:+UseSerialGC
jvmFlags string
null
jvmName string
OpenJDK 64-Bit Server VM
jvmStartTime long: epochmillis
1754910820470
jvmVersion string
OpenJDK 64-Bit Server VM (21.0.7+6-LTS) for bsd-aarch64 JRE (21.0.7+6-LTS), built on 2025-04-15T00:00:00Z by "admin" with clang Apple LLVM 15.0.0 (clang-1500.1.0.2.5)
pid long
97133
startTime long: millis
252322436875
javaArguments string
[...]_1/code/experiments/jfreventcollector/.cache/renaissance.jar -t 5 -r 1 all
jvmArguments string
-XX:StartFlightRecording=filename=[...]_1/code/experiments/jfreventcollector/jfr/sample_UseG1GC.jfr,settings=[...]_1/code/experiments/jfreventcollector/.cache/jfc.jfc -XX:+UseG1GC
jvmFlags string
null
jvmName string
OpenJDK 64-Bit Server VM
jvmStartTime long: epochmillis
1754910293523
jvmVersion string
OpenJDK 64-Bit Server VM (21.0.7+6-LTS) for bsd-aarch64 JRE (21.0.7+6-LTS), built on 2025-04-15T00:00:00Z by "admin" with clang Apple LLVM 15.0.0 (clang-1500.1.0.2.5)
pid long
96009
startTime long: millis
217937005250
javaArguments string
[...]_1/code/experiments/jfreventcollector/.cache/renaissance.jar -t 5 -r 1 all
jvmArguments string
-XX:StartFlightRecording=filename=[...]_1/code/experiments/jfreventcollector/jfr/sample_UseParallelGC.jfr,settings=[...]_1/code/experiments/jfreventcollector/.cache/jfc.jfc -XX:+UseParallelGC
jvmFlags string
null
jvmName string
OpenJDK 64-Bit Server VM
jvmStartTime long: epochmillis
1754910547780
jvmVersion string
OpenJDK 64-Bit Server VM (21.0.7+6-LTS) for bsd-aarch64 JRE (21.0.7+6-LTS), built on 2025-04-15T00:00:00Z by "admin" with clang Apple LLVM 15.0.0 (clang-1500.1.0.2.5)
pid long
96543
startTime long: millis
251329633458

InitialSystemProperty

default profiling startTime end of every chunk 11 17 21 25 26

Category: Java Virtual Machine

System Property at JVM start

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  jlong max_size = conf.has_max_size_default_value() ? jmc_undefined_long : conf.max_size();
  EventYoungGenerationConfiguration event;
  event.set_maxSize((u8)max_size);
  event.set_minSize(conf.min_size());
  event.set_newRatio(static_cast<unsigned int>(conf.new_ratio()));
  event.commit();
}

TRACE_REQUEST_FUNC(InitialSystemProperty) {
  SystemProperty* p = Arguments::system_properties();
  JfrTicks time_stamp = JfrTicks::now();
  while (p !=  nullptr) {
    if (!p->internal()) {
      EventInitialSystemProperty event(UNTIMED);
      event.set_key(p->key());
      event.set_value(p->value());
      event.set_starttime(time_stamp);
      event.set_endtime(time_stamp);
      event.commit();
    }
    p = p->next();
  }
}

TRACE_REQUEST_FUNC(ThreadAllocationStatistics) {

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
key string Key
value string Value

Examples 3
key string
java.home
startTime long: millis
201461740250
value string
[...]_1/.sdkman/candidates/java/21.0.7-tem
key string
jdk.debug
startTime long: millis
233960284417
value string
release
key string
sun.java.launcher
startTime long: millis
258417665250
value string
SUN_STANDARD

JVM: Class Loading

ClassLoad

startTime duration eventThread stackTrace 11 17 21 25 26

Category: Java Virtual Machine / Class Loading

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/classfile/systemDictionary.cpp:

        InstanceKlass* check = loader_data->dictionary()->find_class(current, name);
        if (check != nullptr) {
          // Klass is already loaded, so just return it
          return check;
        }
        // check if other thread failed to load and cleaned up
        oldprobe = PlaceholderTable::get_entry(name, loader_data);
      }
    }
  }
  return nullptr;
}

void SystemDictionary::post_class_load_event(EventClassLoad* event, const InstanceKlass* k, const ClassLoaderData* init_cld) {
  assert(event != nullptr, "invariant");
  assert(k != nullptr, "invariant");
  event->set_loadedClass(k);
  event->set_definingClassLoader(k->class_loader_data());
  event->set_initiatingClassLoader(init_cld);
  event->commit();
}

// SystemDictionary::resolve_instance_class_or_null is the main function for class name resolution.
// After checking if the InstanceKlass already exists, it checks for ClassCircularityError and
// whether the thread must wait for loading in parallel.  It eventually calls load_instance_class,
// which will load the class via the bootstrap loader or call ClassLoader.loadClass().
// This can return null, an exception or an InstanceKlass.
InstanceKlass* SystemDictionary::resolve_instance_class_or_null(Symbol* name,
                                                                Handle class_loader,
                                                                TRAPS) {
  // name must be in the form of "java/lang/Object" -- cannot be "Ljava/lang/Object;"
  DEBUG_ONLY(ResourceMark rm(THREAD));
  assert(name != nullptr && !Signature::is_array(name) &&
         !Signature::has_envelope(name), "invalid class name: %s", name == nullptr ? "nullptr" : name->as_C_string());

  EventClassLoad class_load_start_event;

  HandleMark hm(THREAD);

  ClassLoaderData* loader_data = register_loader(class_loader);
  Dictionary* dictionary = loader_data->dictionary();

  // Do lookup to see if class already exists.
  InstanceKlass* probe = dictionary->find_class(THREAD, name);
  if (probe != nullptr) return probe;

  // Non-bootstrap class loaders will call out to class loader and

src/hotspot/share/classfile/systemDictionary.cpp:

// Note: this method is much like resolve_class_from_stream, but
// does not publish the classes in the SystemDictionary.
// Handles Lookup.defineClass hidden.
InstanceKlass* SystemDictionary::resolve_hidden_class_from_stream(
                                                     ClassFileStream* st,
                                                     Symbol* class_name,
                                                     Handle class_loader,
                                                     const ClassLoadInfo& cl_info,
                                                     TRAPS) {

  EventClassLoad class_load_start_event;
  ClassLoaderData* loader_data;

  // - for hidden classes that are not strong: create a new CLD that has a class holder and
  //                                           whose loader is the Lookup class's loader.
  // - for hidden class: add the class to the Lookup class's loader's CLD.
  assert (cl_info.is_hidden(), "only used for hidden classes");
  bool create_mirror_cld = !cl_info.is_strong_hidden();
  loader_data = register_loader(class_loader, create_mirror_cld);

  assert(st != nullptr, "invariant");

src/hotspot/share/classfile/systemDictionary.hpp:

//         readers (we must ensure write ordering)
//
// Note that placeholders are deleted at any time, as they are removed
// when a class is completely loaded. Therefore, readers as well as writers
// of placeholders must hold the SystemDictionary_lock.
//

class BootstrapInfo;
class ClassFileStream;
class ClassLoadInfo;
class Dictionary;
class PackageEntry;
class GCTimer;
class EventClassLoad;
class Symbol;

template <class E> class GrowableArray;

class SystemDictionary : AllStatic {
  friend class AOTLinkedClassBulkLoader;
  friend class BootstrapInfo;
  friend class LambdaProxyClassDictionary;
  friend class vmClasses;

 public:

src/hotspot/share/classfile/systemDictionary.hpp:

  static bool check_shared_class_super_type(InstanceKlass* klass, InstanceKlass* super,
                                            Handle class_loader,
                                            bool is_superclass, TRAPS);
  static bool check_shared_class_super_types(InstanceKlass* ik, Handle class_loader, TRAPS);
  // Second part of load_shared_class
  static void load_shared_class_misc(InstanceKlass* ik, ClassLoaderData* loader_data) NOT_CDS_RETURN;
  static void restore_archived_method_handle_intrinsics_impl(TRAPS) NOT_CDS_RETURN;

protected:
  // Used by AOTLinkedClassBulkLoader, LambdaProxyClassDictionary, and SystemDictionaryShared

  static bool add_loader_constraint(Symbol* name, Klass* klass_being_linked,  Handle loader1,
                                    Handle loader2);
  static void post_class_load_event(EventClassLoad* event, const InstanceKlass* k, const ClassLoaderData* init_cld);
  static InstanceKlass* load_shared_class(InstanceKlass* ik,
                                          Handle class_loader,
                                          Handle protection_domain,
                                          const ClassFileStream *cfs,
                                          PackageEntry* pkg_entry,
                                          TRAPS);
  static void preload_class(Handle class_loader, InstanceKlass* ik, TRAPS);
  static Handle get_loader_lock_or_null(Handle class_loader);
  static InstanceKlass* find_or_define_instance_class(Symbol* class_name,
                                                      Handle class_loader,
                                                      InstanceKlass* k, TRAPS);

src/hotspot/share/cds/lambdaProxyClassDictionary.cpp:

  assert(shared_nest_host->is_same_class_package(lambda_ik),
         "lambda proxy class and its nest host must be in the same package");
  // The lambda proxy class and its nest host have the same class loader and class loader data,
  // as verified in add_lambda_proxy_class()
  assert(shared_nest_host->class_loader() == class_loader(), "mismatched class loader");
  assert(shared_nest_host->class_loader_data() == ClassLoaderData::class_loader_data(class_loader()), "mismatched class loader data");
  lambda_ik->set_nest_host(shared_nest_host);

  // Ensures the nest host is the same as the lambda proxy's
  // nest host recorded at dump time.
  InstanceKlass* nest_host = caller_ik->nest_host(THREAD);
  assert(nest_host == shared_nest_host, "mismatched nest host");

  EventClassLoad class_load_start_event;

  // Add to class hierarchy, and do possible deoptimizations.
  lambda_ik->add_to_hierarchy(THREAD);
  // But, do not add to dictionary.

  lambda_ik->link_class(CHECK_NULL);
  // notify jvmti
  if (JvmtiExport::should_post_class_load()) {
    JvmtiExport::post_class_load(THREAD, lambda_ik);
  }
  if (class_load_start_event.should_commit()) {

Configuration enabled stackTrace threshold
default false true 0 ms
profiling false true 0 ms

Field Type Description
loadedClass Class Loaded Class Consider contributing a description to jfreventcollector.
definingClassLoader ClassLoader Defining Class Loader Consider contributing a description to jfreventcollector.
initiatingClassLoader ClassLoader Initiating Class Loader Consider contributing a description to jfreventcollector.

Examples 3
definingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
initiatingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
loadedClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1537
name string
scala/reflect/api/StandardDefinitions
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/reflect/api
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(Ljava/lang/ClassLoader;Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;
hidden boolean
false
modifiers int
264
name string
defineClass1
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1025
name string
java/lang/ClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Native
truncated boolean
false
startTime long: millis
260418380458
definingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
initiatingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
loadedClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1537
name string
scala/reflect/internal/tpe/TypeComparers
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/reflect/internal/tpe
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(Ljava/lang/ClassLoader;Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;
hidden boolean
false
modifiers int
264
name string
defineClass1
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1025
name string
java/lang/ClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Native
truncated boolean
true
startTime long: millis
223765756333
definingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
initiatingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
loadedClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
true
modifiers int
4112
name string
org.apache.spark.ml.recommendation.ALS$$$Lambda+0x0000007006643928/1566886817
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark/ml/recommendation
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(Ljava/lang/ClassLoader;Ljava/lang/Class;Ljava/lang/String;[BIILjava/security/ProtectionDomain;ZILjava/lang/Object;)Ljava/lang/Class;
hidden boolean
false
modifiers int
264
name string
defineClass0
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1025
name string
java/lang/ClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Native
truncated boolean
false
startTime long: millis
243532981708

ClassDefine

startTime eventThread stackTrace 11 17 21 25 26

Category: Java Virtual Machine / Class Loading

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/classfile/systemDictionary.cpp:

    // before references to the initiating class loader.
    loader_data->record_dependency(loaded_class);

    update_dictionary(THREAD, loaded_class, loader_data);

    if (JvmtiExport::should_post_class_load()) {
      JvmtiExport::post_class_load(THREAD, loaded_class);
    }
  }
  return loaded_class;
}

static void post_class_define_event(InstanceKlass* k, const ClassLoaderData* def_cld) {
  EventClassDefine event;
  if (event.should_commit()) {
    event.set_definedClass(k);
    event.set_definingClassLoader(def_cld);
    event.commit();
  }
}

void SystemDictionary::define_instance_class(InstanceKlass* k, Handle class_loader, TRAPS) {

  ClassLoaderData* loader_data = k->class_loader_data();
  assert(loader_data->class_loader() == class_loader(), "they must be the same");

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
definedClass Class Defined Class Consider contributing a description to jfreventcollector.
definingClassLoader ClassLoader Defining Class Loader Consider contributing a description to jfreventcollector.

Examples 3
definedClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1537
name string
scala/reflect/api/StandardDefinitions
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/reflect/api
definingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(Ljava/lang/ClassLoader;Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;
hidden boolean
false
modifiers int
264
name string
defineClass1
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1025
name string
java/lang/ClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Native
truncated boolean
true
startTime long: millis
223773516666
definedClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1537
name string
scala/reflect/internal/FlagSets
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/reflect/internal
definingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(Ljava/lang/ClassLoader;Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;
hidden boolean
false
modifiers int
264
name string
defineClass1
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1025
name string
java/lang/ClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Native
truncated boolean
false
startTime long: millis
260417897167
definedClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1537
name string
scala/reflect/runtime/TwoWayCaches
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/reflect/runtime
definingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(Ljava/lang/ClassLoader;Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;
hidden boolean
false
modifiers int
264
name string
defineClass1
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1025
name string
java/lang/ClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Native
truncated boolean
true
startTime long: millis
244510623958

ClassRedefinition

default profiling startTime 15 17 21 25 26

Category: Java Virtual Machine / Class Loading

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/prims/jvmtiRedefineClasses.cpp:

  _timer_rsc_phase1.stop();
  if (log_is_enabled(Info, redefine, class, timer)) {
    _timer_rsc_phase2.start();
  }

  if (the_class->oop_map_cache() != nullptr) {
    // Flush references to any obsolete methods from the oop map cache
    // so that obsolete methods are not pinned.
    the_class->oop_map_cache()->flush_obsolete_entries();
  }

  increment_class_counter(the_class);

  if (EventClassRedefinition::is_enabled()) {
    EventClassRedefinition event;
    event.set_classModificationCount(java_lang_Class::classRedefinedCount(the_class->java_mirror()));
    event.set_redefinedClass(the_class);
    event.set_redefinitionId(_id);
    event.commit();
  }

  {
    ResourceMark rm(current);
    // increment the classRedefinedCount field in the_class and in any
    // direct and indirect subclasses of the_class
    physical_memory_size_type avail_mem = 0;

Configuration enabled
default true
profiling true

Field Type Description
redefinedClass Class Redefined Class Consider contributing a description to jfreventcollector.
classModificationCount int Class Modification Count The number of times the class has changed
redefinitionId ulong Class Redefinition Id

RedefineClasses

default profiling startTime duration eventThread stackTrace 15 17 21 25 26

Category: Java Virtual Machine / Class Loading

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/prims/jvmtiEnv.cpp:

    event.set_classCount(class_count);
    event.set_redefinitionId(op.id());
    event.commit();
  }
  return error;
} /* end RetransformClasses */


// class_count - pre-checked to be greater than or equal to 0
// class_definitions - pre-checked for null
jvmtiError
JvmtiEnv::RedefineClasses(jint class_count, const jvmtiClassDefinition* class_definitions) {
//TODO: add locking
  EventRedefineClasses event;
  VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
  VMThread::execute(&op);
  jvmtiError error = op.check_error();
  if (error == JVMTI_ERROR_NONE) {
    event.set_classCount(class_count);
    event.set_redefinitionId(op.id());
    event.commit();
  }
  return error;
} /* end RedefineClasses */

Configuration enabled stackTrace threshold
default true true 0 ms
profiling true true 0 ms

Field Type Description
classCount int Class Count
redefinitionId ulong Class Redefinition Id

RetransformClasses

default profiling startTime duration eventThread stackTrace 15 17 21 25 26

Category: Java Virtual Machine / Class Loading

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/prims/jvmtiEnv.cpp:

      class_definitions[index].class_byte_count = (jint)reconstituter.class_file_size();
      class_definitions[index].class_bytes      = (unsigned char*)
                                                       reconstituter.class_file_bytes();
    } else {
      // it is cached, get it from the cache
      class_definitions[index].class_byte_count = ik->get_cached_class_file_len();
      class_definitions[index].class_bytes      = ik->get_cached_class_file_bytes();
    }
    class_definitions[index].klass              = jcls;
  }
  EventRetransformClasses event;
  VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform);
  VMThread::execute(&op);
  jvmtiError error = op.check_error();
  if (error == JVMTI_ERROR_NONE) {
    event.set_classCount(class_count);
    event.set_redefinitionId(op.id());
    event.commit();
  }
  return error;
} /* end RetransformClasses */

Configuration enabled stackTrace threshold
default true true 0 ms
profiling true true 0 ms

Field Type Description
classCount int Class Count
redefinitionId ulong Class Redefinition Id

ClassUnload

startTime eventThread 11 17 21 25 26

Category: Java Virtual Machine / Class Loading

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/oops/instanceKlass.cpp:

  ClassLoadingService::notify_class_unloaded(ik);

  SystemDictionaryShared::handle_class_unloading(ik);

  if (log_is_enabled(Info, class, unload)) {
    ResourceMark rm;
    log_info(class, unload)("unloading class %s " PTR_FORMAT, ik->external_name(), p2i(ik));
  }

  Events::log_class_unloading(Thread::current(), ik);

#if INCLUDE_JFR
  assert(ik != nullptr, "invariant");
  EventClassUnload event;
  event.set_unloadedClass(ik);
  event.set_definingClassLoader(ik->class_loader_data());
  event.commit();
#endif
}

static void method_release_C_heap_structures(Method* m) {
  m->release_C_heap_structures();
}

// Called also by InstanceKlass::deallocate_contents, with false for release_sub_metadata.

Configuration enabled
default false
profiling false

Field Type Description
unloadedClass Class Unloaded Class Consider contributing a description to jfreventcollector.
definingClassLoader ClassLoader Defining Class Loader Consider contributing a description to jfreventcollector.

Examples 3
definingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
startTime long: millis
246898377333
unloadedClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
17
name string
scala/collection/immutable/Vector2
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/collection/immutable
definingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
startTime long: millis
226116279291
unloadedClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
0
name string
org/renaissance/jdk/streams/MnemonicsCoderWithStream$1
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/renaissance/jdk/streams
definingClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
startTime long: millis
267243160750
unloadedClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
17
name string
scala/collection/mutable/Map$
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/collection/mutable

JVM: Code Cache

CodeCacheFull

default profiling startTime eventThread 11 17 21 25 26

Category: Java Virtual Machine / Code Cache

A code heap is full, this leads to disabling the compiler

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/code/codeCache.cpp:

    {
      ttyLocker ttyl;
      tty->print("%s", s.freeze());
    }

    if (full_count == 1) {
      if (PrintCodeHeapAnalytics) {
        CompileBroker::print_heapinfo(tty, "all", 4096); // details, may be a lot!
      }
    }
  }

  EventCodeCacheFull event;
  if (event.should_commit()) {
    event.set_codeBlobType((u1)code_blob_type);
    event.set_startAddress((u8)heap->low_boundary());
    event.set_commitedTopAddress((u8)heap->high());
    event.set_reservedTopAddress((u8)heap->high_boundary());
    event.set_entryCount(heap->blob_count());
    event.set_methodCount(heap->nmethod_count());
    event.set_adaptorCount(heap->adapter_count());
    event.set_unallocatedCapacity(heap->unallocated_capacity());
    event.set_fullCount(heap->full_count());
    event.set_codeCacheMaxCapacity(CodeCache::max_capacity());

Configuration enabled
default true
profiling true

Field Type Description
codeBlobType CodeBlobType Code Heap Consider contributing a description to jfreventcollector.
startAddress ulong: address Start Address
commitedTopAddress ulong: address Commited Top
reservedTopAddress ulong: address Reserved Top
entryCount int Entries
methodCount int Methods
adaptorCount int Adaptors
unallocatedCapacity ulong: bytes Unallocated
fullCount int Full Count
codeCacheMaxCapacity ulong: bytes 17+ Code Cache Maximum Capacity

CodeCacheStatistics

default profiling startTime every chunk 11 17 21 25 26

Category: Java Virtual Machine / Code Cache

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

TRACE_REQUEST_FUNC(CompilerConfiguration) {
  EventCompilerConfiguration event;
  event.set_threadCount(static_cast<s4>(CICompilerCount));
  event.set_tieredCompilation(TieredCompilation);
  event.set_dynamicCompilerThreadCount(UseDynamicNumberOfCompilerThreads);
  event.commit();
}

TRACE_REQUEST_FUNC(CodeCacheStatistics) {
  // Emit stats for all available code heaps
  for (int bt_index = 0; bt_index < static_cast<int>(CodeBlobType::NumTypes); ++bt_index) {
    const CodeBlobType bt = static_cast<CodeBlobType>(bt_index);
    if (CodeCache::heap_available(bt)) {
      EventCodeCacheStatistics event;
      event.set_codeBlobType((u1)bt);
      event.set_startAddress((u8)CodeCache::low_bound(bt));
      event.set_reservedTopAddress((u8)CodeCache::high_bound(bt));
      event.set_entryCount(CodeCache::blob_count(bt));
      event.set_methodCount(CodeCache::nmethod_count(bt));
      event.set_adaptorCount(CodeCache::adapter_count(bt));
      event.set_unallocatedCapacity(CodeCache::unallocated_capacity(bt));
      event.set_fullCount(CodeCache::get_codemem_full_count(bt));
      event.commit();
    }
  }

Configuration enabled period
default true everyChunk
profiling true everyChunk

Field Type Description
codeBlobType CodeBlobType Code Heap Consider contributing a description to jfreventcollector.
startAddress ulong: address Start Address
reservedTopAddress ulong: address Reserved Top
entryCount int Entries
methodCount int Methods
adaptorCount int Adaptors
unallocatedCapacity ulong: bytes Unallocated
fullCount int Full Count

Examples 3
adaptorCount int
0
codeBlobType CodeBlobType
CodeHeap 'profiled nmethods'
entryCount int
8388
fullCount int
0
methodCount int
8388
reservedTopAddress ulong: address
4677795840
startAddress ulong: address
4554899456
startTime long: millis
275491021292
unallocatedCapacity ulong: bytes
95361664
adaptorCount int
0
codeBlobType CodeBlobType
CodeHeap 'profiled nmethods'
entryCount int
6328
fullCount int
0
methodCount int
6328
reservedTopAddress ulong: address
5365776384
startAddress ulong: address
5242880000
startTime long: millis
240014271875
unallocatedCapacity ulong: bytes
101549440
adaptorCount int
2302
codeBlobType CodeBlobType
CodeHeap 'non-nmethods'
entryCount int
2396
fullCount int
0
methodCount int
0
reservedTopAddress ulong: address
4684644352
startAddress ulong: address
4678795264
startTime long: millis
239147432042
unallocatedCapacity ulong: bytes
2965376

CodeCacheConfiguration

default profiling startTime end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / Code Cache

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

      event.set_startAddress((u8)CodeCache::low_bound(bt));
      event.set_reservedTopAddress((u8)CodeCache::high_bound(bt));
      event.set_entryCount(CodeCache::blob_count(bt));
      event.set_methodCount(CodeCache::nmethod_count(bt));
      event.set_adaptorCount(CodeCache::adapter_count(bt));
      event.set_unallocatedCapacity(CodeCache::unallocated_capacity(bt));
      event.set_fullCount(CodeCache::get_codemem_full_count(bt));
      event.commit();
    }
  }
}

TRACE_REQUEST_FUNC(CodeCacheConfiguration) {
  EventCodeCacheConfiguration event;
  event.set_initialSize(InitialCodeCacheSize);
  event.set_reservedSize(ReservedCodeCacheSize);
  event.set_nonNMethodSize(NonNMethodCodeHeapSize);
  event.set_profiledSize(ProfiledCodeHeapSize);
  event.set_nonProfiledSize(NonProfiledCodeHeapSize);
  event.set_expansionSize(CodeCacheExpansionSize);
  event.set_minBlockLength(CodeCacheMinBlockLength);
  event.set_startAddress((u8)CodeCache::low_bound());
  event.set_reservedTopAddress((u8)CodeCache::high_bound());
  event.commit();
}

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
initialSize ulong: bytes Initial Size
reservedSize ulong: bytes Reserved Size
nonNMethodSize ulong: bytes Non-Nmethod Size
profiledSize ulong: bytes Profiled Size
nonProfiledSize ulong: bytes Non-Profiled Size
expansionSize ulong: bytes Expansion Size
minBlockLength ulong: bytes Minimum Block Length
startAddress ulong: address Start Address
reservedTopAddress ulong: address Reserved Top

Examples 3
expansionSize ulong: bytes
65536
initialSize ulong: bytes
2555904
minBlockLength ulong: bytes
6
nonNMethodSize ulong: bytes
5839564
nonProfiledSize ulong: bytes
122909338
profiledSize ulong: bytes
122909338
reservedSize ulong: bytes
251658240
reservedTopAddress ulong: address
4807557120
startAddress ulong: address
4555898880
startTime long: millis
255857308417
expansionSize ulong: bytes
65536
initialSize ulong: bytes
2555904
minBlockLength ulong: bytes
6
nonNMethodSize ulong: bytes
5839564
nonProfiledSize ulong: bytes
122909338
profiledSize ulong: bytes
122909338
reservedSize ulong: bytes
251658240
reservedTopAddress ulong: address
4806557696
startAddress ulong: address
4554899456
startTime long: millis
252333668125
expansionSize ulong: bytes
65536
initialSize ulong: bytes
2555904
minBlockLength ulong: bytes
6
nonNMethodSize ulong: bytes
5839564
nonProfiledSize ulong: bytes
122909338
profiledSize ulong: bytes
122909338
reservedSize ulong: bytes
251658240
reservedTopAddress ulong: address
5494538240
startAddress ulong: address
5242880000
startTime long: millis
244991012625

JVM: Compiler

JITRestart

default profiling startTime eventThread 17 21 25 26

Category: Java Virtual Machine / Compiler

Restart of the JIT compilers after they were stopped

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/code/codeCache.cpp:

    delete curr;
    curr = next;
  }
  _exception_cache_purge_list = nullptr;
}

// Restart compiler if possible and required..
void CodeCache::maybe_restart_compiler(size_t freed_memory) {

  // Try to start the compiler again if we freed any memory
  if (!CompileBroker::should_compile_new_jobs() && freed_memory != 0) {
    CompileBroker::set_should_compile_new_jobs(CompileBroker::run_compilation);
    log_info(codecache)("Restarting compiler");
    EventJITRestart event;
    event.set_freedMemory(freed_memory);
    event.set_codeCacheMaxCapacity(CodeCache::max_capacity());
    event.commit();
  }
}

uint8_t CodeCache::_unloading_cycle = 1;

void CodeCache::increment_unloading_cycle() {
  // 2-bit value (see IsUnloadingState in nmethod.cpp for details)
  // 0 is reserved for new methods.

Configuration enabled
default true
profiling true

Field Type Description
freedMemory ulong: bytes Freed Memory
codeCacheMaxCapacity ulong: bytes Code Cache Maximum Capacity

Compilation

default profiling startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / Compiler

Results of method compilation attempts

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/compiler/compileBroker.cpp:

void CompileBroker::handle_compile_error(CompilerThread* thread, CompileTask* task, ciEnv* ci_env,
                                         int compilable, const char* failure_reason) {
  if (!AbortVMOnCompilationFailure) {
    return;
  }
  if (compilable == ciEnv::MethodCompilable_not_at_tier) {
    fatal("Not compilable at tier %d: %s", task->comp_level(), failure_reason);
  }
  if (compilable == ciEnv::MethodCompilable_never) {
    fatal("Never compilable: %s", failure_reason);
  }
}

static void post_compilation_event(EventCompilation& event, CompileTask* task) {
  assert(task != nullptr, "invariant");
  CompilerEvent::CompilationEvent::post(event,
                                        task->compile_id(),
                                        task->compiler()->type(),
                                        task->method(),
                                        task->comp_level(),
                                        task->is_success(),
                                        task->osr_bci() != CompileBroker::standard_entry_bci,
                                        task->nm_total_size(),
                                        task->num_inlined_bytecodes(),
                                        task->arena_bytes());
}

src/hotspot/share/compiler/compileBroker.cpp:

  // Allocate a new set of JNI handles.
  JNIHandleMark jhm(thread);
  Method* target_handle = task->method();
  int compilable = ciEnv::MethodCompilable;
  const char* failure_reason = nullptr;
  bool failure_reason_on_C_heap = false;
  const char* retry_message = nullptr;

#if INCLUDE_JVMCI
  if (UseJVMCICompiler && comp != nullptr && comp->is_jvmci()) {
    JVMCICompiler* jvmci = (JVMCICompiler*) comp;

    TraceTime t1("compilation", &time);
    EventCompilation event;
    JVMCICompileState compile_state(task, jvmci);
    JVMCIRuntime *runtime = nullptr;

    if (JVMCI::in_shutdown()) {
      failure_reason = "in JVMCI shutdown";
      retry_message = "not retryable";
      compilable = ciEnv::MethodCompilable_never;
    } else if (compile_state.target_method_is_old()) {
      // Skip redefined methods
      failure_reason = "redefined method";
      retry_message = "not retryable";

src/hotspot/share/compiler/compileBroker.cpp:

    bool method_is_old = ci_env.cache_jvmti_state();

    // Skip redefined methods
    if (method_is_old) {
      ci_env.record_method_not_compilable("redefined method", true);
    }

    // Cache DTrace flags
    ci_env.cache_dtrace_flags();

    ciMethod* target = ci_env.get_method_from_handle(target_handle);

    TraceTime t1("compilation", &time);
    EventCompilation event;

    if (comp == nullptr) {
      ci_env.record_method_not_compilable("no compiler");
    } else if (!ci_env.failing()) {
      if (WhiteBoxAPI && WhiteBox::compilation_locked) {
        whitebox_lock_compilation();
      }
      comp->compile_method(&ci_env, target, osr_bci, true, directive);

      /* Repeat compilation without installing code for profiling purposes */
      int repeat_compilation_count = directive->RepeatCompilationOption;

src/hotspot/share/compiler/compilerEvent.cpp:

template <typename EventType>
static inline void commit(EventType& event) {
  JavaThread* thread = JavaThread::current();
  JavaThreadState state = thread->thread_state();
  if (state == _thread_in_native) {
    ThreadInVMfromNative transition(thread);
    event.commit();
  } else {
    assert(state == _thread_in_vm, "coming from wrong thread state %d", state);
    event.commit();
  }
 }

void CompilerEvent::CompilationEvent::post(EventCompilation& event, int compile_id, CompilerType compiler_type, Method* method,
    int compile_level, bool success, bool is_osr, int code_size,
    int inlined_bytecodes, size_t arenaBytes) {
  event.set_compileId(compile_id);
  event.set_compiler(compiler_type);
  event.set_method(method);
  event.set_compileLevel((short)compile_level);
  event.set_succeded(success);
  event.set_isOsr(is_osr);
  event.set_codeSize(code_size);
  event.set_inlinedBytes(inlined_bytecodes);
  event.set_arenaBytes(arenaBytes);

src/hotspot/share/compiler/compilerEvent.hpp:

#if INCLUDE_JFR
#include "jfr/utilities/jfrTime.hpp"
#endif

class ciMethod;
template <typename>
class GrowableArray;
class Method;
class EventCompilation;
class EventCompilationFailure;
class EventCompilerInlining;
class EventCompilerPhase;
struct JfrStructCalleeMethod;

class CompilerEvent : AllStatic {
 public:
  static jlong ticksNow() {
    // Using Ticks for consistent usage outside JFR folder.
    JFR_ONLY(return JfrTime::is_ft_enabled() ? Ticks::now().ft_value() : Ticks::now().value();) NOT_JFR_RETURN_(0L);
  }

  class CompilationEvent : AllStatic {
   public:
    static void post(EventCompilation& event, int compile_id, CompilerType type, Method* method,
                     int compile_level, bool success, bool is_osr, int code_size,
                     int inlined_bytecodes, size_t arenaBytes) NOT_JFR_RETURN();
  };

  class CompilationFailureEvent : AllStatic {
   public:
    static void post(EventCompilationFailure& event, int compile_id, const char* reason) NOT_JFR_RETURN();
  };

  class PhaseEvent : AllStatic {
    friend class CompilerPhaseTypeConstant;

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/EmptyEventProvider.java:

package jdk.vm.ci.hotspot;

/**
 * An empty implementation for {@link EventProvider}. This implementation is used when no logging is
 * requested.
 */
final class EmptyEventProvider implements EventProvider {

    static InternalError shouldNotReachHere() {
        throw new InternalError("should not reach here");
    }

    @Override
    public CompilationEvent newCompilationEvent() {
        return new EmptyCompilationEvent();
    }

    static class EmptyCompilationEvent implements CompilationEvent {
        @Override
        public void commit() {
            throw shouldNotReachHere();
        }

        @Override
        public boolean shouldWrite() {
            // Events of this class should never been written.
            return false;
        }

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/EventProvider.java:

     * Creates and returns an empty implementation for {@link EventProvider}. This implementation
     * can be used when no logging is requested.
     */
    static EventProvider createEmptyEventProvider() {
        return new EmptyEventProvider();
    }

    /**
     * Creates and returns an empty implementation for {@link CompilationEvent}.
     */
    static CompilationEvent createEmptyCompilationEvent() {
        return new EmptyCompilationEvent();
    }

    /**
     * Creates and returns an empty implementation for {@link CompilationEvent}.
     */
    static CompilerFailureEvent createEmptyCompilerFailureEvent() {
        return new EmptyCompilerFailureEvent();
    }

    /**
     * An instant event is an event that is not considered to have taken any time.

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/EventProvider.java:

        /**
         * Ends the timing period for this event.
         */
        void end();
    }

    /**
     * Creates a new {@link CompilationEvent}.
     *
     * @return a compilation event
     */
    CompilationEvent newCompilationEvent();

    /**
     * A compilation event.
     */
    public interface CompilationEvent extends TimedEvent {
        void setMethod(String method);

        void setCompileId(int compileId);

        void setCompileLevel(int compileLevel);

        void setSucceeded(boolean succeeded);

Configuration enabled threshold
default true 1000 ms
profiling true 100 ms

Field Type Description
compileId int Compilation Identifier
compiler CompilerType 14+ Compiler Consider contributing a description to jfreventcollector.
method Method Method Consider contributing a description to jfreventcollector.
compileLevel ushort Compilation Level
succeded boolean Succeeded
isOsr boolean On Stack Replacement
codeSize ulong: bytes Compiled Code Size
inlinedBytes ulong: bytes Inlined Code Size
arenaBytes ulong: bytes 23+ Arena Usage

Examples 3
codeSize ulong: bytes
16424
compileId int
122184
compileLevel ushort
4
compiler CompilerType
c2
inlinedBytes ulong: bytes
3186
isOsr boolean
false
method Method
descriptor string
(Ljava/lang/Object;)Ljava/lang/Object;
hidden boolean
true
modifiers int
1
name string
apply
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
true
modifiers int
4112
name string
com.twitter.finagle.http.codec.ResponseConformanceFilter$$$Lambda+0x00000070089730a8/1487477875
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
com/twitter/finagle/http/codec
startTime long: millis
292144937792
succeded boolean
true
codeSize ulong: bytes
8888
compileId int
78044
compileLevel ushort
3
compiler CompilerType
c1
inlinedBytes ulong: bytes
101
isOsr boolean
false
method Method
descriptor string
(Lorg/apache/spark/ContextCleaner;Lorg/apache/spark/CleanupTaskWeakReference;)V
hidden boolean
false
modifiers int
4121
name string
$anonfun$keepCleaning$3
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
org/apache/spark/ContextCleaner
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark
startTime long: millis
242801467417
succeded boolean
true
codeSize ulong: bytes
58000
compileId int
105346
compileLevel ushort
4
compiler CompilerType
c2
inlinedBytes ulong: bytes
2706
isOsr boolean
false
method Method
descriptor string
(Ljava/lang/Object;Ldotty/tools/dotc/ast/Trees$Tree;Ldotty/tools/dotc/core/Contexts$Context;)Ljava/lang/Object;
hidden boolean
false
modifiers int
1
name string
foldOver
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1025
name string
dotty/tools/dotc/ast/Trees$Instance$TreeAccumulator
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
dotty/tools/dotc/ast
startTime long: millis
245900625000
succeded boolean
true

CompilerPhase

default profiling startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / Compiler

Describes various phases of the compilation process like inlining or string optimization related phases

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/opto/compile.cpp:

    if (n->is_Allocate()) {
      if (i != allocates) {
        Node* tmp = macro_node(allocates);
        _macro_nodes.at_put(allocates, n);
        _macro_nodes.at_put(i, tmp);
      }
      allocates++;
    }
  }
}

void Compile::print_method(CompilerPhaseType cpt, int level, Node* n) {
  if (failing_internal()) { return; } // failing_internal to not stress bailouts from printing code.
  EventCompilerPhase event(UNTIMED);
  if (event.should_commit()) {
    CompilerEvent::PhaseEvent::post(event, C->_latest_stage_start_counter, cpt, C->_compile_id, level);
  }
#ifndef PRODUCT
  ResourceMark rm;
  stringStream ss;
  ss.print_raw(CompilerPhaseTypeHelper::to_description(cpt));
  int iter = ++_igv_phase_iter[cpt];
  if (iter > 1) {
    ss.print(" %d", iter);
  }

src/hotspot/share/opto/compile.cpp:

// Only used from CompileWrapper
void Compile::begin_method() {
#ifndef PRODUCT
  if (_method != nullptr && should_print_igv(1)) {
    _igv_printer->begin_method();
  }
#endif
  C->_latest_stage_start_counter.stamp();
}

// Only used from CompileWrapper
void Compile::end_method() {
  EventCompilerPhase event(UNTIMED);
  if (event.should_commit()) {
    CompilerEvent::PhaseEvent::post(event, C->_latest_stage_start_counter, PHASE_END, C->_compile_id, 1);
  }

#ifndef PRODUCT
  if (_method != nullptr && should_print_igv(1)) {
    _igv_printer->end_method();
  }
#endif
}

src/hotspot/share/compiler/compilerEvent.cpp:

  event.set_isOsr(is_osr);
  event.set_codeSize(code_size);
  event.set_inlinedBytes(inlined_bytecodes);
  event.set_arenaBytes(arenaBytes);
  commit(event);
}

void CompilerEvent::CompilationFailureEvent::post(EventCompilationFailure& event, int compile_id, const char* reason) {
  event.set_compileId(compile_id);
  event.set_failureMessage(reason);
  event.commit();
}

void CompilerEvent::PhaseEvent::post(EventCompilerPhase& event, const Ticks& start_time, int phase, int compile_id, int level) {
  event.set_starttime(start_time);
  event.set_phase((u1) phase);
  event.set_compileId(compile_id);
  event.set_phaseLevel((short)level);
  event.commit();
}

void CompilerEvent::InlineEvent::post(EventCompilerInlining& event, int compile_id, Method* caller, const JfrStructCalleeMethod& callee, bool success, const char* msg, int bci) {
  event.set_compileId(compile_id);
  event.set_caller(caller);
  event.set_callee(callee);

src/hotspot/share/compiler/compilerEvent.hpp:

#if INCLUDE_JFR
#include "jfr/utilities/jfrTime.hpp"
#endif

class ciMethod;
template <typename>
class GrowableArray;
class Method;
class EventCompilation;
class EventCompilationFailure;
class EventCompilerInlining;
class EventCompilerPhase;
struct JfrStructCalleeMethod;

class CompilerEvent : AllStatic {
 public:
  static jlong ticksNow() {
    // Using Ticks for consistent usage outside JFR folder.
    JFR_ONLY(return JfrTime::is_ft_enabled() ? Ticks::now().ft_value() : Ticks::now().value();) NOT_JFR_RETURN_(0L);
  }

  class CompilationEvent : AllStatic {
   public:

src/hotspot/share/compiler/compilerEvent.hpp:

  class PhaseEvent : AllStatic {
    friend class CompilerPhaseTypeConstant;
   public:

    // Gets a unique identifier for `phase_name`, computing and registering it first if necessary.
    // If `may_exist` is true, then current registrations are searched first. If false, then
    // there must not be an existing registration for `phase_name`.
    // If `use_strdup` is true, then `phase_name` is strdup'ed before registration.
    // If `sync` is true, then access to the registration table is synchronized.
    static int get_phase_id(const char* phase_name, bool may_exist, bool use_strdup, bool sync) NOT_JFR_RETURN_(-1);

    static void post(EventCompilerPhase& event, const Ticks& start_time, int phase, int compile_id, int level) NOT_JFR_RETURN();
    static void post(EventCompilerPhase& event, jlong start_time, int phase, int compile_id, int level) {
      JFR_ONLY(post(event, Ticks(start_time), phase, compile_id, level);)
    }
  };

  class InlineEvent : AllStatic {
    static void post(EventCompilerInlining& event, int compile_id, Method* caller, const JfrStructCalleeMethod& callee, bool success, const char* msg, int bci) NOT_JFR_RETURN();
   public:
    static void post(EventCompilerInlining& event, int compile_id, Method* caller, Method* callee, bool success, const char* msg, int bci) NOT_JFR_RETURN();
    static void post(EventCompilerInlining& event, int compile_id, Method* caller, ciMethod* callee, bool success, const char* msg, int bci) NOT_JFR_RETURN();
  };
};

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp:

C2V_END

C2V_VMENTRY_0(jint, registerCompilerPhase, (JNIEnv* env, jobject, jstring jphase_name))
#if INCLUDE_JFR
  JVMCIObject phase_name = JVMCIENV->wrap(jphase_name);
  const char *name = JVMCIENV->as_utf8_string(phase_name);
  return CompilerEvent::PhaseEvent::get_phase_id(name, true, true, true);
#else
  return -1;
#endif // !INCLUDE_JFR
C2V_END

C2V_VMENTRY(void, notifyCompilerPhaseEvent, (JNIEnv* env, jobject, jlong startTime, jint phase, jint compileId, jint level))
  EventCompilerPhase event(UNTIMED);
  if (event.should_commit()) {
    CompilerEvent::PhaseEvent::post(event, startTime, phase, compileId, level);
  }
C2V_END

C2V_VMENTRY(void, notifyCompilerInliningEvent, (JNIEnv* env, jobject, jint compileId, ARGUMENT_PAIR(caller), ARGUMENT_PAIR(callee), jboolean succeeded, jstring jmessage, jint bci))
  EventCompilerInlining event;
  if (event.should_commit()) {
    Method* caller = UNPACK_PAIR(Method, caller);
    Method* callee = UNPACK_PAIR(Method, callee);
    JVMCIObject message = JVMCIENV->wrap(jmessage);

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/JFR.java:

        /**
         * @return current JFR time stamp
         */
        public static long now() {
            return compilerToVM().ticksNow();
        }
    }

    /**
     * Helper methods for managing JFR CompilerPhase events. The events are defined in {@code
     * src/share/jfr/metadata/metadata.xml}.
     */
    public static final class CompilerPhaseEvent {

        private static final ConcurrentHashMap<String, Integer> phaseToId = new ConcurrentHashMap<>();

        private static int getPhaseToId(String phaseName) {
            return phaseToId.computeIfAbsent(phaseName, k -> compilerToVM().registerCompilerPhase(phaseName));
        }

        /**
         * Commits a CompilerPhase event.
         *
         * @param startTime time captured at the start of compiler phase

Configuration enabled threshold
default true 60 s
profiling true 10 s

Field Type Description
phase CompilerPhaseType Compile Phase
compileId int Compilation Identifier
phaseLevel ushort Phase Level

CompilationFailure

profiling startTime eventThread 11 17 21 25 26

Category: Java Virtual Machine / Compiler

In case a JIT compilation failed, a compilation failure is triggered, reporting the reason

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/compiler/compilerEvent.cpp:

    int inlined_bytecodes, size_t arenaBytes) {
  event.set_compileId(compile_id);
  event.set_compiler(compiler_type);
  event.set_method(method);
  event.set_compileLevel((short)compile_level);
  event.set_succeded(success);
  event.set_isOsr(is_osr);
  event.set_codeSize(code_size);
  event.set_inlinedBytes(inlined_bytecodes);
  event.set_arenaBytes(arenaBytes);
  commit(event);
}

void CompilerEvent::CompilationFailureEvent::post(EventCompilationFailure& event, int compile_id, const char* reason) {
  event.set_compileId(compile_id);
  event.set_failureMessage(reason);
  event.commit();
}

void CompilerEvent::PhaseEvent::post(EventCompilerPhase& event, const Ticks& start_time, int phase, int compile_id, int level) {
  event.set_starttime(start_time);
  event.set_phase((u1) phase);
  event.set_compileId(compile_id);
  event.set_phaseLevel((short)level);
  event.commit();

src/hotspot/share/compiler/compilerEvent.hpp:

#if INCLUDE_JFR
#include "jfr/utilities/jfrTime.hpp"
#endif

class ciMethod;
template <typename>
class GrowableArray;
class Method;
class EventCompilation;
class EventCompilationFailure;
class EventCompilerInlining;
class EventCompilerPhase;
struct JfrStructCalleeMethod;

class CompilerEvent : AllStatic {
 public:
  static jlong ticksNow() {
    // Using Ticks for consistent usage outside JFR folder.
    JFR_ONLY(return JfrTime::is_ft_enabled() ? Ticks::now().ft_value() : Ticks::now().value();) NOT_JFR_RETURN_(0L);
  }

  class CompilationEvent : AllStatic {
   public:
    static void post(EventCompilation& event, int compile_id, CompilerType type, Method* method,
                     int compile_level, bool success, bool is_osr, int code_size,
                     int inlined_bytecodes, size_t arenaBytes) NOT_JFR_RETURN();
  };

  class CompilationFailureEvent : AllStatic {
   public:
    static void post(EventCompilationFailure& event, int compile_id, const char* reason) NOT_JFR_RETURN();
  };

  class PhaseEvent : AllStatic {
    friend class CompilerPhaseTypeConstant;
   public:

    // Gets a unique identifier for `phase_name`, computing and registering it first if necessary.
    // If `may_exist` is true, then current registrations are searched first. If false, then
    // there must not be an existing registration for `phase_name`.
    // If `use_strdup` is true, then `phase_name` is strdup'ed before registration.
    // If `sync` is true, then access to the registration table is synchronized.

src/hotspot/share/ci/ciEnv.cpp:

      CompilerThread* thread = CompilerThread::current();
      CompileTask* task = thread->task();
      CompilationLog::log()->log_failure(thread, task, reason, nullptr);
    }
  }

  if (_failure_reason.get() == nullptr) {
    // Record the first failure reason.
    _failure_reason.set(reason);
  }
}

void ciEnv::report_failure(const char* reason) {
  EventCompilationFailure event;
  if (event.should_commit()) {
    CompilerEvent::CompilationFailureEvent::post(event, compile_id(), reason);
  }
}

// ------------------------------------------------------------------
// ciEnv::record_method_not_compilable()
void ciEnv::record_method_not_compilable(const char* reason, bool all_tiers) {
  int new_compilable =
    all_tiers ? MethodCompilable_never : MethodCompilable_not_at_tier ;

  // Only note transitions to a worse state
  if (new_compilable > _compilable) {

Configuration enabled
default false
profiling true

Field Type Description
failureMessage string Failure Message
compileId int Compilation Identifier

Examples 3
compileId int
100561
failureMessage string
concurrent class loading
startTime long: millis
244771713041
compileId int
91283
failureMessage string
concurrent class loading
startTime long: millis
259416978292
compileId int
101696
failureMessage string
concurrent class loading
startTime long: millis
283736801042

CompilerInlining

startTime eventThread 11 17 21 25 26

Category: Java Virtual Machine / Compiler / Optimization

Describes the result of a method inlining attempt

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/opto/bytecodeInfo.cpp:

  int caller_bci = jvm->bci();
  ciMethod* caller_method = jvm->method();
  const char* inline_msg = msg();
  assert(inline_msg != nullptr, "just checking");
  if (C->log() != nullptr) {
    if (success) {
      C->log()->inline_success(inline_msg);
    } else {
      C->log()->inline_fail(inline_msg);
    }
  }
  CompileTask::print_inlining_ul(callee_method, inline_level(), caller_bci, inlining_result_of(success), inline_msg);
  C->inline_printer()->record(callee_method, jvm, inlining_result_of(success), inline_msg);
  EventCompilerInlining event;
  if (event.should_commit()) {
    guarantee(callee_method != nullptr, "would crash in CompilerEvent::InlineEvent::post");
    CompilerEvent::InlineEvent::post(event, C->compile_id(), caller_method->get_Method(), callee_method, success, inline_msg, caller_bci);
  }
}

//------------------------------ok_to_inline-----------------------------------
bool InlineTree::ok_to_inline(ciMethod* callee_method, JVMState* jvms, ciCallProfile& profile,
                              bool& should_delay) {
#ifdef ASSERT
  assert(callee_method != nullptr, "caller checks for optimized virtual!");

src/hotspot/share/compiler/compilerEvent.cpp:

  event.set_compileId(compile_id);
  event.set_failureMessage(reason);
  event.commit();
}

void CompilerEvent::PhaseEvent::post(EventCompilerPhase& event, const Ticks& start_time, int phase, int compile_id, int level) {
  event.set_starttime(start_time);
  event.set_phase((u1) phase);
  event.set_compileId(compile_id);
  event.set_phaseLevel((short)level);
  event.commit();
}

void CompilerEvent::InlineEvent::post(EventCompilerInlining& event, int compile_id, Method* caller, const JfrStructCalleeMethod& callee, bool success, const char* msg, int bci) {
  event.set_compileId(compile_id);
  event.set_caller(caller);
  event.set_callee(callee);
  event.set_succeeded(success);
  event.set_message(msg);
  event.set_bci(bci);
  commit(event);
}

void CompilerEvent::InlineEvent::post(EventCompilerInlining& event, int compile_id, Method* caller, Method* callee, bool success, const char* msg, int bci) {
  JfrStructCalleeMethod callee_struct;
  callee_struct.set_type(callee->klass_name()->as_utf8());
  callee_struct.set_name(callee->name()->as_utf8());
  callee_struct.set_descriptor(callee->signature()->as_utf8());
  post(event, compile_id, caller, callee_struct, success, msg, bci);
}

void CompilerEvent::InlineEvent::post(EventCompilerInlining& event, int compile_id, Method* caller, ciMethod* callee, bool success, const char* msg, int bci) {
  JfrStructCalleeMethod callee_struct;
  callee_struct.set_type(callee->holder()->name()->as_utf8());
  callee_struct.set_name(callee->name()->as_utf8());
  callee_struct.set_descriptor(callee->signature()->as_symbol()->as_utf8());
  post(event, compile_id, caller, callee_struct, success, msg, bci);
}

src/hotspot/share/compiler/compilerEvent.hpp:

#if INCLUDE_JFR
#include "jfr/utilities/jfrTime.hpp"
#endif

class ciMethod;
template <typename>
class GrowableArray;
class Method;
class EventCompilation;
class EventCompilationFailure;
class EventCompilerInlining;
class EventCompilerPhase;
struct JfrStructCalleeMethod;

class CompilerEvent : AllStatic {
 public:
  static jlong ticksNow() {
    // Using Ticks for consistent usage outside JFR folder.
    JFR_ONLY(return JfrTime::is_ft_enabled() ? Ticks::now().ft_value() : Ticks::now().value();) NOT_JFR_RETURN_(0L);
  }

src/hotspot/share/compiler/compilerEvent.hpp:

    // there must not be an existing registration for `phase_name`.
    // If `use_strdup` is true, then `phase_name` is strdup'ed before registration.
    // If `sync` is true, then access to the registration table is synchronized.
    static int get_phase_id(const char* phase_name, bool may_exist, bool use_strdup, bool sync) NOT_JFR_RETURN_(-1);

    static void post(EventCompilerPhase& event, const Ticks& start_time, int phase, int compile_id, int level) NOT_JFR_RETURN();
    static void post(EventCompilerPhase& event, jlong start_time, int phase, int compile_id, int level) {
      JFR_ONLY(post(event, Ticks(start_time), phase, compile_id, level);)
    }
  };

  class InlineEvent : AllStatic {
    static void post(EventCompilerInlining& event, int compile_id, Method* caller, const JfrStructCalleeMethod& callee, bool success, const char* msg, int bci) NOT_JFR_RETURN();
   public:
    static void post(EventCompilerInlining& event, int compile_id, Method* caller, Method* callee, bool success, const char* msg, int bci) NOT_JFR_RETURN();
    static void post(EventCompilerInlining& event, int compile_id, Method* caller, ciMethod* callee, bool success, const char* msg, int bci) NOT_JFR_RETURN();
  };
};
#endif // SHARE_COMPILER_COMPILEREVENT_HPP

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp:

#else
  return -1;
#endif // !INCLUDE_JFR
C2V_END

C2V_VMENTRY(void, notifyCompilerPhaseEvent, (JNIEnv* env, jobject, jlong startTime, jint phase, jint compileId, jint level))
  EventCompilerPhase event(UNTIMED);
  if (event.should_commit()) {
    CompilerEvent::PhaseEvent::post(event, startTime, phase, compileId, level);
  }
C2V_END

C2V_VMENTRY(void, notifyCompilerInliningEvent, (JNIEnv* env, jobject, jint compileId, ARGUMENT_PAIR(caller), ARGUMENT_PAIR(callee), jboolean succeeded, jstring jmessage, jint bci))
  EventCompilerInlining event;
  if (event.should_commit()) {
    Method* caller = UNPACK_PAIR(Method, caller);
    Method* callee = UNPACK_PAIR(Method, callee);
    JVMCIObject message = JVMCIENV->wrap(jmessage);
    CompilerEvent::InlineEvent::post(event, compileId, caller, callee, succeeded, JVMCIENV->as_utf8_string(message), bci);
  }
C2V_END

C2V_VMENTRY(void, setThreadLocalObject, (JNIEnv* env, jobject, jint id, jobject value))
  requireInHotSpot("setThreadLocalObject", JVMCI_CHECK);
  if (id == 0) {

src/hotspot/share/c1/c1_GraphBuilder.cpp:

  append(new MemBar(lir_membar_storestore));
}

void GraphBuilder::print_inlining(ciMethod* callee, const char* msg, bool success) {
  CompileLog* log = compilation()->log();
  if (log != nullptr) {
    assert(msg != nullptr, "inlining msg should not be null!");
    if (success) {
      log->inline_success(msg);
    } else {
      log->inline_fail(msg);
    }
  }
  EventCompilerInlining event;
  if (event.should_commit()) {
    CompilerEvent::InlineEvent::post(event, compilation()->env()->task()->compile_id(), method()->get_Method(), callee, success, msg, bci());
  }

  CompileTask::print_inlining_ul(callee, scope()->level(), bci(), inlining_result_of(success), msg);

  if (!compilation()->directive()->PrintInliningOption) {
    return;
  }
  CompileTask::print_inlining_tty(callee, scope()->level(), bci(), inlining_result_of(success), msg);
  if (success && CIPrintMethodCodes) {

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/JFR.java:

         * @param phaseName compiler phase name
         * @param compileId current compilation unit id
         * @param phaseLevel compiler phase nesting level
         */
        public static void write(long startTime, String phaseName, int compileId, int phaseLevel) {
            compilerToVM().notifyCompilerPhaseEvent(startTime, getPhaseToId(phaseName), compileId, phaseLevel);
        }
    }

    /**
     * Helper methods for managing JFR CompilerInlining events. The events are defined in {@code
     * src/share/jfr/metadata/metadata.xml}.
     */
    public static final class CompilerInliningEvent {

        /**
         * Commits a CompilerInlining event.
         *
         * @param compileId current compilation unit id
         * @param caller caller method
         * @param callee callee method
         * @param succeeded inlining succeeded or not
         * @param message extra information on inlining
         * @param bci invocation byte code index
         */

Configuration enabled
default false
profiling false

Field Type Description
compileId int Compilation Identifier
caller Method Caller Method
callee CalleeMethod struct Callee Method
succeeded boolean Succeeded
message string Message
bci int Bytecode Index

Examples 3
bci int
38
callee CalleeMethod
descriptor string
()Lorg/apache/spark/storage/BlockUpdatedInfo;
name string
blockUpdatedInfo
type string
org/apache/spark/scheduler/SparkListenerBlockUpdated
caller Method
descriptor string
(Ljava/lang/Object;)Z
hidden boolean
false
modifiers int
1
name string
equals
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
org/apache/spark/scheduler/SparkListenerBlockUpdated
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark/scheduler
compileId int
82507
message string
inline
startTime long: millis
198721700083
succeeded boolean
true
bci int
1
callee CalleeMethod
descriptor string
(I)I
name string
highestOneBit
type string
java/lang/Integer
caller Method
descriptor string
(I)I
hidden boolean
false
modifiers int
2
name string
nextPowerOf2
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
org/apache/spark/util/collection/AppendOnlyMap
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark/util/collection
compileId int
77456
message string
inline
startTime long: millis
230179343333
succeeded boolean
true
bci int
74
callee CalleeMethod
descriptor string
()I
name string
getAndDecrement
type string
java/util/concurrent/atomic/AtomicInteger
caller Method
descriptor string
(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
hidden boolean
false
modifiers int
1
name string
poll
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/util/concurrent/LinkedBlockingQueue
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
compileId int
84062
message string
callee uses too much stack
startTime long: millis
237694588208
succeeded boolean
false

Deoptimization

default profiling startTime eventThread stackTrace 14 17 21 25 26

Category: Java Virtual Machine / Compiler

Describes the detection of an uncommon situation in a compiled method which may lead to deoptimization of the method

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/deoptimization.cpp:

  JfrSerializer::register_serializer(TYPE_DEOPTIMIZATIONREASON, true, new DeoptReasonSerializer());
  JfrSerializer::register_serializer(TYPE_DEOPTIMIZATIONACTION, true, new DeoptActionSerializer());
}

static void post_deoptimization_event(nmethod* nm,
                                      const Method* method,
                                      int trap_bci,
                                      int instruction,
                                      Deoptimization::DeoptReason reason,
                                      Deoptimization::DeoptAction action) {
  assert(nm != nullptr, "invariant");
  assert(method != nullptr, "invariant");
  if (EventDeoptimization::is_enabled()) {
    static bool serializers_registered = false;
    if (!serializers_registered) {
      register_serializers();
      serializers_registered = true;
    }
    EventDeoptimization event;
    event.set_compileId(nm->compile_id());
    event.set_compiler(nm->compiler_type());
    event.set_method(method);
    event.set_lineNumber(method->line_number_from_bci(trap_bci));
    event.set_bci(trap_bci);
    event.set_instruction(instruction);
    event.set_reason(reason);
    event.set_action(action);
    event.commit();
  }
}

Configuration enabled stackTrace
default true false
profiling true true

Field Type Description
compileId int Compilation Identifier
compiler CompilerType Compiler Consider contributing a description to jfreventcollector.
method Method Method Consider contributing a description to jfreventcollector.
lineNumber int Line Number
bci int Bytecode Index
instruction Bytecode Instruction Consider contributing a description to jfreventcollector.
reason DeoptimizationReason Reason Consider contributing a description to jfreventcollector.
action DeoptimizationAction Action Consider contributing a description to jfreventcollector.

Examples 3
action DeoptimizationAction
maybe_recompile
bci int
68
compileId int
80282
compiler CompilerType
c2
instruction Bytecode
invokevirtual
lineNumber int
48
method Method
descriptor string
(Lscala/concurrent/stm/ccstm/Handle;)J
hidden boolean
false
modifiers int
2
name string
acquireOwnership
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1025
name string
scala/concurrent/stm/ccstm/InTxnRefOps
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/concurrent/stm/ccstm
reason DeoptimizationReason
class_check
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
68
lineNumber int
48
method Method
descriptor string
(Lscala/concurrent/stm/ccstm/Handle;)J
hidden boolean
false
modifiers int
2
name string
acquireOwnership
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1025
name string
scala/concurrent/stm/ccstm/InTxnRefOps
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/concurrent/stm/ccstm
type FrameType
JIT compiled
truncated boolean
false
startTime long: millis
247065259667
action DeoptimizationAction
reinterpret
bci int
24
compileId int
85833
compiler CompilerType
c2
instruction Bytecode
if_icmpne
lineNumber int
159
method Method
descriptor string
(Lscala/Function1;)V
hidden boolean
false
modifiers int
17
name string
foreach$mVc$sp
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
scala/collection/immutable/Range
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/collection/immutable
reason DeoptimizationReason
unstable_if
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
24
lineNumber int
159
method Method
descriptor string
(Lscala/Function1;)V
hidden boolean
false
modifiers int
17
name string
foreach$mVc$sp
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
scala/collection/immutable/Range
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/collection/immutable
type FrameType
JIT compiled
truncated boolean
false
startTime long: millis
230763643500
action DeoptimizationAction
maybe_recompile
bci int
8
compileId int
84209
compiler CompilerType
c2
instruction Bytecode
invokeinterface
lineNumber int
800
method Method
descriptor string
()Lscala/Tuple2;
hidden boolean
false
modifiers int
1
name string
next
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
17
name string
scala/collection/Iterator$$anon$14
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/collection
reason DeoptimizationReason
class_check
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
8
lineNumber int
800
method Method
descriptor string
()Lscala/Tuple2;
hidden boolean
false
modifiers int
1
name string
next
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
17
name string
scala/collection/Iterator$$anon$14
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/collection
type FrameType
Inlined
truncated boolean
false
startTime long: millis
260674522708

CompilerQueueUtilization

default profiling startTime duration every chunk 22 25 26

Category: Java Virtual Machine / Compiler

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrCompilerQueueUtilization.cpp:

    {CompileBroker::c2_compile_queue(), c2_compiler_queue_id, &CompileBroker::get_c2_thread_count, 0, 0}};

  const JfrTicks cur_time = JfrTicks::now();
  static JfrTicks last_sample_instant;
  const JfrTickspan interval = cur_time - last_sample_instant;
  for (int i = 0; i < num_compiler_queues; i ++) {
    CompilerQueueEntry* entry = &compilerQueueEntries[i];
    if (entry->compilerQueue != nullptr) {
      const uint64_t current_added = entry->compilerQueue->get_total_added();
      const uint64_t current_removed = entry->compilerQueue->get_total_removed();
      const uint64_t addedRate = rate_per_second(current_added, entry->added, interval);
      const uint64_t removedRate = rate_per_second(current_removed, entry->removed, interval);

      EventCompilerQueueUtilization event;
      event.set_compiler(entry->compiler_queue_id);
      event.set_addedRate(addedRate);
      event.set_removedRate(removedRate);
      event.set_queueSize(entry->compilerQueue->size());
      event.set_peakQueueSize(entry->compilerQueue->get_peak_size());
      event.set_addedCount(current_added - entry->added);
      event.set_removedCount(current_removed - entry->removed);
      event.set_totalAddedCount(current_added);
      event.set_totalRemovedCount(current_removed);
      event.set_compilerThreadCount(entry->get_compiler_thread_count());
      event.commit();

Configuration enabled period
default true 10 s
profiling true 5 s

Field Type Description
compiler CompilerType Compiler Consider contributing a description to jfreventcollector.
addedRate long: hertz Requets Added Rate Requests added per second
removedRate long: hertz Requests Removed Rate Requests removed per second
queueSize long Queue Size
peakQueueSize long Peak Queue Size
addedCount long Requests Added
removedCount long Requests Removed
totalAddedCount long Total Requests Added
totalRemovedCount long Total Requests Removed
compilerThreadCount int Compiler Thread Count

CompilerStatistics

default profiling startTime every chunk 11 17 21 25 26

Category: Java Virtual Machine / Compiler

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

TRACE_REQUEST_FUNC(SymbolTableStatistics) {
  TableStatistics statistics = SymbolTable::get_table_statistics();
  emit_table_statistics<EventSymbolTableStatistics>(statistics);
}

TRACE_REQUEST_FUNC(StringTableStatistics) {
  TableStatistics statistics = StringTable::get_table_statistics();
  emit_table_statistics<EventStringTableStatistics>(statistics);
}

TRACE_REQUEST_FUNC(CompilerStatistics) {
  EventCompilerStatistics event;
  event.set_compileCount(CompileBroker::get_total_compile_count());
  event.set_bailoutCount(CompileBroker::get_total_bailout_count());
  event.set_invalidatedCount(CompileBroker::get_total_invalidated_count());
  event.set_osrCompileCount(CompileBroker::get_total_osr_compile_count());
  event.set_standardCompileCount(CompileBroker::get_total_standard_compile_count());
  event.set_osrBytesCompiled(CompileBroker::get_sum_osr_bytes_compiled());
  event.set_standardBytesCompiled(CompileBroker::get_sum_standard_bytes_compiled());
  event.set_nmethodsSize(CompileBroker::get_sum_nmethod_size());
  event.set_nmethodCodeSize(CompileBroker::get_sum_nmethod_code_size());
  event.set_peakTimeSpent(CompileBroker::get_peak_compilation_time());
  event.set_totalTimeSpent(CompileBroker::get_total_compilation_time());

Configuration enabled period
default true 1000 ms
profiling true 1000 ms

Field Type Description
compileCount int Compiled Methods
bailoutCount int Bailouts
invalidatedCount int Invalidated Compilations
osrCompileCount int OSR Compilations
standardCompileCount int Standard Compilations
osrBytesCompiled ulong: bytes OSR Bytes Compiled
standardBytesCompiled ulong: bytes Standard Bytes Compiled
nmethodsSize ulong: bytes Compilation Resulting Size
nmethodCodeSize ulong: bytes Compilation Resulting Code Size
peakTimeSpent long: millis Peak Time
totalTimeSpent long: millis Total Time

Examples 3
bailoutCount int
13
compileCount int
94283
invalidatedCount int
0
nmethodCodeSize ulong: bytes
132546592
nmethodsSize ulong: bytes
196818944
osrBytesCompiled ulong: bytes
0
osrCompileCount int
1067
peakTimeSpent long: millis
6943
standardBytesCompiled ulong: bytes
0
standardCompileCount int
93216
startTime long: millis
244614976375
totalTimeSpent long: millis
233971
bailoutCount int
15
compileCount int
83423
invalidatedCount int
0
nmethodCodeSize ulong: bytes
113931512
nmethodsSize ulong: bytes
172847736
osrBytesCompiled ulong: bytes
0
osrCompileCount int
891
peakTimeSpent long: millis
7513
standardBytesCompiled ulong: bytes
0
standardCompileCount int
82532
startTime long: millis
256590066250
totalTimeSpent long: millis
463347
bailoutCount int
17
compileCount int
116707
invalidatedCount int
0
nmethodCodeSize ulong: bytes
166918624
nmethodsSize ulong: bytes
257597552
osrBytesCompiled ulong: bytes
0
osrCompileCount int
1110
peakTimeSpent long: millis
5569
standardBytesCompiled ulong: bytes
0
standardCompileCount int
115597
startTime long: millis
293799311875
totalTimeSpent long: millis
416698

CompilerConfiguration

default profiling startTime end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / Compiler

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  event.set_invalidatedCount(CompileBroker::get_total_invalidated_count());
  event.set_osrCompileCount(CompileBroker::get_total_osr_compile_count());
  event.set_standardCompileCount(CompileBroker::get_total_standard_compile_count());
  event.set_osrBytesCompiled(CompileBroker::get_sum_osr_bytes_compiled());
  event.set_standardBytesCompiled(CompileBroker::get_sum_standard_bytes_compiled());
  event.set_nmethodsSize(CompileBroker::get_sum_nmethod_size());
  event.set_nmethodCodeSize(CompileBroker::get_sum_nmethod_code_size());
  event.set_peakTimeSpent(CompileBroker::get_peak_compilation_time());
  event.set_totalTimeSpent(CompileBroker::get_total_compilation_time());
  event.commit();
}

TRACE_REQUEST_FUNC(CompilerConfiguration) {
  EventCompilerConfiguration event;
  event.set_threadCount(static_cast<s4>(CICompilerCount));
  event.set_tieredCompilation(TieredCompilation);
  event.set_dynamicCompilerThreadCount(UseDynamicNumberOfCompilerThreads);
  event.commit();
}

TRACE_REQUEST_FUNC(CodeCacheStatistics) {
  // Emit stats for all available code heaps
  for (int bt_index = 0; bt_index < static_cast<int>(CodeBlobType::NumTypes); ++bt_index) {
    const CodeBlobType bt = static_cast<CodeBlobType>(bt_index);
    if (CodeCache::heap_available(bt)) {

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
threadCount int Thread Count
tieredCompilation boolean Tiered Compilation
dynamicCompilerThreadCount boolean 20+ Uses Dynamic Number of Compiler Threads

Examples 3
dynamicCompilerThreadCount boolean
true
startTime long: millis
230210314375
threadCount int
4
tieredCompilation boolean
true
dynamicCompilerThreadCount boolean
true
startTime long: millis
240014270416
threadCount int
4
tieredCompilation boolean
true
dynamicCompilerThreadCount boolean
true
startTime long: millis
252333665125
threadCount int
4
tieredCompilation boolean
true

JVM: Diagnostics

SyncOnValueBasedClass

experimental default profiling startTime eventThread stackTrace 16 17 21 25 26

Category: Java Virtual Machine / Diagnostics

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/synchronizer.cpp:

  } else {
    assert(DiagnoseSyncOnValueBasedClasses == LOG_WARNING, "invalid value for DiagnoseSyncOnValueBasedClasses");
    ResourceMark rm;
    Log(valuebasedclasses) vblog;

    vblog.info("Synchronizing on object " INTPTR_FORMAT " of klass %s", p2i(obj()), obj->klass()->external_name());
    if (locking_thread->has_last_Java_frame()) {
      LogStream info_stream(vblog.info());
      locking_thread->print_active_stack_on(&info_stream);
    } else {
      vblog.info("Cannot find the last Java frame");
    }

    EventSyncOnValueBasedClass event;
    if (event.should_commit()) {
      event.set_valueBasedClass(obj->klass());
      event.commit();
    }
  }

  if (bcp_was_adjusted) {
    last_frame.interpreter_frame_set_bcp(last_frame.interpreter_frame_bcp() + 1);
  }
}

Configuration enabled stackTrace
default true true
profiling true true

Field Type Description
valueBasedClass Class Value Based Class Consider contributing a description to jfreventcollector.

HeapDump

default profiling startTime duration eventThread stackTrace 15 17 21 25 26

Category: Java Virtual Machine / Diagnostics

Information about a successfully written Java heap dump

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/services/heapDumper.cpp:

    // (DumpWriter buffer, DumperClassCacheTable, GZipCompressor buffers).
    // For the OOM handling we may already be limited in memory.
    // Lets ensure we have at least 20MB per thread.
    physical_memory_size_type free_memory = 0;
    // Return value ignored - defaulting to 0 on failure.
    (void)os::free_memory(free_memory);
    julong max_threads = free_memory / (20 * M);
    if (num_dump_threads > max_threads) {
      num_dump_threads = MAX2<uint>(1, (uint)max_threads);
    }
  }

  // create JFR event
  EventHeapDump event;

  AbstractCompressor* compressor = nullptr;

  if (compression > 0) {
    compressor = new (std::nothrow) GZipCompressor(compression);

    if (compressor == nullptr) {
      set_error("Could not allocate gzip compressor");
      return -1;
    }
  }

Configuration enabled stackTrace threshold
default true true 0 ns
profiling true true 0 ns

Field Type Description
destination string Destination Path of the Dump
size long Size
gcBeforeDump boolean GC Before Dump
onOutOfMemoryError boolean Heap Dump on Out of Memory Error
overwrite boolean 21+ Overwrite Heap dump overwrites previous file location if it exists
compression int 21+ Compression Level Compression level of the dump, if larger than 0 we use gzip compression with this level

JavaAgent

default profiling startTime end of every chunk 21 25 26

Category: Java Virtual Machine / Diagnostics

A Java programming language agent making use of the java.lang.instrument package for instrumenting programs running on the JVM

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  event.set_name(agent->name());
  event.set_options(agent->options());
  event.set_dynamic(agent->is_dynamic());
  event.set_initializationTime(agent->initialization_time());
  event.set_initializationDuration(agent->initialization_duration());
  event.commit();
}

TRACE_REQUEST_FUNC(JavaAgent) {
  JvmtiAgentList::Iterator it = JvmtiAgentList::java_agents();
  while (it.has_next()) {
    const JvmtiAgent* agent = it.next();
    assert(agent->is_jplis(), "invariant");
    EventJavaAgent event;
    send_agent_event(event, agent);
  }
}

static void send_native_agent_events(JvmtiAgentList::Iterator& it) {
  while (it.has_next()) {
    const JvmtiAgent* agent = it.next();
    assert(!agent->is_jplis(), "invariant");
    EventNativeAgent event;
    event.set_path(agent->os_lib_path());
    send_agent_event(event, agent);

Configuration enabled period
default true endChunk
profiling true endChunk

Field Type Description
name string Name
options string Options
dynamic boolean Dynamic If the agent attached to the JVM dynamically during runtime, i.e. not at startup
initializationTime Ticks Initialization Time The time the JVM initialized the agent
initializationDuration Tickspan Initialization Duration The duration of executing the initialization method, either premain or agentmain

NativeAgent

default profiling startTime end of every chunk 21 25 26

Category: Java Virtual Machine / Diagnostics

A native programming language agent making use of the JVMTI interface used by development, profiling and monitoring tools

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  JvmtiAgentList::Iterator it = JvmtiAgentList::java_agents();
  while (it.has_next()) {
    const JvmtiAgent* agent = it.next();
    assert(agent->is_jplis(), "invariant");
    EventJavaAgent event;
    send_agent_event(event, agent);
  }
}

static void send_native_agent_events(JvmtiAgentList::Iterator& it) {
  while (it.has_next()) {
    const JvmtiAgent* agent = it.next();
    assert(!agent->is_jplis(), "invariant");
    EventNativeAgent event;
    event.set_path(agent->os_lib_path());
    send_agent_event(event, agent);
  }
}

TRACE_REQUEST_FUNC(NativeAgent) {
  JvmtiAgentList::Iterator native_agents_it = JvmtiAgentList::native_agents();
  send_native_agent_events(native_agents_it);
  JvmtiAgentList::Iterator xrun_agents_it = JvmtiAgentList::xrun_agents();
  send_native_agent_events(xrun_agents_it);
}

Configuration enabled period
default true endChunk
profiling true endChunk

Field Type Description
name string Name
options string Options
dynamic boolean Dynamic If the library attached to the JVM dynamically during runtime, i.e. not at startup
initializationTime Ticks Initialization Time The time the JVM initialized the agent
initializationDuration Tickspan Initialization Duration The duration of executing the JVMTI VMInit event callback. If no VMInit callback is specified, the duration is 0. For a dynamically loaded agent, it is the duration of executing the call to Agent_OnAttach.
path string Path The path of the library

JVM: Flag

IntFlagChanged

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/flags/jvmFlagAccess.cpp:

  virtual void print_range(outputStream* st, const JVMFlagLimit* range) const {
    const JVMTypedFlagLimit<T>* r = (const JVMTypedFlagLimit<T>*)range;
    print_range_impl(st, r->min(), r->max());
  }

  virtual void range_error(const char* name, T value, T min, T max, bool verbose) const = 0;
  virtual void print_range_impl(outputStream* st, T min, T max) const = 0;
};

class FlagAccessImpl_int : public RangedFlagAccessImpl<int, EventIntFlagChanged> {
public:
  void range_error(const char* name, int value, int min, int max, bool verbose) const {
    JVMFlag::printError(verbose,
                        "int %s=%d is outside the allowed range "
                        "[ %d ... %d ]\n",
                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, int value, bool verbose) const {
    return ((JVMFlagConstraintFunc_int)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, int min, int max) const {

Configuration enabled
default true
profiling true

Field Type Description
name string Name
oldValue int Old Value
newValue int New Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

UnsignedIntFlagChanged

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/flags/jvmFlagAccess.cpp:

                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, int value, bool verbose) const {
    return ((JVMFlagConstraintFunc_int)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, int min, int max) const {
    st->print("[ %-25d ... %25d ]", min, max);
  }
  void print_default_range(outputStream* st) const {
    st->print("[ " INT32_FORMAT_W(-25) " ... " INT32_FORMAT_W(25) " ]", INT_MIN, INT_MAX);
  }
};

class FlagAccessImpl_uint : public RangedFlagAccessImpl<uint, EventUnsignedIntFlagChanged> {
public:
  void range_error(const char* name, uint value, uint min, uint max, bool verbose) const {
    JVMFlag::printError(verbose,
                        "uint %s=%u is outside the allowed range "
                        "[ %u ... %u ]\n",
                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, uint value, bool verbose) const {
    return ((JVMFlagConstraintFunc_uint)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, uint min, uint max) const {

Configuration enabled
default true
profiling true

Field Type Description
name string Name
oldValue uint Old Value
newValue uint New Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

LongFlagChanged

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/flags/jvmFlagAccess.cpp:

                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, uint value, bool verbose) const {
    return ((JVMFlagConstraintFunc_uint)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, uint min, uint max) const {
    st->print("[ %-25u ... %25u ]", min, max);
  }
  void print_default_range(outputStream* st) const {
    st->print("[ " UINT32_FORMAT_W(-25) " ... " UINT32_FORMAT_W(25) " ]", 0, UINT_MAX);
  }
};

class FlagAccessImpl_intx : public RangedFlagAccessImpl<intx, EventLongFlagChanged> {
public:
  void range_error(const char* name, intx value, intx min, intx max, bool verbose) const {
    JVMFlag::printError(verbose,
                        "intx %s=%zd is outside the allowed range "
                        "[ %zd ... %zd ]\n",
                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, intx value, bool verbose) const {
    return ((JVMFlagConstraintFunc_intx)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, intx min, intx max) const {

Configuration enabled
default true
profiling true

Field Type Description
name string Name
oldValue long Old Value
newValue long New Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

UnsignedLongFlagChanged

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/flags/jvmFlagAccess.cpp:

                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, intx value, bool verbose) const {
    return ((JVMFlagConstraintFunc_intx)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, intx min, intx max) const {
    st->print("[ %-25zd ... %25zd ]", min, max);
  }
  void print_default_range(outputStream* st) const {
    st->print("[ %-25zd ... %25zd ]", min_intx, max_intx);
  }
};

class FlagAccessImpl_uintx : public RangedFlagAccessImpl<uintx, EventUnsignedLongFlagChanged> {
public:
  void range_error(const char* name, uintx value, uintx min, uintx max, bool verbose) const {
    JVMFlag::printError(verbose,
                        "uintx %s=%zu is outside the allowed range "
                        "[ %zu ... %zu ]\n",
                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, uintx value, bool verbose) const {
    return ((JVMFlagConstraintFunc_uintx)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, uintx min, uintx max) const {
    st->print("[ %-25zu ... %25zu ]", min, max);
  }
  void print_default_range(outputStream* st) const {
    st->print("[ %-25zu ... %25zu ]", uintx(0), max_uintx);
  }
};

class FlagAccessImpl_uint64_t : public RangedFlagAccessImpl<uint64_t, EventUnsignedLongFlagChanged> {
public:
  void range_error(const char* name, uint64_t value, uint64_t min, uint64_t max, bool verbose) const {
    JVMFlag::printError(verbose,
                        "uint64_t %s=" UINT64_FORMAT " is outside the allowed range "
                        "[ " UINT64_FORMAT " ... " UINT64_FORMAT " ]\n",
                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, uint64_t value, bool verbose) const {
    return ((JVMFlagConstraintFunc_uint64_t)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, uint64_t min, uint64_t max) const {
    st->print("[ " UINT64_FORMAT_W(-25) " ... " UINT64_FORMAT_W(25) " ]", min, max);
  }
  void print_default_range(outputStream* st) const {
    st->print("[ " UINT64_FORMAT_W(-25) " ... " UINT64_FORMAT_W(25) " ]", uint64_t(0), uint64_t(max_juint));
  }
};

class FlagAccessImpl_size_t : public RangedFlagAccessImpl<size_t, EventUnsignedLongFlagChanged> {
public:
  void range_error(const char* name, size_t value, size_t min, size_t max, bool verbose) const {
    JVMFlag::printError(verbose,
                        "size_t %s=%zu is outside the allowed range "
                        "[ %zu ... %zu ]\n",
                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, size_t value, bool verbose) const {
    return ((JVMFlagConstraintFunc_size_t)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, size_t min, size_t max) const {

Configuration enabled
default true
profiling true

Field Type Description
name string Name
oldValue ulong Old Value
newValue ulong New Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

DoubleFlagChanged

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/flags/jvmFlagAccess.cpp:

                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, size_t value, bool verbose) const {
    return ((JVMFlagConstraintFunc_size_t)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, size_t min, size_t max) const {
    st->print("[ %-25zu ... %25zu ]", min, max);
  }
  void print_default_range(outputStream* st) const {
    st->print("[ %-25zu ... %25zu ]", size_t(0), size_t(SIZE_MAX));
  }
};

class FlagAccessImpl_double : public RangedFlagAccessImpl<double, EventDoubleFlagChanged> {
public:
  void range_error(const char* name, double value, double min, double max, bool verbose) const {
    JVMFlag::printError(verbose,
                          "double %s=%f is outside the allowed range "
                          "[ %f ... %f ]\n",
                        name, value, min, max);
  }
  JVMFlag::Error typed_check_constraint(void* func, double value, bool verbose) const {
    return ((JVMFlagConstraintFunc_double)func)(value, verbose);
  }
  void print_range_impl(outputStream* st, double min, double max) const {

Configuration enabled
default true
profiling true

Field Type Description
name string Name
oldValue double Old Value
newValue double New Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

BooleanFlagChanged

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/flags/jvmFlagAccess.cpp:

    *((T*)value_addr) = old_value;
    flag->set_origin(origin);

    return JVMFlag::SUCCESS;
  }

  JVMFlag::Error check_constraint(const JVMFlag* flag, void * func, bool verbose) const  {
    return typed_check_constraint(func, flag->read<T>(), verbose);
  }

  virtual JVMFlag::Error typed_check_constraint(void * func, T value, bool verbose) const = 0;
};

class FlagAccessImpl_bool : public TypedFlagAccessImpl<bool, EventBooleanFlagChanged> {
public:
  JVMFlag::Error set_impl(JVMFlag* flag, void* value_addr, JVMFlagOrigin origin) const {
    bool verbose = JVMFlagLimit::verbose_checks_needed();
    return TypedFlagAccessImpl<bool, EventBooleanFlagChanged>
               ::check_constraint_and_set(flag, value_addr, origin, verbose);
  }

  JVMFlag::Error typed_check_constraint(void* func, bool value, bool verbose) const {
    return ((JVMFlagConstraintFunc_bool)func)(value, verbose);
  }
};

template <typename T, typename EVENT>
class RangedFlagAccessImpl : public TypedFlagAccessImpl<T, EVENT> {
public:

Configuration enabled
default true
profiling true

Field Type Description
name string Name
oldValue boolean Old Value
newValue boolean New Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

StringFlagChanged

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/flags/jvmFlagAccess.cpp:

  if (!flag->is_ccstr()) return JVMFlag::WRONG_FORMAT;
  const JVMTypedFlagLimit<ccstr>* constraint = (const JVMTypedFlagLimit<ccstr>*)JVMFlagLimit::get_constraint(flag);
  if (constraint != nullptr && constraint->phase() <= JVMFlagLimit::validating_phase()) {
    bool verbose = JVMFlagLimit::verbose_checks_needed() | (origin == JVMFlagOrigin::ERGONOMIC);
    JVMFlag::Error err = ((JVMFlagConstraintFunc_ccstr)constraint->constraint_func())(*value, verbose);
    if (err != JVMFlag::SUCCESS) {
      if (origin == JVMFlagOrigin::ERGONOMIC) {
        fatal("FLAG_SET_ERGO cannot be used to set an invalid value for %s", flag->name());
      }
      return err;
    }
  }
  ccstr old_value = flag->get_ccstr();
  trace_flag_changed<ccstr, EventStringFlagChanged>(flag, old_value, *value, origin);
  char* new_value = nullptr;
  if (*value != nullptr) {
    new_value = os::strdup_check_oom(*value);
  }
  flag->set_ccstr(new_value);
  if (!flag->is_default() && old_value != nullptr) {
    // Old value is heap allocated so free it.
    FREE_C_HEAP_ARRAY(char, old_value);
  }
  // Unlike the other APIs, the old value is NOT returned, so the caller won't need to free it.
  // The callers typically don't care what the old value is.

Configuration enabled
default true
profiling true

Field Type Description
name string Name
oldValue string Old Value
newValue string New Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

IntFlag

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
name string Name
value int Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

Examples 3
name string
VerifyMetaspaceInterval
origin FlagValueOrigin
Default
startTime long: millis
230210319417
value int
0
name string
ObjectAlignmentInBytes
origin FlagValueOrigin
Default
startTime long: millis
212458680000
value int
8
name string
CompilerThreadPriority
origin FlagValueOrigin
Default
startTime long: millis
264792429042
value int
-1

UnsignedIntFlag

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
name string Name
value uint Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

Examples 3
name string
UseSVE
origin FlagValueOrigin
Default
startTime long: millis
217947759500
value uint
0
name string
SharedSymbolTableBucketSize
origin FlagValueOrigin
Default
startTime long: millis
247327050000
value uint
4
name string
TrimNativeHeapInterval
origin FlagValueOrigin
Default
startTime long: millis
232730968000
value uint
0

LongFlag

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
name string Name
value long Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

Examples 3
name string
Tier3BackedgeNotifyFreqLog
origin FlagValueOrigin
Default
startTime long: millis
242226860625
value long
13
name string
PrintIdealGraphLevel
origin FlagValueOrigin
Default
startTime long: millis
199127001458
value long
0
name string
OSROnlyBCI
origin FlagValueOrigin
Default
startTime long: millis
230210329583
value long
-1

UnsignedLongFlag

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
name string Name
value ulong Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

Examples 3
name string
HeapMaximumCompactionInterval
origin FlagValueOrigin
Default
startTime long: millis
230210336250
value ulong
20
name string
AdaptiveSizeMajorGCDecayTimeScale
origin FlagValueOrigin
Default
startTime long: millis
199127014583
value ulong
10
name string
GCHeapFreeLimit
origin FlagValueOrigin
Default
startTime long: millis
242226881125
value ulong
2

DoubleFlag

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
name string Name
value double Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

Examples 3
name string
InitialRAMPercentage
origin FlagValueOrigin
Default
startTime long: millis
233971233042
value double
1.5625
name string
InitialRAMPercentage
origin FlagValueOrigin
Default
startTime long: millis
264792452167
value double
1.5625
name string
MinRAMPercentage
origin FlagValueOrigin
Default
startTime long: millis
199127022041
value double
50.0

BooleanFlag

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
name string Name
value boolean Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

Examples 3
name string
UseBlockZeroing
origin FlagValueOrigin
Default
startTime long: millis
230210346167
value boolean
true
name string
UseSimpleArrayEquals
origin FlagValueOrigin
Default
startTime long: millis
199127023125
value boolean
false
name string
WalkStackALot
origin FlagValueOrigin
Default
startTime long: millis
242226919667
value boolean
false

StringFlag

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / Flag

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
name string Name
value string Value
origin FlagValueOrigin Origin Consider contributing a description to jfreventcollector.

Examples 3
name string
DeoptimizeOnlyAt
origin FlagValueOrigin
Default
startTime long: millis
242226947250
value string
name string
HeapDumpPath
origin FlagValueOrigin
Default
startTime long: millis
230210371500
value string
null
name string
PrintIdealGraphAddress
origin FlagValueOrigin
Default
startTime long: millis
205981207708
value string
127.0.0.1

JVM: GC: Collector

GarbageCollection

default profiling startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Collector

Garbage collection performed by the JVM

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

// All GC dependencies against the trace framework is contained within this file.

typedef uintptr_t TraceAddress;

bool GCTracer::should_send_cpu_time_event() const {
  return EventGCCPUTime::is_enabled();
}

void GCTracer::send_garbage_collection_event() const {
  EventGarbageCollection event(UNTIMED);
  if (event.should_commit()) {
    event.set_gcId(GCId::current());
    event.set_name(_shared_gc_info.name());
    event.set_cause((u2) _shared_gc_info.cause());
    event.set_sumOfPauses(_shared_gc_info.sum_of_pauses());
    event.set_longestPause(_shared_gc_info.longest_pause());
    event.set_starttime(_shared_gc_info.start_timestamp());
    event.set_endtime(_shared_gc_info.end_timestamp());
    event.commit();
  }
}

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
name GCName Name The name of the Garbage Collector
cause GCCause Cause The reason for triggering this Garbage Collection
sumOfPauses Tickspan Sum of Pauses Sum of all the times in which Java execution was paused during the garbage collection
longestPause Tickspan Longest Pause Longest individual pause during the garbage collection

Examples 3
cause GCCause
Heap Inspection Initiated GC
gcId uint
362
longestPause Tickspan
3768917
name GCName
ParallelScavenge
startTime long: millis
265633913333
sumOfPauses Tickspan
3768917
cause GCCause
G1 Humongous Allocation
gcId uint
784
longestPause Tickspan
1859292
name GCName
G1New
startTime long: millis
201459336083
sumOfPauses Tickspan
1859292
cause GCCause
Allocation Failure
gcId uint
725
longestPause Tickspan
6637541
name GCName
DefNew
startTime long: millis
265236002667
sumOfPauses Tickspan
6637541

SystemGC

default profiling startTime duration eventThread stackTrace 17 21 25 26

Category: Java Virtual Machine / GC / Collector

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/prims/jvm.cpp:

    event.commit();
  }
JVM_END


JVM_ENTRY_NO_ENV(void, JVM_Halt(jint code))
  before_exit(thread, true);
  vm_exit(code);
JVM_END


JVM_ENTRY_NO_ENV(void, JVM_GC(void))
  if (!DisableExplicitGC) {
    EventSystemGC event;
    event.set_invokedConcurrent(ExplicitGCInvokesConcurrent);
    Universe::heap()->collect(GCCause::_java_lang_system_gc);
    event.commit();
  }
JVM_END


JVM_LEAF(jlong, JVM_MaxObjectInspectionAge(void))
  return Universe::heap()->millis_since_last_whole_heap_examined();
JVM_END

Configuration enabled stackTrace threshold
default true true 0 ms
profiling true true 0 ms

Field Type Description
invokedConcurrent boolean Invoked Concurrent

Examples 3
invokedConcurrent boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
()V
hidden boolean
false
modifiers int
257
name string
gc
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/lang/Runtime
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Native
truncated boolean
false
startTime long: millis
241627508791
invokedConcurrent boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
()V
hidden boolean
false
modifiers int
257
name string
gc
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/lang/Runtime
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Native
truncated boolean
false
startTime long: millis
246876449500
invokedConcurrent boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
()V
hidden boolean
false
modifiers int
257
name string
gc
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/lang/Runtime
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Native
truncated boolean
false
startTime long: millis
260814534792

ParallelOldGarbageCollection

default profiling startTime duration 11 17 21 25 26

Category: Java Virtual Machine / GC / Collector

Appearing in: ParallelGC

Missing in: G1GC, SerialGC, ShenandoahGC, ZGC

Extra information specific to Parallel Old Garbage Collections

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

    e.set_smallChunksTotalSize(summary.small_chunks_size_in_bytes());

    e.set_mediumChunks(summary.num_medium_chunks());
    e.set_mediumChunksTotalSize(summary.medium_chunks_size_in_bytes());

    e.set_humongousChunks(summary.num_humongous_chunks());
    e.set_humongousChunksTotalSize(summary.humongous_chunks_size_in_bytes());

    e.commit();
  }
}

void ParallelOldTracer::send_parallel_old_event() const {
  EventParallelOldGarbageCollection e(UNTIMED);
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_densePrefix((TraceAddress)_parallel_old_gc_info.dense_prefix());
    e.set_starttime(_shared_gc_info.start_timestamp());
    e.set_endtime(_shared_gc_info.end_timestamp());
    e.commit();
  }
}

void YoungGCTracer::send_young_gc_event() const {
  EventYoungGarbageCollection e(UNTIMED);

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
densePrefix ulong: address Dense Prefix The address of the dense prefix, used when compacting

Examples 1
densePrefix ulong: address
21744844800
gcId uint
312
startTime long: millis
239148866708

YoungGarbageCollection

default profiling startTime duration 11 17 21 25 26

Category: Java Virtual Machine / GC / Collector

Appearing in: G1GC, ParallelGC, SerialGC

Missing in: ShenandoahGC, ZGC

Extra information specific to Young Garbage Collections

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

void ParallelOldTracer::send_parallel_old_event() const {
  EventParallelOldGarbageCollection e(UNTIMED);
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_densePrefix((TraceAddress)_parallel_old_gc_info.dense_prefix());
    e.set_starttime(_shared_gc_info.start_timestamp());
    e.set_endtime(_shared_gc_info.end_timestamp());
    e.commit();
  }
}

void YoungGCTracer::send_young_gc_event() const {
  EventYoungGarbageCollection e(UNTIMED);
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_tenuringThreshold(_tenuring_threshold);
    e.set_starttime(_shared_gc_info.start_timestamp());
    e.set_endtime(_shared_gc_info.end_timestamp());
    e.commit();
  }
}

bool YoungGCTracer::should_send_promotion_in_new_plab_event() const {
  return EventPromoteObjectInNewPLAB::is_enabled();

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
tenuringThreshold uint Tenuring Threshold

Examples 3
gcId uint
366
startTime long: millis
266732620792
tenuringThreshold uint
1
gcId uint
895
startTime long: millis
243512365458
tenuringThreshold uint
15
gcId uint
803
startTime long: millis
282095307917
tenuringThreshold uint
15

OldGarbageCollection

default profiling startTime duration 11 17 21 25 26

Category: Java Virtual Machine / GC / Collector

Appearing in: G1GC, ParallelGC, SerialGC

Missing in: ShenandoahGC, ZGC

Extra information specific to Old Garbage Collections

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

  EventPromoteObjectOutsidePLAB event;
  if (event.should_commit()) {
    event.set_gcId(GCId::current());
    event.set_objectClass(klass);
    event.set_objectSize(obj_size);
    event.set_tenured(tenured);
    event.set_tenuringAge(age);
    event.commit();
  }
}

void OldGCTracer::send_old_gc_event() const {
  EventOldGarbageCollection e(UNTIMED);
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_starttime(_shared_gc_info.start_timestamp());
    e.set_endtime(_shared_gc_info.end_timestamp());
    e.commit();
  }
}

static JfrStructCopyFailed to_struct(const CopyFailedInfo& cf_info) {
  JfrStructCopyFailed failed_info;
  failed_info.set_objectCount(cf_info.failed_count());

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier

Examples 3
gcId uint
328
startTime long: millis
249757461667
gcId uint
845
startTime long: millis
233726843500
gcId uint
813
startTime long: millis
284064696083

G1GarbageCollection

default profiling startTime duration 11 17 21 25 26

Category: Java Virtual Machine / GC / Collector

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

Extra information specific to G1 Young Garbage Collections

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1Trace.cpp:

  send_adaptive_ihop_statistics(threshold,
                                internal_target_occupancy,
                                current_occupancy,
                                additional_buffer_size,
                                predicted_allocation_rate,
                                predicted_marking_length,
                                prediction_active);
}

void G1NewTracer::send_g1_young_gc_event() {
  // Check that the pause type has been updated to something valid for this event.
  G1GCPauseTypeHelper::assert_is_young_pause(_pause);

  EventG1GarbageCollection e(UNTIMED);
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_type(static_cast<uint>(_pause));
    e.set_starttime(_shared_gc_info.start_timestamp());
    e.set_endtime(_shared_gc_info.end_timestamp());
    e.commit();
  }
}

void G1NewTracer::send_evacuation_info_event(G1EvacInfo* info) {
  EventEvacuationInformation e;

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
type G1YCType Type Consider contributing a description to jfreventcollector.

Examples 1
gcId uint
822
startTime long: millis
225376371666
type G1YCType
Concurrent Start

ZYoungGarbageCollection

default profiling startTime duration eventThread 21 25 26

Category: Java Virtual Machine / GC / Collector

Extra information specific to ZGC Young Garbage Collections

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zTracer.cpp:

ZMinorTracer::ZMinorTracer()
  : GCTracer(ZMinor) {}

ZMajorTracer::ZMajorTracer()
  : GCTracer(ZMajor) {}

void ZGenerationTracer::report_start(const Ticks& timestamp) {
  _start = timestamp;
}

void ZYoungTracer::report_end(const Ticks& timestamp) {
  NoSafepointVerifier nsv;

  EventZYoungGarbageCollection e(UNTIMED);
  e.set_gcId(GCId::current());
  e.set_tenuringThreshold(ZGeneration::young()->tenuring_threshold());
  e.set_starttime(_start);
  e.set_endtime(timestamp);
  e.commit();
}

void ZOldTracer::report_end(const Ticks& timestamp) {
  NoSafepointVerifier nsv;

  EventZOldGarbageCollection e(UNTIMED);

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
tenuringThreshold uint Tenuring Threshold

ZOldGarbageCollection

default profiling startTime duration eventThread 21 25 26

Category: Java Virtual Machine / GC / Collector

Extra information specific to ZGC Old Garbage Collections

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zTracer.cpp:

  NoSafepointVerifier nsv;

  EventZYoungGarbageCollection e(UNTIMED);
  e.set_gcId(GCId::current());
  e.set_tenuringThreshold(ZGeneration::young()->tenuring_threshold());
  e.set_starttime(_start);
  e.set_endtime(timestamp);
  e.commit();
}

void ZOldTracer::report_end(const Ticks& timestamp) {
  NoSafepointVerifier nsv;

  EventZOldGarbageCollection e(UNTIMED);
  e.set_gcId(GCId::current());
  e.set_starttime(_start);
  e.set_endtime(timestamp);
  e.commit();
}

void ZTracer::initialize() {
  JFR_ONLY(register_jfr_type_serializers();)
}

void ZTracer::send_stat_counter(const ZStatCounter& counter, uint64_t increment, uint64_t value) {

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier

JVM: GC: Configuration

GCConfiguration

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / GC / Configuration

The configuration of the garbage collector

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

TRACE_REQUEST_FUNC(G1HeapRegionInformation) {
  G1GC_ONLY(G1HeapRegionEventSender::send_events());
}

// Java Mission Control (JMC) uses (Java) Long.MIN_VALUE to describe that a
// long value is undefined.
static jlong jmc_undefined_long = min_jlong;

TRACE_REQUEST_FUNC(GCConfiguration) {
  GCConfiguration conf;
  jlong pause_target = conf.has_pause_target_default_value() ? jmc_undefined_long : conf.pause_target();
  EventGCConfiguration event;
  event.set_youngCollector(conf.young_collector());
  event.set_oldCollector(conf.old_collector());
  event.set_parallelGCThreads(conf.num_parallel_gc_threads());
  event.set_concurrentGCThreads(conf.num_concurrent_gc_threads());
  event.set_usesDynamicGCThreads(conf.uses_dynamic_gc_threads());
  event.set_isExplicitGCConcurrent(conf.is_explicit_gc_concurrent());
  event.set_isExplicitGCDisabled(conf.is_explicit_gc_disabled());
  event.set_gcTimeRatio(static_cast<unsigned int>(conf.gc_time_ratio()));
  event.set_pauseTarget((s8)pause_target);
  event.commit();
}

Configuration enabled period
default true everyChunk
profiling true everyChunk

Field Type Description
youngCollector GCName Young Garbage Collector The garbage collector used for the young generation
oldCollector GCName Old Garbage Collector The garbage collector used for the old generation
parallelGCThreads uint Parallel GC Threads Number of parallel threads to use for garbage collection
concurrentGCThreads uint Concurrent GC Threads Number of concurrent threads to use for garbage collection
usesDynamicGCThreads boolean Uses Dynamic GC Threads Whether a dynamic number of GC threads are used or not
isExplicitGCConcurrent boolean Concurrent Explicit GC Whether System.gc() is concurrent or not
isExplicitGCDisabled boolean Disabled Explicit GC Whether System.gc() will cause a garbage collection or not
pauseTarget long: millis Pause Target Target for GC pauses
gcTimeRatio uint GC Time Ratio Target for runtime vs garbage collection time

Examples 3
concurrentGCThreads uint
3
gcTimeRatio uint
12
isExplicitGCConcurrent boolean
false
isExplicitGCDisabled boolean
false
oldCollector GCName
G1Old
parallelGCThreads uint
10
pauseTarget long: millis
-9223372036854775808
startTime long: millis
217982755791
usesDynamicGCThreads boolean
true
youngCollector GCName
G1New
concurrentGCThreads uint
0
gcTimeRatio uint
99
isExplicitGCConcurrent boolean
false
isExplicitGCDisabled boolean
false
oldCollector GCName
ParallelOld
parallelGCThreads uint
10
pauseTarget long: millis
-9223372036854775808
startTime long: millis
254437616542
usesDynamicGCThreads boolean
true
youngCollector GCName
ParallelScavenge
concurrentGCThreads uint
0
gcTimeRatio uint
99
isExplicitGCConcurrent boolean
false
isExplicitGCDisabled boolean
false
oldCollector GCName
SerialOld
parallelGCThreads uint
0
pauseTarget long: millis
-9223372036854775808
startTime long: millis
284305247833
usesDynamicGCThreads boolean
true
youngCollector GCName
DefNew

GCSurvivorConfiguration

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / GC / Configuration

The configuration of the survivors of garbage collection

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

TRACE_REQUEST_FUNC(GCTLABConfiguration) {
  GCTLABConfiguration conf;
  EventGCTLABConfiguration event;
  event.set_usesTLABs(conf.uses_tlabs());
  event.set_minTLABSize(conf.min_tlab_size());
  event.set_tlabRefillWasteLimit(conf.tlab_refill_waste_limit());
  event.commit();
}

TRACE_REQUEST_FUNC(GCSurvivorConfiguration) {
  GCSurvivorConfiguration conf;
  EventGCSurvivorConfiguration event;
  event.set_maxTenuringThreshold(static_cast<u1>(conf.max_tenuring_threshold()));
  event.set_initialTenuringThreshold(static_cast<u1>(conf.initial_tenuring_threshold()));
  event.commit();
}

TRACE_REQUEST_FUNC(GCHeapConfiguration) {
  GCHeapConfiguration conf;
  EventGCHeapConfiguration event;
  event.set_minSize(conf.min_size());
  event.set_maxSize(conf.max_size());
  event.set_initialSize(conf.initial_size());

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
maxTenuringThreshold ubyte Maximum Tenuring Threshold Upper limit for the age of how old objects to keep in the survivor area
initialTenuringThreshold ubyte Initial Tenuring Threshold Initial age limit for how old objects to keep in survivor area

Examples 3
initialTenuringThreshold ubyte
7
maxTenuringThreshold ubyte
15
startTime long: millis
287403299250
initialTenuringThreshold ubyte
7
maxTenuringThreshold ubyte
15
startTime long: millis
199167087583
initialTenuringThreshold ubyte
7
maxTenuringThreshold ubyte
15
startTime long: millis
251392919333

GCTLABConfiguration

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / GC / Configuration

The configuration of the Thread Local Allocation Buffers (TLABs)

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  event.set_oldCollector(conf.old_collector());
  event.set_parallelGCThreads(conf.num_parallel_gc_threads());
  event.set_concurrentGCThreads(conf.num_concurrent_gc_threads());
  event.set_usesDynamicGCThreads(conf.uses_dynamic_gc_threads());
  event.set_isExplicitGCConcurrent(conf.is_explicit_gc_concurrent());
  event.set_isExplicitGCDisabled(conf.is_explicit_gc_disabled());
  event.set_gcTimeRatio(static_cast<unsigned int>(conf.gc_time_ratio()));
  event.set_pauseTarget((s8)pause_target);
  event.commit();
}

TRACE_REQUEST_FUNC(GCTLABConfiguration) {
  GCTLABConfiguration conf;
  EventGCTLABConfiguration event;
  event.set_usesTLABs(conf.uses_tlabs());
  event.set_minTLABSize(conf.min_tlab_size());
  event.set_tlabRefillWasteLimit(conf.tlab_refill_waste_limit());
  event.commit();
}

TRACE_REQUEST_FUNC(GCSurvivorConfiguration) {
  GCSurvivorConfiguration conf;
  EventGCSurvivorConfiguration event;
  event.set_maxTenuringThreshold(static_cast<u1>(conf.max_tenuring_threshold()));
  event.set_initialTenuringThreshold(static_cast<u1>(conf.initial_tenuring_threshold()));

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
usesTLABs boolean TLABs Used If Thread Local Allocation Buffers (TLABs) are in use
minTLABSize ulong: bytes Minimum TLAB Size
tlabRefillWasteLimit ulong: bytes TLAB Refill Waste Limit

Examples 3
minTLABSize ulong: bytes
2048
startTime long: millis
255918017875
tlabRefillWasteLimit ulong: bytes
64
usesTLABs boolean
true
minTLABSize ulong: bytes
2048
startTime long: millis
238490110583
tlabRefillWasteLimit ulong: bytes
64
usesTLABs boolean
true
minTLABSize ulong: bytes
2048
startTime long: millis
287403299708
tlabRefillWasteLimit ulong: bytes
64
usesTLABs boolean
true

GCHeapConfiguration

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / GC / Configuration

The configuration of the garbage collected heap

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  event.commit();
}

TRACE_REQUEST_FUNC(GCSurvivorConfiguration) {
  GCSurvivorConfiguration conf;
  EventGCSurvivorConfiguration event;
  event.set_maxTenuringThreshold(static_cast<u1>(conf.max_tenuring_threshold()));
  event.set_initialTenuringThreshold(static_cast<u1>(conf.initial_tenuring_threshold()));
  event.commit();
}

TRACE_REQUEST_FUNC(GCHeapConfiguration) {
  GCHeapConfiguration conf;
  EventGCHeapConfiguration event;
  event.set_minSize(conf.min_size());
  event.set_maxSize(conf.max_size());
  event.set_initialSize(conf.initial_size());
  event.set_usesCompressedOops(conf.uses_compressed_oops());
  event.set_compressedOopsMode(conf.narrow_oop_mode());
  event.set_objectAlignment(conf.object_alignment_in_bytes());
  event.set_heapAddressBits(static_cast<u1>(conf.heap_address_size_in_bits()));
  event.commit();
}

TRACE_REQUEST_FUNC(YoungGenerationConfiguration) {

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
minSize ulong: bytes Minimum Heap Size
maxSize ulong: bytes Maximum Heap Size
initialSize ulong: bytes Initial Heap Size
usesCompressedOops boolean If Compressed Oops Are Used If compressed Oops (Ordinary Object Pointers) are enabled
compressedOopsMode NarrowOopMode Compressed Oops Mode The kind of compressed oops being used
objectAlignment ulong: bytes Object Alignment Object alignment (in bytes) on the heap
heapAddressBits ubyte Heap Address Size Heap Address Size (in bits)

Examples 3
compressedOopsMode NarrowOopMode
Zero based
heapAddressBits ubyte
32
initialSize ulong: bytes
805306368
maxSize ulong: bytes
12884901888
minSize ulong: bytes
8388608
objectAlignment ulong: bytes
8
startTime long: millis
240062879666
usesCompressedOops boolean
true
compressedOopsMode NarrowOopMode
Zero based
heapAddressBits ubyte
32
initialSize ulong: bytes
805306368
maxSize ulong: bytes
12884901888
minSize ulong: bytes
8388608
objectAlignment ulong: bytes
8
startTime long: millis
230258100708
usesCompressedOops boolean
true
compressedOopsMode NarrowOopMode
Zero based
heapAddressBits ubyte
32
initialSize ulong: bytes
805306368
maxSize ulong: bytes
12884901888
minSize ulong: bytes
8388608
objectAlignment ulong: bytes
8
startTime long: millis
287403300292
usesCompressedOops boolean
true

YoungGenerationConfiguration

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Java Virtual Machine / GC / Configuration

The configuration of the young generation of the garbage collected heap

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  event.set_minSize(conf.min_size());
  event.set_maxSize(conf.max_size());
  event.set_initialSize(conf.initial_size());
  event.set_usesCompressedOops(conf.uses_compressed_oops());
  event.set_compressedOopsMode(conf.narrow_oop_mode());
  event.set_objectAlignment(conf.object_alignment_in_bytes());
  event.set_heapAddressBits(static_cast<u1>(conf.heap_address_size_in_bits()));
  event.commit();
}

TRACE_REQUEST_FUNC(YoungGenerationConfiguration) {
  GCYoungGenerationConfiguration conf;
  jlong max_size = conf.has_max_size_default_value() ? jmc_undefined_long : conf.max_size();
  EventYoungGenerationConfiguration event;
  event.set_maxSize((u8)max_size);
  event.set_minSize(conf.min_size());
  event.set_newRatio(static_cast<unsigned int>(conf.new_ratio()));
  event.commit();
}

TRACE_REQUEST_FUNC(InitialSystemProperty) {
  SystemProperty* p = Arguments::system_properties();
  JfrTicks time_stamp = JfrTicks::now();
  while (p !=  nullptr) {
    if (!p->internal()) {

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
minSize ulong: bytes Minimum Young Generation Size
maxSize ulong: bytes Maximum Young Generation Size
newRatio uint New Ratio The size of the young generation relative to the tenured generation

Examples 3
maxSize ulong: bytes
7725907968
minSize ulong: bytes
1363144
newRatio uint
2
startTime long: millis
206020037000
maxSize ulong: bytes
4294967296
minSize ulong: bytes
268435456
newRatio uint
2
startTime long: millis
258393539000
maxSize ulong: bytes
4294967296
minSize ulong: bytes
268435456
newRatio uint
2
startTime long: millis
277269606958

JVM: GC: Detailed

ZThreadDebug

internal startTime duration eventThread 18 21 25 26

Category: Java Virtual Machine / GC / Detailed

Temporary latency measurements used during development and debugging of ZGC

Only valid for the ZGC.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zTracer.cpp:

  NoSafepointVerifier nsv;

  EventZThreadPhase e(UNTIMED);
  if (e.should_commit()) {
    e.set_gcId(GCId::current_or_undefined());
    e.set_name(name);
    e.set_starttime(start);
    e.set_endtime(end);
    e.commit();
  }
}

void ZTracer::send_thread_debug(const char* name, const Ticks& start, const Ticks& end) {
  NoSafepointVerifier nsv;

  EventZThreadDebug e(UNTIMED);
  if (e.should_commit()) {
    e.set_gcId(GCId::current_or_undefined());
    e.set_name(name);
    e.set_starttime(start);
    e.set_endtime(end);
    e.commit();
  }
}

src/hotspot/share/gc/z/zTracer.inline.hpp:

inline void ZTracer::report_stat_sampler(const ZStatSampler& sampler, uint64_t value) {
  if (EventZStatisticsSampler::is_enabled()) {
    send_stat_sampler(sampler, value);
  }
}

inline void ZTracer::report_thread_phase(const char* name, const Ticks& start, const Ticks& end) {
  if (EventZThreadPhase::is_enabled()) {
    send_thread_phase(name, start, end);
  }
}

inline void ZTracer::report_thread_debug(const char* name, const Ticks& start, const Ticks& end) {
  if (EventZThreadDebug::is_enabled()) {
    send_thread_debug(name, start, end);
  }
}

inline ZTraceThreadDebug::ZTraceThreadDebug(const char* name)
  : _start(Ticks::now()),
    _name(name) {}

inline ZTraceThreadDebug::~ZTraceThreadDebug() {
  ZTracer::report_thread_debug(_name, _start, Ticks::now());
}

Field Type Description
gcId uint GC Identifier
name string Name The name of the GC runner

G1MMU

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1Trace.cpp:

void G1OldTracer::report_gc_start_impl(GCCause::Cause cause, const Ticks& timestamp) {
  _shared_gc_info.set_start_timestamp(timestamp);
}

void G1OldTracer::set_gc_cause(GCCause::Cause cause) {
  _shared_gc_info.set_cause(cause);
}

void G1MMUTracer::report_mmu(double time_slice_sec, double gc_time_sec, double max_time_sec) {
  send_g1_mmu_event(time_slice_sec * MILLIUNITS,
                    gc_time_sec * MILLIUNITS,
                    max_time_sec * MILLIUNITS);
}

void G1MMUTracer::send_g1_mmu_event(double time_slice_ms, double gc_time_ms, double max_time_ms) {
  EventG1MMU e;
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_timeSlice(time_slice_ms);
    e.set_gcTime(gc_time_ms);
    e.set_pauseTarget(max_time_ms);
    e.commit();
  }
}

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
timeSlice long: millis Time Slice Time slice used to calculate MMU
gcTime long: millis GC Time Time stopped because of GC during last time slice
pauseTarget long: millis Pause Target Max time allowed to be spent on GC during last time slice

Examples 1
gcId uint
822
gcTime long: millis
4
pauseTarget long: millis
200
startTime long: millis
225378415500
timeSlice long: millis
201

EvacuationInformation

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1Trace.cpp:

  G1GCPauseTypeHelper::assert_is_young_pause(_pause);

  EventG1GarbageCollection e(UNTIMED);
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_type(static_cast<uint>(_pause));
    e.set_starttime(_shared_gc_info.start_timestamp());
    e.set_endtime(_shared_gc_info.end_timestamp());
    e.commit();
  }
}

void G1NewTracer::send_evacuation_info_event(G1EvacInfo* info) {
  EventEvacuationInformation e;
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_cSetRegions(info->collection_set_regions());
    e.set_cSetUsedBefore(info->collection_set_used_before());
    e.set_cSetUsedAfter(info->collection_set_used_after());
    e.set_allocationRegions(info->allocation_regions());
    e.set_allocationRegionsUsedBefore(info->alloc_regions_used_before());
    e.set_allocationRegionsUsedAfter(info->alloc_regions_used_before() + info->bytes_used());
    e.set_bytesCopied(info->bytes_used());
    e.set_regionsFreed(info->regions_freed());
    e.commit();

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
cSetRegions uint Collection Set Regions
cSetUsedBefore ulong: bytes Collection Set Before Memory usage before GC in the collection set regions
cSetUsedAfter ulong: bytes Collection Set After Memory usage after GC in the collection set regions
allocationRegions uint Allocation Regions Regions chosen as allocation regions during evacuation (includes survivors and old space regions)
allocationRegionsUsedBefore ulong: bytes Allocation Regions Before Memory usage before GC in allocation regions
allocationRegionsUsedAfter ulong: bytes Allocation Regions After Memory usage after GC in allocation regions
bytesCopied ulong: bytes Bytes Copied
regionsFreed uint Regions Freed

Examples 1
allocationRegions uint
2
allocationRegionsUsedAfter ulong: bytes
16756360
allocationRegionsUsedBefore ulong: bytes
0
bytesCopied ulong: bytes
16756360
cSetRegions uint
84
cSetUsedAfter ulong: bytes
0
cSetUsedBefore ulong: bytes
701941384
gcId uint
853
regionsFreed uint
84
startTime long: millis
235231389166

ObjectCountAfterGC

startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC, ParallelGC, SerialGC

Missing in: ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/objectCountEventSender.cpp:

#if INCLUDE_SERVICES

bool ObjectCountEventSender::should_send_event() {
#if INCLUDE_JFR
  return _should_send_requestable_event || EventObjectCountAfterGC::is_enabled();
#else
  return false;
#endif // INCLUDE_JFR
}

bool ObjectCountEventSender::_should_send_requestable_event = false;

void ObjectCountEventSender::enable_requestable_event() {
  _should_send_requestable_event = true;
}

void ObjectCountEventSender::disable_requestable_event() {

src/hotspot/share/gc/shared/objectCountEventSender.cpp:

template <typename T>
void ObjectCountEventSender::send_event_if_enabled(Klass* klass, jlong count, julong size, const Ticks& timestamp) {
  T event(UNTIMED);
  if (event.should_commit()) {
    event.set_starttime(timestamp);
    event.set_endtime(timestamp);
    event.set_gcId(GCId::current());
    event.set_objectClass(klass);
    event.set_count(count);
    event.set_totalSize(size);
    event.commit();
  }
}

void ObjectCountEventSender::send(const KlassInfoEntry* entry, const Ticks& timestamp) {
  Klass* klass = entry->klass();
  jlong count = entry->count();
  julong total_size = entry->words() * BytesPerWord;

  send_event_if_enabled<EventObjectCount>(klass, count, total_size, timestamp);
  send_event_if_enabled<EventObjectCountAfterGC>(klass, count, total_size, timestamp);
}

#endif // INCLUDE_SERVICES

Configuration enabled
default false
profiling false

Field Type Description
gcId uint GC Identifier
objectClass Class Object Class Consider contributing a description to jfreventcollector.
count long Count
totalSize ulong: bytes Total Size

Examples 3
count long
71957
gcId uint
786
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[Ljava/lang/Class;
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
startTime long: millis
201496525750
totalSize ulong: bytes
1917760
count long
45582
gcId uint
707
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
8
name string
java/util/LinkedHashMap$Entry
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util
startTime long: millis
242329469792
totalSize ulong: bytes
1823280
count long
81827
gcId uint
304
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
8
name string
java/util/HashMap$Node
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util
startTime long: millis
233243505500
totalSize ulong: bytes
2618464

G1EvacuationYoungStatistics

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

Memory related evacuation statistics during GC for the young generation

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1Trace.cpp:

  s.set_allocated(summary.allocated() * HeapWordSize);
  s.set_wasted(summary.wasted() * HeapWordSize);
  s.set_used(summary.used() * HeapWordSize);
  s.set_undoWaste(summary.undo_wasted() * HeapWordSize);
  s.set_regionEndWaste(summary.region_end_waste() * HeapWordSize);
  s.set_regionsRefilled(summary.regions_filled());
  s.set_directAllocated(summary.direct_allocated() * HeapWordSize);
  s.set_failureUsed(summary.failure_used() * HeapWordSize);
  s.set_failureWaste(summary.failure_waste() * HeapWordSize);
  return s;
}

void G1NewTracer::send_young_evacuation_statistics(const G1EvacSummary& summary) const {
  EventG1EvacuationYoungStatistics surv_evt;
  if (surv_evt.should_commit()) {
    surv_evt.set_statistics(create_g1_evacstats(GCId::current(), summary));
    surv_evt.commit();
  }
}

void G1NewTracer::send_old_evacuation_statistics(const G1EvacSummary& summary) const {
  EventG1EvacuationOldStatistics old_evt;
  if (old_evt.should_commit()) {
    old_evt.set_statistics(create_g1_evacstats(GCId::current(), summary));
    old_evt.commit();

Configuration enabled
default true
profiling true

Field Type Description
statistics G1EvacuationStatistics struct Evacuation Statistics

Examples 1
startTime long: millis
224430056666
statistics G1EvacuationStatistics
allocated ulong: bytes
3543288
directAllocated ulong: bytes
213040
failureUsed ulong: bytes
0
failureWaste ulong: bytes
0
gcId uint
812
numDirectAllocated ulong
6182775016
numPlabsFilled ulong
34036352
regionEndWaste ulong: bytes
0
regionsRefilled uint
1
undoWaste ulong: bytes
0
used ulong: bytes
3280280
wasted ulong: bytes
3176

G1EvacuationOldStatistics

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

Memory related evacuation statistics during GC for the old generation

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1Trace.cpp:

  s.set_failureWaste(summary.failure_waste() * HeapWordSize);
  return s;
}

void G1NewTracer::send_young_evacuation_statistics(const G1EvacSummary& summary) const {
  EventG1EvacuationYoungStatistics surv_evt;
  if (surv_evt.should_commit()) {
    surv_evt.set_statistics(create_g1_evacstats(GCId::current(), summary));
    surv_evt.commit();
  }
}

void G1NewTracer::send_old_evacuation_statistics(const G1EvacSummary& summary) const {
  EventG1EvacuationOldStatistics old_evt;
  if (old_evt.should_commit()) {
    old_evt.set_statistics(create_g1_evacstats(GCId::current(), summary));
    old_evt.commit();
  }
}

void G1NewTracer::send_basic_ihop_statistics(size_t threshold,
                                             size_t target_occupancy,
                                             size_t current_occupancy,
                                             size_t last_allocation_size,
                                             double last_allocation_duration,

Configuration enabled
default true
profiling true

Field Type Description
statistics G1EvacuationStatistics struct Evacuation Statistics

Examples 1
startTime long: millis
243172252083
statistics G1EvacuationStatistics
allocated ulong: bytes
0
directAllocated ulong: bytes
0
failureUsed ulong: bytes
0
failureWaste ulong: bytes
0
gcId uint
893
numDirectAllocated ulong
6182775016
numPlabsFilled ulong
34036352
regionEndWaste ulong: bytes
0
regionsRefilled uint
0
undoWaste ulong: bytes
0
used ulong: bytes
0
wasted ulong: bytes
0

G1BasicIHOP

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

Basic statistics related to current IHOP calculation

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1Trace.cpp:

  EventG1EvacuationOldStatistics old_evt;
  if (old_evt.should_commit()) {
    old_evt.set_statistics(create_g1_evacstats(GCId::current(), summary));
    old_evt.commit();
  }
}

void G1NewTracer::send_basic_ihop_statistics(size_t threshold,
                                             size_t target_occupancy,
                                             size_t current_occupancy,
                                             size_t last_allocation_size,
                                             double last_allocation_duration,
                                             double last_marking_length) {
  EventG1BasicIHOP evt;
  if (evt.should_commit()) {
    evt.set_gcId(GCId::current());
    evt.set_threshold(threshold);
    evt.set_targetOccupancy(target_occupancy);
    evt.set_thresholdPercentage(target_occupancy > 0 ? ((double)threshold / target_occupancy) : 0.0);
    evt.set_currentOccupancy(current_occupancy);
    evt.set_recentMutatorAllocationSize(last_allocation_size);
    evt.set_recentMutatorDuration(last_allocation_duration * MILLIUNITS);
    evt.set_recentAllocationRate(last_allocation_duration != 0.0 ? last_allocation_size / last_allocation_duration : 0.0);
    evt.set_lastMarkingDuration(last_marking_length * MILLIUNITS);
    evt.commit();

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
threshold ulong: bytes Current IHOP Threshold Current IHOP threshold
thresholdPercentage float: percentage Current IHOP Threshold Current IHOP threshold in percent of old generation
targetOccupancy ulong: bytes Target Occupancy Target old generation occupancy to reach at the start of mixed GC
currentOccupancy ulong: bytes Current Occupancy Current old generation occupancy
recentMutatorAllocationSize ulong: bytes Recent Mutator Allocation Size Mutator allocation during mutator operation in the most recent interval
recentMutatorDuration long: millis Recent Mutator Duration Time the mutator ran in the most recent interval
recentAllocationRate double: bytes-per-second Recent Allocation Rate Allocation rate of the mutator in the most recent interval in bytes/second
lastMarkingDuration long: millis Last Marking Duration Last time from the end of the last concurrent start to the first mixed GC

Examples 1
currentOccupancy ulong: bytes
282288200
gcId uint
893
lastMarkingDuration long: millis
340
recentAllocationRate double: bytes-per-second
0.0
recentMutatorAllocationSize ulong: bytes
0
recentMutatorDuration long: millis
190
startTime long: millis
243172262500
targetOccupancy ulong: bytes
1090519040
threshold ulong: bytes
0
thresholdPercentage float: percentage
0.0

G1AdaptiveIHOP

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

Statistics related to current adaptive IHOP calculation

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1Trace.cpp:

    evt.set_recentAllocationRate(last_allocation_duration != 0.0 ? last_allocation_size / last_allocation_duration : 0.0);
    evt.set_lastMarkingDuration(last_marking_length * MILLIUNITS);
    evt.commit();
  }
}

void G1NewTracer::send_adaptive_ihop_statistics(size_t threshold,
                                                size_t internal_target_occupancy,
                                                size_t current_occupancy,
                                                size_t additional_buffer_size,
                                                double predicted_allocation_rate,
                                                double predicted_marking_length,
                                                bool prediction_active) {
  EventG1AdaptiveIHOP evt;
  if (evt.should_commit()) {
    evt.set_gcId(GCId::current());
    evt.set_threshold(threshold);
    evt.set_thresholdPercentage(internal_target_occupancy > 0 ? ((double)threshold / internal_target_occupancy) : 0.0);
    evt.set_ihopTargetOccupancy(internal_target_occupancy);
    evt.set_currentOccupancy(current_occupancy);
    evt.set_additionalBufferSize(additional_buffer_size);
    evt.set_predictedAllocationRate(predicted_allocation_rate);
    evt.set_predictedMarkingDuration(predicted_marking_length * MILLIUNITS);
    evt.set_predictionActive(prediction_active);
    evt.commit();

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
threshold ulong: bytes Threshold Current IHOP Threshold
thresholdPercentage float: percentage Threshold Current IHOP threshold in percent of the internal target occupancy
ihopTargetOccupancy ulong: bytes IHOP Target Occupancy Internal target old generation occupancy to reach at the start of mixed GC
currentOccupancy ulong: bytes Current Occupancy Current old generation occupancy
additionalBufferSize ulong: bytes Additional Buffer Additional buffer size
predictedAllocationRate double: bytes-per-second Predicted Allocation Rate Current predicted allocation rate for the mutator in bytes/second
predictedMarkingDuration long: millis Predicted Marking Duration Current predicted time from the end of the last concurrent start to the first mixed GC
predictionActive boolean Prediction Active Indicates whether the adaptive IHOP prediction is active

Examples 1
additionalBufferSize ulong: bytes
570425344
currentOccupancy ulong: bytes
245167240
gcId uint
822
ihopTargetOccupancy ulong: bytes
908486246
predictedAllocationRate double: bytes-per-second
2.4947960575463347E9
predictedMarkingDuration long: millis
410
predictionActive boolean
true
startTime long: millis
225378419625
threshold ulong: bytes
0
thresholdPercentage float: percentage
0.0

PromoteObjectInNewPLAB

profiling startTime eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC, ParallelGC

Missing in: SerialGC, ShenandoahGC, ZGC

Object survived scavenge and was copied to a new Promotion Local Allocation Buffer (PLAB). Supported GCs are Parallel Scavenge, G1 and CMS with Parallel New. Due to promotion being done in parallel an object might be reported multiple times as the GC threads race to copy all objects.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

void YoungGCTracer::send_young_gc_event() const {
  EventYoungGarbageCollection e(UNTIMED);
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_tenuringThreshold(_tenuring_threshold);
    e.set_starttime(_shared_gc_info.start_timestamp());
    e.set_endtime(_shared_gc_info.end_timestamp());
    e.commit();
  }
}

bool YoungGCTracer::should_send_promotion_in_new_plab_event() const {
  return EventPromoteObjectInNewPLAB::is_enabled();
}

bool YoungGCTracer::should_send_promotion_outside_plab_event() const {
  return EventPromoteObjectOutsidePLAB::is_enabled();
}

void YoungGCTracer::send_promotion_in_new_plab_event(Klass* klass, size_t obj_size,
                                                     uint age, bool tenured,
                                                     size_t plab_size) const {

  EventPromoteObjectInNewPLAB event;
  if (event.should_commit()) {
    event.set_gcId(GCId::current());
    event.set_objectClass(klass);
    event.set_objectSize(obj_size);
    event.set_tenured(tenured);
    event.set_tenuringAge(age);
    event.set_plabSize(plab_size);
    event.commit();
  }
}

Configuration enabled
default false
profiling true

Field Type Description
gcId uint GC Identifier Identifier signifying GC during which the object was promoted
objectClass Class Object Class Class of promoted object
objectSize ulong: bytes Object Size Size of promoted object
tenuringAge uint Object Tenuring Age Tenuring age of a surviving object before being copied. The tenuring age of an object is a value between 0-15 and is incremented each scavenge the object survives. Newly allocated objects have tenuring age 0.
tenured boolean Tenured True if object was promoted to Old space, otherwise the object was aged and copied to a Survivor space
plabSize ulong: bytes PLAB Size Size of the allocated PLAB to which the object was copied

Examples 2
gcId uint
297
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[F
package Package
null
objectSize ulong: bytes
56
plabSize ulong: bytes
32752
startTime long: millis
230210885208
tenured boolean
false
tenuringAge uint
0
gcId uint
784
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[F
package Package
null
objectSize ulong: bytes
56
plabSize ulong: bytes
8808
startTime long: millis
201459899291
tenured boolean
false
tenuringAge uint
0

PromoteObjectOutsidePLAB

profiling startTime eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC, ParallelGC

Missing in: SerialGC, ShenandoahGC, ZGC

Object survived scavenge and was copied directly to the heap. Supported GCs are Parallel Scavenge, G1 and CMS with Parallel New. Due to promotion being done in parallel an object might be reported multiple times as the GC threads race to copy all objects.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

    e.set_gcId(GCId::current());
    e.set_tenuringThreshold(_tenuring_threshold);
    e.set_starttime(_shared_gc_info.start_timestamp());
    e.set_endtime(_shared_gc_info.end_timestamp());
    e.commit();
  }
}

bool YoungGCTracer::should_send_promotion_in_new_plab_event() const {
  return EventPromoteObjectInNewPLAB::is_enabled();
}

bool YoungGCTracer::should_send_promotion_outside_plab_event() const {
  return EventPromoteObjectOutsidePLAB::is_enabled();
}

void YoungGCTracer::send_promotion_in_new_plab_event(Klass* klass, size_t obj_size,
                                                     uint age, bool tenured,
                                                     size_t plab_size) const {

  EventPromoteObjectInNewPLAB event;
  if (event.should_commit()) {
    event.set_gcId(GCId::current());
    event.set_objectClass(klass);
    event.set_objectSize(obj_size);
    event.set_tenured(tenured);
    event.set_tenuringAge(age);
    event.set_plabSize(plab_size);
    event.commit();
  }
}

void YoungGCTracer::send_promotion_outside_plab_event(Klass* klass, size_t obj_size,
                                                      uint age, bool tenured) const {

  EventPromoteObjectOutsidePLAB event;
  if (event.should_commit()) {
    event.set_gcId(GCId::current());
    event.set_objectClass(klass);
    event.set_objectSize(obj_size);
    event.set_tenured(tenured);
    event.set_tenuringAge(age);
    event.commit();
  }
}

void OldGCTracer::send_old_gc_event() const {

Configuration enabled
default false
profiling true

Field Type Description
gcId uint GC Identifier Identifier signifying GC during which the object was promoted
objectClass Class Object Class Class of promoted object
objectSize ulong: bytes Object Size Size of promoted object
tenuringAge uint Object Tenuring Age Tenuring age of a surviving object before being copied. The tenuring age of an object is a value between 0-15 and is incremented each scavenge the object survives. Newly allocated objects have tenuring age 0.
tenured boolean Tenured True if object was promoted to Old space, otherwise the object was aged and copied to a Survivor space

Examples 2
gcId uint
297
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[B
package Package
null
objectSize ulong: bytes
32952
startTime long: millis
230210662292
tenured boolean
false
tenuringAge uint
0
gcId uint
790
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[[F
package Package
null
objectSize ulong: bytes
8016
startTime long: millis
205967503541
tenured boolean
false
tenuringAge uint
0

PromotionFailed

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Promotion of an object failed

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

static JfrStructCopyFailed to_struct(const CopyFailedInfo& cf_info) {
  JfrStructCopyFailed failed_info;
  failed_info.set_objectCount(cf_info.failed_count());
  failed_info.set_firstSize(cf_info.first_size() * HeapWordSize);
  failed_info.set_smallestSize(cf_info.smallest_size() * HeapWordSize);
  failed_info.set_totalSize(cf_info.total_size() * HeapWordSize);
  return failed_info;
}

void YoungGCTracer::send_promotion_failed_event(const PromotionFailedInfo& pf_info) const {
  EventPromotionFailed e;
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_promotionFailed(to_struct(pf_info));
    e.set_thread(pf_info.thread_trace_id());
    e.commit();
  }
}

// G1
void OldGCTracer::send_concurrent_mode_failure_event() {
  EventConcurrentModeFailure e;

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
promotionFailed CopyFailed struct Promotion Failed Data
thread Thread Running Thread

EvacuationFailed

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Evacuation of an object failed

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1Trace.cpp:

    e.set_cSetRegions(info->collection_set_regions());
    e.set_cSetUsedBefore(info->collection_set_used_before());
    e.set_cSetUsedAfter(info->collection_set_used_after());
    e.set_allocationRegions(info->allocation_regions());
    e.set_allocationRegionsUsedBefore(info->alloc_regions_used_before());
    e.set_allocationRegionsUsedAfter(info->alloc_regions_used_before() + info->bytes_used());
    e.set_bytesCopied(info->bytes_used());
    e.set_regionsFreed(info->regions_freed());
    e.commit();
  }
}

void G1NewTracer::send_evacuation_failed_event(const EvacuationFailedInfo& ef_info) const {
  EventEvacuationFailed e;
  if (e.should_commit()) {
    // Create JFR structured failure data
    JfrStructCopyFailed evac_failed;
    evac_failed.set_objectCount(ef_info.failed_count());
    evac_failed.set_firstSize(ef_info.first_size() * HeapWordSize);
    evac_failed.set_smallestSize(ef_info.smallest_size() * HeapWordSize);
    evac_failed.set_totalSize(ef_info.total_size() * HeapWordSize);
    // Add to the event
    e.set_gcId(GCId::current());
    e.set_evacuationFailed(evac_failed);
    e.commit();

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
evacuationFailed CopyFailed struct Evacuation Failed Data

ConcurrentModeFailure

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

Concurrent Mode failed

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

void YoungGCTracer::send_promotion_failed_event(const PromotionFailedInfo& pf_info) const {
  EventPromotionFailed e;
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_promotionFailed(to_struct(pf_info));
    e.set_thread(pf_info.thread_trace_id());
    e.commit();
  }
}

// G1
void OldGCTracer::send_concurrent_mode_failure_event() {
  EventConcurrentModeFailure e;
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.commit();
  }
}

static JfrStructVirtualSpace to_struct(const VirtualSpaceSummary& summary) {
  JfrStructVirtualSpace space;
  space.set_start((TraceAddress)summary.start());
  space.set_committedEnd((TraceAddress)summary.committed_end());
  space.set_committedSize(summary.committed_size());

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier

Examples 1
gcId uint
801
startTime long: millis
217982612750

GCCPUTime

default profiling startTime 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC, ParallelGC, SerialGC

Missing in: ShenandoahGC, ZGC

GC CPU Time information. Supported: G1GC, ParallelGC and SerialGC

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

// All GC dependencies against the trace framework is contained within this file.

typedef uintptr_t TraceAddress;

bool GCTracer::should_send_cpu_time_event() const {
  return EventGCCPUTime::is_enabled();
}

void GCTracer::send_garbage_collection_event() const {
  EventGarbageCollection event(UNTIMED);
  if (event.should_commit()) {
    event.set_gcId(GCId::current());
    event.set_name(_shared_gc_info.name());
    event.set_cause((u2) _shared_gc_info.cause());
    event.set_sumOfPauses(_shared_gc_info.sum_of_pauses());
    event.set_longestPause(_shared_gc_info.longest_pause());
    event.set_starttime(_shared_gc_info.start_timestamp());
    event.set_endtime(_shared_gc_info.end_timestamp());
    event.commit();
  }
}

void GCTracer::send_cpu_time_event(double user_time, double system_time, double real_time) const {
  EventGCCPUTime e;
  if (e.should_commit()) {
      e.set_gcId(GCId::current());
      e.set_userTime((size_t)(user_time * NANOUNITS));
      e.set_systemTime((size_t)(system_time * NANOUNITS));
      e.set_realTime((size_t)(real_time * NANOUNITS));
      e.commit();
  }
}

void GCTracer::send_reference_stats_event(ReferenceType type, size_t count) const {
  EventGCReferenceStatistics e;

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
userTime ulong: nanos User Time
systemTime ulong: nanos System Time
realTime ulong: nanos Real Time

Examples 3
gcId uint
858
realTime ulong: nanos
49999952
startTime long: millis
235604894458
systemTime ulong: nanos
0
userTime ulong: nanos
420000000
gcId uint
711
realTime ulong: nanos
170000076
startTime long: millis
252498468583
systemTime ulong: nanos
0
userTime ulong: nanos
160000000
gcId uint
365
realTime ulong: nanos
89999914
startTime long: millis
265835159708
systemTime ulong: nanos
49999999
userTime ulong: nanos
360000000

AllocationRequiringGC

startTime eventThread stackTrace 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC, ParallelGC, SerialGC

Missing in: ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/allocTracer.cpp:

    event.set_allocationSize(alloc_size);
    event.commit();
  }
}

void AllocTracer::send_allocation_in_new_tlab(Klass* klass, HeapWord* obj, size_t tlab_size, size_t alloc_size, JavaThread* thread) {
  JFR_ONLY(JfrAllocationTracer tracer(klass, obj, alloc_size, false, thread);)
  EventObjectAllocationInNewTLAB event;
  if (event.should_commit()) {
    event.set_objectClass(klass);
    event.set_allocationSize(alloc_size);
    event.set_tlabSize(tlab_size);
    event.commit();
  }
}

void AllocTracer::send_allocation_requiring_gc_event(size_t size, uint gcId) {
  EventAllocationRequiringGC event;
  if (event.should_commit()) {
    event.set_gcId(gcId);
    event.set_size(size);
    event.commit();
  }
}

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
gcId uint Pending GC Identifier
size ulong: bytes Allocation Size

Examples 3
gcId uint
835
size ulong: bytes
793368
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
12
lineNumber int
501
method Method
descriptor string
(Ljava/lang/Object;)Ljava/lang/Object;
hidden boolean
false
modifiers int
8
name string
allocateInstance
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
java/lang/invoke/DirectMethodHandle
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang/invoke
type FrameType
Inlined
truncated boolean
false
startTime long: millis
230236160750
gcId uint
376
size ulong: bytes
24
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
17
lineNumber int
97
method Method
descriptor string
(Lcom/twitter/util/Try;)V
hidden boolean
false
modifiers int
17
name string
runInScheduler
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1033
name string
com/twitter/util/Promise$WaitQueue
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
com/twitter/util
type FrameType
JIT compiled
truncated boolean
true
startTime long: millis
271039293042
gcId uint
788
size ulong: bytes
56
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
52
lineNumber int
239
method Method
descriptor string
(I)[Ljava/lang/Object;
hidden boolean
false
modifiers int
2
name string
grow
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/util/ArrayList
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util
type FrameType
Inlined
truncated boolean
true
startTime long: millis
281070323917

TenuringDistribution

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC, SerialGC

Missing in: ParallelGC, ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/ageTableTracer.cpp:

void AgeTableTracer::send_tenuring_distribution_event(uint age, size_t size) {
  EventTenuringDistribution e;
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_age(age);
    e.set_size(size);
    e.commit();
  }
}

bool AgeTableTracer::is_tenuring_distribution_event_enabled() {
  return EventTenuringDistribution::is_enabled();
}

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
age uint Age
size ulong: bytes Size

Examples 2
age uint
7
gcId uint
722
size ulong: bytes
0
startTime long: millis
265135556583
age uint
7
gcId uint
780
size ulong: bytes
0
startTime long: millis
199166846583

G1HeapRegionTypeChange

startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

Information about a G1 heap region type change

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1HeapRegionTracer.cpp:

void G1HeapRegionTracer::send_region_type_change(uint index,
                                               G1HeapRegionTraceType::Type from,
                                               G1HeapRegionTraceType::Type to,
                                               uintptr_t start,
                                               size_t used) {
  EventG1HeapRegionTypeChange e;
  if (e.should_commit()) {
    e.set_index(index);
    e.set_from(from);
    e.set_to(to);
    e.set_start(start);
    e.set_used(used);
    e.commit();
  }
}

Configuration enabled
default false
profiling false

Field Type Description
index uint Index
from G1HeapRegionType From Consider contributing a description to jfreventcollector.
to G1HeapRegionType To Consider contributing a description to jfreventcollector.
start ulong: address Start
used ulong: bytes Used

Examples 1
from G1HeapRegionType
Free
index uint
171
start ulong: address
22909288448
startTime long: millis
199114848250
to G1HeapRegionType
Free
used ulong: bytes
0

ObjectCount

startTime every chunk 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC, ParallelGC, SerialGC

Missing in: ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/objectCountEventSender.cpp:

template <typename T>
void ObjectCountEventSender::send_event_if_enabled(Klass* klass, jlong count, julong size, const Ticks& timestamp) {
  T event(UNTIMED);
  if (event.should_commit()) {
    event.set_starttime(timestamp);
    event.set_endtime(timestamp);
    event.set_gcId(GCId::current());
    event.set_objectClass(klass);
    event.set_count(count);
    event.set_totalSize(size);
    event.commit();
  }
}

void ObjectCountEventSender::send(const KlassInfoEntry* entry, const Ticks& timestamp) {
  Klass* klass = entry->klass();
  jlong count = entry->count();
  julong total_size = entry->words() * BytesPerWord;

  send_event_if_enabled<EventObjectCount>(klass, count, total_size, timestamp);
  send_event_if_enabled<EventObjectCountAfterGC>(klass, count, total_size, timestamp);
}

#endif // INCLUDE_SERVICES

Configuration enabled period
default false everyChunk
profiling false everyChunk

Field Type Description
gcId uint GC Identifier
objectClass Class Object Class Consider contributing a description to jfreventcollector.
count long Count
totalSize ulong: bytes Total Size

Examples 3
count long
50802
gcId uint
780
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/util/LinkedHashMap
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util
startTime long: millis
199152438958
totalSize ulong: bytes
3251328
count long
58138
gcId uint
708
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
java/time/LocalDateTime
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/time
startTime long: millis
243907057708
totalSize ulong: bytes
1395312
count long
110082
gcId uint
304
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[Ljava/lang/Object;
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
startTime long: millis
233243505500
totalSize ulong: bytes
10413880

G1HeapRegionInformation

startTime duration every chunk 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

Information about a specific heap region in the G1 GC

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1HeapRegionEventSender.cpp:

class DumpEventInfoClosure : public G1HeapRegionClosure {
public:
  bool do_heap_region(G1HeapRegion* r) {
    EventG1HeapRegionInformation evt;
    evt.set_index(r->hrm_index());
    evt.set_type(r->get_trace_type());
    evt.set_start((uintptr_t)r->bottom());
    evt.set_used(r->used());
    evt.commit();
    return false;
  }
};

class VM_G1SendHeapRegionInfoEvents : public VM_Operation {
  virtual void doit() {
    DumpEventInfoClosure c;
    G1CollectedHeap::heap()->heap_region_iterate(&c);

Configuration enabled period
default false everyChunk
profiling false everyChunk

Field Type Description
index uint Index
type G1HeapRegionType Type Consider contributing a description to jfreventcollector.
start ulong: address Start
used ulong: bytes Used

Examples 1
index uint
78
start ulong: address
22129147904
startTime long: millis
199167073500
type G1HeapRegionType
Free
used ulong: bytes
0

ZAllocationStall

default profiling startTime duration eventThread stackTrace 15 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Time spent waiting for memory to become available

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zPageAllocator.cpp:

  if (harvested > 0) {
    ZStatInc(ZCounterMappedCacheHarvest, harvested);
    log_debug(gc, heap)("Mapped Cache Harvested: %zuM (%d)", harvested / M, num_harvested_vmems);
  }

  // Send event for successful allocation
  allocation.send_event(true /* successful */);

  return page;
}

bool ZPageAllocator::alloc_page_stall(ZPageAllocation* allocation) {
  ZStatTimer timer(ZCriticalPhaseAllocationStall);
  EventZAllocationStall event;

  // We can only block if the VM is fully initialized
  check_out_of_memory_during_initialization();

  // Start asynchronous minor GC
  const ZDriverRequest request(GCCause::_z_allocation_stall, ZYoungGCThreads, 0);
  ZDriver::minor()->collect(request);

  // Wait for allocation to complete or fail
  const bool result = allocation->wait();

Configuration enabled stackTrace threshold
default true true 17+ 0 ms
profiling true true 17+ 0 ms

Field Type Description
type ZPageTypeType Type Consider contributing a description to jfreventcollector.
size ulong: bytes Size

ZPageAllocation

default profiling startTime duration eventThread stackTrace 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: ZGC

Missing in: G1GC, ParallelGC, SerialGC, ShenandoahGC

Allocation of a ZPage

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zPageAllocator.cpp:

          _multi_partition_allocation.sum_num_harvested_vmems(),
          _multi_partition_allocation.sum_harvested(),
          _multi_partition_allocation.sum_committed_increased_capacity());
    } else {
      return ZPageAllocationStats(
          _single_partition_allocation.allocation()->num_harvested(),
          _single_partition_allocation.allocation()->harvested(),
          _single_partition_allocation.allocation()->committed_capacity());
    }
  }

  void send_event(bool successful) {
    if (!EventZPageAllocation::is_enabled()) {
      // Event not enabled, exit early
      return;
    }

    Ticks end_timestamp = Ticks::now();
    const ZPageAllocationStats st = stats();

    EventZPageAllocation::commit(_start_timestamp,
                                 end_timestamp,
                                 (u8)_type,
                                 size(),
                                 st._total_harvested,
                                 st._total_committed_capacity,
                                 (unsigned)st._num_harvested_vmems,
                                 _is_multi_partition,
                                 successful,
                                 _flags.non_blocking());
  }
};

src/hotspot/share/gc/z/zPageAllocator.cpp:

  assert(to->age() == ZPageAge::old,   "must be promotion");

  decrease_used_generation(ZGenerationId::young, to->size());
  increase_used_generation(ZGenerationId::old, to->size());
}

static void check_out_of_memory_during_initialization() {
  if (!is_init_completed()) {
    vm_exit_during_initialization("java.lang.OutOfMemoryError", "Java heap too small");
  }
}

ZPage* ZPageAllocator::alloc_page(ZPageType type, size_t size, ZAllocationFlags flags, ZPageAge age, uint32_t preferred_partition) {
  EventZPageAllocation event;

  ZPageAllocation allocation(type, size, flags, age, preferred_partition);

  // Allocate the page
  ZPage* const page = alloc_page_inner(&allocation);
  if (page == nullptr) {
    return nullptr;
  }

  // Update allocation statistics. Exclude gc relocations to avoid
  // artificial inflation of the allocation rate during relocation.

Configuration enabled stackTrace threshold
default true true 15+ 1 ms
profiling true true 15+ 1 ms

Field Type Description
type ZPageTypeType 15+ Type Consider contributing a description to jfreventcollector.
size ulong: bytes 15+ Size
harvested ulong: bytes 25+ Harvested
committed ulong: bytes 15+ Committed
harvestedRanges uint 25+ Harvested Ranges Number of harvested memory ranges
multiPartition boolean 25+ Multi-Partition
successful boolean 25+ Successful
nonBlocking boolean Non-Blocking

Examples 1
committed ulong: bytes
0
nonBlocking boolean
false
size ulong: bytes
2097152
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
23
method Method
descriptor string
(Ljava/lang/Object;)Lscala/runtime/ObjectRef;
hidden boolean
false
modifiers int
9
name string
create
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
17
name string
scala/runtime/ObjectRef
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/runtime
type FrameType
Inlined
truncated boolean
false
startTime long: millis
274627345292
type ZPageTypeType
Small

ZRelocationSet

default profiling startTime duration eventThread 15 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: ZGC

Missing in: G1GC, ParallelGC, SerialGC, ShenandoahGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zRelocationSetSelector.cpp:

ZRelocationSetSelector::ZRelocationSetSelector(double fragmentation_limit)
  : _small("Small", ZPageType::small, ZPageSizeSmall, ZObjectSizeLimitSmall, fragmentation_limit),
    _medium("Medium", ZPageType::medium, ZPageSizeMediumMax, ZObjectSizeLimitMedium, fragmentation_limit),
    _large("Large", ZPageType::large, 0 /* max_page_size */, 0 /* object_size_limit */, fragmentation_limit),
    _empty_pages() {}

void ZRelocationSetSelector::select() {
  // Select pages to relocate. The resulting relocation set will be
  // sorted such that medium pages comes first, followed by small
  // pages. Pages within each page group will be semi-sorted by live
  // bytes in ascending order. Relocating pages in this order allows
  // us to start reclaiming memory more quickly.

  EventZRelocationSet event;

  // Select pages from each group
  _large.select();
  _medium.select();
  _small.select();

  // Send event
  event.commit(total(), empty(), relocate());
}

ZRelocationSetSelectorStats ZRelocationSetSelector::stats() const {

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
total ulong: bytes Total
empty ulong: bytes Empty
relocate ulong: bytes 16+ Relocate

Examples 1
empty ulong: bytes
62914560
relocate ulong: bytes
17913792
startTime long: millis
269443478375
total ulong: bytes
763363328

ZRelocationSetGroup

default profiling startTime duration eventThread 15 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: ZGC

Missing in: G1GC, ParallelGC, SerialGC, ShenandoahGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zRelocationSetSelector.cpp:

    _stats[i]._relocate = selected_live_bytes[i];
    _stats[i]._npages_selected = npages_selected[i];
  }

  log_debug(gc, reloc)("Relocation Set (%s Pages): %d->%d, %d skipped, %zu forwarding entries",
                       _name, selected_from, selected_to, npages - selected_from, selected_forwarding_entries);
}

void ZRelocationSetSelectorGroup::select() {
  if (is_disabled()) {
    return;
  }

  EventZRelocationSetGroup event;

  if (is_selectable()) {
    select_inner();
  } else {
    // Mark pages as not selected
    const int npages = _live_pages.length();
    for (int from = 1; from <= npages; from++) {
      ZPage* const page = _live_pages.at(from - 1);
      _not_selected_pages.append(page);
    }
  }

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
type ZPageTypeType Type Consider contributing a description to jfreventcollector.
candidatePages ulong 21+ Candidate Pages
total ulong: bytes Total
empty ulong: bytes Empty
selectedPages ulong 21+ Selected Pages
relocate ulong: bytes 16+ Relocate

Examples 1
candidatePages ulong
7
empty ulong: bytes
0
relocate ulong: bytes
0
selectedPages ulong
0
startTime long: millis
266500229959
total ulong: bytes
65011712
type ZPageTypeType
Large

ZStatisticsCounter

experimental startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: ZGC

Missing in: G1GC, ParallelGC, SerialGC, ShenandoahGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zTracer.cpp:

  e.set_gcId(GCId::current());
  e.set_starttime(_start);
  e.set_endtime(timestamp);
  e.commit();
}

void ZTracer::initialize() {
  JFR_ONLY(register_jfr_type_serializers();)
}

void ZTracer::send_stat_counter(const ZStatCounter& counter, uint64_t increment, uint64_t value) {
  NoSafepointVerifier nsv;

  JfrNonReentrant<EventZStatisticsCounter> e;
  if (e.should_commit()) {
    e.set_id(counter.id());
    e.set_increment(increment);
    e.set_value(value);
    e.commit();
  }
}

void ZTracer::send_stat_sampler(const ZStatSampler& sampler, uint64_t value) {
  NoSafepointVerifier nsv;

src/hotspot/share/gc/z/zTracer.inline.hpp:

#ifndef SHARE_GC_Z_ZTRACER_INLINE_HPP
#define SHARE_GC_Z_ZTRACER_INLINE_HPP

#include "gc/z/zTracer.hpp"

#include "jfr/jfrEvents.hpp"

inline void ZTracer::report_stat_counter(const ZStatCounter& counter, uint64_t increment, uint64_t value) {
  if (EventZStatisticsCounter::is_enabled()) {
    send_stat_counter(counter, increment, value);
  }
}

inline void ZTracer::report_stat_sampler(const ZStatSampler& sampler, uint64_t value) {
  if (EventZStatisticsSampler::is_enabled()) {
    send_stat_sampler(sampler, value);
  }
}

inline void ZTracer::report_thread_phase(const char* name, const Ticks& start, const Ticks& end) {
  if (EventZThreadPhase::is_enabled()) {
    send_thread_phase(name, start, end);
  }
}

Configuration enabled threshold
default false 0 ms
profiling false 0 ms

Field Type Description
id ZStatisticsCounterType Id Consider contributing a description to jfreventcollector.
increment ulong Increment
value ulong Value

Examples 1
id ZStatisticsCounterType
Mark Segment Reset Contention
increment ulong
1
startTime long: millis
230743882667
value ulong
2

ZStatisticsSampler

experimental startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: ZGC

Missing in: G1GC, ParallelGC, SerialGC, ShenandoahGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zTracer.cpp:

  JfrNonReentrant<EventZStatisticsCounter> e;
  if (e.should_commit()) {
    e.set_id(counter.id());
    e.set_increment(increment);
    e.set_value(value);
    e.commit();
  }
}

void ZTracer::send_stat_sampler(const ZStatSampler& sampler, uint64_t value) {
  NoSafepointVerifier nsv;

  JfrNonReentrant<EventZStatisticsSampler> e;
  if (e.should_commit()) {
    e.set_id(sampler.id());
    e.set_value(value);
    e.commit();
  }
}

void ZTracer::send_thread_phase(const char* name, const Ticks& start, const Ticks& end) {
  NoSafepointVerifier nsv;

  EventZThreadPhase e(UNTIMED);

src/hotspot/share/gc/z/zTracer.inline.hpp:

#define SHARE_GC_Z_ZTRACER_INLINE_HPP

#include "gc/z/zTracer.hpp"

#include "jfr/jfrEvents.hpp"

inline void ZTracer::report_stat_counter(const ZStatCounter& counter, uint64_t increment, uint64_t value) {
  if (EventZStatisticsCounter::is_enabled()) {
    send_stat_counter(counter, increment, value);
  }
}

inline void ZTracer::report_stat_sampler(const ZStatSampler& sampler, uint64_t value) {
  if (EventZStatisticsSampler::is_enabled()) {
    send_stat_sampler(sampler, value);
  }
}

inline void ZTracer::report_thread_phase(const char* name, const Ticks& start, const Ticks& end) {
  if (EventZThreadPhase::is_enabled()) {
    send_thread_phase(name, start, end);
  }
}

inline void ZTracer::report_thread_debug(const char* name, const Ticks& start, const Ticks& end) {

Configuration enabled threshold
default false 0 ms
profiling false 0 ms

Field Type Description
id ZStatisticsSamplerType Id Consider contributing a description to jfreventcollector.
value ulong Value

Examples 1
id ZStatisticsSamplerType
Uncommit
startTime long: millis
231034031375
value ulong
0

ZThreadPhase

experimental startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: ZGC

Missing in: G1GC, ParallelGC, SerialGC, ShenandoahGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zTracer.cpp:

  NoSafepointVerifier nsv;

  JfrNonReentrant<EventZStatisticsSampler> e;
  if (e.should_commit()) {
    e.set_id(sampler.id());
    e.set_value(value);
    e.commit();
  }
}

void ZTracer::send_thread_phase(const char* name, const Ticks& start, const Ticks& end) {
  NoSafepointVerifier nsv;

  EventZThreadPhase e(UNTIMED);
  if (e.should_commit()) {
    e.set_gcId(GCId::current_or_undefined());
    e.set_name(name);
    e.set_starttime(start);
    e.set_endtime(end);
    e.commit();
  }
}

void ZTracer::send_thread_debug(const char* name, const Ticks& start, const Ticks& end) {
  NoSafepointVerifier nsv;

src/hotspot/share/gc/z/zTracer.inline.hpp:

inline void ZTracer::report_stat_counter(const ZStatCounter& counter, uint64_t increment, uint64_t value) {
  if (EventZStatisticsCounter::is_enabled()) {
    send_stat_counter(counter, increment, value);
  }
}

inline void ZTracer::report_stat_sampler(const ZStatSampler& sampler, uint64_t value) {
  if (EventZStatisticsSampler::is_enabled()) {
    send_stat_sampler(sampler, value);
  }
}

inline void ZTracer::report_thread_phase(const char* name, const Ticks& start, const Ticks& end) {
  if (EventZThreadPhase::is_enabled()) {
    send_thread_phase(name, start, end);
  }
}

inline void ZTracer::report_thread_debug(const char* name, const Ticks& start, const Ticks& end) {
  if (EventZThreadDebug::is_enabled()) {
    send_thread_debug(name, start, end);
  }
}

inline ZTraceThreadDebug::ZTraceThreadDebug(const char* name)

Configuration enabled threshold
default false 0 ms
profiling false 0 ms

Field Type Description
gcId uint GC Identifier
name string Name

Examples 1
gcId uint
190
name string
Concurrent Mark Try Flush
startTime long: millis
231351145792

ZUncommit

default profiling startTime duration eventThread 15 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Uncommitting of memory

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/z/zUncommitter.cpp:

bool ZUncommitter::should_continue() const {
  ZLocker<ZConditionLock> locker(&_lock);
  return !_stop;
}

void ZUncommitter::update_statistics(size_t uncommitted, Ticks start, Tickspan* accumulated_time) const {
  // Update counter
  ZStatInc(ZCounterUncommit, uncommitted);

  Ticks end = Ticks::now();

  // Send event
  EventZUncommit::commit(start, end, uncommitted);

  // Track accumulated time
  *accumulated_time += end - start;
}

void ZUncommitter::run_thread() {
  // Initialize first cycle timeout
  _next_cycle_timeout = to_millis(ZUncommitDelay);

  while (wait(_next_cycle_timeout)) {
    // Counters for event and statistics

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
uncommitted ulong: bytes Uncommitted

ShenandoahHeapRegionStateChange

startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: ShenandoahGC

Missing in: G1GC, ParallelGC, SerialGC, ZGC

Information about a Shenandoah heap region state change

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp:

    bool success = os::uncommit_memory((char *) bottom(), RegionSizeBytes);
    if (!success) {
      log_warning(gc)("Region uncommit failed: " PTR_FORMAT " (%zu bytes)", p2i(bottom()), RegionSizeBytes);
      assert(false, "Region uncommit should always succeed");
    }
  }
  if (!heap->is_bitmap_region_special()) {
    heap->uncommit_bitmap_slice(this);
  }
  heap->decrease_committed(ShenandoahHeapRegion::region_size_bytes());
}

void ShenandoahHeapRegion::set_state(RegionState to) {
  EventShenandoahHeapRegionStateChange evt;
  if (evt.should_commit()){
    evt.set_index((unsigned) index());
    evt.set_start((uintptr_t)bottom());
    evt.set_used(used());
    evt.set_from(state());
    evt.set_to(to);
    evt.commit();
  }
  AtomicAccess::store(&_state, to);
}

Configuration enabled
default false
profiling false

Field Type Description
index uint Index
from ShenandoahHeapRegionState From Consider contributing a description to jfreventcollector.
to ShenandoahHeapRegionState To Consider contributing a description to jfreventcollector.
start ulong: address Start
used ulong: bytes Used

Examples 1
from ShenandoahHeapRegionState
Regular
index uint
4
start ulong: address
21491613696
startTime long: millis
211616085083
to ShenandoahHeapRegionState
Collection Set
used ulong: bytes
4194304

ShenandoahHeapRegionInformation

startTime duration every chunk 11 17 21 25 26

Category: Java Virtual Machine / GC / Detailed

Appearing in: ShenandoahGC

Missing in: G1GC, ParallelGC, SerialGC, ZGC

Information about a specific heap region in the Shenandoah GC

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shenandoah/shenandoahJfrSupport.cpp:

void ShenandoahJFRSupport::register_jfr_type_serializers() {
  JfrSerializer::register_serializer(TYPE_SHENANDOAHHEAPREGIONSTATE,
                                     true,
                                     new ShenandoahHeapRegionStateConstant());
}
#endif

class ShenandoahDumpHeapRegionInfoClosure : public ShenandoahHeapRegionClosure {
public:
  virtual void heap_region_do(ShenandoahHeapRegion* r) {
    EventShenandoahHeapRegionInformation evt;
    evt.set_index((unsigned) r->index());
    evt.set_state((u8)r->state());
    evt.set_start((uintptr_t)r->bottom());
    evt.set_used(r->used());
    evt.commit();
  }
};

void VM_ShenandoahSendHeapRegionInfoEvents::doit() {
  ShenandoahDumpHeapRegionInfoClosure c;
  ShenandoahHeap::heap()->heap_region_iterate(&c);

Configuration enabled period
default false everyChunk
profiling false everyChunk

Field Type Description
index uint Index
state ShenandoahHeapRegionState State Consider contributing a description to jfreventcollector.
start ulong: address Start
used ulong: bytes Used

Examples 1
index uint
4
start ulong: address
21491613696
startTime long: millis
211669883625
state ShenandoahHeapRegionState
Empty Committed
used ulong: bytes
0

ShenandoahEvacuationInformation

startTime 24 25 26

Category: Java Virtual Machine / GC / Detailed

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shenandoah/shenandoahTrace.cpp:

void ShenandoahTracer::report_evacuation_info(const ShenandoahCollectionSet* cset,
    size_t free_regions, size_t regions_promoted_humongous, size_t regions_promoted_regular,
    size_t regular_promoted_garbage, size_t regular_promoted_free, size_t regions_immediate,
    size_t immediate_size) {

  EventShenandoahEvacuationInformation e;
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_cSetRegions(cset->count());
    e.set_cSetUsedBefore(cset->used());
    e.set_cSetUsedAfter(cset->live());
    e.set_collectedOld(cset->get_old_bytes_reserved_for_evacuation());
    e.set_collectedPromoted(cset->get_young_bytes_to_be_promoted());
    e.set_collectedYoung(cset->get_young_bytes_reserved_for_evacuation());
    e.set_regionsPromotedHumongous(regions_promoted_humongous);
    e.set_regionsPromotedRegular(regions_promoted_regular);
    e.set_regularPromotedGarbage(regular_promoted_garbage);
    e.set_regularPromotedFree(regular_promoted_free);
    e.set_freeRegions(free_regions);
    e.set_regionsImmediate(regions_immediate);

Configuration enabled
default false
profiling false

Field Type Description
gcId uint GC Identifier
cSetRegions ulong Collection Set Regions
cSetUsedBefore ulong: bytes Collection Set Before Memory usage before GC in the collection set regions
cSetUsedAfter ulong: bytes Collection Set After Memory usage after GC in the collection set regions
collectedOld ulong: bytes Collected Old Memory collected from old generation
collectedPromoted ulong: bytes Collected Promoted Memory collected from generation promotion
collectedYoung ulong: bytes Collection Young Memory collected from young generation
regionsPromotedHumongous ulong Regions Promoted Humongous
regionsPromotedRegular ulong Regions Promoted Regular
regularPromotedGarbage ulong: bytes Regular Promoted Garbage Garbage memory of in place promoted regular regions
regularPromotedFree ulong: bytes Regular Promoted Free Free memory of in place promoted regular regions
freeRegions ulong 25+ Free Regions Free regions prior to collection
regionsImmediate ulong Regions Immediate
immediateBytes ulong: bytes Immediate Bytes

JVM: GC: Heap

GCHeapSummary

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Heap

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

  space.set_used(summary.used());
  space.set_size(summary.size());
  return space;
}

class GCHeapSummaryEventSender : public GCHeapSummaryVisitor {
  GCWhen::Type _when;
 public:
  GCHeapSummaryEventSender(GCWhen::Type when) : _when(when) {}

  void visit(const GCHeapSummary* heap_summary) const {
    const VirtualSpaceSummary& heap_space = heap_summary->heap();

    EventGCHeapSummary e;
    if (e.should_commit()) {
      e.set_gcId(GCId::current());
      e.set_when((u1)_when);
      e.set_heapSpace(to_struct(heap_space));
      e.set_heapUsed(heap_summary->used());
      e.commit();
    }
  }

  void visit(const G1HeapSummary* g1_heap_summary) const {
    visit((GCHeapSummary*)g1_heap_summary);

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
when GCWhen When Consider contributing a description to jfreventcollector.
heapSpace VirtualSpace struct Heap Space Consider contributing a description to jfreventcollector.
heapUsed ulong: bytes Heap Used Bytes allocated by objects in the heap

Examples 3
gcId uint
826
heapSpace VirtualSpace
committedEnd ulong: address
22431137792
committedSize ulong: bytes
956301312
reservedEnd ulong: address
34359738368
reservedSize ulong: bytes
12884901888
start ulong: address
21474836480
heapUsed ulong: bytes
794901616
startTime long: millis
225767619625
when GCWhen
Before GC
gcId uint
320
heapSpace VirtualSpace
committedEnd ulong: address
27413446656
committedSize ulong: bytes
5938610176
reservedEnd ulong: address
34359738368
reservedSize ulong: bytes
12884901888
start ulong: address
21474836480
heapUsed ulong: bytes
207070456
startTime long: millis
244976471833
when GCWhen
After GC
gcId uint
712
heapSpace VirtualSpace
committedEnd ulong: address
22529425408
committedSize ulong: bytes
1054588928
reservedEnd ulong: address
34359738368
reservedSize ulong: bytes
12884901888
start ulong: address
21474836480
heapUsed ulong: bytes
236838784
startTime long: millis
254770556417
when GCWhen
After GC

MetaspaceSummary

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Heap

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

  GCHeapSummaryEventSender visitor(when);
  heap_summary.accept(&visitor);
}

static JfrStructMetaspaceSizes to_struct(const MetaspaceStats& sizes) {
  JfrStructMetaspaceSizes meta_sizes;
  meta_sizes.set_committed(sizes.committed());
  meta_sizes.set_used(sizes.used());
  meta_sizes.set_reserved(sizes.reserved());
  return meta_sizes;
}

void GCTracer::send_meta_space_summary_event(GCWhen::Type when, const MetaspaceSummary& meta_space_summary) const {
  EventMetaspaceSummary e;
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_when((u1) when);
    e.set_gcThreshold(meta_space_summary.capacity_until_GC());
    e.set_metaspace(to_struct(meta_space_summary.stats())); // total stats (class + nonclass)
    e.set_dataSpace(to_struct(meta_space_summary.stats().non_class_space_stats())); // "dataspace" aka non-class space
    e.set_classSpace(to_struct(meta_space_summary.stats().class_space_stats()));
    e.commit();
  }
}

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
when GCWhen When Consider contributing a description to jfreventcollector.
gcThreshold ulong: bytes GC Threshold
metaspace MetaspaceSizes struct Total Consider contributing a description to jfreventcollector.
dataSpace MetaspaceSizes struct Data Consider contributing a description to jfreventcollector.
classSpace MetaspaceSizes struct Class Consider contributing a description to jfreventcollector.

Examples 3
classSpace MetaspaceSizes
committed ulong: bytes
93388800
reserved ulong: bytes
1073741824
used ulong: bytes
91476496
dataSpace MetaspaceSizes
committed ulong: bytes
590217216
reserved ulong: bytes
603979776
used ulong: bytes
588278560
gcId uint
748
gcThreshold ulong: bytes
1136328704
metaspace MetaspaceSizes
committed ulong: bytes
683606016
reserved ulong: bytes
1677721600
used ulong: bytes
679755056
startTime long: millis
268929350167
when GCWhen
Before GC
classSpace MetaspaceSizes
committed ulong: bytes
90505216
reserved ulong: bytes
1073741824
used ulong: bytes
88559368
dataSpace MetaspaceSizes
committed ulong: bytes
572915712
reserved ulong: bytes
603979776
used ulong: bytes
570961832
gcId uint
315
gcThreshold ulong: bytes
1104936960
metaspace MetaspaceSizes
committed ulong: bytes
663420928
reserved ulong: bytes
1677721600
used ulong: bytes
659521200
startTime long: millis
242749678208
when GCWhen
Before GC
classSpace MetaspaceSizes
committed ulong: bytes
92864512
reserved ulong: bytes
1073741824
used ulong: bytes
90960120
dataSpace MetaspaceSizes
committed ulong: bytes
586481664
reserved ulong: bytes
603979776
used ulong: bytes
584511832
gcId uint
823
gcThreshold ulong: bytes
1132134400
metaspace MetaspaceSizes
committed ulong: bytes
679346176
reserved ulong: bytes
1677721600
used ulong: bytes
675471952
startTime long: millis
225449236041
when GCWhen
After GC

PSHeapSummary

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Heap

Appearing in: ParallelGC

Missing in: G1GC, SerialGC, ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

  void visit(const PSHeapSummary* ps_heap_summary) const {
    visit((GCHeapSummary*)ps_heap_summary);

    const VirtualSpaceSummary& old_summary = ps_heap_summary->old();
    const SpaceSummary& old_space = ps_heap_summary->old_space();
    const VirtualSpaceSummary& young_summary = ps_heap_summary->young();
    const SpaceSummary& eden_space = ps_heap_summary->eden();
    const SpaceSummary& from_space = ps_heap_summary->from();
    const SpaceSummary& to_space = ps_heap_summary->to();

    EventPSHeapSummary e;
    if (e.should_commit()) {
      e.set_gcId(GCId::current());
      e.set_when((u1)_when);

      e.set_oldSpace(to_struct(ps_heap_summary->old()));
      e.set_oldObjectSpace(to_struct(ps_heap_summary->old_space()));
      e.set_youngSpace(to_struct(ps_heap_summary->young()));
      e.set_edenSpace(to_struct(ps_heap_summary->eden()));
      e.set_fromSpace(to_struct(ps_heap_summary->from()));
      e.set_toSpace(to_struct(ps_heap_summary->to()));
      e.commit();

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
when GCWhen When Consider contributing a description to jfreventcollector.
oldSpace VirtualSpace struct Old Space Consider contributing a description to jfreventcollector.
oldObjectSpace ObjectSpace struct Old Object Space Consider contributing a description to jfreventcollector.
youngSpace VirtualSpace struct Young Space Consider contributing a description to jfreventcollector.
edenSpace ObjectSpace struct Eden Space Consider contributing a description to jfreventcollector.
fromSpace ObjectSpace struct From Space Consider contributing a description to jfreventcollector.
toSpace ObjectSpace struct To Space Consider contributing a description to jfreventcollector.

Examples 1
edenSpace ObjectSpace
end ulong: address
33392951296
size ulong: bytes
3328180224
start ulong: address
30064771072
used ulong: bytes
0
fromSpace ObjectSpace
end ulong: address
33709096960
size ulong: bytes
524288
start ulong: address
33708572672
used ulong: bytes
0
gcId uint
337
oldObjectSpace ObjectSpace
end ulong: address
23519035392
size ulong: bytes
2044198912
start ulong: address
21474836480
used ulong: bytes
300829184
oldSpace VirtualSpace
committedEnd ulong: address
23519035392
committedSize ulong: bytes
2044198912
reservedEnd ulong: address
30064771072
reservedSize ulong: bytes
8589934592
start ulong: address
21474836480
startTime long: millis
254560408042
toSpace ObjectSpace
end ulong: address
33636220928
size ulong: bytes
72876032
start ulong: address
33563344896
used ulong: bytes
0
when GCWhen
After GC
youngSpace VirtualSpace
committedEnd ulong: address
33709096960
committedSize ulong: bytes
3644325888
reservedEnd ulong: address
34359738368
reservedSize ulong: bytes
4294967296
start ulong: address
30064771072

G1HeapSummary

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Heap

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

    EventGCHeapSummary e;
    if (e.should_commit()) {
      e.set_gcId(GCId::current());
      e.set_when((u1)_when);
      e.set_heapSpace(to_struct(heap_space));
      e.set_heapUsed(heap_summary->used());
      e.commit();
    }
  }

  void visit(const G1HeapSummary* g1_heap_summary) const {
    visit((GCHeapSummary*)g1_heap_summary);

    EventG1HeapSummary e;
    if (e.should_commit()) {
      e.set_gcId(GCId::current());
      e.set_when((u1)_when);
      e.set_edenUsedSize(g1_heap_summary->edenUsed());
      e.set_edenTotalSize(g1_heap_summary->edenCapacity());
      e.set_survivorUsedSize(g1_heap_summary->survivorUsed());
      e.set_oldGenUsedSize(g1_heap_summary->oldGenUsed());
      e.set_numberOfRegions(g1_heap_summary->numberOfRegions());
      e.commit();
    }
  }

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
when GCWhen When Consider contributing a description to jfreventcollector.
edenUsedSize ulong: bytes Eden Used Size
edenTotalSize ulong: bytes Eden Total Size
survivorUsedSize ulong: bytes Survivor Used Size
oldGenUsedSize ulong: bytes 21+ Old Generation Used Size
numberOfRegions uint Number of Regions

Examples 1
edenTotalSize ulong: bytes
570425344
edenUsedSize ulong: bytes
0
gcId uint
807
numberOfRegions uint
124
oldGenUsedSize ulong: bytes
260703976
startTime long: millis
220016146666
survivorUsedSize ulong: bytes
0
when GCWhen
After GC

JVM: GC: Metaspace

MetaspaceGCThreshold

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Metaspace

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/memory/metaspaceTracer.cpp:

void MetaspaceTracer::report_gc_threshold(size_t old_val,
                                          size_t new_val,
                                          MetaspaceGCThresholdUpdater::Type updater) const {
  EventMetaspaceGCThreshold event;
  if (event.should_commit()) {
    event.set_oldValue(old_val);
    event.set_newValue(new_val);
    event.set_updater((u1)updater);
    event.commit();
  }
}

void MetaspaceTracer::report_metaspace_allocation_failure(ClassLoaderData *cld,
                                                          size_t word_size,
                                                          MetaspaceObj::Type objtype,
                                                          Metaspace::MetadataType mdtype) const {
  send_allocation_failure_event<EventMetaspaceAllocationFailure>(cld, word_size, objtype, mdtype);
}

Configuration enabled
default true
profiling true

Field Type Description
oldValue ulong: bytes Old Value
newValue ulong: bytes New Value
updater GCThresholdUpdater Updater Consider contributing a description to jfreventcollector.

Examples 3
newValue ulong: bytes
1433731072
oldValue ulong: bytes
1424556032
startTime long: millis
240350445250
updater GCThresholdUpdater
compute_new_size
newValue ulong: bytes
1484390400
oldValue ulong: bytes
1482555392
startTime long: millis
261192319125
updater GCThresholdUpdater
compute_new_size
newValue ulong: bytes
1548222464
oldValue ulong: bytes
1538457600
startTime long: millis
285773329875
updater GCThresholdUpdater
compute_new_size

MetaspaceAllocationFailure

default profiling startTime stackTrace 11 17 21 25 26

Category: Java Virtual Machine / GC / Metaspace

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/memory/metaspaceTracer.cpp:

  EventMetaspaceGCThreshold event;
  if (event.should_commit()) {
    event.set_oldValue(old_val);
    event.set_newValue(new_val);
    event.set_updater((u1)updater);
    event.commit();
  }
}

void MetaspaceTracer::report_metaspace_allocation_failure(ClassLoaderData *cld,
                                                          size_t word_size,
                                                          MetaspaceObj::Type objtype,
                                                          Metaspace::MetadataType mdtype) const {
  send_allocation_failure_event<EventMetaspaceAllocationFailure>(cld, word_size, objtype, mdtype);
}

void MetaspaceTracer::report_metadata_oom(ClassLoaderData *cld,
                                         size_t word_size,
                                         MetaspaceObj::Type objtype,
                                         Metaspace::MetadataType mdtype) const {
  send_allocation_failure_event<EventMetaspaceOOM>(cld, word_size, objtype, mdtype);
}

template <typename E>
void MetaspaceTracer::send_allocation_failure_event(ClassLoaderData *cld,

Configuration enabled stackTrace
default true true
profiling true true

Field Type Description
classLoader ClassLoader Class Loader Consider contributing a description to jfreventcollector.
hiddenClassLoader boolean 15+ Hidden Class Loader
size ulong: bytes Size
metadataType MetadataType Metadata Type Consider contributing a description to jfreventcollector.
metaspaceObjectType MetaspaceObjectType Metaspace Object Type Consider contributing a description to jfreventcollector.

MetaspaceOOM

default profiling startTime stackTrace 11 17 21 25 26

Category: Java Virtual Machine / GC / Metaspace

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/memory/metaspaceTracer.cpp:

void MetaspaceTracer::report_metaspace_allocation_failure(ClassLoaderData *cld,
                                                          size_t word_size,
                                                          MetaspaceObj::Type objtype,
                                                          Metaspace::MetadataType mdtype) const {
  send_allocation_failure_event<EventMetaspaceAllocationFailure>(cld, word_size, objtype, mdtype);
}

void MetaspaceTracer::report_metadata_oom(ClassLoaderData *cld,
                                         size_t word_size,
                                         MetaspaceObj::Type objtype,
                                         Metaspace::MetadataType mdtype) const {
  send_allocation_failure_event<EventMetaspaceOOM>(cld, word_size, objtype, mdtype);
}

template <typename E>
void MetaspaceTracer::send_allocation_failure_event(ClassLoaderData *cld,
                                                    size_t word_size,
                                                    MetaspaceObj::Type objtype,
                                                    Metaspace::MetadataType mdtype) const {
  E event;
  if (event.should_commit()) {
    event.set_classLoader(cld);
    event.set_hiddenClassLoader(cld->has_class_mirror_holder());

Configuration enabled stackTrace
default true true
profiling true true

Field Type Description
classLoader ClassLoader Class Loader Consider contributing a description to jfreventcollector.
hiddenClassLoader boolean 15+ Hidden Class Loader
size ulong: bytes Size
metadataType MetadataType Metadata Type Consider contributing a description to jfreventcollector.
metaspaceObjectType MetaspaceObjectType Metaspace Object Type Consider contributing a description to jfreventcollector.

MetaspaceChunkFreeListSummary

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Metaspace

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

void GCTracer::send_reference_stats_event(ReferenceType type, size_t count) const {
  EventGCReferenceStatistics e;
  if (e.should_commit()) {
      e.set_gcId(GCId::current());
      e.set_type((u1)type);
      e.set_count(count);
      e.commit();
  }
}

void GCTracer::send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype,
                                                      const MetaspaceChunkFreeListSummary& summary) const {
  EventMetaspaceChunkFreeListSummary e;
  if (e.should_commit()) {
    e.set_gcId(GCId::current());
    e.set_when(when);
    e.set_metadataType(mdtype);

    e.set_specializedChunks(summary.num_specialized_chunks());
    e.set_specializedChunksTotalSize(summary.specialized_chunks_size_in_bytes());

    e.set_smallChunks(summary.num_small_chunks());
    e.set_smallChunksTotalSize(summary.small_chunks_size_in_bytes());

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
when GCWhen When Consider contributing a description to jfreventcollector.
metadataType MetadataType Metadata Type Consider contributing a description to jfreventcollector.
specializedChunks ulong Specialized Chunks
specializedChunksTotalSize ulong: bytes Specialized Chunks Total Size
smallChunks ulong Small Chunks
smallChunksTotalSize ulong: bytes Small Chunks Total Size
mediumChunks ulong Medium Chunks
mediumChunksTotalSize ulong: bytes Medium Chunks Total Size
humongousChunks ulong Humongous Chunks
humongousChunksTotalSize ulong: bytes Humongous Chunks Total Size

Examples 3
gcId uint
301
humongousChunks ulong
0
humongousChunksTotalSize ulong: bytes
0
mediumChunks ulong
0
mediumChunksTotalSize ulong: bytes
0
metadataType MetadataType
Metadata
smallChunks ulong
0
smallChunksTotalSize ulong: bytes
0
specializedChunks ulong
0
specializedChunksTotalSize ulong: bytes
0
startTime long: millis
232731061875
when GCWhen
Before GC
gcId uint
712
humongousChunks ulong
0
humongousChunksTotalSize ulong: bytes
0
mediumChunks ulong
0
mediumChunksTotalSize ulong: bytes
0
metadataType MetadataType
Class
smallChunks ulong
0
smallChunksTotalSize ulong: bytes
0
specializedChunks ulong
0
specializedChunksTotalSize ulong: bytes
0
startTime long: millis
254587890042
when GCWhen
Before GC
gcId uint
801
humongousChunks ulong
0
humongousChunksTotalSize ulong: bytes
0
mediumChunks ulong
0
mediumChunksTotalSize ulong: bytes
0
metadataType MetadataType
Metadata
smallChunks ulong
0
smallChunksTotalSize ulong: bytes
0
specializedChunks ulong
0
specializedChunksTotalSize ulong: bytes
0
startTime long: millis
217936260041
when GCWhen
Before GC

JVM: GC: Phases

GCPhasePause

default profiling startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Phases

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

    e.set_gcThreshold(meta_space_summary.capacity_until_GC());
    e.set_metaspace(to_struct(meta_space_summary.stats())); // total stats (class + nonclass)
    e.set_dataSpace(to_struct(meta_space_summary.stats().non_class_space_stats())); // "dataspace" aka non-class space
    e.set_classSpace(to_struct(meta_space_summary.stats().class_space_stats()));
    e.commit();
  }
}

class PhaseSender : public PhaseVisitor {
  void visit_pause(GCPhase* phase) {
    assert(phase->level() < PhasesStack::PHASE_LEVELS, "Need more event types for PausePhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhasePause>(phase); break;
      case 1: send_phase<EventGCPhasePauseLevel1>(phase); break;
      case 2: send_phase<EventGCPhasePauseLevel2>(phase); break;
      case 3: send_phase<EventGCPhasePauseLevel3>(phase); break;
      case 4: send_phase<EventGCPhasePauseLevel4>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

  void visit_concurrent(GCPhase* phase) {
    assert(phase->level() < 3, "There are only three levels for ConcurrentPhase");

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
name string Name

Examples 3
gcId uint
788
name string
Pause Remark
startTime long: millis
202832461083
gcId uint
302
name string
GC Pause
startTime long: millis
232732031750
gcId uint
779
name string
GC Pause
startTime long: millis
278493608708

GCPhasePauseLevel1

default profiling startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Phases

Appearing in: G1GC, ParallelGC, SerialGC, ShenandoahGC

Missing in: ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

    e.set_metaspace(to_struct(meta_space_summary.stats())); // total stats (class + nonclass)
    e.set_dataSpace(to_struct(meta_space_summary.stats().non_class_space_stats())); // "dataspace" aka non-class space
    e.set_classSpace(to_struct(meta_space_summary.stats().class_space_stats()));
    e.commit();
  }
}

class PhaseSender : public PhaseVisitor {
  void visit_pause(GCPhase* phase) {
    assert(phase->level() < PhasesStack::PHASE_LEVELS, "Need more event types for PausePhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhasePause>(phase); break;
      case 1: send_phase<EventGCPhasePauseLevel1>(phase); break;
      case 2: send_phase<EventGCPhasePauseLevel2>(phase); break;
      case 3: send_phase<EventGCPhasePauseLevel3>(phase); break;
      case 4: send_phase<EventGCPhasePauseLevel4>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

  void visit_concurrent(GCPhase* phase) {
    assert(phase->level() < 3, "There are only three levels for ConcurrentPhase");

    switch (phase->level()) {

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
name string Name

Examples 3
gcId uint
312
name string
Post Compact
startTime long: millis
239196760792
gcId uint
782
name string
Report Object Count
startTime long: millis
199864774083
gcId uint
718
name string
Notify PhantomReferences
startTime long: millis
264994819458

GCPhasePauseLevel2

default profiling startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Phases

Appearing in: G1GC, ParallelGC, SerialGC

Missing in: ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

    e.set_dataSpace(to_struct(meta_space_summary.stats().non_class_space_stats())); // "dataspace" aka non-class space
    e.set_classSpace(to_struct(meta_space_summary.stats().class_space_stats()));
    e.commit();
  }
}

class PhaseSender : public PhaseVisitor {
  void visit_pause(GCPhase* phase) {
    assert(phase->level() < PhasesStack::PHASE_LEVELS, "Need more event types for PausePhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhasePause>(phase); break;
      case 1: send_phase<EventGCPhasePauseLevel1>(phase); break;
      case 2: send_phase<EventGCPhasePauseLevel2>(phase); break;
      case 3: send_phase<EventGCPhasePauseLevel3>(phase); break;
      case 4: send_phase<EventGCPhasePauseLevel4>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

  void visit_concurrent(GCPhase* phase) {
    assert(phase->level() < 3, "There are only three levels for ConcurrentPhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhaseConcurrent>(phase); break;

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
name string Name

Examples 3
gcId uint
788
name string
G1 Complete Cleaning
startTime long: millis
202832985875
gcId uint
780
name string
Class Unloading
startTime long: millis
278940440125
gcId uint
302
name string
Purge Class Loader Data
startTime long: millis
232777460083

GCPhasePauseLevel3

startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Phases

Appearing in: G1GC, ParallelGC, SerialGC

Missing in: ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

    e.set_classSpace(to_struct(meta_space_summary.stats().class_space_stats()));
    e.commit();
  }
}

class PhaseSender : public PhaseVisitor {
  void visit_pause(GCPhase* phase) {
    assert(phase->level() < PhasesStack::PHASE_LEVELS, "Need more event types for PausePhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhasePause>(phase); break;
      case 1: send_phase<EventGCPhasePauseLevel1>(phase); break;
      case 2: send_phase<EventGCPhasePauseLevel2>(phase); break;
      case 3: send_phase<EventGCPhasePauseLevel3>(phase); break;
      case 4: send_phase<EventGCPhasePauseLevel4>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

  void visit_concurrent(GCPhase* phase) {
    assert(phase->level() < 3, "There are only three levels for ConcurrentPhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhaseConcurrent>(phase); break;
      case 1: send_phase<EventGCPhaseConcurrentLevel1>(phase); break;

Configuration enabled threshold
default false 0 ms
profiling false 0 ms

Field Type Description
gcId uint GC Identifier
name string Name

Examples 3
gcId uint
306
name string
Trigger cleanups
startTime long: millis
233997642042
gcId uint
710
name string
Free Code Blobs
startTime long: millis
248914936667
gcId uint
786
name string
Purge Class Loader Data
startTime long: millis
201490732125

GCPhasePauseLevel4

startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Phases

Appearing in: G1GC, ParallelGC

Missing in: SerialGC, ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

    e.commit();
  }
}

class PhaseSender : public PhaseVisitor {
  void visit_pause(GCPhase* phase) {
    assert(phase->level() < PhasesStack::PHASE_LEVELS, "Need more event types for PausePhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhasePause>(phase); break;
      case 1: send_phase<EventGCPhasePauseLevel1>(phase); break;
      case 2: send_phase<EventGCPhasePauseLevel2>(phase); break;
      case 3: send_phase<EventGCPhasePauseLevel3>(phase); break;
      case 4: send_phase<EventGCPhasePauseLevel4>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

  void visit_concurrent(GCPhase* phase) {
    assert(phase->level() < 3, "There are only three levels for ConcurrentPhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhaseConcurrent>(phase); break;
      case 1: send_phase<EventGCPhaseConcurrentLevel1>(phase); break;
      case 2: send_phase<EventGCPhaseConcurrentLevel2>(phase); break;

Configuration enabled threshold
default false 0 ms
profiling false 0 ms

Field Type Description
gcId uint GC Identifier
name string Name

Examples 2
gcId uint
304
name string
Balance queues
startTime long: millis
233231869875
gcId uint
786
name string
Balance queues
startTime long: millis
201488958625

GCPhaseConcurrent

default profiling startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / GC / Phases

Appearing in: G1GC, ShenandoahGC, ZGC

Missing in: ParallelGC, SerialGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp:

class ShenandoahWorkerSession : public StackObj {
protected:
  ShenandoahWorkerSession(uint worker_id);
public:
  static inline uint worker_id() {
    return WorkerThread::worker_id();
  }
};

class ShenandoahConcurrentWorkerSession : public ShenandoahWorkerSession {
private:
  EventGCPhaseConcurrent _event;

public:
  ShenandoahConcurrentWorkerSession(uint worker_id) : ShenandoahWorkerSession(worker_id) { }
  ~ShenandoahConcurrentWorkerSession();
};

class ShenandoahParallelWorkerSession : public ShenandoahWorkerSession {
private:
  EventGCPhaseParallel _event;

public:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

      case 0: send_phase<EventGCPhasePause>(phase); break;
      case 1: send_phase<EventGCPhasePauseLevel1>(phase); break;
      case 2: send_phase<EventGCPhasePauseLevel2>(phase); break;
      case 3: send_phase<EventGCPhasePauseLevel3>(phase); break;
      case 4: send_phase<EventGCPhasePauseLevel4>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

  void visit_concurrent(GCPhase* phase) {
    assert(phase->level() < 3, "There are only three levels for ConcurrentPhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhaseConcurrent>(phase); break;
      case 1: send_phase<EventGCPhaseConcurrentLevel1>(phase); break;
      case 2: send_phase<EventGCPhaseConcurrentLevel2>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

 public:
  template<typename T>
  void send_phase(GCPhase* phase) {
    T event(UNTIMED);
    if (event.should_commit()) {

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
name string Name

Examples 3
gcId uint
186
name string
Concurrent update references
startTime long: millis
211654084750
gcId uint
193
name string
Concurrent Relocate
startTime long: millis
234403065667
gcId uint
788
name string
Concurrent Preclean
startTime long: millis
202831198875

GCPhaseConcurrentLevel1

default profiling startTime duration eventThread 15 17 21 25 26

Category: Java Virtual Machine / GC / Phases

Appearing in: G1GC, ShenandoahGC, ZGC

Missing in: ParallelGC, SerialGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

      case 1: send_phase<EventGCPhasePauseLevel1>(phase); break;
      case 2: send_phase<EventGCPhasePauseLevel2>(phase); break;
      case 3: send_phase<EventGCPhasePauseLevel3>(phase); break;
      case 4: send_phase<EventGCPhasePauseLevel4>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

  void visit_concurrent(GCPhase* phase) {
    assert(phase->level() < 3, "There are only three levels for ConcurrentPhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhaseConcurrent>(phase); break;
      case 1: send_phase<EventGCPhaseConcurrentLevel1>(phase); break;
      case 2: send_phase<EventGCPhaseConcurrentLevel2>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

 public:
  template<typename T>
  void send_phase(GCPhase* phase) {
    T event(UNTIMED);
    if (event.should_commit()) {
      event.set_gcId(GCId::current());

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
name string Name

Examples 3
gcId uint
870
name string
Preclean SoftReferences
startTime long: millis
238623837500
gcId uint
228
name string
ClassLoaderData
startTime long: millis
270039516500
gcId uint
193
name string
Trigger cleanups
startTime long: millis
234394698584

GCPhaseConcurrentLevel2

default profiling startTime duration eventThread 21 25 26

Category: Java Virtual Machine / GC / Phases

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

      case 2: send_phase<EventGCPhasePauseLevel2>(phase); break;
      case 3: send_phase<EventGCPhasePauseLevel3>(phase); break;
      case 4: send_phase<EventGCPhasePauseLevel4>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

  void visit_concurrent(GCPhase* phase) {
    assert(phase->level() < 3, "There are only three levels for ConcurrentPhase");

    switch (phase->level()) {
      case 0: send_phase<EventGCPhaseConcurrent>(phase); break;
      case 1: send_phase<EventGCPhaseConcurrentLevel1>(phase); break;
      case 2: send_phase<EventGCPhaseConcurrentLevel2>(phase); break;
      default: /* Ignore sending this phase */ break;
    }
  }

 public:
  template<typename T>
  void send_phase(GCPhase* phase) {
    T event(UNTIMED);
    if (event.should_commit()) {
      event.set_gcId(GCId::current());
      event.set_name(phase->name());

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
name string Name

GCPhaseParallel

default profiling startTime duration eventThread 12 17 21 25 26

Category: Java Virtual Machine / GC / Phases

Appearing in: G1GC, ShenandoahGC

Missing in: ParallelGC, SerialGC, ZGC

GC phases for parallel workers

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/g1/g1GCParPhaseTimesTracker.hpp:

#ifndef SHARE_GC_G1_G1GCPARPHASETIMESTRACKER_HPP
#define SHARE_GC_G1_G1GCPARPHASETIMESTRACKER_HPP

#include "gc/g1/g1GCPhaseTimes.hpp"
#include "jfr/jfrEvents.hpp"
#include "utilities/ticks.hpp"

class G1GCParPhaseTimesTracker : public CHeapObj<mtGC> {
protected:
  Ticks _start_time;
  G1GCPhaseTimes::GCParPhases _phase;
  G1GCPhaseTimes* _phase_times;
  uint _worker_id;
  EventGCPhaseParallel _event;
  bool _allow_multiple_record;

public:
  G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id, bool allow_multiple_record = false);
  virtual ~G1GCParPhaseTimesTracker();
};

class G1EvacPhaseTimesTracker : public G1GCParPhaseTimesTracker {
  Tickspan _total_time;
  Tickspan _trim_time;

src/hotspot/share/gc/g1/g1HeapRegionManager.cpp:

      _worker_freelists[worker].~G1FreeRegionList();
    }
    FREE_C_HEAP_ARRAY(G1FreeRegionList, _worker_freelists);
  }

  G1FreeRegionList* worker_freelist(uint worker) {
    return &_worker_freelists[worker];
  }

  // Each worker creates a free list for a chunk of the heap. The chunks won't
  // be overlapping so we don't need to do any claiming.
  void work(uint worker_id) {
    Ticks start_time = Ticks::now();
    EventGCPhaseParallel event;

    uint start = worker_id * _worker_chunk_size;
    uint end = MIN2(start + _worker_chunk_size, _hrm->max_num_regions());

    // If start is outside the heap, this worker has nothing to do.
    if (start > end) {
      return;
    }

    G1FreeRegionList* free_list = worker_freelist(worker_id);
    for (uint i = start; i < end; i++) {

src/hotspot/share/gc/g1/g1YoungCollector.cpp:

  G1CollectedHeap*              _g1h;
  G1ParScanThreadState*         _par_scan_state;
  G1ScannerTasksQueueSet*       _queues;
  TaskTerminator*               _terminator;
  G1GCPhaseTimes::GCParPhases   _phase;

  G1ParScanThreadState*   par_scan_state() { return _par_scan_state; }
  G1ScannerTasksQueueSet* queues()         { return _queues; }
  TaskTerminator*         terminator()     { return _terminator; }

  inline bool offer_termination() {
    EventGCPhaseParallel event;
    G1ParScanThreadState* const pss = par_scan_state();
    start_term_time();
    const bool res = (terminator() == nullptr) ? true : terminator()->offer_termination();
    end_term_time();
    event.commit(GCId::current(), pss->worker_id(), G1GCPhaseTimes::phase_name(G1GCPhaseTimes::Termination));
    return res;
  }

public:
  G1ParEvacuateFollowersClosure(G1CollectedHeap* g1h,
                                G1ParScanThreadState* par_scan_state,
                                G1ScannerTasksQueueSet* queues,
                                TaskTerminator* terminator,
                                G1GCPhaseTimes::GCParPhases phase)
    : _start_term(0.0), _term_time(0.0), _term_attempts(0),
      _g1h(g1h), _par_scan_state(par_scan_state),
      _queues(queues), _terminator(terminator), _phase(phase) {}

  void do_void() {
    EventGCPhaseParallel event;
    G1ParScanThreadState* const pss = par_scan_state();
    pss->trim_queue();
    event.commit(GCId::current(), pss->worker_id(), G1GCPhaseTimes::phase_name(_phase));
    do {
      EventGCPhaseParallel event;
      pss->steal_and_trim_queue(queues());
      event.commit(GCId::current(), pss->worker_id(), G1GCPhaseTimes::phase_name(_phase));
    } while (!offer_termination());
  }

  double term_time() const { return _term_time; }
  size_t term_attempts() const { return _term_attempts; }
};

class G1EvacuateRegionsBaseTask : public WorkerTask {

src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp:

  void account_evacuated_region(G1HeapRegion* r) {
    size_t used = r->used();
    assert(used > 0, "region %u %s zero used", r->hrm_index(), r->get_short_type_str());
    _before_used_bytes += used;
    _regions_freed += 1;
  }
};

// Closure applied to all regions in the collection set.
class FreeCSetClosure : public G1HeapRegionClosure {
  // Helper to send JFR events for regions.
  class JFREventForRegion {
    EventGCPhaseParallel _event;

  public:
    JFREventForRegion(G1HeapRegion* region, uint worker_id) : _event() {
      _event.set_gcId(GCId::current());
      _event.set_gcWorkerId(worker_id);
      if (region->is_young()) {
        _event.set_name(G1GCPhaseTimes::phase_name(G1GCPhaseTimes::YoungFreeCSet));
      } else {
        _event.set_name(G1GCPhaseTimes::phase_name(G1GCPhaseTimes::NonYoungFreeCSet));
      }
    }

src/hotspot/share/gc/g1/g1RemSet.cpp:

  size_t cards_scanned_empty() const { return _cards_empty; }
  size_t cards_scanned() const { return _cards_scanned; }
  size_t blocks_scanned() const { return _blocks_scanned; }
  size_t chunks_claimed() const { return _chunks_claimed; }
  size_t heap_roots_found() const { return _heap_roots_found; }
};

void G1RemSet::scan_heap_roots(G1ParScanThreadState* pss,
                               uint worker_id,
                               G1GCPhaseTimes::GCParPhases scan_phase,
                               G1GCPhaseTimes::GCParPhases objcopy_phase,
                               bool remember_already_scanned_cards) {
  EventGCPhaseParallel event;
  G1ScanHRForRegionClosure cl(_scan_state, pss, worker_id, scan_phase, remember_already_scanned_cards);
  _scan_state->iterate_dirty_regions_from(&cl, worker_id);

  event.commit(GCId::current(), worker_id, G1GCPhaseTimes::phase_name(scan_phase));

  G1GCPhaseTimes* p = _g1p->phase_times();

  p->record_or_add_time_secs(objcopy_phase, worker_id, cl.rem_set_trim_partially_time().seconds());

  p->record_or_add_time_secs(scan_phase, worker_id, cl.rem_set_root_scan_time().seconds());

src/hotspot/share/gc/g1/g1RemSet.cpp:

    r->code_roots_do(&cl);
    _code_roots_scanned += cl.count();
    return false;
  }

  size_t code_roots_scanned() const { return _code_roots_scanned; }
};

void G1RemSet::scan_collection_set_code_roots(G1ParScanThreadState* pss,
                                              uint worker_id,
                                              G1GCPhaseTimes::GCParPhases coderoots_phase,
                                              G1GCPhaseTimes::GCParPhases objcopy_phase) {
  EventGCPhaseParallel event;

  Tickspan code_root_scan_time;
  Tickspan code_root_trim_partially_time;
  G1EvacPhaseWithTrimTimeTracker timer(pss, code_root_scan_time, code_root_trim_partially_time);

  G1GCPhaseTimes* p = _g1h->phase_times();

  G1ScanCodeRootsClosure cl(_scan_state, pss, worker_id);
  // Code roots work distribution occurs inside the iteration method. So scan all collection
  // set regions for all threads.

src/hotspot/share/gc/g1/g1RemSet.cpp:

  size_t opt_roots_scanned() const { return _opt_roots_scanned; }
  size_t opt_refs_scanned() const { return _opt_refs_scanned; }
  size_t opt_refs_memory_used() const { return _opt_refs_memory_used; }
};

void G1RemSet::scan_collection_set_optional_roots(G1ParScanThreadState* pss,
                                                  uint worker_id,
                                                  G1GCPhaseTimes::GCParPhases scan_phase,
                                                  G1GCPhaseTimes::GCParPhases objcopy_phase) {
  assert(scan_phase == G1GCPhaseTimes::OptScanHR, "must be");

  EventGCPhaseParallel event;

  Tickspan rem_set_opt_root_scan_time;
  Tickspan rem_set_opt_trim_partially_time;
  G1EvacPhaseWithTrimTimeTracker timer(pss, rem_set_opt_root_scan_time, rem_set_opt_trim_partially_time);

  G1GCPhaseTimes* p = _g1h->phase_times();

  G1ScanOptionalRemSetRootsClosure cl(pss, worker_id, scan_phase);
  // The individual references for the optional remembered set are per-worker, so every worker
  // always need to scan all regions (no claimer).

src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp:

class ShenandoahConcurrentWorkerSession : public ShenandoahWorkerSession {
private:
  EventGCPhaseConcurrent _event;

public:
  ShenandoahConcurrentWorkerSession(uint worker_id) : ShenandoahWorkerSession(worker_id) { }
  ~ShenandoahConcurrentWorkerSession();
};

class ShenandoahParallelWorkerSession : public ShenandoahWorkerSession {
private:
  EventGCPhaseParallel _event;

public:
  ShenandoahParallelWorkerSession(uint worker_id) : ShenandoahWorkerSession(worker_id) { }
  ~ShenandoahParallelWorkerSession();
};

class ShenandoahSuspendibleThreadSetJoiner {
private:
  SuspendibleThreadSetJoiner _joiner;
public:
  ShenandoahSuspendibleThreadSetJoiner(bool active = true) : _joiner(active) {

src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp:

  void print_cycle_on(outputStream* out) const;
  void print_global_on(outputStream* out) const;
};

class ShenandoahWorkerTimingsTracker : public StackObj {
private:
  ShenandoahPhaseTimings*          const _timings;
  ShenandoahPhaseTimings::Phase    const _phase;
  ShenandoahPhaseTimings::ParPhase const _par_phase;
  uint const _worker_id;

  double _start_time;
  EventGCPhaseParallel _event;
public:
  ShenandoahWorkerTimingsTracker(ShenandoahPhaseTimings::Phase phase,
                                 ShenandoahPhaseTimings::ParPhase par_phase,
                                 uint worker_id,
                                 bool cumulative = false);
  ~ShenandoahWorkerTimingsTracker();
};

#endif // SHARE_GC_SHENANDOAH_SHENANDOAHPHASETIMINGS_HPP

Configuration enabled threshold
default true 0 ms
profiling true 0 ms

Field Type Description
gcId uint GC Identifier
gcWorkerId uint GC Worker Identifier
name string Name

Examples 2
gcId uint
186
gcWorkerId uint
3
name string
Finish Mark
startTime long: millis
211616005833
gcId uint
778
gcWorkerId uint
7
name string
ResizeTLABs
startTime long: millis
199114616583

JVM: GC: Reference

GCReferenceStatistics

default profiling startTime 11 17 21 25 26

Category: Java Virtual Machine / GC / Reference

Total count of processed references during GC

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/gcTraceSend.cpp:

void GCTracer::send_cpu_time_event(double user_time, double system_time, double real_time) const {
  EventGCCPUTime e;
  if (e.should_commit()) {
      e.set_gcId(GCId::current());
      e.set_userTime((size_t)(user_time * NANOUNITS));
      e.set_systemTime((size_t)(system_time * NANOUNITS));
      e.set_realTime((size_t)(real_time * NANOUNITS));
      e.commit();
  }
}

void GCTracer::send_reference_stats_event(ReferenceType type, size_t count) const {
  EventGCReferenceStatistics e;
  if (e.should_commit()) {
      e.set_gcId(GCId::current());
      e.set_type((u1)type);
      e.set_count(count);
      e.commit();
  }
}

void GCTracer::send_metaspace_chunk_free_list_summary(GCWhen::Type when, Metaspace::MetadataType mdtype,
                                                      const MetaspaceChunkFreeListSummary& summary) const {
  EventMetaspaceChunkFreeListSummary e;

Configuration enabled
default true
profiling true

Field Type Description
gcId uint GC Identifier
type ReferenceType Type Consider contributing a description to jfreventcollector.
count ulong Total Count

Examples 3
count ulong
572
gcId uint
715
startTime long: millis
261114232167
type ReferenceType
Final reference
count ulong
0
gcId uint
793
startTime long: millis
208191771791
type ReferenceType
Soft reference
count ulong
0
gcId uint
305
startTime long: millis
233971957333
type ReferenceType
Phantom reference

JVM: Heap

GCHeapMemoryUsage

default profiling startTime every chunk 21 25 26

Category: Java Virtual Machine / Heap

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

TRACE_REQUEST_FUNC(JavaThreadStatistics) {
  EventJavaThreadStatistics event;
  event.set_activeCount(ThreadService::get_live_thread_count());
  event.set_daemonCount(ThreadService::get_daemon_thread_count());
  event.set_accumulatedCount(ThreadService::get_total_thread_count());
  event.set_peakCount(ThreadService::get_peak_thread_count());
  event.commit();
}

TRACE_REQUEST_FUNC(GCHeapMemoryUsage) {
  MemoryUsage usage = Universe::heap()->memory_usage();
  EventGCHeapMemoryUsage event(UNTIMED);
  event.set_used(usage.used());
  event.set_committed(usage.committed());
  event.set_max(usage.max_size());
  event.set_starttime(timestamp());
  event.set_endtime(timestamp());
  event.commit();
}

TRACE_REQUEST_FUNC(GCHeapMemoryPoolUsage) {
  ResourceMark mark;
  GrowableArray<MemoryPool*> pools = Universe::heap()->memory_pools();

Configuration enabled period
default true everyChunk
profiling true everyChunk

Field Type Description
used ulong: bytes Heap Used Bytes allocated for storing objects on the heap
committed ulong: bytes Heap Committed Bytes committed for storing objects on the heap
max ulong: bytes Heap Max Max size for the heap

Examples 3
committed ulong: bytes
1054588928
max ulong: bytes
12455444480
startTime long: millis
252322421375
used ulong: bytes
361204816
committed ulong: bytes
3154116608
max ulong: bytes
12884901888
startTime long: millis
199116068750
used ulong: bytes
314282168
committed ulong: bytes
5373427712
max ulong: bytes
11453595648
startTime long: millis
257442660167
used ulong: bytes
1171357424

GCHeapMemoryPoolUsage

default profiling startTime every chunk 21 25 26

Category: Java Virtual Machine / Heap

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  event.set_max(usage.max_size());
  event.set_starttime(timestamp());
  event.set_endtime(timestamp());
  event.commit();
}

TRACE_REQUEST_FUNC(GCHeapMemoryPoolUsage) {
  ResourceMark mark;
  GrowableArray<MemoryPool*> pools = Universe::heap()->memory_pools();
  for (int i = 0; i < pools.length(); i++) {
    MemoryPool* pool = pools.at(i);
    if (pool->is_heap()) {
      MemoryUsage usage = pool->get_memory_usage();
      EventGCHeapMemoryPoolUsage event(UNTIMED);
      event.set_name(pool->name());
      event.set_used(usage.used());
      event.set_committed(usage.committed());
      event.set_max(usage.max_size());
      event.set_starttime(timestamp());
      event.set_endtime(timestamp());
      event.commit();
    }
  }
}

Configuration enabled period
default true everyChunk
profiling true everyChunk

Field Type Description
name string Name GC Heap Memory Pool Name
used ulong: bytes GC Heap Memory Pool Used Bytes used for storing objects in this memory pool
committed ulong: bytes GC Heap Memory Pool Committed Bytes committed for storing objects in this memory pool
max ulong: bytes GC Heap Memory Pool Max Max size for storing objects in this memory pool

Examples 3
committed ulong: bytes
503316480
max ulong: bytes
12884901888
name string
G1 Old Gen
startTime long: millis
217936993250
used ulong: bytes
302327304
committed ulong: bytes
2044198912
max ulong: bytes
8589934592
name string
PS Old Gen
startTime long: millis
258322240250
used ulong: bytes
372660984
committed ulong: bytes
291045376
max ulong: bytes
3436052480
name string
Eden Space
startTime long: millis
278854427458
used ulong: bytes
41288032

JVM: Internal

Duration

internal startTime duration eventThread 18 21 25 26

Category: Java Virtual Machine / Internal

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Instant

internal startTime eventThread 18 21 25 26

Category: Java Virtual Machine / Internal

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/EventProvider.java:

    /**
     * Creates and returns an empty implementation for {@link CompilationEvent}.
     */
    static CompilerFailureEvent createEmptyCompilerFailureEvent() {
        return new EmptyCompilerFailureEvent();
    }

    /**
     * An instant event is an event that is not considered to have taken any time.
     */
    public interface InstantEvent {
        /**
         * Commits the event.
         */
        void commit();

        /**
         * Determines if this particular event instance would be committed to the data stream right
         * now if application called {@link #commit()}. This in turn depends on whether the event is
         * enabled and possible other factors.
         *
         * @return if this event would be committed on a call to {@link #commit()}.
         */
        boolean shouldWrite();
    }

    /**
     * Timed events describe an operation that somehow consumes time.
     */
    public interface TimedEvent extends InstantEvent {
        /**
         * Starts the timing for this event.
         */
        void begin();

        /**
         * Ends the timing period for this event.
         */
        void end();
    }

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/EventProvider.java:

        void setIsOsr(boolean isOsr);

        void setCodeSize(int codeSize);

        void setInlinedBytes(int inlinedBytes);
    }

    /**
     * Creates a new {@link CompilerFailureEvent}.
     *
     * @return a compiler failure event
     */
    CompilerFailureEvent newCompilerFailureEvent();

    /**
     * A compiler failure event.
     */
    public interface CompilerFailureEvent extends InstantEvent {
        void setCompileId(int compileId);

        void setMessage(String message);
    }
}

Value

internal startTime eventThread 18 21 25 26

Category: Java Virtual Machine / Internal

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Field Type Description
value ulong Value

Text

internal startTime eventThread 18 21 25 26

Category: Java Virtual Machine / Internal

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Field Type Description
text string Text

JVM: Memory

ResidentSetSize

default profiling startTime duration every chunk 21 25 26

Category: Java Virtual Machine / Memory

Resident set size of the process

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/os/windows/os_windows.cpp:

#if INCLUDE_JFR

void os::jfr_report_memory_info() {
  PROCESS_MEMORY_COUNTERS_EX pmex;
  ZeroMemory(&pmex, sizeof(PROCESS_MEMORY_COUNTERS_EX));
  pmex.cb = sizeof(pmex);

  BOOL ret = GetProcessMemoryInfo(GetCurrentProcess(), (PROCESS_MEMORY_COUNTERS*) &pmex, sizeof(pmex));
  if (ret != 0) {
    // Send the RSS JFR event
    EventResidentSetSize event;
    event.set_size(pmex.WorkingSetSize);
    event.set_peak(pmex.PeakWorkingSetSize);
    event.commit();
  } else {
    // Log a warning
    static bool first_warning = true;
    if (first_warning) {
      log_warning(jfr)("Error fetching RSS values: GetProcessMemoryInfo failed");
      first_warning = false;
    }
  }

src/hotspot/os/bsd/os_bsd.cpp:

void os::print_memory_mappings(char* addr, size_t bytes, outputStream* st) {}

#if INCLUDE_JFR

void os::jfr_report_memory_info() {
#ifdef __APPLE__
  mach_task_basic_info info;
  mach_msg_type_number_t count = MACH_TASK_BASIC_INFO_COUNT;

  kern_return_t ret = task_info(mach_task_self(), MACH_TASK_BASIC_INFO, (task_info_t)&info, &count);
  if (ret == KERN_SUCCESS) {
    // Send the RSS JFR event
    EventResidentSetSize event;
    event.set_size(info.resident_size);
    // We've seen that resident_size_max sometimes trails resident_size with one page.
    // Make sure we always report size <= peak
    event.set_peak(MAX2(info.resident_size_max, info.resident_size));
    event.commit();
  } else {
    // Log a warning
    static bool first_warning = true;
    if (first_warning) {
      log_warning(jfr)("Error fetching RSS values: task_info failed");
      first_warning = false;

src/hotspot/os/linux/os_linux.cpp:

  if (!print_model_name_and_flags(st, buf, buflen)) {
    _print_ascii_file_h("/proc/cpuinfo", "/proc/cpuinfo", st, false);
  }
  st->cr();
  print_sys_devices_cpu_info(st);
}

#if INCLUDE_JFR

void os::jfr_report_memory_info() {
  os::Linux::meminfo_t info;
  if (os::Linux::query_process_memory_info(&info)) {
    // Send the RSS JFR event
    EventResidentSetSize event;
    event.set_size(info.vmrss * K);
    event.set_peak(info.vmhwm * K);
    event.commit();
  } else {
    // Log a warning
    static bool first_warning = true;
    if (first_warning) {
      log_warning(jfr)("Error fetching RSS values: query_process_memory_info failed");
      first_warning = false;
    }
  }

Configuration enabled period
default true 1000 ms
profiling true 1000 ms

Field Type Description
size ulong: bytes Resident Set Size Resident set size of the process
peak ulong: bytes Resident Set Size Peak Value Resident set size peak value of the process

Examples 3
peak ulong: bytes
5415010304
size ulong: bytes
3384983552
startTime long: millis
269059569125
peak ulong: bytes
9893625856
size ulong: bytes
4022009856
startTime long: millis
251826021875
peak ulong: bytes
8850325504
size ulong: bytes
8375697408
startTime long: millis
268969760708

NativeMemoryUsage

default profiling startTime duration every chunk 20 21 25 26

Category: Java Virtual Machine / Memory

Native memory usage for a given memory tag in the JVM

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrNativeMemoryEvent.cpp:

    return;
  }

  NMTUsage* usage = get_usage(timestamp);

  EventNativeMemoryUsageTotal event(UNTIMED);
  event.set_starttime(timestamp);
  event.set_reserved(usage->total_reserved());
  event.set_committed(usage->total_committed());
  event.commit();
}

void JfrNativeMemoryEvent::send_type_event(const Ticks& starttime, MemTag mem_tag, size_t reserved, size_t committed) {
  EventNativeMemoryUsage event(UNTIMED);
  event.set_starttime(starttime);
  event.set_type(NMTUtil::tag_to_index(mem_tag));
  event.set_reserved(reserved);
  event.set_committed(committed);
  event.commit();
}

void JfrNativeMemoryEvent::send_type_events(const Ticks& timestamp) {
  if (!MemTracker::enabled()) {
    return;
  }

Configuration enabled period
default true 1000 ms
profiling true 1000 ms

Field Type Description
type NMTType Memory Type Type used for the native memory allocation
reserved ulong: bytes Reserved Memory Reserved bytes for this type
committed ulong: bytes Committed Memory Committed bytes for this type

NativeMemoryUsageTotal

default profiling startTime duration every chunk 20 21 25 26

Category: Java Virtual Machine / Memory

Total native memory usage for the JVM. Might not be the exact sum of the NativeMemoryUsage events due to timeing.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrNativeMemoryEvent.cpp:

    usage->refresh();
    last_timestamp = timestamp;
  }
  return usage;
}

void JfrNativeMemoryEvent::send_total_event(const Ticks& timestamp) {
  if (!MemTracker::enabled()) {
    return;
  }

  NMTUsage* usage = get_usage(timestamp);

  EventNativeMemoryUsageTotal event(UNTIMED);
  event.set_starttime(timestamp);
  event.set_reserved(usage->total_reserved());
  event.set_committed(usage->total_committed());
  event.commit();
}

void JfrNativeMemoryEvent::send_type_event(const Ticks& starttime, MemTag mem_tag, size_t reserved, size_t committed) {
  EventNativeMemoryUsage event(UNTIMED);
  event.set_starttime(starttime);
  event.set_type(NMTUtil::tag_to_index(mem_tag));
  event.set_reserved(reserved);

Configuration enabled period
default true 1000 ms
profiling true 1000 ms

Field Type Description
reserved ulong: bytes Reserved Memory Total amount of reserved bytes for the JVM
committed ulong: bytes Committed Memory Total amount of committed bytes for the JVM

JVM: Method Tracing

MethodTiming

default profiling startTime duration stackTrace 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/MethodTimingEvent.java

Category: Java Virtual Machine / Method Tracing

Measures the approximate time it takes for a method to execute, including all delays, not just CPU processing time

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        jdk.internal.event.VirtualThreadStartEvent.class,
        jdk.internal.event.VirtualThreadEndEvent.class,
        jdk.internal.event.VirtualThreadSubmitFailedEvent.class,
        jdk.internal.event.X509CertificateEvent.class,
        jdk.internal.event.X509ValidationEvent.class,
        DirectBufferStatisticsEvent.class,
        InitialSecurityPropertyEvent.class,
        MethodTraceEvent.class,
        MethodTimingEvent.class,
    };

    private static final Runnable emitExceptionStatistics = JDKEvents::emitExceptionStatistics;
    private static final Runnable emitDirectBufferStatistics = JDKEvents::emitDirectBufferStatistics;
    private static final Runnable emitContainerConfiguration = JDKEvents::emitContainerConfiguration;
    private static final Runnable emitContainerCPUUsage = JDKEvents::emitContainerCPUUsage;
    private static final Runnable emitContainerCPUThrottling = JDKEvents::emitContainerCPUThrottling;

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        try {
            if (initializationTriggered == false) {
                for (Class<?> eventClass : eventClasses) {
                    MetadataRepository.getInstance().register((Class<? extends Event>) eventClass);
                }
                PeriodicEvents.addJavaEvent(jdk.internal.event.ExceptionStatisticsEvent.class, emitExceptionStatistics);
                PeriodicEvents.addJavaEvent(DirectBufferStatisticsEvent.class, emitDirectBufferStatistics);
                PeriodicEvents.addJavaEvent(InitialSecurityPropertyEvent.class, emitInitialSecurityProperties);
                PeriodicEvents.addJavaEvent(MethodTimingEvent.class, emitMethodTiming);

                initializeContainerEvents();
                JFRTracing.enable();
                initializationTriggered = true;
            }
        } catch (Exception e) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.WARN, "Could not initialize JDK events. " + e.getMessage());

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

            for (String key : p.stringPropertyNames()) {
                InitialSecurityPropertyEvent e = new InitialSecurityPropertyEvent();
                e.key = key;
                e.value = p.getProperty(key);
                e.commit();
            }
        }
    }

    private static void emitMethodTiming() {
        if (MethodSetting.isInitialized() && MethodTimingEvent.enabled()) {
            PlatformTracer.emitTiming();
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        jdk.internal.event.VirtualThreadStartEvent.class,
        jdk.internal.event.VirtualThreadEndEvent.class,
        jdk.internal.event.VirtualThreadSubmitFailedEvent.class,
        jdk.internal.event.X509CertificateEvent.class,
        jdk.internal.event.X509ValidationEvent.class,
        DirectBufferStatisticsEvent.class,
        InitialSecurityPropertyEvent.class,
        MethodTraceEvent.class,
        MethodTimingEvent.class,
    };

    private static final Runnable emitExceptionStatistics = JDKEvents::emitExceptionStatistics;
    private static final Runnable emitDirectBufferStatistics = JDKEvents::emitDirectBufferStatistics;
    private static final Runnable emitContainerConfiguration = JDKEvents::emitContainerConfiguration;
    private static final Runnable emitContainerCPUUsage = JDKEvents::emitContainerCPUUsage;
    private static final Runnable emitContainerCPUThrottling = JDKEvents::emitContainerCPUThrottling;

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        try {
            if (initializationTriggered == false) {
                for (Class<?> eventClass : eventClasses) {
                    MetadataRepository.getInstance().register((Class<? extends Event>) eventClass);
                }
                PeriodicEvents.addJavaEvent(jdk.internal.event.ExceptionStatisticsEvent.class, emitExceptionStatistics);
                PeriodicEvents.addJavaEvent(DirectBufferStatisticsEvent.class, emitDirectBufferStatistics);
                PeriodicEvents.addJavaEvent(InitialSecurityPropertyEvent.class, emitInitialSecurityProperties);
                PeriodicEvents.addJavaEvent(MethodTimingEvent.class, emitMethodTiming);

                initializeContainerEvents();
                JFRTracing.enable();
                initializationTriggered = true;
            }
        } catch (Exception e) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.WARN, "Could not initialize JDK events. " + e.getMessage());

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

            for (String key : p.stringPropertyNames()) {
                InitialSecurityPropertyEvent e = new InitialSecurityPropertyEvent();
                e.key = key;
                e.value = p.getProperty(key);
                e.commit();
            }
        }
    }

    private static void emitMethodTiming() {
        if (MethodSetting.isInitialized() && MethodTimingEvent.enabled()) {
            PlatformTracer.emitTiming();
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/internal/tracing/PlatformTracer.java:

        s.append(message);
        s.append(" for ");
        s.append(className.replace("/", "."));
        s.append(" in module ");
        s.append(module.getName());
        s.append(" and class loader " + module.getClassLoader());
        Logger.log(LogTag.JFR_METHODTRACE, level, s.toString());
    }

    public static void emitTiming() {
        // Metadata lock prevents rotation/flush while emitting events.
        synchronized (MetadataRepository.getInstance()) {
            removeClasses(JVM.drainStaleMethodTracerIds());
            long timestamp = MethodTimingEvent.timestamp();
            for (var tc : timedClasses.values()) {
                tc.emit(timestamp);
            }
        }
    }

    public static void addObjectTiming(long duration) {
        OBJECT.invocations().getAndIncrement();
        OBJECT.time().addAndGet(duration);
        OBJECT.updateMinMax(duration);
    }

src/jdk.jfr/share/classes/jdk/jfr/internal/tracing/PlatformTracer.java:

        s.append(message);
        s.append(" for ");
        s.append(className.replace("/", "."));
        s.append(" in module ");
        s.append(module.getName());
        s.append(" and class loader " + module.getClassLoader());
        Logger.log(LogTag.JFR_METHODTRACE, level, s.toString());
    }

    public static void emitTiming() {
        // Metadata lock prevents rotation/flush while emitting events.
        synchronized (MetadataRepository.getInstance()) {
            removeClasses(JVM.drainStaleMethodTracerIds());
            long timestamp = MethodTimingEvent.timestamp();
            for (var tc : timedClasses.values()) {
                tc.emit(timestamp);
            }
        }
    }

    public static void addObjectTiming(long duration) {
        OBJECT.invocations().getAndIncrement();
        OBJECT.time().addAndGet(duration);
        OBJECT.updateMinMax(duration);
    }

src/jdk.jfr/share/classes/jdk/jfr/internal/tracing/TimedClass.java:

    public void emit(long timestamp) {
        for (var tm : methods.values()) {
            if (tm.published().get()) {
                long methodId = tm.method().methodId();
                long invocations = tm.invocations().get();
                long time = tm.time().get();
                long min = tm.minimum().get();
                long max = tm.maximum().get();
                if (time == 0 || invocations == 0) {
                    // If time is zero, it's a low resolution clock and more invocations are needed.
                    MethodTimingEvent.commit(timestamp, methodId, invocations, MISSING, MISSING, MISSING);
                } else {
                    long average = (time + invocations / 2) / invocations;
                    if (min == Long.MAX_VALUE) {
                        min = average;
                    }
                    if (max == Long.MIN_VALUE) {
                        max = average;
                    }
                    min = Math.min(min, average);
                    max = Math.max(max, average);
                    MethodTimingEvent.commit(timestamp, methodId, invocations, min, average, max);
                }
                tm.method().log("Emitted event");
            }
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/internal/tracing/TimedClass.java:

    public void emit(long timestamp) {
        for (var tm : methods.values()) {
            if (tm.published().get()) {
                long methodId = tm.method().methodId();
                long invocations = tm.invocations().get();
                long time = tm.time().get();
                long min = tm.minimum().get();
                long max = tm.maximum().get();
                if (time == 0 || invocations == 0) {
                    // If time is zero, it's a low resolution clock and more invocations are needed.
                    MethodTimingEvent.commit(timestamp, methodId, invocations, MISSING, MISSING, MISSING);
                } else {
                    long average = (time + invocations / 2) / invocations;
                    if (min == Long.MAX_VALUE) {
                        min = average;
                    }
                    if (max == Long.MIN_VALUE) {
                        max = average;
                    }
                    min = Math.min(min, average);
                    max = Math.max(max, average);
                    MethodTimingEvent.commit(timestamp, methodId, invocations, min, average, max);
                }
                tm.method().log("Emitted event");
            }
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void timingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }
    }

    public static void traceTimingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }
    }

    public static void trace(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void timing(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
    }

    public static void traceTiming(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void timingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }
    }

    public static void traceTimingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }
    }

    public static void trace(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void timing(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
    }

    public static void traceTiming(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }

src/jdk.jfr/share/classes/jdk/jfr/events/MethodTimingEvent.java:

@Name("jdk.MethodTiming")
@Label("Method Timing")
@Category({ "Java Virtual Machine", "Method Tracing" })
@RemoveFields({ "duration", "eventThread", "stackTrace" })
@Description("Measures the approximate time it takes for a method to execute, including all delays, not just CPU processing time")
public final class MethodTimingEvent extends AbstractJDKEvent {

    @Label("Method")
    public long method;

    @Label("Invocations")
    public long invocations;

    @Label("Minimum Time")
    @Description("The value may be missing (Long.MIN_VALUE) if the clock-resolution is too low to establish a minimum time")
    @Timespan(Timespan.TICKS)
    public long minimum;

src/jdk.jfr/share/classes/jdk/jfr/events/MethodTimingEvent.java:

@Name("jdk.MethodTiming")
@Label("Method Timing")
@Category({ "Java Virtual Machine", "Method Tracing" })
@RemoveFields({ "duration", "eventThread", "stackTrace" })
@Description("Measures the approximate time it takes for a method to execute, including all delays, not just CPU processing time")
public final class MethodTimingEvent extends AbstractJDKEvent {

    @Label("Method")
    public long method;

    @Label("Invocations")
    public long invocations;

    @Label("Minimum Time")
    @Description("The value may be missing (Long.MIN_VALUE) if the clock-resolution is too low to establish a minimum time")
    @Timespan(Timespan.TICKS)
    public long minimum;

Configuration enabled filter period
default true null endChunk
profiling true null endChunk

Field Type Description
method long Method
invocations long Invocations
minimum long: tickspan Minimum Time The value may be missing (Long.MIN_VALUE) if the clock-resolution is too low to establish a minimum time
average long: tickspan Average Time The value may be missing (Long.MIN_VALUE) if the clock-resolution is too low to establish an average time
maximum long: tickspan Maximum Time The value may be missing (Long.MIN_VALUE) if the clock-resolution is too low to establish a maximum time

MethodTrace

default profiling startTime duration stackTrace 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/MethodTraceEvent.java

Category: Java Virtual Machine / Method Tracing

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        jdk.internal.event.SecurityProviderServiceEvent.class,
        jdk.internal.event.SerializationMisdeclarationEvent.class,
        jdk.internal.event.SocketReadEvent.class,
        jdk.internal.event.SocketWriteEvent.class,
        jdk.internal.event.ThreadSleepEvent.class,
        jdk.internal.event.TLSHandshakeEvent.class,
        jdk.internal.event.VirtualThreadStartEvent.class,
        jdk.internal.event.VirtualThreadEndEvent.class,
        jdk.internal.event.VirtualThreadSubmitFailedEvent.class,
        jdk.internal.event.X509CertificateEvent.class,
        jdk.internal.event.X509ValidationEvent.class,
        DirectBufferStatisticsEvent.class,
        InitialSecurityPropertyEvent.class,
        MethodTraceEvent.class,
        MethodTimingEvent.class,
    };

    private static final Runnable emitExceptionStatistics = JDKEvents::emitExceptionStatistics;
    private static final Runnable emitDirectBufferStatistics = JDKEvents::emitDirectBufferStatistics;
    private static final Runnable emitContainerConfiguration = JDKEvents::emitContainerConfiguration;
    private static final Runnable emitContainerCPUUsage = JDKEvents::emitContainerCPUUsage;
    private static final Runnable emitContainerCPUThrottling = JDKEvents::emitContainerCPUThrottling;
    private static final Runnable emitContainerMemoryUsage = JDKEvents::emitContainerMemoryUsage;
    private static final Runnable emitContainerIOUsage = JDKEvents::emitContainerIOUsage;
    private static final Runnable emitInitialSecurityProperties = JDKEvents::emitInitialSecurityProperties;

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        jdk.internal.event.SecurityProviderServiceEvent.class,
        jdk.internal.event.SerializationMisdeclarationEvent.class,
        jdk.internal.event.SocketReadEvent.class,
        jdk.internal.event.SocketWriteEvent.class,
        jdk.internal.event.ThreadSleepEvent.class,
        jdk.internal.event.TLSHandshakeEvent.class,
        jdk.internal.event.VirtualThreadStartEvent.class,
        jdk.internal.event.VirtualThreadEndEvent.class,
        jdk.internal.event.VirtualThreadSubmitFailedEvent.class,
        jdk.internal.event.X509CertificateEvent.class,
        jdk.internal.event.X509ValidationEvent.class,
        DirectBufferStatisticsEvent.class,
        InitialSecurityPropertyEvent.class,
        MethodTraceEvent.class,
        MethodTimingEvent.class,
    };

    private static final Runnable emitExceptionStatistics = JDKEvents::emitExceptionStatistics;
    private static final Runnable emitDirectBufferStatistics = JDKEvents::emitDirectBufferStatistics;
    private static final Runnable emitContainerConfiguration = JDKEvents::emitContainerConfiguration;
    private static final Runnable emitContainerCPUUsage = JDKEvents::emitContainerCPUUsage;
    private static final Runnable emitContainerCPUThrottling = JDKEvents::emitContainerCPUThrottling;
    private static final Runnable emitContainerMemoryUsage = JDKEvents::emitContainerMemoryUsage;
    private static final Runnable emitContainerIOUsage = JDKEvents::emitContainerIOUsage;
    private static final Runnable emitInitialSecurityProperties = JDKEvents::emitInitialSecurityProperties;

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void traceObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }

    public static void timingObjectInit(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void traceTimingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void trace(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }

    public static void timing(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void traceObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }

    public static void timingObjectInit(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void traceTimingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void trace(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }

    public static void timing(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/events/MethodTraceEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Contextual;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.StackTrace;

@Name("jdk.MethodTrace")
@Label("Method Trace")
@Category({ "Java Virtual Machine", "Method Tracing" })
@StackTrace(true)
public final class MethodTraceEvent extends AbstractJDKEvent {

    @Contextual
    @Label("Method")
    private long method;

    public static void commit(long start, long duration, long method) {
        // Generated by JFR
    }

    public static long timestamp() {
        // Generated by JFR
        return 0;

src/jdk.jfr/share/classes/jdk/jfr/events/MethodTraceEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Contextual;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.StackTrace;

@Name("jdk.MethodTrace")
@Label("Method Trace")
@Category({ "Java Virtual Machine", "Method Tracing" })
@StackTrace(true)
public final class MethodTraceEvent extends AbstractJDKEvent {

    @Contextual
    @Label("Method")
    private long method;

    public static void commit(long start, long duration, long method) {
        // Generated by JFR
    }

    public static long timestamp() {
        // Generated by JFR
        return 0;

Configuration enabled filter stackTrace threshold
default true null true 0 ms
profiling true null true 0 ms

JVM: Profiling

OldObjectSample

cutoff default profiling startTime eventThread stackTrace 11 17 21 25 26

Category: Java Virtual Machine / Profiling

A potential memory leak

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/jni/jfrJniMethod.cpp:

NO_TRANSITION(jlong, jfr_elapsed_counter(JNIEnv* env, jclass jvm))
  return JfrTicks::now();
NO_TRANSITION_END

NO_TRANSITION(void, jfr_retransform_classes(JNIEnv* env, jclass jvm, jobjectArray classes))
  JfrJvmtiAgent::retransform_classes(env, classes, JavaThread::thread_from_jni_environment(env));
NO_TRANSITION_END

NO_TRANSITION(void, jfr_set_enabled(JNIEnv* env, jclass jvm, jlong event_type_id, jboolean enabled))
  JfrEventSetting::set_enabled(event_type_id, JNI_TRUE == enabled);
  if (EventOldObjectSample::eventId == event_type_id) {
    JavaThread* thread = JavaThread::thread_from_jni_environment(env);
    MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, thread));
    ThreadInVMfromNative transition(thread);
    if (JNI_TRUE == enabled) {
      LeakProfiler::start(JfrOptionSet::old_object_queue_size());
    } else {
      LeakProfiler::stop();
    }
  }
NO_TRANSITION_END

src/hotspot/share/jfr/leakprofiler/checkpoint/eventEmitter.cpp:

  assert(!sample->is_dead(), "invariant");
  assert(edge_store != nullptr, "invariant");
  assert(_jfr_thread_local != nullptr, "invariant");

  const StoredEdge* const edge = edge_store->get(sample);
  assert(edge != nullptr, "invariant");
  assert(edge->pointee() == sample->object(), "invariant");
  const traceid object_id = edge_store->get_id(edge);
  assert(object_id != 0, "invariant");
  const traceid gc_root_id = edge->gc_root_id();

  Tickspan object_age = Ticks(_start_time.value()) - sample->allocation_time();

  EventOldObjectSample e(UNTIMED);
  e.set_starttime(_start_time);
  e.set_endtime(_end_time);
  e.set_allocationTime(sample->allocation_time());
  e.set_objectSize(sample->allocated());
  e.set_objectAge(object_age);
  e.set_lastKnownHeapUsage(sample->heap_used_at_last_gc());
  e.set_object(object_id);
  e.set_arrayElements(array_size(edge->pointee()));
  e.set_root(gc_root_id);

  // Temporarily assigning both the stack trace id and thread id

src/hotspot/share/jfr/leakprofiler/sampling/objectSampler.cpp:

    // for regular threads, the blob is cached in the thread local data structure
    tl->set_thread_blob(JfrCheckpointManager::create_thread_blob(thread, tid));
    assert(tl->has_thread_blob(), "invariant");
  }
  return tl->thread_blob();
}

class RecordStackTrace {
 private:
  JavaThread* _jt;
  bool _enabled;
 public:
  RecordStackTrace(JavaThread* jt) : _jt(jt),
    _enabled(JfrEventSetting::has_stacktrace(EventOldObjectSample::eventId)) {
    if (_enabled) {
      JfrStackTraceRepository::record_for_leak_profiler(jt);
    }
  }
  ~RecordStackTrace() {
    if (_enabled) {
      _jt->jfr_thread_local()->clear_cached_stack_trace();
    }
  }
};

Configuration cutoff enabled stackTrace
default 0 ns true false
profiling 0 ns true true

Field Type Description
allocationTime Ticks Allocation Time Consider contributing a description to jfreventcollector.
objectSize ulong: bytes 18+ Object Size
objectAge Tickspan 14+ Object Age Consider contributing a description to jfreventcollector.
lastKnownHeapUsage ulong: bytes Last Known Heap Usage
object OldObject Object Consider contributing a description to jfreventcollector.
arrayElements int Array Elements If the object is an array, the number of elements, or minimum value for the type int if it is not an array
root OldObjectGcRoot GC Root Consider contributing a description to jfreventcollector.

Examples 3
allocationTime Ticks
290285174167
arrayElements int
64
lastKnownHeapUsage ulong: bytes
263297432
object OldObject
address ulong: address
26031857992
description string
null
referrer Reference
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[Ljava/util/concurrent/ForkJoinTask;
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
objectAge Tickspan
4172086666
objectSize ulong: bytes
272
root OldObjectGcRoot
null
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
32
lineNumber int
1607
method Method
descriptor string
(Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V
hidden boolean
false
modifiers int
16
name string
registerWorker
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/util/concurrent/ForkJoinPool
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
type FrameType
Interpreted
truncated boolean
false
startTime long: millis
294457260833
allocationTime Ticks
268351193750
arrayElements int
64
lastKnownHeapUsage ulong: bytes
273056744
object OldObject
address ulong: address
21746622288
description string
null
referrer Reference
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[Ljava/util/concurrent/ForkJoinTask;
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
objectAge Tickspan
3567518792
objectSize ulong: bytes
272
root OldObjectGcRoot
null
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
32
lineNumber int
1607
method Method
descriptor string
(Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V
hidden boolean
false
modifiers int
16
name string
registerWorker
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/util/concurrent/ForkJoinPool
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
type FrameType
Interpreted
truncated boolean
false
startTime long: millis
271918712542
allocationTime Ticks
249331001250
arrayElements int
64
lastKnownHeapUsage ulong: bytes
277607048
object OldObject
address ulong: address
21771403664
description string
null
referrer Reference
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[Ljava/util/concurrent/ForkJoinTask;
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
objectAge Tickspan
4126005916
objectSize ulong: bytes
272
root OldObjectGcRoot
null
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
32
lineNumber int
1607
method Method
descriptor string
(Ljava/util/concurrent/ForkJoinPool$WorkQueue;)V
hidden boolean
false
modifiers int
16
name string
registerWorker
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/util/concurrent/ForkJoinPool
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
type FrameType
Interpreted
truncated boolean
false
startTime long: millis
253457007166

ExecutionSample

default profiling startTime every chunk 11 17 21 25 26

Category: Java Virtual Machine / Profiling

Snapshot of a thread executing Java code. Threads that are not executing Java code, including those waiting or executing native code, are not included.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/jni/jfrJniMethod.cpp:

JVM_ENTRY_NO_ENV(void, jfr_subscribe_log_level(JNIEnv* env, jclass jvm, jobject log_tag, jint id))
  JfrJavaLog::subscribe_log_level(log_tag, id, thread);
JVM_END

JVM_ENTRY_NO_ENV(void, jfr_set_output(JNIEnv* env, jclass jvm, jstring path))
  JfrRepository::set_chunk_path(path, thread);
JVM_END

JVM_ENTRY_NO_ENV(void, jfr_set_method_sampling_period(JNIEnv* env, jclass jvm, jlong type, jlong periodMillis))
  if (periodMillis < 0) {
    periodMillis = 0;
  }
  JfrEventId typed_event_id = (JfrEventId)type;
  assert(EventExecutionSample::eventId == typed_event_id || EventNativeMethodSample::eventId == typed_event_id, "invariant");
  JfrEventSetting::set_enabled(typed_event_id, periodMillis > 0);
  if (EventExecutionSample::eventId == type) {
    JfrThreadSampler::set_java_sample_period(periodMillis);
  } else {
    JfrThreadSampler::set_native_sample_period(periodMillis);
  }
JVM_END

JVM_ENTRY_NO_ENV(void, jfr_store_metadata_descriptor(JNIEnv* env, jclass jvm, jbyteArray descriptor))
  JfrMetadataEvent::update(descriptor);
JVM_END

// trace thread id for a thread object

src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp:

  traceid sid;
  {
    ResourceMark rm(current);
    JfrStackTrace stacktrace;
    if (!stacktrace.record(jt, top_frame, in_continuation, request)) {
      // Unable to record stacktrace. Fail.
      return;
    }
    sid = JfrStackTraceRepository::add(stacktrace);
  }
  assert(sid != 0, "invariant");
  const traceid tid = in_continuation ? tl->vthread_id_with_epoch_update(jt) : JfrThreadLocal::jvm_thread_id(jt);
  send_sample_event<EventExecutionSample>(request._sample_ticks, now, sid, tid);
  if (current == jt) {
    send_safepoint_latency_event(request, now, sid, jt);
  }
}

#ifdef LINUX
static void record_cpu_time_thread(const JfrCPUTimeSampleRequest& request, const JfrTicks& now, const JfrThreadLocal* tl, JavaThread* jt, Thread* current) {
  assert(jt != nullptr, "invariant");
  assert(tl != nullptr, "invariant");
  assert(current != nullptr, "invariant");
  frame top_frame;

Configuration enabled period
default true 20 ms
profiling true 10 ms

Field Type Description
sampledThread Thread Thread Consider contributing a description to jfreventcollector.
stackTrace StackTrace Stack Trace Consider contributing a description to jfreventcollector.
state ThreadState Thread State

Examples 3
sampledThread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
Executor task launch worker for task 2.0 in stage 26.0 (TID 197)
javaThreadId long
1558
osName string
Executor task launch worker for task 2.0 in stage 26.0 (TID 197)
osThreadId long
132367
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
175
lineNumber int
1746
method Method
descriptor string
(IIZLscala/Option;Lorg/apache/spark/ml/recommendation/ALS$LocalIndexEncoder;ZDLorg/apache/spark/ml/recommendation/ALS$LeastSquaresNESolver;DLscala/Tuple2;)[[F
hidden boolean
false
modifiers int
4121
name string
$anonfun$computeFactors$4
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
17
name string
org/apache/spark/ml/recommendation/ALS$
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark/ml/recommendation
type FrameType
JIT compiled
truncated boolean
false
startTime long: millis
237750294292
state ThreadState
STATE_RUNNABLE
sampledThread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
Executor task launch worker for task 0.0 in stage 20.0 (TID 135)
javaThreadId long
1568
osName string
Executor task launch worker for task 0.0 in stage 20.0 (TID 135)
osThreadId long
50447
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
13
lineNumber int
3440
method Method
descriptor string
(Ljava/lang/String;ID[DII[DI)V
hidden boolean
false
modifiers int
4
name string
dsprK
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
0
name string
dev/ludovic/netlib/blas/Java8BLAS
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
dev/ludovic/netlib/blas
type FrameType
Inlined
truncated boolean
false
startTime long: millis
238183729833
state ThreadState
STATE_RUNNABLE
sampledThread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
Executor task launch worker for task 7.0 in stage 22.0 (TID 162)
javaThreadId long
1609
osName string
Executor task launch worker for task 7.0 in stage 22.0 (TID 162)
osThreadId long
121107
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
62
lineNumber int
182
method Method
descriptor string
(I)I
hidden boolean
false
modifiers int
1
name string
getPos$mcI$sp
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
org/apache/spark/util/collection/OpenHashSet$mcI$sp
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark/util/collection
type FrameType
Inlined
truncated boolean
true
startTime long: millis
213051918541
state ThreadState
STATE_RUNNABLE

NativeMethodSample

default profiling startTime every chunk 11 17 21 25 26

Category: Java Virtual Machine / Profiling

Snapshot of a thread in native code, executing or waiting. Threads that are executing Java code are not included.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/jni/jfrJniMethod.cpp:

JVM_ENTRY_NO_ENV(void, jfr_subscribe_log_level(JNIEnv* env, jclass jvm, jobject log_tag, jint id))
  JfrJavaLog::subscribe_log_level(log_tag, id, thread);
JVM_END

JVM_ENTRY_NO_ENV(void, jfr_set_output(JNIEnv* env, jclass jvm, jstring path))
  JfrRepository::set_chunk_path(path, thread);
JVM_END

JVM_ENTRY_NO_ENV(void, jfr_set_method_sampling_period(JNIEnv* env, jclass jvm, jlong type, jlong periodMillis))
  if (periodMillis < 0) {
    periodMillis = 0;
  }
  JfrEventId typed_event_id = (JfrEventId)type;
  assert(EventExecutionSample::eventId == typed_event_id || EventNativeMethodSample::eventId == typed_event_id, "invariant");
  JfrEventSetting::set_enabled(typed_event_id, periodMillis > 0);
  if (EventExecutionSample::eventId == type) {
    JfrThreadSampler::set_java_sample_period(periodMillis);
  } else {
    JfrThreadSampler::set_native_sample_period(periodMillis);
  }
JVM_END

JVM_ENTRY_NO_ENV(void, jfr_store_metadata_descriptor(JNIEnv* env, jclass jvm, jbyteArray descriptor))
  JfrMetadataEvent::update(descriptor);
JVM_END

src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp:

      const frame top_frame = jt->last_frame();
      if (!stacktrace.record_inner(jt, top_frame, is_in_continuation(top_frame, jt), 0 /* skip level */)) {
        // Unable to record stacktrace. Fail.
        return false;
      }
      sid = JfrStackTraceRepository::add(stacktrace);
    }
    // Read the tid under the monitor to ensure that if its a virtual thread,
    // it is not unmounted until we are done with it.
    tid = JfrThreadLocal::thread_id(jt);
  }

  assert(tl->sample_state() == NO_SAMPLE, "invariant");
  send_sample_event<EventNativeMethodSample>(start_time, start_time, sid, tid);
  return true;
}

// Entry point for a sampled thread that discovered pending Jfr Sample Requests as part of a safepoint poll.
void JfrThreadSampling::process_sample_request(JavaThread* jt) {
  assert(JavaThread::current() == jt, "should be current thread");
  assert(jt->thread_state() == _thread_in_vm || jt->thread_state() == _thread_in_Java, "invariant");

  const JfrTicks now = JfrTicks::now();

  JfrThreadLocal* const tl = jt->jfr_thread_local();

Configuration enabled period
default true 20 ms
profiling true 20 ms

Field Type Description
sampledThread Thread Thread Consider contributing a description to jfreventcollector.
stackTrace StackTrace Stack Trace Consider contributing a description to jfreventcollector.
state ThreadState Thread State

Examples 3
sampledThread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
shuffle-boss-6-1
javaThreadId long
1544
osName string
shuffle-boss-6-1
osThreadId long
97295
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(IJIJ)I
hidden boolean
false
modifiers int
264
name string
poll
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
sun/nio/ch/KQueue
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
sun/nio/ch
type FrameType
Native
truncated boolean
false
startTime long: millis
238521558667
state ThreadState
STATE_RUNNABLE
sampledThread Thread
group ThreadGroup
name string
finagle/netty4
parent ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
finagle/netty4-2-4
javaThreadId long
1212
osName string
finagle/netty4-2-4
osThreadId long
143371
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(IJIJ)I
hidden boolean
false
modifiers int
264
name string
poll
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
sun/nio/ch/KQueue
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
sun/nio/ch
type FrameType
Native
truncated boolean
false
startTime long: millis
231510533542
state ThreadState
STATE_RUNNABLE
sampledThread Thread
group ThreadGroup
name string
finagle/netty4
parent ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
finagle/netty4-2-15
javaThreadId long
1222
osName string
finagle/netty4-2-15
osThreadId long
259335
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(IJIJ)I
hidden boolean
false
modifiers int
264
name string
poll
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
sun/nio/ch/KQueue
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
sun/nio/ch
type FrameType
Native
truncated boolean
false
startTime long: millis
200863117375
state ThreadState
STATE_RUNNABLE

CPUTimeSample

experimental throttle startTime 25 26

Category: Java Virtual Machine / Profiling

Snapshot of a threads state from the CPU time sampler, both threads executing native and Java code are included. The throttle setting can be either an upper bound for the event emission rate, e.g. 100/s, or the cpu-time period, e.g. 10ms, with s, ms, us and ns supported as time units.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp:

      if (jt->has_last_Java_frame()) {
        JfrThreadSampling::process_cpu_time_request(jt, tl, current, false);
      } else {
        tl->set_do_async_processing_of_cpu_time_jfr_requests(false);
      }
      tl->release_cpu_time_jfr_queue_lock();
    }
  }
}

static volatile size_t count = 0;

void JfrCPUTimeThreadSampling::send_empty_event(const JfrTicks &start_time, traceid tid, Tickspan cpu_time_period) {
  EventCPUTimeSample event(UNTIMED);
  event.set_failed(true);
  event.set_starttime(start_time);
  event.set_eventThread(tid);
  event.set_stackTrace(0);
  event.set_samplingPeriod(cpu_time_period);
  event.set_biased(false);
  event.commit();
}


static volatile size_t biased_count = 0;

void JfrCPUTimeThreadSampling::send_event(const JfrTicks &start_time, traceid sid, traceid tid, Tickspan cpu_time_period, bool biased) {
  EventCPUTimeSample event(UNTIMED);
  event.set_failed(false);
  event.set_starttime(start_time);
  event.set_eventThread(tid);
  event.set_stackTrace(sid);
  event.set_samplingPeriod(cpu_time_period);
  event.set_biased(biased);
  event.commit();
  AtomicAccess::inc(&count);
  if (biased) {
    AtomicAccess::inc(&biased_count);
  }

Configuration enabled stackTrace throttle
default false true 500/s
profiling false true 10ms

Field Type Description
stackTrace StackTrace Stack Trace Consider contributing a description to jfreventcollector.
eventThread Thread Thread Consider contributing a description to jfreventcollector.
failed boolean Failed Failed to obtain the stack trace
samplingPeriod Tickspan CPU Time Sampling Period
biased boolean Biased The sample is safepoint-biased

CPUTimeSamplesLost

experimental default profiling startTime 25 26

Category: Java Virtual Machine / Profiling

Records that the CPU time sampler lost samples

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp:

  event.set_samplingPeriod(cpu_time_period);
  event.set_biased(biased);
  event.commit();
  AtomicAccess::inc(&count);
  if (biased) {
    AtomicAccess::inc(&biased_count);
  }
  if (AtomicAccess::load(&count) % 1000 == 0) {
    log_debug(jfr)("CPU thread sampler sent %zu events, lost %d, biased %zu\n", AtomicAccess::load(&count), AtomicAccess::load(&_lost_samples_sum), AtomicAccess::load(&biased_count));
  }
}

void JfrCPUTimeThreadSampling::send_lost_event(const JfrTicks &time, traceid tid, s4 lost_samples) {
  if (!EventCPUTimeSamplesLost::is_enabled()) {
    return;
  }
  EventCPUTimeSamplesLost event(UNTIMED);
  event.set_starttime(time);
  event.set_lostSamples(lost_samples);
  event.set_eventThread(tid);
  event.commit();
}

void JfrCPUSamplerThread::post_run() {
  this->NonJavaThread::post_run();
  delete this;
}

Configuration enabled
default true
profiling true

Field Type Description
lostSamples int Lost Samples
eventThread Thread Thread Consider contributing a description to jfreventcollector.

JVM: Runtime

ContinuationFreeze

experimental startTime duration eventThread stackTrace 19 21 25 26

Category: Java Virtual Machine / Runtime

Invocation of Continuation.yield()

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/continuationFreezeThaw.cpp:

template<typename ConfigT, bool preempt>
static inline freeze_result freeze_internal(JavaThread* current, intptr_t* const sp) {
  assert(!current->has_pending_exception(), "");

#ifdef ASSERT
  log_trace(continuations)("~~~~ freeze sp: " INTPTR_FORMAT "JavaThread: " INTPTR_FORMAT, p2i(current->last_continuation()->entry_sp()), p2i(current));
  log_frames(current);
#endif

  CONT_JFR_ONLY(EventContinuationFreeze event;)

  ContinuationEntry* entry = current->last_continuation();

  oop oopCont = entry->cont_oop(current);
  assert(oopCont == current->last_continuation()->cont_oop(current), "");
  assert(ContinuationEntry::assert_entry_frame_laid_out(current), "");

  verify_continuation(oopCont);
  ContinuationWrapper cont(current, oopCont);
  log_develop_debug(continuations)("FREEZE #" INTPTR_FORMAT " " INTPTR_FORMAT, cont.hash(), p2i((oopDesc*)oopCont));

Configuration enabled stackTrace threshold
default false false 0 ms
profiling false false 0 ms

Field Type Description
carrierThread Thread Carrier Thread Thread enlisted as a carrier
continuationClass Class Continuation Class Consider contributing a description to jfreventcollector.
interpretedFrames ushort Interpreted Frames
size ushort: bytes Stack Size

ContinuationThaw

experimental startTime duration eventThread stackTrace 19 21 25 26

Category: Java Virtual Machine / Runtime

Invocation of Continuation.run() on a started continuation

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/continuationFreezeThaw.cpp:

    " to: " INTPTR_FORMAT " top_address: " INTPTR_FORMAT, p2i(f.sp() - frame::metadata_words), p2i(_top_stack_address));
  ContinuationHelper::Frame::patch_pc(f, f.raw_pc()); // in case we want to deopt the frame in a full transition, this is checked.
  ContinuationHelper::push_pd(f);

  assert(ContinuationHelper::Frame::assert_frame_laid_out(f), "");
}

// returns new top sp
// called after preparations (stack overflow check and making room)
template<typename ConfigT>
static inline intptr_t* thaw_internal(JavaThread* thread, const Continuation::thaw_kind kind) {
  assert(thread == JavaThread::current(), "Must be current thread");

  CONT_JFR_ONLY(EventContinuationThaw event;)

  log_develop_trace(continuations)("~~~~ thaw kind: %d sp: " INTPTR_FORMAT, kind, p2i(thread->last_continuation()->entry_sp()));

  ContinuationEntry* entry = thread->last_continuation();
  assert(entry != nullptr, "");
  oop oopCont = entry->cont_oop(thread);

  assert(!jdk_internal_vm_Continuation::done(oopCont), "");
  assert(oopCont == get_continuation(thread), "");
  verify_continuation(oopCont);

Configuration enabled stackTrace threshold
default false false 0 ms
profiling false false 0 ms

Field Type Description
carrierThread Thread Carrier Thread Thread enlisted as a carrier
continuationClass Class Continuation Class Consider contributing a description to jfreventcollector.
interpretedFrames ushort Interpreted Frames
size ushort: bytes Stack Size

ContinuationFreezeFast

experimental startTime eventThread 20 21 25 26

Category: Java Virtual Machine / Runtime

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/continuationFreezeThaw.cpp:

  log_develop_trace(continuations)("FREEZE CHUNK #" INTPTR_FORMAT " (young)", _cont.hash());
  LogTarget(Trace, continuations) lt;
  if (lt.develop_is_enabled()) {
    LogStream ls(lt);
    chunk->print_on(true, &ls);
  }

  // Verification
  assert(_cont.chunk_invariant(), "");
  chunk->verify();

#if CONT_JFR
  EventContinuationFreezeFast e;
  if (e.should_commit()) {
    e.set_id(cast_from_oop<u8>(chunk));
    DEBUG_ONLY(e.set_allocate(chunk_is_allocated);)
    e.set_size(cont_size() << LogBytesPerWord);
    e.commit();
  }
#endif
}

NOINLINE freeze_result FreezeBase::freeze_slow() {
#ifdef ASSERT

Configuration enabled
default false
profiling false

Field Type Description
id ulong Continuation ID
size uint Size
allocate boolean Allocated New

ContinuationFreezeSlow

experimental startTime eventThread 20 21 25 26

Category: Java Virtual Machine / Runtime

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/continuationFreezeThaw.cpp:

NOINLINE freeze_result FreezeBase::freeze_slow() {
#ifdef ASSERT
  ResourceMark rm;
#endif

  log_develop_trace(continuations)("freeze_slow  #" INTPTR_FORMAT, _cont.hash());
  assert(_thread->thread_state() == _thread_in_vm || _thread->thread_state() == _thread_blocked, "");

#if CONT_JFR
  EventContinuationFreezeSlow e;
  if (e.should_commit()) {
    e.set_id(cast_from_oop<u8>(_cont.continuation()));
    e.commit();
  }
#endif

  init_rest();

  HandleMark hm(Thread::current());

  frame f = freeze_start_frame();

Configuration enabled
default false
profiling false

Field Type Description
id ulong Continuation ID

ContinuationThawFast

experimental startTime eventThread 20 21 25 26

Category: Java Virtual Machine / Runtime

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/continuationFreezeThaw.cpp:

  log_develop_trace(continuations)("setting entry argsize: %d", _cont.argsize());
  assert(rs.bottom_sp() == _cont.entry()->bottom_sender_sp(), "");

  // install the return barrier if not last frame, or the entry's pc if last
  patch_return(rs.bottom_sp(), is_last);

  // insert the back links from callee to caller frames
  patch_caller_links(rs.top(), rs.top() + rs.total_size());

  assert(is_last == _cont.is_empty(), "");
  assert(_cont.chunk_invariant(), "");

#if CONT_JFR
  EventContinuationThawFast e;
  if (e.should_commit()) {
    e.set_id(cast_from_oop<u8>(chunk));
    e.set_size(thaw_size << LogBytesPerWord);
    e.set_full(!partial);
    e.commit();
  }
#endif

#ifdef ASSERT
  set_anchor(_thread, rs.sp());
  log_frames(_thread);

Configuration enabled
default false
profiling false

Field Type Description
id ulong Continuation ID
full boolean Full
size uint Size

ContinuationThawSlow

experimental startTime eventThread 20 21 25 26

Category: Java Virtual Machine / Runtime

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/continuationFreezeThaw.cpp:

  LogTarget(Trace, continuations) lt;
  if (lt.develop_is_enabled()) {
    LogStream ls(lt);
    ls.print_cr("thaw slow return_barrier: %d " INTPTR_FORMAT, kind, p2i(chunk));
    chunk->print_on(true, &ls);
  }

#if CONT_JFR
  EventContinuationThawSlow e;
  if (e.should_commit()) {
    e.set_id(cast_from_oop<u8>(_cont.continuation()));
    e.commit();
  }
#endif

  DEBUG_ONLY(_frames = 0;)
  _align_size = 0;
  int num_frames = kind == Continuation::thaw_top ? 2 : 1;

  _stream = StackChunkFrameStream<ChunkFrames::Mixed>(chunk);

Configuration enabled
default false
profiling false

Field Type Description
id ulong Continuation ID

ReservedStackActivation

default profiling startTime eventThread stackTrace 11 17 21 25 26

Category: Java Virtual Machine / Runtime

Activation of Reserved Stack Area caused by stack overflow with ReservedStackAccess annotated method in call stack

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/sharedRuntime.cpp:

        for (ScopeDesc *sd = nm->scope_desc_near(fr.pc()); sd != nullptr; sd = sd->sender()) {
          method = sd->method();
          if (method != nullptr && method->has_reserved_stack_access()) {
            found = true;
          }
        }
      }
    }
    if (found) {
      activation = fr;
      warning("Potentially dangerous stack overflow in "
              "ReservedStackAccess annotated method %s [%d]",
              method->name_and_sig_as_C_string(), count++);
      EventReservedStackActivation event;
      if (event.should_commit()) {
        event.set_method(method);
        event.commit();
      }
    }
  }
  return activation;
}

void SharedRuntime::on_slowpath_allocation_exit(JavaThread* current) {
  // After any safepoint, just before going back to compiled code,

Configuration enabled stackTrace
default true true
profiling true true

Field Type Description
method Method Java Method

SafepointBegin

default profiling startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / Runtime / Safepoint

Safepointing begin

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/safepoint.cpp:

static void post_safepoint_begin_event(EventSafepointBegin& event,
                                       uint64_t safepoint_id,
                                       int thread_count,
                                       int critical_thread_count) {
  if (event.should_commit()) {
    event.set_safepointId(safepoint_id);
    event.set_totalThreadCount(thread_count);
    event.set_jniCriticalThreadCount(critical_thread_count);
    event.commit();
  }
}

src/hotspot/share/runtime/safepoint.cpp:

    SafepointMechanism::arm_local_poll(cur);
  }
  if (UseSystemMemoryBarrier) {
    SystemMemoryBarrier::emit(); // storestore|storeload, global state -> local state
  } else {
    OrderAccess::fence(); // storestore|storeload, global state -> local state
  }
}

// Roll all threads forward to a safepoint and suspend them all
void SafepointSynchronize::begin() {
  assert(Thread::current()->is_VM_thread(), "Only VM thread may execute a safepoint");

  EventSafepointBegin begin_event;
  SafepointTracing::begin(VMThread::vm_op_type());

  log_trace(safepoint)("Suspending GC threads");
  Universe::heap()->safepoint_synchronize_begin();

  // By getting the Threads_lock, we assure that no threads are about to start or
  // exit. It is released again in SafepointSynchronize::end().
  log_trace(safepoint)("Blocking threads from starting/exiting");
  Threads_lock->lock();

  assert( _state == _not_synchronized, "trying to safepoint synchronize with wrong state");

Configuration enabled threshold
default true 10 ms
profiling true 0 ms

Field Type Description
safepointId ulong Safepoint Identifier
totalThreadCount int Total Threads The total number of threads at the start of safe point
jniCriticalThreadCount int JNI Critical Threads The number of threads in JNI critical sections

Examples 3
jniCriticalThreadCount int
0
safepointId ulong
981
startTime long: millis
245000560208
totalThreadCount int
134
jniCriticalThreadCount int
0
safepointId ulong
1487
startTime long: millis
272784751417
totalThreadCount int
155
jniCriticalThreadCount int
0
safepointId ulong
1815
startTime long: millis
225376332458
totalThreadCount int
132

SafepointStateSynchronization

startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / Runtime / Safepoint

Synchronize run state of threads

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/safepoint.cpp:

static void post_safepoint_begin_event(EventSafepointBegin& event,
                                       uint64_t safepoint_id,
                                       int thread_count,
                                       int critical_thread_count) {
  if (event.should_commit()) {
    event.set_safepointId(safepoint_id);
    event.set_totalThreadCount(thread_count);
    event.set_jniCriticalThreadCount(critical_thread_count);
    event.commit();
  }
}


static void post_safepoint_synchronize_event(EventSafepointStateSynchronization& event,
                                             uint64_t safepoint_id,
                                             int initial_number_of_threads,
                                             int threads_waiting_to_block,
                                             int iterations) {
  if (event.should_commit()) {
    event.set_safepointId(safepoint_id);
    event.set_initialThreadCount(initial_number_of_threads);
    event.set_runningThreadCount(threads_waiting_to_block);
    event.set_iterations(checked_cast<u4>(iterations));
    event.commit();
  }

src/hotspot/share/runtime/safepoint.cpp:

  _current_jni_active_count = 0;

  // Set number of threads to wait for
  _waiting_to_block = nof_threads;

  jlong safepoint_limit_time = 0;
  if (SafepointTimeout) {
    // Set the limit time, so that it can be compared to see if this has taken
    // too long to complete.
    safepoint_limit_time = SafepointTracing::start_of_safepoint() + (jlong)(SafepointTimeoutDelay * NANOSECS_PER_MILLISEC);
    timeout_error_printed = false;
  }

  EventSafepointStateSynchronization sync_event;
  int initial_running = 0;

  // Arms the safepoint, _current_jni_active_count and _waiting_to_block must be set before.
  log_trace(safepoint)("Arming safepoint using %s wait barrier", _wait_barrier->description());
  arm_safepoint();

  // Will spin until all threads are safe.
  int iterations = synchronize_threads(safepoint_limit_time, nof_threads, &initial_running);
  assert(_waiting_to_block == 0, "No thread should be running");

#ifndef PRODUCT

Configuration enabled threshold
default false 10 ms
profiling false 0 ms

Field Type Description
safepointId ulong Safepoint Identifier
initialThreadCount int Initial Threads The number of threads running at the beginning of state check
runningThreadCount int Running Threads The number of threads still running
iterations int Iterations Number of state check iterations

Examples 3
initialThreadCount int
11
iterations int
373
runningThreadCount int
0
safepointId ulong
1395
startTime long: millis
243397664000
initialThreadCount int
0
iterations int
1
runningThreadCount int
0
safepointId ulong
1814
startTime long: millis
225250907791
initialThreadCount int
3
iterations int
4
runningThreadCount int
0
safepointId ulong
988
startTime long: millis
248804396208

SafepointEnd

startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / Runtime / Safepoint

Safepointing end

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/safepoint.cpp:

                                             uint64_t safepoint_id,
                                             int initial_number_of_threads,
                                             int threads_waiting_to_block,
                                             int iterations) {
  if (event.should_commit()) {
    event.set_safepointId(safepoint_id);
    event.set_initialThreadCount(initial_number_of_threads);
    event.set_runningThreadCount(threads_waiting_to_block);
    event.set_iterations(checked_cast<u4>(iterations));
    event.commit();
  }
}

static void post_safepoint_end_event(EventSafepointEnd& event, uint64_t safepoint_id) {
  if (event.should_commit()) {
    event.set_safepointId(safepoint_id);
    event.commit();
  }
}

// SafepointCheck
SafepointStateTracker::SafepointStateTracker(uint64_t safepoint_id, bool at_safepoint)
  : _safepoint_id(safepoint_id), _at_safepoint(at_safepoint) {}

bool SafepointStateTracker::safepoint_state_changed() {

src/hotspot/share/runtime/safepoint.cpp:

  // Release threads lock, so threads can be created/destroyed again.
  Threads_lock->unlock();

  // Wake threads after local state is correctly set.
  _wait_barrier->disarm();
}

// Wake up all threads, so they are ready to resume execution after the safepoint
// operation has been carried out
void SafepointSynchronize::end() {
  assert(Threads_lock->owned_by_self(), "must hold Threads_lock");
  SafepointTracing::leave();

  EventSafepointEnd event;
  assert(Thread::current()->is_VM_thread(), "Only VM thread can execute a safepoint");

  log_trace(safepoint)("Disarming safepoint");
  disarm_safepoint();

  log_trace(safepoint)("Resuming GC threads");
  Universe::heap()->safepoint_synchronize_end();

  SafepointTracing::end();

  post_safepoint_end_event(event, safepoint_id());

Configuration enabled threshold
default false 10 ms
profiling false 0 ms

Field Type Description
safepointId ulong Safepoint Identifier

Examples 3
safepointId ulong
950
startTime long: millis
235083182667
safepointId ulong
1469
startTime long: millis
269737826750
safepointId ulong
1727
startTime long: millis
200100943666

SafepointLatency

throttle startTime duration eventThread stackTrace 25 26

Category: Java Virtual Machine / Runtime / Safepoint

The delay for a thread to reach its next safepoint poll instruction after receiving an asynchronous sampling interrupt

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/sampling/jfrThreadSampling.cpp:

static inline void send_sample_event(const JfrTicks& start_time, const JfrTicks& end_time, traceid sid, traceid tid) {
  EventType event(UNTIMED);
  event.set_starttime(start_time);
  event.set_endtime(end_time);
  event.set_sampledThread(tid);
  event.set_state(static_cast<u8>(JavaThreadStatus::RUNNABLE));
  event.set_stackTrace(sid);
  event.commit();
}

static inline void send_safepoint_latency_event(const JfrSampleRequest& request, const JfrTicks& end_time, traceid sid, const JavaThread* jt) {
  assert(jt != nullptr, "invariant");
  assert(!jt->jfr_thread_local()->has_cached_stack_trace(), "invariant");
  EventSafepointLatency event(UNTIMED);
  event.set_starttime(request._sample_ticks);
  event.set_endtime(end_time);
  if (event.should_commit()) {
    event.set_threadState(_thread_in_Java);
    jt->jfr_thread_local()->set_cached_stack_trace_id(sid);
    event.commit();
    jt->jfr_thread_local()->clear_cached_stack_trace();
  }
}

static inline bool is_interpreter(address pc) {

Configuration enabled stackTrace threshold throttle
default false true 0 ms off
profiling false false 0 ms off

Field Type Description
threadState VMThreadState VM Thread State

ExecuteVMOperation

default profiling startTime duration eventThread 11 17 21 25 26

Category: Java Virtual Machine / Runtime

Execution of a VM Operation

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/vmThread.cpp:

  // Wait until VM thread is terminated
  // Note: it should be OK to use Terminator_lock here. But this is called
  // at a very delicate time (VM shutdown) and we are operating in non- VM
  // thread at Safepoint. It's safer to not share lock with other threads.
  {
    MonitorLocker ml(_terminate_lock, Mutex::_no_safepoint_check_flag);
    while (!VMThread::is_terminated()) {
      ml.wait();
    }
  }
}

static void post_vm_operation_event(EventExecuteVMOperation* event, VM_Operation* op) {
  assert(event != nullptr, "invariant");
  assert(op != nullptr, "invariant");
  const bool evaluate_at_safepoint = op->evaluate_at_safepoint();
  event->set_operation(op->type());
  event->set_safepoint(evaluate_at_safepoint);
  event->set_blocking(true);
  event->set_caller(JFR_THREAD_ID(op->calling_thread()));
  event->set_safepointId(evaluate_at_safepoint ? SafepointSynchronize::safepoint_id() : 0);
  event->commit();
}

void VMThread::evaluate_operation(VM_Operation* op) {
  ResourceMark rm;

  {
    PerfTraceTime vm_op_timer(perf_accumulated_vm_operation_time());
    HOTSPOT_VMOPS_BEGIN(
                     (char*) op->name(), strlen(op->name()),
                     op->evaluate_at_safepoint() ? 0 : 1);

    EventExecuteVMOperation event;
    VMThreadCPUTimeScope CPUTimeScope(this, op->is_gc_operation());
    op->evaluate();
    if (event.should_commit()) {
      post_vm_operation_event(&event, op);
    }

    HOTSPOT_VMOPS_END(
                     (char*) op->name(), strlen(op->name()),
                     op->evaluate_at_safepoint() ? 0 : 1);
  }
}

Configuration enabled threshold
default true 10 ms
profiling true 0 ms

Field Type Description
operation VMOperationType Operation Consider contributing a description to jfreventcollector.
safepoint boolean At Safepoint If the operation occurred at a safepoint
blocking boolean Caller Blocked If the calling thread was blocked until the operation was complete
caller Thread Caller Thread requesting operation. If non-blocking, will be set to 0 indicating thread is unknown
safepointId ulong Safepoint Identifier The safepoint (if any) under which this operation was completed

Examples 3
blocking boolean
true
caller Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
ForkJoinPool.commonPool-worker-4
javaThreadId long
26
osName string
ForkJoinPool.commonPool-worker-4
osThreadId long
28675
virtual boolean
false
operation VMOperationType
GenCollectForAllocation
safepoint boolean
true
safepointId ulong
1446
startTime long: millis
265508471958
blocking boolean
true
caller Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
Executor task launch worker-8
javaThreadId long
1863
osName string
Executor task launch worker-8
osThreadId long
163603
virtual boolean
false
operation VMOperationType
HandshakeAllThreads
safepoint boolean
false
safepointId ulong
0
startTime long: millis
253633132958
blocking boolean
true
caller Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
ForkJoinPool.commonPool-worker-11
javaThreadId long
49
osName string
ForkJoinPool.commonPool-worker-11
osThreadId long
44547
virtual boolean
false
operation VMOperationType
ICBufferFull
safepoint boolean
true
safepointId ulong
1799
startTime long: millis
224237218791

Shutdown

default profiling startTime eventThread stackTrace 11 17 21 25 26

Category: Java Virtual Machine / Runtime

JVM shutting down

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/threads.cpp:

  // Wait until we are the last non-daemon thread to execute, or
  // if we are a daemon then wait until the last non-daemon thread has
  // executed.
  bool daemon = java_lang_Thread::is_daemon(thread->threadObj());
  int expected = daemon ? 0 : 1;
  {
    MonitorLocker nu(Threads_lock);
    while (Threads::number_of_non_daemon_threads() > expected)
      // This wait should make safepoint checks, wait without a timeout.
      nu.wait(0);
  }

  EventShutdown e;
  if (e.should_commit()) {
    e.set_reason("No remaining non-daemon Java threads");
    e.commit();
  }

  // Hang forever on exit if we are reporting an error.
  if (ShowMessageBoxOnError && VMError::is_error_reported()) {
    os::infinite_sleep();
  }
  os::wait_for_keypress_at_exit();

src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp:

  void transition_to_native() {
    if (_jt != nullptr) {
      assert(_jt->thread_state() == _thread_in_vm, "invariant");
      _jt->set_thread_state(_thread_in_native);
    }
  }
};

static void post_events(bool emit_old_object_samples, bool emit_event_shutdown, Thread* thread) {
  if (emit_old_object_samples) {
    LeakProfiler::emit_events(max_jlong, false, false);
  }
  if (emit_event_shutdown) {
    EventShutdown e;
    e.set_reason("VM Error");
    e.commit();
  }
  EventDumpReason event;
  event.set_reason(emit_old_object_samples ? "Out of Memory" : "Crash");
  event.set_recordingId(-1);
  event.commit();
}

static volatile traceid _jfr_shutdown_tid = 0;

src/hotspot/share/prims/jvm.cpp:

JVM_ENTRY(jstring, JVM_GetTemporaryDirectory(JNIEnv *env))
  HandleMark hm(THREAD);
  const char* temp_dir = os::get_temp_directory();
  Handle h = java_lang_String::create_from_platform_dependent_str(temp_dir, CHECK_NULL);
  return (jstring) JNIHandles::make_local(THREAD, h());
JVM_END


// java.lang.Runtime /////////////////////////////////////////////////////////////////////////

extern volatile jint vm_created;

JVM_ENTRY_NO_ENV(void, JVM_BeforeHalt())
  EventShutdown event;
  if (event.should_commit()) {
    event.set_reason("Shutdown requested from Java");
    event.commit();
  }
JVM_END


JVM_ENTRY_NO_ENV(void, JVM_Halt(jint code))
  before_exit(thread, true);
  vm_exit(code);
JVM_END

src/hotspot/share/runtime/java.cpp:

  // Hang forever on exit if we're reporting an error.
  if (ShowMessageBoxOnError && VMError::is_error_reported()) {
    os::infinite_sleep();
  }

  EventThreadEnd event;
  if (event.should_commit()) {
    event.set_thread(JFR_JVM_THREAD_ID(thread));
    event.commit();
  }

  // 2nd argument (emit_event_shutdown) should be set to false
  // because EventShutdown would be emitted at Threads::destroy_vm().
  // (one of the callers of before_exit())
  JFR_ONLY(Jfr::on_vm_shutdown(true, false, halt);)

  // Stop the WatcherThread. We do this before disenrolling various
  // PeriodicTasks to reduce the likelihood of races.
  WatcherThread::stop();

  NativeHeapTrimmer::cleanup();

  // Run before exit and then stop concurrent GC threads
  Universe::before_exit();

Configuration enabled stackTrace
default true true
profiling true true

Field Type Description
reason string Reason Reason for JVM shutdown

Examples 3
reason string
No remaining non-daemon Java threads
stackTrace StackTrace
null
startTime long: millis
294456948250
reason string
No remaining non-daemon Java threads
stackTrace StackTrace
null
startTime long: millis
253456608458
reason string
No remaining non-daemon Java threads
stackTrace StackTrace
null
startTime long: millis
271918480958

SymbolTableStatistics

profiling startTime duration every chunk 13 17 21 25 26

Category: Java Virtual Machine / Runtime / Tables

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  event.set_entryCount(statistics._number_of_entries);
  event.set_totalFootprint(statistics._total_footprint);
  event.set_bucketCountMaximum(statistics._maximum_bucket_size);
  event.set_bucketCountAverage(statistics._average_bucket_size);
  event.set_bucketCountVariance(statistics._variance_of_bucket_size);
  event.set_bucketCountStandardDeviation(statistics._stddev_of_bucket_size);
  event.set_insertionRate(statistics._add_rate);
  event.set_removalRate(statistics._remove_rate);
  event.commit();
}

TRACE_REQUEST_FUNC(SymbolTableStatistics) {
  TableStatistics statistics = SymbolTable::get_table_statistics();
  emit_table_statistics<EventSymbolTableStatistics>(statistics);
}

TRACE_REQUEST_FUNC(StringTableStatistics) {
  TableStatistics statistics = StringTable::get_table_statistics();
  emit_table_statistics<EventStringTableStatistics>(statistics);
}

TRACE_REQUEST_FUNC(CompilerStatistics) {
  EventCompilerStatistics event;
  event.set_compileCount(CompileBroker::get_total_compile_count());
  event.set_bailoutCount(CompileBroker::get_total_bailout_count());

Configuration enabled period
default false 10 s
profiling true 10 s

Field Type Description
bucketCount ulong Bucket Count Number of buckets
entryCount ulong Entry Count Number of all entries
totalFootprint ulong: bytes Total Footprint Total memory footprint (the table itself plus all of the entries)
bucketCountMaximum ulong Maximum Bucket Count The maximum bucket length (entries in a single bucket)
bucketCountAverage float Average Bucket Count The average bucket length
bucketCountVariance float Bucket Count Variance How far bucket lengths are spread out from their average value
bucketCountStandardDeviation float Bucket Count Standard Deviation How far bucket lengths are spread out from their mean (expected) value
insertionRate float Insertion Rate How many items were added since last event (per second)
removalRate float Removal Rate How many items were removed since last event (per second)

Examples 3
bucketCount ulong
131072
bucketCountAverage float
4.6651077
bucketCountMaximum ulong
17
bucketCountStandardDeviation float
2.1594267
bucketCountVariance float
4.663123
entryCount ulong
611465
insertionRate float
7222.6704
removalRate float
48.940376
startTime long: millis
245639944083
totalFootprint ulong: bytes
67700384
bucketCount ulong
65536
bucketCountAverage float
7.897156
bucketCountMaximum ulong
22
bucketCountStandardDeviation float
2.816904
bucketCountVariance float
7.9349494
entryCount ulong
517548
insertionRate float
996.5333
removalRate float
243.46152
startTime long: millis
254580210125
totalFootprint ulong: bytes
55816808
bucketCount ulong
65536
bucketCountAverage float
7.8146667
bucketCountMaximum ulong
20
bucketCountStandardDeviation float
2.8032317
bucketCountVariance float
7.8581076
entryCount ulong
512142
insertionRate float
81.77172
removalRate float
11.237307
startTime long: millis
269078868625
totalFootprint ulong: bytes
55244608

StringTableStatistics

profiling startTime duration every chunk 13 17 21 25 26

Category: Java Virtual Machine / Runtime / Tables

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  event.set_bucketCountStandardDeviation(statistics._stddev_of_bucket_size);
  event.set_insertionRate(statistics._add_rate);
  event.set_removalRate(statistics._remove_rate);
  event.commit();
}

TRACE_REQUEST_FUNC(SymbolTableStatistics) {
  TableStatistics statistics = SymbolTable::get_table_statistics();
  emit_table_statistics<EventSymbolTableStatistics>(statistics);
}

TRACE_REQUEST_FUNC(StringTableStatistics) {
  TableStatistics statistics = StringTable::get_table_statistics();
  emit_table_statistics<EventStringTableStatistics>(statistics);
}

TRACE_REQUEST_FUNC(CompilerStatistics) {
  EventCompilerStatistics event;
  event.set_compileCount(CompileBroker::get_total_compile_count());
  event.set_bailoutCount(CompileBroker::get_total_bailout_count());
  event.set_invalidatedCount(CompileBroker::get_total_invalidated_count());
  event.set_osrCompileCount(CompileBroker::get_total_osr_compile_count());
  event.set_standardCompileCount(CompileBroker::get_total_standard_compile_count());
  event.set_osrBytesCompiled(CompileBroker::get_sum_osr_bytes_compiled());
  event.set_standardBytesCompiled(CompileBroker::get_sum_standard_bytes_compiled());

Configuration enabled period
default false 10 s
profiling true 10 s

Field Type Description
bucketCount ulong Bucket Count Number of buckets
entryCount ulong Entry Count Number of all entries
totalFootprint ulong: bytes Total Footprint Total memory footprint (the table itself plus all of the entries)
bucketCountMaximum ulong Maximum Bucket Count The maximum bucket length (entries in a single bucket)
bucketCountAverage float Average Bucket Count The average bucket length
bucketCountVariance float Bucket Count Variance How far bucket lengths are spread out from their average value
bucketCountStandardDeviation float Bucket Count Standard Deviation How far bucket lengths are spread out from their mean (expected) value
insertionRate float Insertion Rate How many items were added since last event (per second)
removalRate float Removal Rate How many items were removed since last event (per second)

Examples 3
bucketCount ulong
65536
bucketCountAverage float
1.517334
bucketCountMaximum ulong
9
bucketCountStandardDeviation float
1.2307124
bucketCountVariance float
1.5146532
entryCount ulong
99440
insertionRate float
48.010853
removalRate float
5.8987694
startTime long: millis
218005234333
totalFootprint ulong: bytes
11278672
bucketCount ulong
65536
bucketCountAverage float
1.5317993
bucketCountMaximum ulong
9
bucketCountStandardDeviation float
1.2338293
bucketCountVariance float
1.5223347
entryCount ulong
100388
insertionRate float
27.658583
removalRate float
8.85523
startTime long: millis
269082968167
totalFootprint ulong: bytes
11424864
bucketCount ulong
65536
bucketCountAverage float
1.5967865
bucketCountMaximum ulong
9
bucketCountStandardDeviation float
1.2639728
bucketCountVariance float
1.597627
entryCount ulong
104647
insertionRate float
550.08246
removalRate float
73.83221
startTime long: millis
254584339833
totalFootprint ulong: bytes
11950664

ThreadDump

default profiling startTime duration every chunk 11 17 21 25 26

Category: Java Virtual Machine / Runtime

Appearing in: ParallelGC

Missing in: G1GC, SerialGC, ShenandoahGC, ZGC

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

/*
 * This is left empty on purpose, having ExecutionSample as a requestable
 * is a way of getting the period. The period is passed to ThreadSampling::update_period.
 * Implementation in periodic/sampling/jfrThreadSampler.cpp.
 */
TRACE_REQUEST_FUNC(ExecutionSample) {
}
TRACE_REQUEST_FUNC(NativeMethodSample) {
}

TRACE_REQUEST_FUNC(ThreadDump) {
  ResourceMark rm;
  EventThreadDump event;
  event.set_result(JfrDcmdEvent::thread_dump());
  event.commit();
}

static int _native_library_callback(const char* name, address base, address top, void *param) {
  EventNativeLibrary event(UNTIMED);
  event.set_name(name);
  event.set_baseAddress((u8)base);
  event.set_topAddress((u8)top);
  event.set_starttime(*(JfrTicks*)param);
  event.set_endtime(*(JfrTicks*) param);

Configuration enabled period
default true everyChunk
profiling true 60 s

Field Type Description
result string Thread Dump

Examples 1
result string
2025-08-11 13:13:10 Full thread dump OpenJDK 64-Bit Server VM (21.0.7+6-LTS mixed mode, sharing): Threads class SMR info: _java_thread_list=0x0000600000a55b00, length=296, elements={ 0x000000012d008600, 0x000000012c01b200, 0x000000012c018800, 0x000000012b811400, 0x000000012b811c00, 0x000000012b8124
startTime long: millis
242286191375

NativeLibrary

default profiling startTime every chunk 11 17 21 25 26

Category: Java Virtual Machine / Runtime

Information about a dynamic library or other native image loaded by the JVM process

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

TRACE_REQUEST_FUNC(ExecutionSample) {
}
TRACE_REQUEST_FUNC(NativeMethodSample) {
}

TRACE_REQUEST_FUNC(ThreadDump) {
  ResourceMark rm;
  EventThreadDump event;
  event.set_result(JfrDcmdEvent::thread_dump());
  event.commit();
}

static int _native_library_callback(const char* name, address base, address top, void *param) {
  EventNativeLibrary event(UNTIMED);
  event.set_name(name);
  event.set_baseAddress((u8)base);
  event.set_topAddress((u8)top);
  event.set_starttime(*(JfrTicks*)param);
  event.set_endtime(*(JfrTicks*) param);
  event.commit();
  return 0;
}

TRACE_REQUEST_FUNC(NativeLibrary) {
  JfrTicks ts= JfrTicks::now();

Configuration enabled period
default true everyChunk
profiling true everyChunk

Field Type Description
name string Name
baseAddress ulong: address Base Address Starting address of the module
topAddress ulong: address Top Address Ending address of the module, if available

Examples 3
baseAddress ulong: address
6764929024
name string
/usr/lib/libMobileGestalt.dylib
startTime long: millis
230210233625
topAddress ulong: address
0
baseAddress ulong: address
6853357568
name string
/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
startTime long: millis
199126906250
topAddress ulong: address
0
baseAddress ulong: address
6863880192
name string
/System/Library/PrivateFrameworks/XCTTargetBootstrap.framework/Versions/A/XCTTargetBootstrap
startTime long: millis
242226700042
topAddress ulong: address
0

NativeLibraryLoad

default profiling startTime duration eventThread stackTrace 22 25 26

Category: Java Virtual Machine / Runtime

Information about a dynamic library or other native image load operation

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/support/jfrNativeLibraryLoadEvent.cpp:

/*
 * The JfrTicks value is heap allocated inside an object of type JfrTicksWrapper.
 * The reason is that a raw value object of type Ticks is not possible at this
 * location because this code runs as part of early VM bootstrap, at a moment
 * where Ticks support is not yet initialized.
 */
template <typename EventType>
static inline JfrTicksWrapper* allocate_start_time() {
  return EventType::is_enabled() ? new JfrTicksWrapper() : nullptr;
}

NativeLibraryLoadEvent::NativeLibraryLoadEvent(const char* name, void** result) : JfrNativeLibraryEventBase(name), _result(result), _fp_env_correction_attempt(false), _fp_env_correction_success(false) {
  assert(_result != nullptr, "invariant");
  _start_time = allocate_start_time<EventNativeLibraryLoad>();
}

bool NativeLibraryLoadEvent::success() const {
  return *_result != nullptr;
}

NativeLibraryUnloadEvent::NativeLibraryUnloadEvent(const char* name) : JfrNativeLibraryEventBase(name), _result(false) {
  _start_time = allocate_start_time<EventNativeLibraryUnload>();
}

bool NativeLibraryUnloadEvent::success() const {
  return _result;
}

void NativeLibraryUnloadEvent::set_result(bool result) {
  _result = result;
}

static void set_additional_data(EventNativeLibraryLoad& event, const NativeLibraryLoadEvent& helper) {
  event.set_fpuCorrectionAttempt(helper.get_fp_env_correction_attempt());
  event.set_fpuCorrectionSuccess(helper.get_fp_env_correction_success());
}

static void set_additional_data(EventNativeLibraryUnload& event, const NativeLibraryUnloadEvent& helper) {
  // no additional entries atm. for the unload event
}

template <typename EventType, typename HelperType>
static void commit(const HelperType& helper) {
  if (!helper.has_start_time()) {

src/hotspot/share/jfr/support/jfrNativeLibraryLoadEvent.cpp:

  assert(thread != nullptr, "invariant");
  if (thread->is_Java_thread()) {
    JavaThread* jt = JavaThread::cast(thread);
    if (jt->thread_state() == _thread_in_native) {
      // For a JavaThread to take a JFR stacktrace, it must be in _thread_in_vm. Can safepoint here.
      MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, jt));
      ThreadInVMfromNative transition(jt);
      event.commit();
      return;
    }
    // If a thread comes here still _thread_in_Java, which can happen for example
    // when loading the disassembler library in response to traps in JIT code - all is ok.
    // Since there is no ljf, an event will be committed without a stacktrace.
  }
  event.commit();
}

NativeLibraryLoadEvent::~NativeLibraryLoadEvent() {
  commit<EventNativeLibraryLoad>(*this);
}

NativeLibraryUnloadEvent::~NativeLibraryUnloadEvent() {
  commit<EventNativeLibraryUnload>(*this);
}

Configuration enabled stackTrace threshold
default true true 0 ms
profiling true true 0 ms

Field Type Description
name string Name
success boolean Success Success or failure of the load operation
errorMessage string Error Message In case of a load error, error description
fpuCorrectionAttempt boolean 23+ FPU Environment Correction In case of IEEE conformance issues we might reset the FP environment
fpuCorrectionSuccess boolean 23+ FPU Environment Correction Result Stores the result in the case of an FP environment correction

NativeLibraryUnload

default profiling startTime duration eventThread stackTrace 22 25 26

Category: Java Virtual Machine / Runtime

Information about a dynamic library or other native image unload operation

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/support/jfrNativeLibraryLoadEvent.cpp:

static inline JfrTicksWrapper* allocate_start_time() {
  return EventType::is_enabled() ? new JfrTicksWrapper() : nullptr;
}

NativeLibraryLoadEvent::NativeLibraryLoadEvent(const char* name, void** result) : JfrNativeLibraryEventBase(name), _result(result), _fp_env_correction_attempt(false), _fp_env_correction_success(false) {
  assert(_result != nullptr, "invariant");
  _start_time = allocate_start_time<EventNativeLibraryLoad>();
}

bool NativeLibraryLoadEvent::success() const {
  return *_result != nullptr;
}

NativeLibraryUnloadEvent::NativeLibraryUnloadEvent(const char* name) : JfrNativeLibraryEventBase(name), _result(false) {
  _start_time = allocate_start_time<EventNativeLibraryUnload>();
}

bool NativeLibraryUnloadEvent::success() const {
  return _result;
}

void NativeLibraryUnloadEvent::set_result(bool result) {
  _result = result;
}

static void set_additional_data(EventNativeLibraryLoad& event, const NativeLibraryLoadEvent& helper) {
  event.set_fpuCorrectionAttempt(helper.get_fp_env_correction_attempt());
  event.set_fpuCorrectionSuccess(helper.get_fp_env_correction_success());
}

static void set_additional_data(EventNativeLibraryUnload& event, const NativeLibraryUnloadEvent& helper) {
  // no additional entries atm. for the unload event
}

template <typename EventType, typename HelperType>
static void commit(const HelperType& helper) {
  if (!helper.has_start_time()) {
    return;
  }
  EventType event(UNTIMED);
  event.set_endtime(JfrTicks::now());
  event.set_starttime(*helper.start_time());

src/hotspot/share/jfr/support/jfrNativeLibraryLoadEvent.cpp:

  assert(thread != nullptr, "invariant");
  if (thread->is_Java_thread()) {
    JavaThread* jt = JavaThread::cast(thread);
    if (jt->thread_state() == _thread_in_native) {
      // For a JavaThread to take a JFR stacktrace, it must be in _thread_in_vm. Can safepoint here.
      MACOS_AARCH64_ONLY(ThreadWXEnable __wx(WXWrite, jt));
      ThreadInVMfromNative transition(jt);
      event.commit();
      return;
    }
    // If a thread comes here still _thread_in_Java, which can happen for example
    // when loading the disassembler library in response to traps in JIT code - all is ok.
    // Since there is no ljf, an event will be committed without a stacktrace.
  }
  event.commit();
}

NativeLibraryLoadEvent::~NativeLibraryLoadEvent() {
  commit<EventNativeLibraryLoad>(*this);
}

NativeLibraryUnloadEvent::~NativeLibraryUnloadEvent() {
  commit<EventNativeLibraryUnload>(*this);
}

Configuration enabled stackTrace threshold
default true true 0 ms
profiling true true 0 ms

Field Type Description
name string Name
success boolean Success Success or failure of the unload operation
errorMessage string Error Message In case of an unload error, error description

ModuleRequire

default profiling startTime every chunk 11 17 21 25 26

Category: Java Virtual Machine / Runtime / Modules

A directed edge representing a dependency

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrModuleEvent.cpp:

   ModuleDependencyClosure(const ModuleEntry* module, EventFunc ef) : ModuleEventCallbackClosure(ef), _module(module) {}
   void do_module(ModuleEntry* entry);
};

class ModuleExportClosure : public ModuleEventCallbackClosure {
 private:
  const PackageEntry* const _package;
 public:
  ModuleExportClosure(const PackageEntry* pkg, EventFunc ef) : ModuleEventCallbackClosure(ef), _package(pkg) {}
  void do_module(ModuleEntry* entry);
};

static void write_module_dependency_event(const void* from_module, const ModuleEntry* to_module) {
  EventModuleRequire event(UNTIMED);
  event.set_starttime(invocation_time);
  event.set_endtime(invocation_time);
  event.set_source((const ModuleEntry*)from_module);
  event.set_requiredModule(to_module);
  event.commit();
}

static void write_module_export_event(const void* package, const ModuleEntry* qualified_export) {
  EventModuleExport event(UNTIMED);
  event.set_starttime(invocation_time);
  event.set_endtime(invocation_time);

Configuration enabled period
default true endChunk
profiling true endChunk

Field Type Description
source Module Source Module
requiredModule Module Required Module Consider contributing a description to jfreventcollector.

Examples 3
requiredModule Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.xml
name string
java.xml
version string
21.0.7
source Module
classLoader ClassLoader
name string
app
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
10
name string
jdk/internal/loader/ClassLoaders$AppClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
jdk/internal/loader
location string
jrt:/jdk.jpackage
name string
jdk.jpackage
version string
21.0.7
startTime long: millis
231212350792
requiredModule Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
source Module
classLoader ClassLoader
name string
app
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
10
name string
jdk/internal/loader/ClassLoaders$AppClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
jdk/internal/loader
location string
jrt:/jdk.jconsole
name string
jdk.jconsole
version string
21.0.7
startTime long: millis
200101111750
requiredModule Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.xml
name string
java.xml
version string
21.0.7
source Module
classLoader ClassLoader
name string
platform
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
10
name string
jdk/internal/loader/ClassLoaders$PlatformClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
jdk/internal/loader
location string
jrt:/java.sql.rowset
name string
java.sql.rowset
version string
21.0.7
startTime long: millis
243809184667

ModuleExport

profiling startTime every chunk 11 17 21 25 26

Category: Java Virtual Machine / Runtime / Modules

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrModuleEvent.cpp:

  void do_module(ModuleEntry* entry);
};

static void write_module_dependency_event(const void* from_module, const ModuleEntry* to_module) {
  EventModuleRequire event(UNTIMED);
  event.set_starttime(invocation_time);
  event.set_endtime(invocation_time);
  event.set_source((const ModuleEntry*)from_module);
  event.set_requiredModule(to_module);
  event.commit();
}

static void write_module_export_event(const void* package, const ModuleEntry* qualified_export) {
  EventModuleExport event(UNTIMED);
  event.set_starttime(invocation_time);
  event.set_endtime(invocation_time);
  event.set_exportedPackage((const PackageEntry*)package);
  event.set_targetModule(qualified_export);
  event.commit();
}

void ModuleDependencyClosure::do_module(ModuleEntry* to_module) {
  assert_locked_or_safepoint(Module_lock);
  assert(to_module != nullptr, "invariant");
  assert(_module != nullptr, "invariant");

Configuration enabled period
default false endChunk
profiling true endChunk

Field Type Description
exportedPackage Package Exported Package Consider contributing a description to jfreventcollector.
targetModule Module Target Module Module to which the package is qualifiedly exported. If null or N/A, the package is unqualifiedly exported

Examples 3
exportedPackage Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
com/clearspring/analytics/stream/cardinality
startTime long: millis
231212491500
targetModule Module
null
exportedPackage Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/hadoop/shaded/com/google/re2j
startTime long: millis
200101199416
targetModule Module
null
exportedPackage Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/sparkproject/jetty/util/ssl
startTime long: millis
243809266625
targetModule Module
null

Java Application

ThreadStart

default profiling startTime eventThread stackTrace 11 17 21 25 26

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/support/jfrThreadLocal.cpp:

  assert(Thread::is_starting_thread(jt), "invariant");
  assert(jt->threadObj() == nullptr, "invariant");
  assert(jt->jfr_thread_local()->_jvm_thread_id == 0, "invariant");
  jt->jfr_thread_local()->_jvm_thread_id = ThreadIdentifier::initial();
}

static void send_java_thread_start_event(JavaThread* jt) {
  assert(jt != nullptr, "invariant");
  assert(Thread::current() == jt, "invariant");
  if (!JfrJavaSupport::on_thread_start(jt)) {
    // thread is excluded
    return;
  }
  EventThreadStart event;
  traceid thread_id = JfrThreadLocal::jvm_thread_id(jt);
  assert(thread_id != 0, "invariant");
  event.set_thread(thread_id);
  event.set_parentThread(jt->jfr_thread_local()->parent_thread_id());
  event.commit();
}

void JfrThreadLocal::on_start(Thread* t) {
  JfrThreadLocal* const tl = t->jfr_thread_local();
  assert(tl != nullptr, "invariant");
  assign_thread_id(t, tl);

src/hotspot/share/jfr/support/jfrThreadLocal.cpp:

// The starter thread ensures that the startee has a valid _vm_thread_id and _contextual_id.
// This is to avoid recursion in thread assignment since accessing the java threadObj can lead
// to events being fired, a situation the starter thread can handle but not the startee.
void JfrThreadLocal::on_java_thread_start(JavaThread* starter, JavaThread* startee) {
  assert(starter != nullptr, "invariant");
  assert(startee != nullptr, "invariant");
  JfrThreadLocal* const tl = startee->jfr_thread_local();
  assign_thread_id(startee, tl);
  assert(vthread_id(startee) != 0, "invariant");
  assert(jvm_thread_id(startee) == vthread_id(startee), "invariant");
  if (JfrRecorder::is_recording() && EventThreadStart::is_enabled() && EventThreadStart::is_stacktrace_enabled()) {
    // skip level 2 to skip frames Thread.start() and Thread.start0()
    startee->jfr_thread_local()->set_cached_stack_trace_id(JfrStackTraceRepository::record(starter, 2));
  }
}

void JfrThreadLocal::release(Thread* t) {
  if (has_java_event_writer()) {
    assert(t->is_Java_thread(), "invariant");
    JfrJavaSupport::destroy_global_jni_handle(java_event_writer());
    _java_event_writer = nullptr;
  }

Configuration enabled stackTrace
default true true
profiling true true

Field Type Description
thread Thread New Java Thread
parentThread Thread Parent Java Thread

Examples 3
parentThread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
block-manager-storage-async-thread-pool-59
javaThreadId long
1681
osName string
block-manager-storage-async-thread-pool-59
osThreadId long
151307
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
2
lineNumber int
2577
method Method
descriptor string
(Ljava/lang/Thread;Ljdk/internal/vm/ThreadContainer;)V
hidden boolean
false
modifiers int
1
name string
start
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
java/lang/System$2
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Inlined
truncated boolean
false
startTime long: millis
233265306958
thread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
block-manager-ask-thread-pool-38
javaThreadId long
1682
osName string
block-manager-ask-thread-pool-38
osThreadId long
94219
virtual boolean
false
parentThread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
dispatcher-BlockManagerEndpoint1
javaThreadId long
1524
osName string
dispatcher-BlockManagerEndpoint1
osThreadId long
110355
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
2
lineNumber int
2577
method Method
descriptor string
(Ljava/lang/Thread;Ljdk/internal/vm/ThreadContainer;)V
hidden boolean
false
modifiers int
1
name string
start
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
java/lang/System$2
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Inlined
truncated boolean
false
startTime long: millis
249032033958
thread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
block-manager-storage-async-thread-pool-75
javaThreadId long
1697
osName string
block-manager-storage-async-thread-pool-75
osThreadId long
60695
virtual boolean
false
parentThread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
block-manager-ask-thread-pool-48
javaThreadId long
1720
osName string
block-manager-ask-thread-pool-48
osThreadId long
128031
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
2
lineNumber int
2577
method Method
descriptor string
(Ljava/lang/Thread;Ljdk/internal/vm/ThreadContainer;)V
hidden boolean
false
modifiers int
1
name string
start
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
java/lang/System$2
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Inlined
truncated boolean
false
startTime long: millis
214473703583
thread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
block-manager-ask-thread-pool-49
javaThreadId long
1721
osName string
block-manager-ask-thread-pool-49
osThreadId long
68639
virtual boolean
false

ThreadEnd

default profiling startTime eventThread 11 17 21 25 26

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/support/jfrThreadLocal.cpp:

  assert(t != nullptr, "invariant");
  assert(Thread::current() == t, "invariant");
  assert(!tl->is_dead(), "invariant");
  assert(tl->shelved_buffer() == nullptr, "invariant");
  tl->_dead = true;
  tl->release(t);
}

static void send_java_thread_end_event(JavaThread* jt, traceid tid) {
  assert(jt != nullptr, "invariant");
  assert(Thread::current() == jt, "invariant");
  assert(tid != 0, "invariant");
  if (JfrRecorder::is_recording()) {
    EventThreadEnd event;
    event.set_thread(tid);
    event.commit();
    ObjectSampleCheckpoint::on_thread_exit(tid);
  }
}

void JfrThreadLocal::on_exit(Thread* t) {
  assert(t != nullptr, "invariant");
  JfrThreadLocal * const tl = t->jfr_thread_local();
  assert(!tl->is_dead(), "invariant");
  if (JfrRecorder::is_recording()) {

src/hotspot/share/runtime/java.cpp:

#if INCLUDE_CDS
  ClassListWriter::write_resolved_constants();

  if (CDSConfig::is_dumping_preimage_static_archive()) {
    AOTMetaspace::dump_static_archive(thread);
  }
#endif

  // Hang forever on exit if we're reporting an error.
  if (ShowMessageBoxOnError && VMError::is_error_reported()) {
    os::infinite_sleep();
  }

  EventThreadEnd event;
  if (event.should_commit()) {
    event.set_thread(JFR_JVM_THREAD_ID(thread));
    event.commit();
  }

  // 2nd argument (emit_event_shutdown) should be set to false
  // because EventShutdown would be emitted at Threads::destroy_vm().
  // (one of the callers of before_exit())
  JFR_ONLY(Jfr::on_vm_shutdown(true, false, halt);)

  // Stop the WatcherThread. We do this before disenrolling various

Configuration enabled
default true
profiling true

Field Type Description
thread Thread Java Thread

Examples 3
startTime long: millis
242178836958
thread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
QueryStageCreator-1
javaThreadId long
1288
osName string
QueryStageCreator-1
osThreadId long
96519
virtual boolean
false
startTime long: millis
224060584666
thread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
dag-scheduler-event-loop
javaThreadId long
1564
osName string
dag-scheduler-event-loop
osThreadId long
134167
virtual boolean
false
startTime long: millis
233790494625
thread Thread
group ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
C2 CompilerThread1
javaThreadId long
11
osName string
C2 CompilerThread1
osThreadId long
116743
virtual boolean
false

ThreadPark

default profiling startTime duration eventThread stackTrace 11 17 21 25 26

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/prims/unsafe.cpp:

UNSAFE_ENTRY_SCOPED(jboolean, Unsafe_CompareAndSetInt(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jint e, jint x)) {
  oop p = JNIHandles::resolve(obj);
  volatile jint* addr = (volatile jint*)index_oop_from_field_offset_long(p, offset);
  return AtomicAccess::cmpxchg(addr, e, x) == e;
} UNSAFE_END

UNSAFE_ENTRY_SCOPED(jboolean, Unsafe_CompareAndSetLong(JNIEnv *env, jobject unsafe, jobject obj, jlong offset, jlong e, jlong x)) {
  oop p = JNIHandles::resolve(obj);
  volatile jlong* addr = (volatile jlong*)index_oop_from_field_offset_long(p, offset);
  return AtomicAccess::cmpxchg(addr, e, x) == e;
} UNSAFE_END

static void post_thread_park_event(EventThreadPark* event, const oop obj, jlong timeout_nanos, jlong until_epoch_millis) {
  assert(event != nullptr, "invariant");
  event->set_parkedClass((obj != nullptr) ? obj->klass() : nullptr);
  event->set_timeout(timeout_nanos);
  event->set_until(until_epoch_millis);
  event->set_address((obj != nullptr) ? (u8)cast_from_oop<uintptr_t>(obj) : 0);
  event->commit();
}

UNSAFE_ENTRY(void, Unsafe_Park(JNIEnv *env, jobject unsafe, jboolean isAbsolute, jlong time)) {
  HOTSPOT_THREAD_PARK_BEGIN((uintptr_t) thread->parker(), (int) isAbsolute, time);
  EventThreadPark event;

  JavaThreadParkedState jtps(thread, time != 0);
  thread->parker()->park(isAbsolute != 0, time);
  if (event.should_commit()) {
    const oop obj = thread->current_park_blocker();
    if (time == 0) {
      post_thread_park_event(&event, obj, min_jlong, min_jlong);
    } else {
      if (isAbsolute != 0) {
        post_thread_park_event(&event, obj, min_jlong, time);
      } else {

Configuration enabled stackTrace threshold
default true true 20 ms
profiling true true 10 ms

Field Type Description
parkedClass Class Class Parked On
timeout long: nanos Park Timeout
until long: epochmillis Park Until
address ulong: address Address of Object Parked

Examples 3
address ulong: address
25960099224
parkedClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent/locks
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(ZJ)V
hidden boolean
false
modifiers int
257
name string
park
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
jdk/internal/misc/Unsafe
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
jdk/internal/misc
type FrameType
Native
truncated boolean
false
startTime long: millis
242399741583
timeout long: nanos
-9223372036854775808
until long: epochmillis
-9223372036854775808
address ulong: address
21672910592
parkedClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent/locks
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(ZJ)V
hidden boolean
false
modifiers int
257
name string
park
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
jdk/internal/misc/Unsafe
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
jdk/internal/misc
type FrameType
Native
truncated boolean
false
startTime long: millis
198284458541
timeout long: nanos
-9223372036854775808
until long: epochmillis
-9223372036854775808
address ulong: address
21661152712
parkedClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent/locks
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(ZJ)V
hidden boolean
false
modifiers int
257
name string
park
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
jdk/internal/misc/Unsafe
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
jdk/internal/misc
type FrameType
Native
truncated boolean
false
startTime long: millis
229430150458
timeout long: nanos
-9223372036854775808
until long: epochmillis
-9223372036854775808

JavaMonitorEnter

default profiling startTime duration eventThread stackTrace 11 17 21 25 26

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/objectMonitor.cpp:

    // yet appear on any queues that would get it made the successor.
    // This means that the JVMTI_EVENT_MONITOR_CONTENDED_ENTER event
    // handler cannot accidentally consume an unpark() meant for the
    // ParkEvent associated with this ObjectMonitor.
  }
}

void ObjectMonitor::enter_with_contention_mark(JavaThread* current, ObjectMonitorContentionMark &cm) {
  assert(current == JavaThread::current(), "must be");
  assert(!has_owner(current), "must be");
  assert(cm._monitor == this, "must be");
  assert(!is_being_async_deflated(), "must be");

  JFR_ONLY(JfrConditionalFlush<EventJavaMonitorEnter> flush(current);)
  EventJavaMonitorEnter enter_event;
  if (enter_event.is_started()) {
    enter_event.set_monitorClass(object()->klass());
    // Set an address that is 'unique enough', such that events close in
    // time and with the same address are likely (but not guaranteed) to
    // belong to the same object.
    enter_event.set_address((uintptr_t)this);
  }
  EventVirtualThreadPinned vthread_pinned_event;

  freeze_result result;

src/hotspot/share/runtime/objectMonitor.cpp:

    assert(false, "Non-balanced monitor enter/exit!");
#endif
    return;
  }

  if (_recursions != 0) {
    _recursions--;        // this is simple recursive enter
    return;
  }

#if INCLUDE_JFR
  // get the owner's thread id for the MonitorEnter event
  // if it is enabled and the thread isn't suspended
  if (not_suspended && EventJavaMonitorEnter::is_enabled()) {
    _previous_owner_tid = JFR_THREAD_ID(current);
  }
#endif

  for (;;) {
    // If there is a successor we should release the lock as soon as
    // possible, so that the successor can acquire the lock. If there is
    // no successor, we might need to wake up a waiting thread.
    if (!has_successor()) {
      ObjectWaiter* w = AtomicAccess::load(&_entry_list);
      if (w != nullptr) {

Configuration enabled stackTrace threshold
default true true 20 ms
profiling true true 10 ms

Field Type Description
monitorClass Class Monitor Class Consider contributing a description to jfreventcollector.
previousOwner Thread Previous Monitor Owner
address ulong: address Monitor Address

Examples 3
address ulong: address
105553574545856
monitorClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[I
package Package
null
previousOwner Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
Executor task launch worker-8
javaThreadId long
1863
osName string
Executor task launch worker-8
osThreadId long
163603
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
1
lineNumber int
266
method Method
descriptor string
(Lscala/collection/Iterator;)Lscala/collection/Iterator;
hidden boolean
false
modifiers int
1
name string
destructiveIterator
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
org/apache/spark/util/collection/ExternalAppendOnlyMap
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark/util/collection
type FrameType
Interpreted
truncated boolean
false
startTime long: millis
254487573667
address ulong: address
105553532649104
monitorClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[I
package Package
null
previousOwner Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
Executor task launch worker-4
javaThreadId long
1871
osName string
Executor task launch worker-4
osThreadId long
44843
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
57
lineNumber int
508
method Method
descriptor string
()Lorg/sparkproject/guava/collect/Multiset$Entry;
hidden boolean
false
modifiers int
4
name string
computeNext
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
0
name string
org/sparkproject/guava/collect/ConcurrentHashMultiset$2
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/sparkproject/guava/collect
type FrameType
Interpreted
truncated boolean
false
startTime long: millis
233938615250
address ulong: address
105553693086800
monitorClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
24
name string
java/util/concurrent/ConcurrentHashMap$ReservationNode
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
previousOwner Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
Thread-408
javaThreadId long
2362
osName string
Thread-408
osThreadId long
186639
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
269
lineNumber int
1726
method Method
descriptor string
(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
hidden boolean
false
modifiers int
1
name string
computeIfAbsent
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/util/concurrent/ConcurrentHashMap
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
type FrameType
JIT compiled
truncated boolean
true
startTime long: millis
289594534750

JavaMonitorWait

default profiling startTime duration eventThread stackTrace 11 17 21 25 26

Category: Java Application

Waiting on a Java monitor

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/objectMonitor.cpp:

// Otherwise returns false and throws IllegalMonitorStateException
// (IMSE). If there is a pending exception and the specified thread
// is not the owner, that exception will be replaced by the IMSE.
bool ObjectMonitor::check_owner(TRAPS) {
  JavaThread* current = THREAD;
  int64_t cur = owner_raw();
  if (cur == owner_id_from(current)) {
    return true;
  }
  THROW_MSG_(vmSymbols::java_lang_IllegalMonitorStateException(),
             "current thread is not owner", false);
}

static void post_monitor_wait_event(EventJavaMonitorWait* event,
                                    ObjectMonitor* monitor,
                                    uint64_t notifier_tid,
                                    jlong timeout,
                                    bool timedout) {
  assert(event != nullptr, "invariant");
  assert(monitor != nullptr, "invariant");
  const Klass* monitor_klass = monitor->object()->klass();
  if (ObjectMonitor::is_jfr_excluded(monitor_klass)) {
    return;
  }
  event->set_monitorClass(monitor_klass);
  event->set_timeout(timeout);
  // Set an address that is 'unique enough', such that events close in
  // time and with the same address are likely (but not guaranteed) to
  // belong to the same object.
  event->set_address((uintptr_t)monitor);
  event->set_notifier(notifier_tid);
  event->set_timedOut(timedout);
  event->commit();
}

static void vthread_monitor_waited_event(JavaThread* current, ObjectWaiter* node, ContinuationWrapper& cont, EventJavaMonitorWait* event, jboolean timed_out) {
  // Since we might safepoint set the anchor so that the stack can we walked.
  assert(current->last_continuation() != nullptr, "");
  JavaFrameAnchor* anchor = current->frame_anchor();
  anchor->set_last_Java_sp(current->last_continuation()->entry_sp());
  anchor->set_last_Java_pc(current->last_continuation()->entry_pc());

  ContinuationWrapper::SafepointOp so(current, cont);

  JRT_BLOCK
    if (event->should_commit()) {
      long timeout = java_lang_VirtualThread::timeout(current->vthread());

src/hotspot/share/runtime/objectMonitor.cpp:

// -----------------------------------------------------------------------------
// Wait/Notify/NotifyAll
//
// Note: a subset of changes to ObjectMonitor::wait()
// will need to be replicated in complete_exit
void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) {
  JavaThread* current = THREAD;

  assert(InitDone, "Unexpectedly not initialized");

  CHECK_OWNER();  // Throws IMSE if not owner.

  EventJavaMonitorWait wait_event;
  EventVirtualThreadPinned vthread_pinned_event;

  // check for a pending interrupt
  if (interruptible && current->is_interrupted(true) && !HAS_PENDING_EXCEPTION) {
    JavaThreadInObjectWaitState jtiows(current, millis != 0, interruptible);

    if (JvmtiExport::should_post_monitor_wait()) {
      JvmtiExport::post_monitor_wait(current, object(), millis);
    }
    // post monitor waited event.  Note that this is past-tense, we are done waiting.
    if (JvmtiExport::should_post_monitor_waited()) {

src/hotspot/share/runtime/objectMonitor.cpp:

      node->TState = ObjectWaiter::TS_RUN;
    }
    Thread::SpinRelease(&_wait_set_lock);
  }

  // If this was an interrupted case, set the _interrupted boolean so that
  // once we re-acquire the monitor we know if we need to throw IE or not.
  ObjectWaiter::TStates state = node->TState;
  bool was_notified = state == ObjectWaiter::TS_ENTER;
  assert(was_notified || state == ObjectWaiter::TS_RUN, "");
  node->_interrupted = !was_notified && current->is_interrupted(false);

  // Post JFR and JVMTI events.
  EventJavaMonitorWait wait_event;
  if (wait_event.should_commit() || JvmtiExport::should_post_monitor_waited()) {
    vthread_monitor_waited_event(current, node, cont, &wait_event, !was_notified && !node->_interrupted);
  }

  // Mark that we are at reenter so that we don't call this method again.
  node->_at_reenter = true;

  if (!was_notified) {
    bool acquired = vthread_monitor_enter(current, node);
    if (acquired) {
      guarantee(_recursions == 0, "invariant");

Configuration enabled stackTrace threshold
default true true 20 ms
profiling true true 10 ms

Field Type Description
monitorClass Class Monitor Class Class of object waited on
notifier Thread Notifier Thread Notifying Thread
timeout long: millis Timeout Maximum wait time
timedOut boolean Timed Out Wait has been timed out
address ulong: address Monitor Address Address of object waited on

Examples 3
address ulong: address
105553600617584
monitorClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[I
package Package
null
notifier Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
Executor task launch worker-4
javaThreadId long
1871
osName string
Executor task launch worker-4
osThreadId long
44843
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
16
lineNumber int
403
method Method
descriptor string
()Ljava/lang/String;
hidden boolean
false
modifiers int
2
name string
encodedFunctionName$lzycompute
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
org/apache/spark/sql/catalyst/expressions/objects/Invoke
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark/sql/catalyst/expressions/objects
type FrameType
Interpreted
truncated boolean
false
startTime long: millis
233265216500
timedOut boolean
false
timeout long: millis
0
address ulong: address
105553625303696
monitorClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/lang/Object
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
notifier Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
Executor task launch worker-6
javaThreadId long
1848
osName string
Executor task launch worker-6
osThreadId long
158479
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
-1
method Method
descriptor string
(J)V
hidden boolean
false
modifiers int
274
name string
wait0
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/lang/Object
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Native
truncated boolean
false
startTime long: millis
272693995417
timedOut boolean
false
timeout long: millis
0
address ulong: address
105553576459088
monitorClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[I
package Package
null
notifier Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
Executor task launch worker-8
javaThreadId long
1863
osName string
Executor task launch worker-8
osThreadId long
163603
virtual boolean
false
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
16
lineNumber int
403
method Method
descriptor string
()Ljava/lang/String;
hidden boolean
false
modifiers int
2
name string
encodedFunctionName$lzycompute
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
org/apache/spark/sql/catalyst/expressions/objects/Invoke
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark/sql/catalyst/expressions/objects
type FrameType
Interpreted
truncated boolean
false
startTime long: millis
253439129292
timedOut boolean
false
timeout long: millis
0

JavaMonitorNotify

startTime duration eventThread stackTrace 25 26

Category: Java Application

Notifying a Java monitor

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/objectMonitor.cpp:

        // have reached reenter_internal and read a false value of has_unmounted_vthreads()
        // before we added it to the _entry_list above. To deal with that case, we set _do_timed_park
        // which will be read by the target on the next loop iteration in reenter_internal.
        iterator->_do_timed_park = true;
        JavaThread* t = iterator->thread();
        t->_ParkEvent->unpark();
      }
    }
  }
  Thread::SpinRelease(&_wait_set_lock);
  return did_notify;
}

static void post_monitor_notify_event(EventJavaMonitorNotify* event,
                                      ObjectMonitor* monitor,
                                      int notified_count) {
  assert(event != nullptr, "invariant");
  assert(monitor != nullptr, "invariant");
  const Klass* monitor_klass = monitor->object()->klass();
  if (ObjectMonitor::is_jfr_excluded(monitor_klass)) {
    return;
  }
  event->set_monitorClass(monitor_klass);
  // Set an address that is 'unique enough', such that events close in
  // time and with the same address are likely (but not guaranteed) to

src/hotspot/share/runtime/objectMonitor.cpp:

void ObjectMonitor::notify(TRAPS) {
  JavaThread* current = THREAD;
  CHECK_OWNER();  // Throws IMSE if not owner.
  if (_wait_set == nullptr) {
    return;
  }

  quick_notify(current);
}

void ObjectMonitor::quick_notify(JavaThread* current) {
  assert(has_owner(current), "Precondition");

  EventJavaMonitorNotify event;
  DTRACE_MONITOR_PROBE(notify, this, object(), current);
  int tally = notify_internal(current) ? 1 : 0;

  if ((tally > 0) && event.should_commit()) {
    post_monitor_notify_event(&event, this, /* notified_count = */ tally);
  }
}

// notifyAll() transfers the waiters one-at-a-time from the waitset to
// the entry_list. If the waitset is "ABCD" (where A was added first
// and D last) and the entry_list is ->X->Y->Z. After a notifyAll()

src/hotspot/share/runtime/objectMonitor.cpp:

void ObjectMonitor::notifyAll(TRAPS) {
  JavaThread* current = THREAD;
  CHECK_OWNER();  // Throws IMSE if not owner.
  if (_wait_set == nullptr) {
    return;
  }

  quick_notifyAll(current);
}

void ObjectMonitor::quick_notifyAll(JavaThread* current) {
  assert(has_owner(current), "Precondition");

  EventJavaMonitorNotify event;
  DTRACE_MONITOR_PROBE(notifyAll, this, object(), current);
  int tally = 0;
  while (_wait_set != nullptr) {
    if (notify_internal(current)) {
      tally++;
    }
  }

  if ((tally > 0) && event.should_commit()) {
    post_monitor_notify_event(&event, this, /* notified_count = */ tally);
  }

Configuration enabled stackTrace threshold
default false true 0 ms
profiling false true 0 ms

Field Type Description
monitorClass Class Monitor Class Class of object waited on
notifiedCount uint Notified Threads Number of actually notified threads
address ulong: address Monitor Address Address of object waited on

JavaMonitorInflate

startTime duration eventThread stackTrace 11 17 21 25 26

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/lightweightSynchronizer.cpp:

static void log_inflate(Thread* current, oop object, ObjectSynchronizer::InflateCause cause) {
  if (log_is_enabled(Trace, monitorinflation)) {
    ResourceMark rm(current);
    log_trace(monitorinflation)("inflate: object=" INTPTR_FORMAT ", mark="
                                INTPTR_FORMAT ", type='%s' cause=%s", p2i(object),
                                object->mark().value(), object->klass()->external_name(),
                                ObjectSynchronizer::inflate_cause_name(cause));
  }
}

static void post_monitor_inflate_event(EventJavaMonitorInflate* event,
                                       const oop obj,
                                       ObjectSynchronizer::InflateCause cause) {
  assert(event != nullptr, "invariant");
  const Klass* monitor_klass = obj->klass();
  if (ObjectMonitor::is_jfr_excluded(monitor_klass)) {
    return;
  }
  event->set_monitorClass(monitor_klass);
  event->set_address((uintptr_t)(void*)obj);
  event->set_cause((u1)cause);
  event->commit();
}

ObjectMonitor* LightweightSynchronizer::get_or_insert_monitor(oop object, JavaThread* current, ObjectSynchronizer::InflateCause cause) {
  assert(UseObjectMonitorTable, "must be");

  EventJavaMonitorInflate event;

  bool inserted;
  ObjectMonitor* monitor = get_or_insert_monitor_from_table(object, current, &inserted);

  if (inserted) {
    log_inflate(current, object, cause);
    if (event.should_commit()) {
      post_monitor_inflate_event(&event, object, cause);
    }

    // The monitor has an anonymous owner so it is safe from async deflation.

src/hotspot/share/runtime/lightweightSynchronizer.cpp:

ObjectMonitor* LightweightSynchronizer::inflate_into_object_header(oop object, ObjectSynchronizer::InflateCause cause, JavaThread* locking_thread, Thread* current) {

  // The JavaThread* locking parameter requires that the locking_thread == JavaThread::current,
  // or is suspended throughout the call by some other mechanism.
  // Even with lightweight locking the thread might be nullptr when called from a non
  // JavaThread. (As may still be the case from FastHashCode). However it is only
  // important for the correctness of the lightweight locking algorithm that the thread
  // is set when called from ObjectSynchronizer::enter from the owning thread,
  // ObjectSynchronizer::enter_for from any thread, or ObjectSynchronizer::exit.
  EventJavaMonitorInflate event;

  for (;;) {
    const markWord mark = object->mark_acquire();

    // The mark can be in one of the following states:
    // *  inflated     - Just return if using stack-locking.
    //                   If using fast-locking and the ObjectMonitor owner
    //                   is anonymous and the locking_thread owns the
    //                   object lock, then we make the locking_thread
    //                   the ObjectMonitor owner and remove the lock from
    //                   the locking_thread's lock stack.

Configuration enabled stackTrace threshold
default false true 0 ms
profiling false true 0 ms

Field Type Description
monitorClass Class Monitor Class Consider contributing a description to jfreventcollector.
address ulong: address Monitor Address
cause InflateCause Monitor Inflation Cause Cause of inflation

JavaMonitorDeflate

startTime duration 25 26

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/runtime/objectMonitor.cpp:

    // Interference - the CAS failed because _entry_list changed.  Before
    // retrying the CAS retry taking the lock as it may now be free.
    if (try_lock(current) == TryLockResult::Success) {
      assert(!has_successor(current), "invariant");
      assert(has_owner(current), "invariant");
      node->TState = ObjectWaiter::TS_RUN;
      return true;
    }
  }
}

static void post_monitor_deflate_event(EventJavaMonitorDeflate* event,
                                       const oop obj) {
  assert(event != nullptr, "invariant");
  if (obj == nullptr) {
    // Accept the case when obj was already garbage-collected.
    // Emit the event anyway, but without details.
    event->set_monitorClass(nullptr);
    event->set_address(0);
  } else {
    const Klass* monitor_klass = obj->klass();
    if (ObjectMonitor::is_jfr_excluded(monitor_klass)) {
      return;

src/hotspot/share/runtime/objectMonitor.cpp:

// as part of the protocol to make sure that the calling thread has
// not lost the race to a contending thread.
//
// The ObjectMonitor has been successfully async deflated when:
//   (contentions < 0)
// Contending threads that see that condition know to retry their operation.
//
bool ObjectMonitor::deflate_monitor(Thread* current) {
  if (is_busy()) {
    // Easy checks are first - the ObjectMonitor is busy so no deflation.
    return false;
  }

  EventJavaMonitorDeflate event;

  const oop obj = object_peek();

  if (obj == nullptr) {
    // If the object died, we can recycle the monitor without racing with
    // Java threads. The GC already broke the association with the object.
    set_owner_from_raw(NO_OWNER, DEFLATER_MARKER);
    assert(contentions() >= 0, "must be non-negative: contentions=%d", contentions());
    _contentions = INT_MIN; // minimum negative int
  } else {
    // Attempt async deflation protocol.

Configuration enabled threshold
default false 0 ms
profiling false 0 ms

Field Type Description
monitorClass Class Monitor Class Class of the object deflated. If null or N/A, the object has been garbage collected.
address ulong: address Monitor Address Address of the object deflated. If null or N/A, the object has been garbage collected.

VirtualThreadPinned

default profiling startTime duration eventThread stackTrace 19 21 25 26

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/prims/jvm.cpp:

    assert(!JvmtiExport::can_support_virtual_threads(), "sanity check");
    return;
  }
  assert(thread->is_disable_suspend() != (bool)enter,
         "nested or unbalanced monitor enter/exit is not allowed");
  thread->toggle_is_disable_suspend();
#endif
JVM_END

JVM_ENTRY(void, JVM_VirtualThreadPinnedEvent(JNIEnv* env, jclass ignored, jstring op))
#if INCLUDE_JFR
  freeze_result result = THREAD->last_freeze_fail_result();
  assert(result != freeze_ok, "sanity check");
  EventVirtualThreadPinned event(UNTIMED);
  event.set_starttime(THREAD->last_freeze_fail_time());
  if (event.should_commit()) {
    ResourceMark rm(THREAD);
    const char *str = java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(op));
    THREAD->post_vthread_pinned_event(&event, str, result);
  }
#endif
JVM_END

JVM_ENTRY(jobject, JVM_TakeVirtualThreadListToUnblock(JNIEnv* env, jclass ignored))
  ParkEvent* parkEvent = ObjectMonitor::vthread_unparker_ParkEvent();

src/hotspot/share/runtime/javaThread.cpp:

  new_head->add(_scopedValueCache);
  _oop_handle_list = new_head;
  Service_lock->notify_all();
}

#if INCLUDE_JFR
void JavaThread::set_last_freeze_fail_result(freeze_result result) {
  assert(result != freeze_ok, "sanity check");
  _last_freeze_fail_result = result;
  _last_freeze_fail_time = Ticks::now();
}

// Post jdk.VirtualThreadPinned event
void JavaThread::post_vthread_pinned_event(EventVirtualThreadPinned* event, const char* op, freeze_result result) {
  assert(result != freeze_ok, "sanity check");
  if (event->should_commit()) {
    char reason[256];
    if (class_to_be_initialized() != nullptr) {
      ResourceMark rm(this);
      jio_snprintf(reason, sizeof reason, "Waited for initialization of %s by another thread",
                   class_to_be_initialized()->external_name());
      event->set_pinnedReason(reason);
    } else if (class_being_initialized() != nullptr) {
      ResourceMark rm(this);
      jio_snprintf(reason, sizeof(reason), "VM call to %s.<clinit> on stack",

src/hotspot/share/runtime/javaThread.hpp:

class OSThread;

class ThreadsList;
class ThreadSafepointState;
class ThreadStatistics;

class vframeArray;
class vframe;
class javaVFrame;

class JavaThread;
typedef void (*ThreadFunction)(JavaThread*, TRAPS);

class EventVirtualThreadPinned;

class JavaThread: public Thread {
  friend class VMStructs;
  friend class JVMCIVMStructs;
  friend class WhiteBox;
  friend class ThreadsSMRSupport; // to access _threadObj for exiting_threads_oops_do
  friend class HandshakeState;
  friend class Continuation;
  friend class Threads;
  friend class ServiceThread; // for deferred OopHandle release access
 private:

src/hotspot/share/runtime/javaThread.hpp:

  bool sleep(jlong millis);
  bool sleep_nanos(jlong nanos);

  // java.lang.Thread interruption support
  void interrupt();
  bool is_interrupted(bool clear_interrupted);

#if INCLUDE_JFR
  // Support for jdk.VirtualThreadPinned event
  freeze_result last_freeze_fail_result() { return _last_freeze_fail_result; }
  Ticks& last_freeze_fail_time() { return _last_freeze_fail_time; }
  void set_last_freeze_fail_result(freeze_result result);
#endif
  void post_vthread_pinned_event(EventVirtualThreadPinned* event, const char* op, freeze_result result) NOT_JFR_RETURN();


  // This is only for use by JVMTI RawMonitorWait. It emulates the actions of
  // the Java code in Object::wait which are not present in RawMonitorWait.
  bool get_and_clear_interrupted();

private:
  LockStack _lock_stack;
  OMCache _om_cache;

public:

src/hotspot/share/runtime/objectMonitor.cpp:

  assert(!has_owner(current), "must be");
  assert(cm._monitor == this, "must be");
  assert(!is_being_async_deflated(), "must be");

  JFR_ONLY(JfrConditionalFlush<EventJavaMonitorEnter> flush(current);)
  EventJavaMonitorEnter enter_event;
  if (enter_event.is_started()) {
    enter_event.set_monitorClass(object()->klass());
    // Set an address that is 'unique enough', such that events close in
    // time and with the same address are likely (but not guaranteed) to
    // belong to the same object.
    enter_event.set_address((uintptr_t)this);
  }
  EventVirtualThreadPinned vthread_pinned_event;

  freeze_result result;

  assert(current->current_pending_monitor() == nullptr, "invariant");

  ContinuationEntry* ce = current->last_continuation();
  bool is_virtual = ce != nullptr && ce->is_virtual_thread();
  if (is_virtual) {
    notify_contended_enter(current);
    result = Continuation::try_preempt(current, ce->cont_oop(current));
    if (result == freeze_ok) {

src/hotspot/share/runtime/objectMonitor.cpp:

// -----------------------------------------------------------------------------
// Wait/Notify/NotifyAll
//
// Note: a subset of changes to ObjectMonitor::wait()
// will need to be replicated in complete_exit
void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) {
  JavaThread* current = THREAD;

  assert(InitDone, "Unexpectedly not initialized");

  CHECK_OWNER();  // Throws IMSE if not owner.

  EventJavaMonitorWait wait_event;
  EventVirtualThreadPinned vthread_pinned_event;

  // check for a pending interrupt
  if (interruptible && current->is_interrupted(true) && !HAS_PENDING_EXCEPTION) {
    JavaThreadInObjectWaitState jtiows(current, millis != 0, interruptible);

    if (JvmtiExport::should_post_monitor_wait()) {
      JvmtiExport::post_monitor_wait(current, object(), millis);
    }
    // post monitor waited event.  Note that this is past-tense, we are done waiting.
    if (JvmtiExport::should_post_monitor_waited()) {
      // Note: 'false' parameter is passed here because the

Configuration enabled stackTrace threshold
default true true 20 ms
profiling true true 20 ms

Field Type Description
blockingOperation string 24+ Blocking Operation
pinnedReason string 24+ Pinned Reason
carrierThread Thread 24+ Carrier Thread Consider contributing a description to jfreventcollector.

ObjectAllocationInNewTLAB

startTime eventThread stackTrace 11 17 21 25 26

Category: Java Application

Allocation in new Thread Local Allocation Buffer

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/allocTracer.cpp:

void AllocTracer::send_allocation_outside_tlab(Klass* klass, HeapWord* obj, size_t alloc_size, JavaThread* thread) {
  JFR_ONLY(JfrAllocationTracer tracer(klass, obj, alloc_size, true, thread);)
  EventObjectAllocationOutsideTLAB event;
  if (event.should_commit()) {
    event.set_objectClass(klass);
    event.set_allocationSize(alloc_size);
    event.commit();
  }
}

void AllocTracer::send_allocation_in_new_tlab(Klass* klass, HeapWord* obj, size_t tlab_size, size_t alloc_size, JavaThread* thread) {
  JFR_ONLY(JfrAllocationTracer tracer(klass, obj, alloc_size, false, thread);)
  EventObjectAllocationInNewTLAB event;
  if (event.should_commit()) {
    event.set_objectClass(klass);
    event.set_allocationSize(alloc_size);
    event.set_tlabSize(tlab_size);
    event.commit();
  }
}

void AllocTracer::send_allocation_requiring_gc_event(size_t size, uint gcId) {
  EventAllocationRequiringGC event;
  if (event.should_commit()) {

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
objectClass Class Object Class Class of allocated object
allocationSize ulong: bytes Allocation Size
tlabSize ulong: bytes TLAB Size

Examples 3
allocationSize ulong: bytes
24
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
24
name string
java/util/concurrent/ConcurrentHashMap$MapEntry
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
37
lineNumber int
3505
method Method
descriptor string
()Ljava/util/Map$Entry;
hidden boolean
false
modifiers int
17
name string
next
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
24
name string
java/util/concurrent/ConcurrentHashMap$EntryIterator
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
type FrameType
Inlined
truncated boolean
false
startTime long: millis
199167119916
tlabSize ulong: bytes
3096
allocationSize ulong: bytes
16
objectClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
17
name string
scala/runtime/ObjectRef
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/runtime
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
23
method Method
descriptor string
(Ljava/lang/Object;)Lscala/runtime/ObjectRef;
hidden boolean
false
modifiers int
9
name string
create
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
17
name string
scala/runtime/ObjectRef
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/runtime
type FrameType
Inlined
truncated boolean
false
startTime long: millis
230286350917
tlabSize ulong: bytes
1132008
allocationSize ulong: bytes
56
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[F
package Package
null
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
2
lineNumber int
78
method Method
descriptor string
(Ljava/lang/Class;I)Ljava/lang/Object;
hidden boolean
false
modifiers int
9
name string
newInstance
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
java/lang/reflect/Array
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang/reflect
type FrameType
Inlined
truncated boolean
true
startTime long: millis
242397653083
tlabSize ulong: bytes
472888

ObjectAllocationOutsideTLAB

startTime eventThread stackTrace 11 17 21 25 26

Category: Java Application

Allocation outside Thread Local Allocation Buffers

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/gc/shared/allocTracer.cpp:

#if INCLUDE_JFR
#include "jfr/support/jfrAllocationTracer.hpp"
#endif

void AllocTracer::send_allocation_outside_tlab(Klass* klass, HeapWord* obj, size_t alloc_size, JavaThread* thread) {
  JFR_ONLY(JfrAllocationTracer tracer(klass, obj, alloc_size, true, thread);)
  EventObjectAllocationOutsideTLAB event;
  if (event.should_commit()) {
    event.set_objectClass(klass);
    event.set_allocationSize(alloc_size);
    event.commit();
  }
}

void AllocTracer::send_allocation_in_new_tlab(Klass* klass, HeapWord* obj, size_t tlab_size, size_t alloc_size, JavaThread* thread) {
  JFR_ONLY(JfrAllocationTracer tracer(klass, obj, alloc_size, false, thread);)
  EventObjectAllocationInNewTLAB event;
  if (event.should_commit()) {
    event.set_objectClass(klass);
    event.set_allocationSize(alloc_size);

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
objectClass Class Object Class Class of allocated object
allocationSize ulong: bytes Allocation Size

Examples 3
allocationSize ulong: bytes
8656
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[B
package Package
null
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
15
lineNumber int
3541
method Method
descriptor string
([BI)[B
hidden boolean
false
modifiers int
9
name string
copyOf
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
java/util/Arrays
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util
type FrameType
JIT compiled
truncated boolean
false
startTime long: millis
199826386541
allocationSize ulong: bytes
4336
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[B
package Package
null
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
15
lineNumber int
3541
method Method
descriptor string
([BI)[B
hidden boolean
false
modifiers int
9
name string
copyOf
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
java/util/Arrays
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util
type FrameType
JIT compiled
truncated boolean
false
startTime long: millis
237796806000
allocationSize ulong: bytes
136
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
sun/nio/fs/UnixFileAttributes
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
sun/nio/fs
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
0
lineNumber int
74
method Method
descriptor string
(Lsun/nio/fs/UnixPath;Z)Lsun/nio/fs/UnixFileAttributes;
hidden boolean
false
modifiers int
8
name string
get
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
sun/nio/fs/UnixFileAttributes
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
sun/nio/fs
type FrameType
JIT compiled
truncated boolean
false
startTime long: millis
237255380458

ObjectAllocationSample

throttle default profiling startTime eventThread stackTrace 16 17 21 25 26

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/support/jfrAllocationTracer.cpp:

JfrAllocationTracer::JfrAllocationTracer(const Klass* klass, HeapWord* obj, size_t alloc_size, bool outside_tlab, JavaThread* thread) {
  if (LeakProfiler::is_running()) {
    LeakProfiler::sample(obj, alloc_size, thread);
  }
  if (EventObjectAllocationSample::is_enabled()) {
    JfrObjectAllocationSample::send_event(klass, alloc_size, outside_tlab, thread);
  }
}

src/hotspot/share/jfr/support/jfrObjectAllocationSample.cpp:

inline bool send_allocation_sample(const Klass* klass, int64_t allocated_bytes, JfrThreadLocal* tl) {
  EventObjectAllocationSample event;
  if (event.should_commit()) {
    const int64_t weight = allocated_bytes - tl->last_allocated_bytes();
    assert(weight > 0, "invariant");
    event.set_objectClass(klass);
    event.set_weight(weight);
    event.commit();
    tl->set_last_allocated_bytes(allocated_bytes);
    return true;
  }
  return false;
}

inline int64_t estimate_tlab_size_bytes(JavaThread* jt) {
  const size_t desired_tlab_size_bytes = jt->tlab().desired_size() * HeapWordSize;
  const size_t alignment_reserve_bytes = jt->tlab().alignment_reserve_in_bytes();

Configuration enabled stackTrace throttle
default true true 150/s
profiling true true 300/s

Field Type Description
objectClass Class Object Class Class of allocated object
weight long: bytes Sample Weight The relative weight of the sample. Aggregating the weights for a large number of samples, for a particular class, thread or stack trace, gives a statistically accurate representation of the allocation pressure

Examples 3
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
jdk/jfr/events/InitialSecurityPropertyEvent
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/jdk.jfr
name string
jdk.jfr
version string
21.0.7
name string
jdk/jfr/events
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
42
lineNumber int
314
method Method
descriptor string
()V
hidden boolean
false
modifiers int
10
name string
emitInitialSecurityProperties
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
jdk/jfr/internal/instrument/JDKEvents
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/jdk.jfr
name string
jdk.jfr
version string
21.0.7
name string
jdk/jfr/internal/instrument
type FrameType
Interpreted
truncated boolean
false
startTime long: millis
199167151125
weight long: bytes
2056
objectClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[S
package Package
null
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
38
lineNumber int
33
method Method
descriptor string
([BII[BII)I
hidden boolean
false
modifiers int
8
name string
compress64k
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
16
name string
net/jpountz/lz4/LZ4JavaUnsafeCompressor
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
net/jpountz/lz4
type FrameType
JIT compiled
truncated boolean
false
startTime long: millis
237763987667
weight long: bytes
1850656
objectClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
true
modifiers int
4112
name string
org.apache.spark.ContextCleaner$$Lambda+0x0000007005dc8000/1321336068
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark
stackTrace StackTrace
frames StackFrame
bytecodeIndex int
12
lineNumber int
501
method Method
descriptor string
(Ljava/lang/Object;)Ljava/lang/Object;
hidden boolean
false
modifiers int
8
name string
allocateInstance
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
java/lang/invoke/DirectMethodHandle
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang/invoke
type FrameType
Inlined
truncated boolean
false
startTime long: millis
230267695417
weight long: bytes
1704

MethodTrace

default profiling startTime duration eventThread stackTrace 25 26

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        jdk.internal.event.SecurityProviderServiceEvent.class,
        jdk.internal.event.SerializationMisdeclarationEvent.class,
        jdk.internal.event.SocketReadEvent.class,
        jdk.internal.event.SocketWriteEvent.class,
        jdk.internal.event.ThreadSleepEvent.class,
        jdk.internal.event.TLSHandshakeEvent.class,
        jdk.internal.event.VirtualThreadStartEvent.class,
        jdk.internal.event.VirtualThreadEndEvent.class,
        jdk.internal.event.VirtualThreadSubmitFailedEvent.class,
        jdk.internal.event.X509CertificateEvent.class,
        jdk.internal.event.X509ValidationEvent.class,
        DirectBufferStatisticsEvent.class,
        InitialSecurityPropertyEvent.class,
        MethodTraceEvent.class,
        MethodTimingEvent.class,
    };

    private static final Runnable emitExceptionStatistics = JDKEvents::emitExceptionStatistics;
    private static final Runnable emitDirectBufferStatistics = JDKEvents::emitDirectBufferStatistics;
    private static final Runnable emitContainerConfiguration = JDKEvents::emitContainerConfiguration;
    private static final Runnable emitContainerCPUUsage = JDKEvents::emitContainerCPUUsage;
    private static final Runnable emitContainerCPUThrottling = JDKEvents::emitContainerCPUThrottling;
    private static final Runnable emitContainerMemoryUsage = JDKEvents::emitContainerMemoryUsage;
    private static final Runnable emitContainerIOUsage = JDKEvents::emitContainerIOUsage;
    private static final Runnable emitInitialSecurityProperties = JDKEvents::emitInitialSecurityProperties;

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        jdk.internal.event.SecurityProviderServiceEvent.class,
        jdk.internal.event.SerializationMisdeclarationEvent.class,
        jdk.internal.event.SocketReadEvent.class,
        jdk.internal.event.SocketWriteEvent.class,
        jdk.internal.event.ThreadSleepEvent.class,
        jdk.internal.event.TLSHandshakeEvent.class,
        jdk.internal.event.VirtualThreadStartEvent.class,
        jdk.internal.event.VirtualThreadEndEvent.class,
        jdk.internal.event.VirtualThreadSubmitFailedEvent.class,
        jdk.internal.event.X509CertificateEvent.class,
        jdk.internal.event.X509ValidationEvent.class,
        DirectBufferStatisticsEvent.class,
        InitialSecurityPropertyEvent.class,
        MethodTraceEvent.class,
        MethodTimingEvent.class,
    };

    private static final Runnable emitExceptionStatistics = JDKEvents::emitExceptionStatistics;
    private static final Runnable emitDirectBufferStatistics = JDKEvents::emitDirectBufferStatistics;
    private static final Runnable emitContainerConfiguration = JDKEvents::emitContainerConfiguration;
    private static final Runnable emitContainerCPUUsage = JDKEvents::emitContainerCPUUsage;
    private static final Runnable emitContainerCPUThrottling = JDKEvents::emitContainerCPUThrottling;
    private static final Runnable emitContainerMemoryUsage = JDKEvents::emitContainerMemoryUsage;
    private static final Runnable emitContainerIOUsage = JDKEvents::emitContainerIOUsage;
    private static final Runnable emitInitialSecurityProperties = JDKEvents::emitInitialSecurityProperties;

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void traceObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }

    public static void timingObjectInit(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void traceTimingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void trace(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }

    public static void timing(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void traceObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }

    public static void timingObjectInit(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void traceTimingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void trace(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }

    public static void timing(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/events/MethodTraceEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Contextual;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.StackTrace;

@Name("jdk.MethodTrace")
@Label("Method Trace")
@Category({ "Java Virtual Machine", "Method Tracing" })
@StackTrace(true)
public final class MethodTraceEvent extends AbstractJDKEvent {

    @Contextual
    @Label("Method")
    private long method;

    public static void commit(long start, long duration, long method) {
        // Generated by JFR
    }

    public static long timestamp() {
        // Generated by JFR
        return 0;

src/jdk.jfr/share/classes/jdk/jfr/events/MethodTraceEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Contextual;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.StackTrace;

@Name("jdk.MethodTrace")
@Label("Method Trace")
@Category({ "Java Virtual Machine", "Method Tracing" })
@StackTrace(true)
public final class MethodTraceEvent extends AbstractJDKEvent {

    @Contextual
    @Label("Method")
    private long method;

    public static void commit(long start, long duration, long method) {
        // Generated by JFR
    }

    public static long timestamp() {
        // Generated by JFR
        return 0;

Configuration enabled filter stackTrace threshold
default true null true 0 ms
profiling true null true 0 ms

Field Type Description
method Method Method Consider contributing a description to jfreventcollector.

MethodTiming

default profiling startTime every chunk 25 26

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        jdk.internal.event.VirtualThreadStartEvent.class,
        jdk.internal.event.VirtualThreadEndEvent.class,
        jdk.internal.event.VirtualThreadSubmitFailedEvent.class,
        jdk.internal.event.X509CertificateEvent.class,
        jdk.internal.event.X509ValidationEvent.class,
        DirectBufferStatisticsEvent.class,
        InitialSecurityPropertyEvent.class,
        MethodTraceEvent.class,
        MethodTimingEvent.class,
    };

    private static final Runnable emitExceptionStatistics = JDKEvents::emitExceptionStatistics;
    private static final Runnable emitDirectBufferStatistics = JDKEvents::emitDirectBufferStatistics;
    private static final Runnable emitContainerConfiguration = JDKEvents::emitContainerConfiguration;
    private static final Runnable emitContainerCPUUsage = JDKEvents::emitContainerCPUUsage;
    private static final Runnable emitContainerCPUThrottling = JDKEvents::emitContainerCPUThrottling;

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        try {
            if (initializationTriggered == false) {
                for (Class<?> eventClass : eventClasses) {
                    MetadataRepository.getInstance().register((Class<? extends Event>) eventClass);
                }
                PeriodicEvents.addJavaEvent(jdk.internal.event.ExceptionStatisticsEvent.class, emitExceptionStatistics);
                PeriodicEvents.addJavaEvent(DirectBufferStatisticsEvent.class, emitDirectBufferStatistics);
                PeriodicEvents.addJavaEvent(InitialSecurityPropertyEvent.class, emitInitialSecurityProperties);
                PeriodicEvents.addJavaEvent(MethodTimingEvent.class, emitMethodTiming);

                initializeContainerEvents();
                JFRTracing.enable();
                initializationTriggered = true;
            }
        } catch (Exception e) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.WARN, "Could not initialize JDK events. " + e.getMessage());

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

            for (String key : p.stringPropertyNames()) {
                InitialSecurityPropertyEvent e = new InitialSecurityPropertyEvent();
                e.key = key;
                e.value = p.getProperty(key);
                e.commit();
            }
        }
    }

    private static void emitMethodTiming() {
        if (MethodSetting.isInitialized() && MethodTimingEvent.enabled()) {
            PlatformTracer.emitTiming();
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        jdk.internal.event.VirtualThreadStartEvent.class,
        jdk.internal.event.VirtualThreadEndEvent.class,
        jdk.internal.event.VirtualThreadSubmitFailedEvent.class,
        jdk.internal.event.X509CertificateEvent.class,
        jdk.internal.event.X509ValidationEvent.class,
        DirectBufferStatisticsEvent.class,
        InitialSecurityPropertyEvent.class,
        MethodTraceEvent.class,
        MethodTimingEvent.class,
    };

    private static final Runnable emitExceptionStatistics = JDKEvents::emitExceptionStatistics;
    private static final Runnable emitDirectBufferStatistics = JDKEvents::emitDirectBufferStatistics;
    private static final Runnable emitContainerConfiguration = JDKEvents::emitContainerConfiguration;
    private static final Runnable emitContainerCPUUsage = JDKEvents::emitContainerCPUUsage;
    private static final Runnable emitContainerCPUThrottling = JDKEvents::emitContainerCPUThrottling;

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        try {
            if (initializationTriggered == false) {
                for (Class<?> eventClass : eventClasses) {
                    MetadataRepository.getInstance().register((Class<? extends Event>) eventClass);
                }
                PeriodicEvents.addJavaEvent(jdk.internal.event.ExceptionStatisticsEvent.class, emitExceptionStatistics);
                PeriodicEvents.addJavaEvent(DirectBufferStatisticsEvent.class, emitDirectBufferStatistics);
                PeriodicEvents.addJavaEvent(InitialSecurityPropertyEvent.class, emitInitialSecurityProperties);
                PeriodicEvents.addJavaEvent(MethodTimingEvent.class, emitMethodTiming);

                initializeContainerEvents();
                JFRTracing.enable();
                initializationTriggered = true;
            }
        } catch (Exception e) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.WARN, "Could not initialize JDK events. " + e.getMessage());

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

            for (String key : p.stringPropertyNames()) {
                InitialSecurityPropertyEvent e = new InitialSecurityPropertyEvent();
                e.key = key;
                e.value = p.getProperty(key);
                e.commit();
            }
        }
    }

    private static void emitMethodTiming() {
        if (MethodSetting.isInitialized() && MethodTimingEvent.enabled()) {
            PlatformTracer.emitTiming();
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/internal/tracing/PlatformTracer.java:

        s.append(message);
        s.append(" for ");
        s.append(className.replace("/", "."));
        s.append(" in module ");
        s.append(module.getName());
        s.append(" and class loader " + module.getClassLoader());
        Logger.log(LogTag.JFR_METHODTRACE, level, s.toString());
    }

    public static void emitTiming() {
        // Metadata lock prevents rotation/flush while emitting events.
        synchronized (MetadataRepository.getInstance()) {
            removeClasses(JVM.drainStaleMethodTracerIds());
            long timestamp = MethodTimingEvent.timestamp();
            for (var tc : timedClasses.values()) {
                tc.emit(timestamp);
            }
        }
    }

    public static void addObjectTiming(long duration) {
        OBJECT.invocations().getAndIncrement();
        OBJECT.time().addAndGet(duration);
        OBJECT.updateMinMax(duration);
    }

src/jdk.jfr/share/classes/jdk/jfr/internal/tracing/PlatformTracer.java:

        s.append(message);
        s.append(" for ");
        s.append(className.replace("/", "."));
        s.append(" in module ");
        s.append(module.getName());
        s.append(" and class loader " + module.getClassLoader());
        Logger.log(LogTag.JFR_METHODTRACE, level, s.toString());
    }

    public static void emitTiming() {
        // Metadata lock prevents rotation/flush while emitting events.
        synchronized (MetadataRepository.getInstance()) {
            removeClasses(JVM.drainStaleMethodTracerIds());
            long timestamp = MethodTimingEvent.timestamp();
            for (var tc : timedClasses.values()) {
                tc.emit(timestamp);
            }
        }
    }

    public static void addObjectTiming(long duration) {
        OBJECT.invocations().getAndIncrement();
        OBJECT.time().addAndGet(duration);
        OBJECT.updateMinMax(duration);
    }

src/jdk.jfr/share/classes/jdk/jfr/internal/tracing/TimedClass.java:

    public void emit(long timestamp) {
        for (var tm : methods.values()) {
            if (tm.published().get()) {
                long methodId = tm.method().methodId();
                long invocations = tm.invocations().get();
                long time = tm.time().get();
                long min = tm.minimum().get();
                long max = tm.maximum().get();
                if (time == 0 || invocations == 0) {
                    // If time is zero, it's a low resolution clock and more invocations are needed.
                    MethodTimingEvent.commit(timestamp, methodId, invocations, MISSING, MISSING, MISSING);
                } else {
                    long average = (time + invocations / 2) / invocations;
                    if (min == Long.MAX_VALUE) {
                        min = average;
                    }
                    if (max == Long.MIN_VALUE) {
                        max = average;
                    }
                    min = Math.min(min, average);
                    max = Math.max(max, average);
                    MethodTimingEvent.commit(timestamp, methodId, invocations, min, average, max);
                }
                tm.method().log("Emitted event");
            }
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/internal/tracing/TimedClass.java:

    public void emit(long timestamp) {
        for (var tm : methods.values()) {
            if (tm.published().get()) {
                long methodId = tm.method().methodId();
                long invocations = tm.invocations().get();
                long time = tm.time().get();
                long min = tm.minimum().get();
                long max = tm.maximum().get();
                if (time == 0 || invocations == 0) {
                    // If time is zero, it's a low resolution clock and more invocations are needed.
                    MethodTimingEvent.commit(timestamp, methodId, invocations, MISSING, MISSING, MISSING);
                } else {
                    long average = (time + invocations / 2) / invocations;
                    if (min == Long.MAX_VALUE) {
                        min = average;
                    }
                    if (max == Long.MIN_VALUE) {
                        max = average;
                    }
                    min = Math.min(min, average);
                    max = Math.max(max, average);
                    MethodTimingEvent.commit(timestamp, methodId, invocations, min, average, max);
                }
                tm.method().log("Emitted event");
            }
        }
    }
}

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void timingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }
    }

    public static void traceTimingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }
    }

    public static void trace(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void timing(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
    }

    public static void traceTiming(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void timingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }
    }

    public static void traceTimingObjectInit(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addObjectTiming(duration);
        }
    }

    public static void trace(long startTime, long methodId) {

src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java:

    public static void timing(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
    }

    public static void traceTiming(long startTime, long methodId) {
        long endTime = JVM.counterTime();
        long duration = endTime - startTime;
        if (MethodTimingEvent.enabled()) {
            PlatformTracer.addTiming(methodId, duration);
        }
        if (MethodTraceEvent.shouldCommit(duration)) {
            MethodTraceEvent.commit(startTime, duration, methodId);
        }

src/jdk.jfr/share/classes/jdk/jfr/events/MethodTimingEvent.java:

@Name("jdk.MethodTiming")
@Label("Method Timing")
@Category({ "Java Virtual Machine", "Method Tracing" })
@RemoveFields({ "duration", "eventThread", "stackTrace" })
@Description("Measures the approximate time it takes for a method to execute, including all delays, not just CPU processing time")
public final class MethodTimingEvent extends AbstractJDKEvent {

    @Label("Method")
    public long method;

    @Label("Invocations")
    public long invocations;

    @Label("Minimum Time")
    @Description("The value may be missing (Long.MIN_VALUE) if the clock-resolution is too low to establish a minimum time")
    @Timespan(Timespan.TICKS)
    public long minimum;

src/jdk.jfr/share/classes/jdk/jfr/events/MethodTimingEvent.java:

@Name("jdk.MethodTiming")
@Label("Method Timing")
@Category({ "Java Virtual Machine", "Method Tracing" })
@RemoveFields({ "duration", "eventThread", "stackTrace" })
@Description("Measures the approximate time it takes for a method to execute, including all delays, not just CPU processing time")
public final class MethodTimingEvent extends AbstractJDKEvent {

    @Label("Method")
    public long method;

    @Label("Invocations")
    public long invocations;

    @Label("Minimum Time")
    @Description("The value may be missing (Long.MIN_VALUE) if the clock-resolution is too low to establish a minimum time")
    @Timespan(Timespan.TICKS)
    public long minimum;

Configuration enabled filter period
default true null endChunk
profiling true null endChunk

Field Type Description
method Method Method Consider contributing a description to jfreventcollector.
invocations long Invocations The number of times the method was invoked
minimum Tickspan Minimum An approximation of the minimum wall-clock time it took for the method to execute
average Tickspan Average An approximation of the average wall-clock time it took for the method to execute
maximum Tickspan Maximum An approximation of the maximum wall-clock time it took for the method to execute

JavaErrorThrow

default profiling startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ErrorThrownEvent.java

Category: Java Application

An object derived from java.lang.Error has been created. OutOfMemoryErrors are ignored

Configuration enabled stackTrace
default true true
profiling true true

Field Type Description
message string Message Consider contributing a description to jfreventcollector.
thrownClass Class Class Consider contributing a description to jfreventcollector.

Examples 3
message string
static Lorg/apache/spark/storage/BroadcastBlockId;.<clinit>()V
startTime long: millis
253197294167
thrownClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/lang/NoSuchMethodError
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
message string
static Lorg/apache/spark/ml/PipelineStage;.<clinit>()V
startTime long: millis
273981259792
thrownClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/lang/NoSuchMethodError
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
message string
static Lorg/apache/spark/sql/catalyst/expressions/AttributeReference;.<clinit>()V
startTime long: millis
233050814500
thrownClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/lang/NoSuchMethodError
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang

JavaExceptionThrow

throttle default profiling startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionThrownEvent.java

Category: Java Application

An object derived from java.lang.Exception has been created

Configuration enabled stackTrace throttle
default true true 100/s 25+
profiling true true 300/s 25+

Field Type Description
message string Message Consider contributing a description to jfreventcollector.
thrownClass Class Class Consider contributing a description to jfreventcollector.

Examples 3
message string
null
startTime long: millis
230287741917
thrownClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
scala/runtime/NonLocalReturnControl
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
scala/runtime
message string
null
startTime long: millis
237739069500
thrownClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/io/EOFException
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/io
message string
null
startTime long: millis
198731549125
thrownClass Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/io/EOFException
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/io

FileForce

default profiling startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/FileForceEvent.java

Category: Java Application

Force updates to be written to file

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java:

    private void implForce(boolean metaData) throws IOException {
        try {
            begin();
            nd.force(fdObj, metaData);
        } finally {
            end();
        }
    }

    @Override
    public void force(boolean metaData) throws IOException {
        if (!FileForceEvent.enabled()) {
            implForce(metaData);
            return;
        }
        long start = FileForceEvent.timestamp();
        implForce(metaData);
        FileForceEvent.offer(start, path, metaData);
    }

    // -- file locking --

    /**
     * Task that initiates locking operation and handles completion result.
     */
    private class LockTask<A> implements Runnable, Iocp.ResultHandler {
        private final long position;
        private final FileLockImpl fli;
        private final PendingFuture<FileLock,A> result;

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

                } finally {
                    Blocker.end(attempted);
                }
            } while ((rv == IOStatus.INTERRUPTED) && isOpen());
        } finally {
            threads.remove(ti);
            endBlocking(rv > -1);
            assert IOStatus.check(rv);
        }
    }

    @Override
    public void force(boolean metaData) throws IOException {
        if (!FileForceEvent.enabled()) {
            implForce(metaData);
            return;
        }
        long start = FileForceEvent.timestamp();
        implForce(metaData);
        FileForceEvent.offer(start, path, metaData);
    }

    // Assume at first that the underlying kernel supports sendfile/equivalent;
    // set this to true if we find out later that it doesn't
    //
    private static volatile boolean transferToDirectNotSupported;

    // Assume at first that the underlying kernel supports copy_file_range/equivalent;
    // set this to true if we find out later that it doesn't
    //
    private static volatile boolean transferFromDirectNotSupported;

src/java.base/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java:

                do {
                    n = nd.force(fdObj, metaData);
                } while ((n == IOStatus.INTERRUPTED) && isOpen());
            } finally {
                end(n >= 0);
            }
        } finally {
            threads.remove(ti);
        }
    }

    @Override
    public void force(boolean metaData) throws IOException {
        if (!FileForceEvent.enabled()) {
            implForce(metaData);
            return;
        }
        long start = FileForceEvent.timestamp();
        implForce(metaData);
        FileForceEvent.offer(start, path, metaData);
    }

    @Override
    <A> Future<FileLock> implLock(final long position,
                                  final long size,
                                  final boolean shared,
                                  final A attachment,
                                  final CompletionHandler<FileLock,? super A> handler)
    {
        if (shared && !reading)
            throw new NonReadableChannelException();

src/java.base/share/classes/jdk/internal/event/FileForceEvent.java:

package jdk.internal.event;

/**
 * A JFR event for forced updates written to files.  This event is mirrored in
 * {@code jdk.jfr.events.FileForceEvent } where the event annotations are
 * provided.  Some of the methods are replaced by generated
 * methods when jfr is enabled.  Note that the order of the arguments of the
 * {@link #commit(long, long, String, boolean)} method
 * must be the same as the order of the fields.
 */
public class FileForceEvent extends Event {

    // THE ORDER OF THE FOLLOWING FIELDS IS IMPORTANT!
    // The order must match the argument order of the generated commit method.
    public String path;
    public boolean metaData;

    /**
     * Helper method to offer the data needed to potentially commit an event.
     * The duration of the operation is computed using the current
     * timestamp and the given start time.  If the duration is meets
     * or exceeds the configured value (determined by calling the generated method
     * {@link #shouldCommit(long)}), an event will be emitted by calling
     * {@link #commit(long, long, String, boolean)}.

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

/**
 * This class registers all mirror events.
 */
final class MirrorEvents {
    private static final Map<String, Class<? extends MirrorEvent>> mirrorLookup = new ConcurrentHashMap<>();

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);

src/jdk.jfr/share/classes/jdk/jfr/events/FileForceEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Description;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "FileForce")
@Label("File Force")
@Category("Java Application")
@Description("Force updates to be written to file")
public final class FileForceEvent extends MirrorEvent {

    // The order of these fields must be the same as the parameters in
    // commit(..., String, boolean)

    @Label("Path")
    @Description("Full path of the file")
    public String path;

    @Label("Update Metadata")
    @Description("Whether the file metadata is updated")
    public boolean metaData;

Configuration enabled stackTrace threshold
default true true 20 ms
profiling true true 10 ms

Field Type Description
path string Path Full path of the file
metaData boolean Update Metadata Whether the file metadata is updated

FileRead

throttle default profiling startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/FileReadEvent.java

Category: Java Application

Excludes in stack trace: java.nio.channels.FileChannel, java.io.DataInputStream, java.io.FileInputStream, java.io.InputStream, java.io.RandomAccessFile, sun.nio.ch.ChannelInputStream, sun.nio.ch.FileChannelImpl

Appearing in: G1GC, SerialGC

Missing in: ParallelGC, ShenandoahGC, ZGC

Reading data from a file

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/io/FileInputStream.java:

     * @return     the next byte of data, or {@code -1} if the end of the
     *             file is reached.
     * @throws     IOException {@inheritDoc}
     */
    @Override
    public int read() throws IOException {
        if (jfrTracing && FileReadEvent.enabled()) {
            return traceRead0();
        }
        return read0();
    }

src/java.base/share/classes/java/io/FileInputStream.java:

    private native int read0() throws IOException;

    private int traceRead0() throws IOException {
        int result = 0;
        long bytesRead = 0;
        long start = FileReadEvent.timestamp();
        try {
            result = read0();
            if (result < 0) {
                bytesRead = -1;
            } else {
                bytesRead = 1;
            }
        } finally {
            FileReadEvent.offer(start, path, bytesRead);
        }
        return result;
    }

src/java.base/share/classes/java/io/FileInputStream.java:

     * @throws    IOException If an I/O error has occurred.
     */
    private native int readBytes(byte[] b, int off, int len) throws IOException;

    private int traceReadBytes(byte b[], int off, int len) throws IOException {
        int bytesRead = 0;
        long start = FileReadEvent.timestamp();
        try {
            bytesRead = readBytes(b, off, len);
        } finally {
            FileReadEvent.offer(start, path, bytesRead);
        }
        return bytesRead;
    }

src/java.base/share/classes/java/io/FileInputStream.java:

     *             {@code -1} if there is no more data because the end of
     *             the file has been reached.
     * @throws     IOException  if an I/O error occurs.
     */
    @Override
    public int read(byte[] b) throws IOException {
        if (jfrTracing && FileReadEvent.enabled()) {
            return traceReadBytes(b, 0, b.length);
        }
        return readBytes(b, 0, b.length);
    }

src/java.base/share/classes/java/io/FileInputStream.java:

     * @throws     NullPointerException {@inheritDoc}
     * @throws     IndexOutOfBoundsException {@inheritDoc}
     * @throws     IOException  if an I/O error occurs.
     */
    @Override
    public int read(byte[] b, int off, int len) throws IOException {
        if (jfrTracing && FileReadEvent.enabled()) {
            return traceReadBytes(b, off, len);
        }
        return readBytes(b, off, len);
    }

src/java.base/share/classes/java/io/RandomAccessFile.java:

     *             file has been reached.
     * @throws     IOException  if an I/O error occurs. Not thrown if
     *                          end-of-file has been reached.
     */
    public int read() throws IOException {
        if (jfrTracing && FileReadEvent.enabled()) {
            return traceRead0();
        }
        return read0();

src/java.base/share/classes/java/io/RandomAccessFile.java:

    private native int read0() throws IOException;

    private int traceRead0() throws IOException {
        int result = 0;
        long bytesRead = 0;
        long start = FileReadEvent.timestamp();
        try {
            result = read0();
            if (result < 0) {

src/java.base/share/classes/java/io/RandomAccessFile.java:

                bytesRead = -1;
            } else {
                bytesRead = 1;
            }
        } finally {
            FileReadEvent.offer(start, path, bytesRead);
        }
        return result;
    }

src/java.base/share/classes/java/io/RandomAccessFile.java:

     * @param     off the start offset of the data.
     * @param     len the number of bytes to read.
     * @throws    IOException If an I/O error has occurred.
     */
    private int readBytes(byte[] b, int off, int len) throws IOException {
        if (jfrTracing && FileReadEvent.enabled()) {
            return traceReadBytes0(b, off, len);
        }
        return readBytes0(b, off, len);

src/java.base/share/classes/java/io/RandomAccessFile.java:

    private native int readBytes0(byte[] b, int off, int len) throws IOException;

    private int traceReadBytes0(byte b[], int off, int len) throws IOException {
        int bytesRead = 0;
        long start = FileReadEvent.timestamp();
        try {
            bytesRead = readBytes0(b, off, len);
        } finally {
            FileReadEvent.offer(start, path, bytesRead);
        }
        return bytesRead;
    }

src/java.base/share/classes/java/io/RandomAccessFile.java:

     *             of file is encountered before even one byte is read.
     * @throws     IOException  if an I/O error occurs.
     */

    public final String readLine() throws IOException {
        if (jfrTracing && FileReadEvent.enabled()) {
            long bytesRead = 0;
            long start = FileReadEvent.timestamp();
            try {
                String result = implReadLine();
                bytesRead = result == null ? 0 : result.length();
                return result;
            } finally {
                FileReadEvent.offer(start, path, bytesRead);
            }
        }
        return implReadLine();

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

    @Override
    public int read(ByteBuffer dst) throws IOException {
        if (jfrTracing && FileReadEvent.enabled()) {
            return traceImplRead(dst);
        }
        return implRead(dst);

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

    private int traceImplRead(ByteBuffer dst) throws IOException {
        int bytesRead = 0;
        long start = FileReadEvent.timestamp();
        try {
            bytesRead = implRead(dst);
        } finally {
            FileReadEvent.offer(start, path, bytesRead);
        }
        return bytesRead;
    }

    @Override
    public long read(ByteBuffer[] dsts, int offset, int length) throws IOException {
        if (jfrTracing && FileReadEvent.enabled()) {
            return traceImplRead(dsts, offset, length);
        }
        return implRead(dsts, offset, length);

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

    private long traceImplRead(ByteBuffer[] dsts, int offset, int length) throws IOException {
        long bytesRead = 0;
        long start = FileReadEvent.timestamp();
        try {
            bytesRead = implRead(dsts, offset, length);
        } finally {
            FileReadEvent.offer(start, path, bytesRead);
        }
        return bytesRead;
    }

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

    @Override
    public int read(ByteBuffer dst, long position) throws IOException {
        if (jfrTracing && FileReadEvent.enabled()) {
            return traceImplRead(dst, position);
        }
        return implRead(dst, position);

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

    private int traceImplRead(ByteBuffer dst, long position) throws IOException {
        int bytesRead = 0;
        long start = FileReadEvent.timestamp();
        try {
            bytesRead = implRead(dst, position);
        } finally {
            FileReadEvent.offer(start, path, bytesRead);
        }
        return bytesRead;
    }

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

    @Override
    public int write(ByteBuffer src, long position) throws IOException {
        if (jfrTracing && FileReadEvent.enabled()) {
            return traceImplWrite(src, position);
        }
        return implWrite(src, position);

src/java.base/share/classes/jdk/internal/event/FileReadEvent.java:

package jdk.internal.event;

/**
 * Event recording file reads.
 */
public final class FileReadEvent extends Event {

    // The order of these fields must be the same as the parameters in
    // commit(..., String, long, boolean)
    public String path;
    public long bytesRead;
    public boolean endOfFile;

    public static boolean enabled() {
        // Generated by JFR
        return false;
    }

    public static long timestamp() {
        // Generated by JFR
        return 0L;
    }

    public static boolean shouldThrottleCommit(long duration, long end) {
        // Generated by JFR

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

/**
 * This class registers all mirror events.
 */
final class MirrorEvents {
    private static final Map<String, Class<? extends MirrorEvent>> mirrorLookup = new ConcurrentHashMap<>();

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);

src/jdk.jfr/share/classes/jdk/jfr/events/FileReadEvent.java:

@Name(Type.EVENT_NAME_PREFIX + "FileRead")
@Label("File Read")
@Category("Java Application")
@Description("Reading data from a file")
@StackFilter({"java.nio.channels.FileChannel",
              "java.io.DataInputStream",
              "java.io.FileInputStream",
              "java.io.InputStream",
              "java.io.RandomAccessFile",
              "sun.nio.ch.ChannelInputStream",
              "sun.nio.ch.FileChannelImpl"})
@Throttle
public final class FileReadEvent extends MirrorEvent {

    @Label("Path")
    @Description("Full path of the file, or N/A if a file descriptor was used to create the stream, for example System.in")
    public String path;

    @Label("Bytes Read")
    @Description("Number of bytes read from the file (possibly 0)")
    @DataAmount
    public long bytesRead;

    @Label("End of File")

Configuration enabled stackTrace threshold throttle
default true true 1 ms 100/s 25+
profiling true true 1 ms 300/s 25+

Field Type Description
path string Path Full path of the file, or N/A if a file descriptor was used to create the stream, for example System.in
bytesRead long: bytes Bytes Read Number of bytes read from the file (possibly 0)
endOfFile boolean End of File If end of file was reached

Examples 2
bytesRead long: bytes
65536
endOfFile boolean
false
path string
[...]_1/code/experiments/jfreventcollector/harness-130453-1906420335947283803/apache-spark/log-regression/input.txt
startTime long: millis
233899060250
bytesRead long: bytes
65536
endOfFile boolean
false
path string
[...]_1/code/experiments/jfreventcollector/harness-131340-18105539698102044895/apache-spark/log-regression/input.txt
startTime long: millis
273457008792

FileWrite

throttle default profiling startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/FileWriteEvent.java

Category: Java Application

Excludes in stack trace: java.nio.channels.FileChannel, java.io.DataOutputStream, java.io.FileOutputStream, java.io.OutputStream, java.io.RandomAccessFile, sun.nio.ch.ChannelOutputStream, sun.nio.ch.FileChannelImpl

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

Writing data to a file

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/io/FileOutputStream.java:

     *     advances the position to the end of file
     */
    private native void write(int b, boolean append) throws IOException;

    private void traceWrite(int b, boolean append) throws IOException {
        long bytesWritten = 0;
        long start = FileWriteEvent.timestamp();
        try {
            write(b, append);
            bytesWritten = 1;
        } finally {
            FileWriteEvent.offer(start, path, bytesWritten);
        }
    }

    /**

src/java.base/share/classes/java/io/FileOutputStream.java:

     * @param      b   the byte to be written.
     * @throws     IOException  if an I/O error occurs.
     */
    @Override
    public void write(int b) throws IOException {
        boolean append = FD_ACCESS.getAppend(fd);
        if (jfrTracing && FileWriteEvent.enabled()) {
            traceWrite(b, append);
            return;
        }
        write(b, append);

src/java.base/share/classes/java/io/FileOutputStream.java:

     */
    private native void writeBytes(byte[] b, int off, int len, boolean append)
        throws IOException;

    private void traceWriteBytes(byte b[], int off, int len, boolean append) throws IOException {
        long bytesWritten = 0;
        long start = FileWriteEvent.timestamp();
        try {
            writeBytes(b, off, len, append);
            bytesWritten = len;
        } finally {
            FileWriteEvent.offer(start, path, bytesWritten);
        }
    }

    /**

src/java.base/share/classes/java/io/FileOutputStream.java:

     * @param      b   {@inheritDoc}
     * @throws     IOException  {@inheritDoc}
     */
    @Override
    public void write(byte[] b) throws IOException {
        boolean append = FD_ACCESS.getAppend(fd);
        if (jfrTracing && FileWriteEvent.enabled()) {
            traceWriteBytes(b, 0, b.length, append);
            return;
        }
        writeBytes(b, 0, b.length, append);

src/java.base/share/classes/java/io/FileOutputStream.java:

     * @throws     IOException  if an I/O error occurs.
     * @throws     IndexOutOfBoundsException {@inheritDoc}
     */
    @Override
    public void write(byte[] b, int off, int len) throws IOException {
        boolean append = FD_ACCESS.getAppend(fd);
        if (jfrTracing && FileWriteEvent.enabled()) {
            traceWriteBytes(b, off, len, append);
            return;
        }
        writeBytes(b, off, len, append);

src/java.base/share/classes/java/io/RandomAccessFile.java:

     * Writes the specified byte to this file. The write starts at
     * the current file pointer.
     *
     * @param      b   the {@code byte} to be written.
     * @throws     IOException  if an I/O error occurs.
     */
    public void write(int b) throws IOException {
        if (jfrTracing && FileWriteEvent.enabled()) {
            traceImplWrite(b);
            return;
        }
        implWrite(b);
    }

src/java.base/share/classes/java/io/RandomAccessFile.java:

        } finally {
            Blocker.end(attempted);
        }
    }

    private void traceImplWrite(int b) throws IOException {
        long bytesWritten = 0;
        long start = FileWriteEvent.timestamp();
        try {
            implWrite(b);
            bytesWritten = 1;
        } finally {
            FileWriteEvent.offer(start, path, bytesWritten);
        }
    }

    private native void write0(int b) throws IOException;

src/java.base/share/classes/java/io/RandomAccessFile.java:

     *
     * @param     b the data to be written
     * @param     off the start offset in the data
     * @param     len the number of bytes that are written
     * @throws    IOException If an I/O error has occurred.
     */
    private void writeBytes(byte[] b, int off, int len) throws IOException {
        if (jfrTracing && FileWriteEvent.enabled()) {
            traceImplWriteBytes(b, off, len);
            return;
        }
        implWriteBytes(b, off, len);
    }

src/java.base/share/classes/java/io/RandomAccessFile.java:

        } finally {
            Blocker.end(attempted);
        }
    }

    private void traceImplWriteBytes(byte b[], int off, int len) throws IOException {
        long bytesWritten = 0;
        long start = FileWriteEvent.timestamp();
        try {
            implWriteBytes(b, off, len);
            bytesWritten = len;
        } finally {
            FileWriteEvent.offer(start, path, bytesWritten);
        }
    }

    private native void writeBytes0(byte[] b, int off, int len) throws IOException;

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

    @Override
    public int write(ByteBuffer src) throws IOException {
        if (jfrTracing && FileWriteEvent.enabled()) {
            return traceImplWrite(src);
        }
        return implWrite(src);
    }

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

    private int traceImplWrite(ByteBuffer src) throws IOException {
        int bytesWritten = 0;
        long start = FileWriteEvent.timestamp();
        try {
            bytesWritten = implWrite(src);
        } finally {
            FileWriteEvent.offer(start, path, bytesWritten);
        }
        return bytesWritten;
    }

    @Override
    public long write(ByteBuffer[] srcs, int offset, int length) throws IOException {
        if (jfrTracing && FileWriteEvent.enabled()) {
            return traceImplWrite(srcs, offset, length);
        }
        return implWrite(srcs, offset, length);
    }

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

    private long traceImplWrite(ByteBuffer[] srcs, int offset, int length) throws IOException {
        long bytesWritten = 0;
        long start = FileWriteEvent.timestamp();
        try {
            bytesWritten = implWrite(srcs, offset, length);
        } finally {
            FileWriteEvent.offer(start, path, bytesWritten);
        }
        return bytesWritten;
    }

src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java:

    private int traceImplWrite(ByteBuffer src, long position) throws IOException {
        int bytesWritten = 0;
        long start = FileWriteEvent.timestamp();
        try {
            bytesWritten = implWrite(src, position);
        } finally {
            FileWriteEvent.offer(start, path, bytesWritten);
        }
        return bytesWritten;
    }

src/java.base/share/classes/jdk/internal/event/FileWriteEvent.java:

package jdk.internal.event;

/**
 * Event recording file writes.
 */
public final class FileWriteEvent extends Event {

    // The order of these fields must be the same as the parameters in
    // commit(..., String, long)
    public String path;
    public long bytesWritten;

    public static boolean enabled() {
        // Generated by JFR
        return false;
    }

    public static long timestamp() {
        // Generated by JFR
        return 0L;
    }

    public static boolean shouldThrottleCommit(long duration, long end) {
        // Generated by JFR
        return false;

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

/**
 * This class registers all mirror events.
 */
final class MirrorEvents {
    private static final Map<String, Class<? extends MirrorEvent>> mirrorLookup = new ConcurrentHashMap<>();

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);

src/jdk.jfr/share/classes/jdk/jfr/events/FileWriteEvent.java:

@Name(Type.EVENT_NAME_PREFIX + "FileWrite")
@Label("File Write")
@Category("Java Application")
@Description("Writing data to a file")
@StackFilter({"java.nio.channels.FileChannel",
              "java.io.DataOutputStream",
              "java.io.FileOutputStream",
              "java.io.OutputStream",
              "java.io.RandomAccessFile",
              "sun.nio.ch.ChannelOutputStream",
              "sun.nio.ch.FileChannelImpl"})
@Throttle
public final class FileWriteEvent extends MirrorEvent {

    @Label("Path")
    @Description("Full path of the file, or N/A if a file descriptor was used to create the stream, for example System.out and System.err")
    public String path;

    @Label("Bytes Written")
    @Description("Number of bytes written to the file")
    @DataAmount
    public long bytesWritten;
}

Configuration enabled stackTrace threshold throttle
default true true 1 ms 100/s 25+
profiling true true 1 ms 300/s 25+

Field Type Description
path string Path Full path of the file, or N/A if a file descriptor was used to create the stream, for example System.out and System.err
bytesWritten long: bytes Bytes Written Number of bytes written to the file

Examples 1
bytesWritten long: bytes
4356
path string
[...]_1/code/experiments/jfreventcollector/harness-130453-1906420335947283803/apache-spark/log-regression/blockmgr-bce61232-add2-496c-aa06-56d21451dcb8/11/shuffle_2_38_0.data.bf2e661e-20b8-4658-a95e-6c134ddf2977
startTime long: millis
235557301625

SocketRead

throttle default profiling startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java

Category: Java Application

Excludes in stack trace: java.io.InputStream, java.net.Socket$SocketInputStream, java.nio.channels.SocketChannel, sun.nio.ch.SocketInputStream

Appearing in: G1GC, ParallelGC, SerialGC, ZGC

Missing in: ShenandoahGC

Reading data from a socket

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java:

        } finally {
            readLock.unlock();
        }
    }

    @Override
    public int read(ByteBuffer buf) throws IOException {
        if (!SocketReadEvent.enabled()) {
            return implRead(buf);
        }
        long start = SocketReadEvent.timestamp();
        int nbytes = implRead(buf);
        SocketReadEvent.offer(start, nbytes, remoteAddress(), 0);
        return nbytes;
    }


    @Override
    public long read(ByteBuffer[] dsts, int offset, int length)
        throws IOException
    {
        if (!SocketReadEvent.enabled()) {
            return implRead(dsts, offset, length);
        }
        long start = SocketReadEvent.timestamp();
        long nbytes = implRead(dsts, offset, length);
        SocketReadEvent.offer(start, nbytes, remoteAddress(), 0);
        return nbytes;
    }

    /**
     * Marks the beginning of a write operation that might block.

src/java.base/share/classes/sun/nio/ch/SocketInputStream.java:

    private int implRead(byte[] b, int off, int len, int timeout) throws IOException {
        if (timeout > 0) {
            long nanos = MILLISECONDS.toNanos(timeout);
            return sc.blockingRead(b, off, len, nanos);
        } else {
            return sc.blockingRead(b, off, len, 0);
        }
    }

    @Override
    public int read(byte[] b, int off, int len) throws IOException {
        int timeout = timeoutSupplier.getAsInt();
        if (!SocketReadEvent.enabled()) {
            return implRead(b, off, len, timeout);
        }
        long start = SocketReadEvent.timestamp();
        int n = implRead(b, off, len, timeout);
        SocketReadEvent.offer(start, n, sc.remoteAddress(), timeout);
        return n;
    }

    @Override
    public int available() throws IOException {
        return sc.available();
    }

    @Override
    public void close() throws IOException {
        sc.close();

src/java.base/share/classes/java/net/Socket.java:

        private final InputStream in;
        SocketInputStream(Socket parent, InputStream in) {
            this.parent = parent;
            this.in = in;
        }
        @Override
        public int read() throws IOException {
            byte[] a = new byte[1];
            int n = read(a, 0, 1);
            return (n > 0) ? (a[0] & 0xff) : -1;
        }
        @Override
        public int read(byte[] b, int off, int len) throws IOException {
            if (!SocketReadEvent.enabled()) {
                return implRead(b, off, len);
            }
            long start = SocketReadEvent.timestamp();
            int nbytes = implRead(b, off, len);
            SocketReadEvent.offer(start, nbytes, parent.getRemoteSocketAddress(), getSoTimeout());
            return nbytes;
        }

        private int implRead(byte[] b, int off, int len) throws IOException {
            try {
                return in.read(b, off, len);
            } catch (SocketTimeoutException e) {
                throw e;
            } catch (InterruptedIOException e) {
                Thread thread = Thread.currentThread();
                if (thread.isVirtual() && thread.isInterrupted()) {

src/java.base/share/classes/jdk/internal/event/SocketReadEvent.java:

/**
 * A JFR event for socket read operations.  This event is mirrored in
 * {@code jdk.jfr.events.SocketReadEvent } where the metadata for the event is
 * provided with annotations.  Some of the methods are replaced by generated
 * methods when jfr is enabled.  Note that the order of the arguments of the
 * {@link #commit(long, long, String, String, int, long, long, boolean)} method
 * must be the same as the order of the fields.
 */
public class SocketReadEvent extends Event {

    // THE ORDER OF THE FOLLOWING FIELDS IS IMPORTANT!
    // The order must match the argument order of the generated commit method.
    public String host;
    public String address;
    public int port;
    public long timeout;
    public long bytesRead;
    public boolean endOfStream;

    /**

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

final class MirrorEvents {
    private static final Map<String, Class<? extends MirrorEvent>> mirrorLookup = new ConcurrentHashMap<>();

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);
        register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class);

src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java:

@Name(Type.EVENT_NAME_PREFIX + "SocketRead")
@Label("Socket Read")
@Category("Java Application")
@Description("Reading data from a socket")
@StackFilter({"java.io.InputStream",
              "java.net.Socket$SocketInputStream",
              "java.nio.channels.SocketChannel",
              "sun.nio.ch.SocketInputStream"})
@Throttle
public final class SocketReadEvent extends MirrorEvent {

    @Label("Remote Host")
    public String host;

    @Label("Remote Address")
    public String address;

    @Label("Remote Port")
    public int port;

    @Label("Timeout Value")

Configuration enabled stackTrace threshold throttle
default true true 1 ms 100/s 25+
profiling true true 1 ms 300/s 25+

Field Type Description
host string Remote Host
address string Remote Address
port int Remote Port
timeout long: millis Timeout Value
bytesRead long: bytes Bytes Read Number of bytes read from the socket
endOfStream boolean End of Stream If end of stream was reached

Examples 3
address string
127.0.0.1
bytesRead long: bytes
13
endOfStream boolean
false
host string
port int
54014
startTime long: millis
251773180208
timeout long: millis
0
address string
127.0.0.1
bytesRead long: bytes
60
endOfStream boolean
false
host string
localhost
port int
55171
startTime long: millis
292147302375
timeout long: millis
0
address string
127.0.0.1
bytesRead long: bytes
10
endOfStream boolean
false
host string
localhost
port int
54137
startTime long: millis
269273625250
timeout long: millis
0

SocketWrite

throttle default profiling startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java

Category: Java Application

Excludes in stack trace: java.io.OutputStream, java.net.Socket$SocketOutputStream, java.nio.channels.SocketChannel, sun.nio.ch.SocketOutputStream

Writing data to a socket

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java:

        } finally {
            writeLock.unlock();
        }
    }

    @Override
    public int write(ByteBuffer buf) throws IOException {
        if (!SocketWriteEvent.enabled()) {
            return implWrite(buf);
        }
        long start = SocketWriteEvent.timestamp();
        int nbytes = implWrite(buf);
        SocketWriteEvent.offer(start, nbytes, remoteAddress());
        return nbytes;
    }

    @Override
    public long write(ByteBuffer[] srcs, int offset, int length)
        throws IOException
    {
        if (!SocketWriteEvent.enabled()) {
            return implWrite(srcs, offset, length);
        }
        long start = SocketWriteEvent.timestamp();
        long nbytes = implWrite(srcs, offset, length);
        SocketWriteEvent.offer(start, nbytes, remoteAddress());
        return nbytes;
    }

    /**
     * Writes a byte of out of band data.

src/java.base/share/classes/sun/nio/ch/SocketOutputStream.java:

     */
    SocketChannelImpl channel() {
        return sc;
    }

    @Override
    public void write(int b) throws IOException {
        byte[] a = new byte[]{(byte) b};
        write(a, 0, 1);
    }

    @Override
    public void write(byte[] b, int off, int len) throws IOException {
        if (!SocketWriteEvent.enabled()) {
            sc.blockingWriteFully(b, off, len);
            return;
        }
        long start = SocketWriteEvent.timestamp();
        sc.blockingWriteFully(b, off, len);
        SocketWriteEvent.offer(start, len, sc.remoteAddress());
    }

    @Override
    public void close() throws IOException {
        sc.close();
    }
}

src/java.base/share/classes/java/net/Socket.java:

        private final Socket parent;
        private final OutputStream out;
        SocketOutputStream(Socket parent, OutputStream out) {
            this.parent = parent;
            this.out = out;
        }
        @Override
        public void write(int b) throws IOException {
            byte[] a = new byte[] { (byte) b };
            write(a, 0, 1);
        }
        @Override
        public void write(byte[] b, int off, int len) throws IOException {
            if (!SocketWriteEvent.enabled()) {
                implWrite(b, off, len);
                return;
            }
            long start = SocketWriteEvent.timestamp();
            implWrite(b, off, len);
            SocketWriteEvent.offer(start, len, parent.getRemoteSocketAddress());
        }

        private void implWrite(byte[] b, int off, int len) throws IOException {
            try {
                out.write(b, off, len);
            } catch (InterruptedIOException e) {
                Thread thread = Thread.currentThread();
                if (thread.isVirtual() && thread.isInterrupted()) {
                    close();
                    throw new SocketException("Closed by interrupt");
                }

src/java.base/share/classes/jdk/internal/event/SocketWriteEvent.java:

/**
 * A JFR event for socket write operations.  This event is mirrored in
 * {@code jdk.jfr.events.SocketWriteEvent } where the metadata for the event is
 * provided with annotations.  Some of the methods are replaced by generated
 * methods when jfr is enabled.  Note that the order of the arguments of the
 * {@link #commit(long, long, String, String, int, long)} method
 * must be the same as the order of the fields.
 */
public class SocketWriteEvent extends Event {

    // THE ORDER OF THE FOLLOWING FIELDS IS IMPORTANT!
    // The order must match the argument order of the generated commit method.
    public String host;
    public String address;
    public int port;
    public long bytesWritten;

    /**
     * Actually commit a socket write event.  This is generated automatically.
     * The order of the fields must be the same as the parameters in this method.

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

    private static final Map<String, Class<? extends MirrorEvent>> mirrorLookup = new ConcurrentHashMap<>();

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);
        register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class);
    };

src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java:

@Name(Type.EVENT_NAME_PREFIX + "SocketWrite")
@Label("Socket Write")
@Category("Java Application")
@Description("Writing data to a socket")
@StackFilter({"java.io.OutputStream",
              "java.net.Socket$SocketOutputStream",
              "java.nio.channels.SocketChannel",
              "sun.nio.ch.SocketOutputStream"})
@Throttle
public final class SocketWriteEvent extends MirrorEvent {

    @Label("Remote Host")
    public String host;

    @Label("Remote Address")
    public String address;

    @Label("Remote Port")
    public int port;

    @Label("Bytes Written")

Configuration enabled stackTrace threshold throttle
default true true 1 ms 100/s 25+
profiling true true 1 ms 300/s 25+

Field Type Description
host string Remote Host
address string Remote Address
port int Remote Port
bytesWritten long: bytes Bytes Written Number of bytes written to the socket

Examples 3
address string
127.0.0.1
bytesWritten long: bytes
34
host string
localhost
port int
55171
startTime long: millis
291058086958
address string
127.0.0.1
bytesWritten long: bytes
101
host string
localhost
port int
54137
startTime long: millis
269273325375
address string
127.0.0.1
bytesWritten long: bytes
100
host string
localhost
port int
53378
startTime long: millis
251773165000

ThreadSleep

default profiling startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ThreadSleepEvent.java

Category: Java Application

Excludes in stack trace: java.lang.Thread::afterSleep, java.lang.Thread::sleepNanos, java.lang.Thread::sleep

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/lang/Thread.java:

    public static void yield() {
        if (currentThread() instanceof VirtualThread vthread) {
            vthread.tryYield();
        } else {
            yield0();
        }
    }

    private static native void yield0();

    /**
     * Called before sleeping to create a jdk.ThreadSleep event.
     */
    private static ThreadSleepEvent beforeSleep(long nanos) {
        try {
            ThreadSleepEvent event = new ThreadSleepEvent();
            if (event.isEnabled()) {
                event.time = nanos;
                event.begin();
                return event;
            }
        } catch (OutOfMemoryError e) {
            // ignore
        }
        return null;
    }


    /**
     * Called after sleeping to commit the jdk.ThreadSleep event.
     */
    private static void afterSleep(ThreadSleepEvent event) {
        if (event != null) {
            try {
                event.commit();
            } catch (OutOfMemoryError e) {
                // ignore
            }
        }
    }

    /**
     * Sleep for the specified number of nanoseconds, subject to the precision
     * and accuracy of system timers and schedulers.
     */
    private static void sleepNanos(long nanos) throws InterruptedException {
        ThreadSleepEvent event = beforeSleep(nanos);
        try {
            if (currentThread() instanceof VirtualThread vthread) {
                vthread.sleepNanos(nanos);
            } else {
                sleepNanos0(nanos);
            }
        } finally {
            afterSleep(event);
        }
    }

src/java.base/share/classes/jdk/internal/event/ThreadSleepEvent.java:

package jdk.internal.event;

/**
 * Event recording thread sleeping.
 */

public final class ThreadSleepEvent extends Event {
    public long time;
}

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);
        register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class);
    };

src/jdk.jfr/share/classes/jdk/jfr/events/ThreadSleepEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.Timespan;
import jdk.jfr.internal.MirrorEvent;

@Category("Java Application")
@Label("Java Thread Sleep")
@Name("jdk.ThreadSleep")
@StackFilter({"java.lang.Thread::afterSleep",
              "java.lang.Thread::sleepNanos",
              "java.lang.Thread::sleep"})
public final class ThreadSleepEvent extends MirrorEvent {
    @Label("Sleep Time")
    @Timespan(Timespan.NANOSECONDS)
    public long time;
}

Configuration enabled stackTrace threshold
default true true 20 ms
profiling true true 10 ms

Field Type Description
time long: nanos Sleep Time

Examples 3
startTime long: millis
230797276708
time long: nanos
8000000
startTime long: millis
198927245791
time long: nanos
7000000
startTime long: millis
237950273875
time long: nanos
8000000

VirtualThreadEnd

startTime duration 19 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadEndEvent.java

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/lang/VirtualThread.java:

            event.commit();
        }

        Object bindings = Thread.scopedValueBindings();
        try {
            runWith(bindings, task);
        } catch (Throwable exc) {
            dispatchUncaughtException(exc);
        } finally {
            // pop any remaining scopes from the stack, this may block
            StackableScope.popAll();

            // emit JFR event if enabled
            if (VirtualThreadEndEvent.isTurnedOn()) {
                var event = new VirtualThreadEndEvent();
                event.javaThreadId = threadId();
                event.commit();
            }
        }
    }

    /**
     * Mounts this virtual thread onto the current platform thread. On
     * return, the current thread is the virtual thread.
     */
    @ChangesCurrentThread

src/java.base/share/classes/jdk/internal/event/VirtualThreadEndEvent.java:

package jdk.internal.event;

/**
 * Event recording that a virtual thread has terminated.
 */
public class VirtualThreadEndEvent extends Event {
    private static final VirtualThreadEndEvent EVENT = new VirtualThreadEndEvent();

    /**
     * Returns {@code true} if event is enabled, {@code false} otherwise.
     */
    public static boolean isTurnedOn() {
        return EVENT.isEnabled();
    }

    public long javaThreadId;
}

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);
        register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class);
    };

    private static void register(String eventClassName, Class<? extends MirrorEvent> mirrorClass) {
        mirrorLookup.put(eventClassName, mirrorClass);
    }

src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadEndEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;

@Category("Java Application")
@Label("Virtual Thread End")
@Name("jdk.VirtualThreadEnd")
@RemoveFields({"duration", "stackTrace"})
public final class VirtualThreadEndEvent extends MirrorEvent {

    @Label("Thread Id")
    public long javaThreadId;

}

Configuration enabled
default false
profiling false

Field Type Description
javaThreadId long Thread Id

VirtualThreadStart

startTime duration 19 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadStartEvent.java

Category: Java Application

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/lang/VirtualThread.java:

            event.javaThreadId = threadId();
            event.exceptionMessage = ree.getMessage();
            event.commit();
        }
    }

    /**
     * Runs a task in the context of this virtual thread.
     */
    private void run(Runnable task) {
        assert Thread.currentThread() == this && state == RUNNING;

        // emit JFR event if enabled
        if (VirtualThreadStartEvent.isTurnedOn()) {
            var event = new VirtualThreadStartEvent();
            event.javaThreadId = threadId();
            event.commit();
        }

        Object bindings = Thread.scopedValueBindings();
        try {
            runWith(bindings, task);
        } catch (Throwable exc) {
            dispatchUncaughtException(exc);
        } finally {
            // pop any remaining scopes from the stack, this may block

src/java.base/share/classes/jdk/internal/event/VirtualThreadStartEvent.java:

package jdk.internal.event;

/**
 * Event recording that a virtual thread has been started.
 */
public class VirtualThreadStartEvent extends Event {
    private static final VirtualThreadStartEvent EVENT = new VirtualThreadStartEvent();

    /**
     * Returns {@code true} if event is enabled, {@code false} otherwise.
     */
    public static boolean isTurnedOn() {
        return EVENT.isEnabled();
    }

    public long javaThreadId;
}

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);
        register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class);
    };

    private static void register(String eventClassName, Class<? extends MirrorEvent> mirrorClass) {
        mirrorLookup.put(eventClassName, mirrorClass);

src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadStartEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;

@Category("Java Application")
@Label("Virtual Thread Start")
@Name("jdk.VirtualThreadStart")
@RemoveFields("duration")
public final class VirtualThreadStartEvent extends MirrorEvent {

    @Label("Thread Id")
    public long javaThreadId;

}

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
javaThreadId long Thread Id

Java Application Statistics

JavaMonitorStatistics

default profiling startTime duration every chunk 25 26

Category: Java Application / Statistics

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

TRACE_REQUEST_FUNC(FinalizerStatistics) {
#if INCLUDE_MANAGEMENT
  JfrFinalizerStatisticsEvent::generate_events();
#else
  log_debug(jfr, system)("Unable to generate requestable event FinalizerStatistics. The required jvm feature 'management' is missing.");
#endif
}

TRACE_REQUEST_FUNC(NativeMemoryUsage) {
  JfrNativeMemoryEvent::send_type_events(timestamp());
}

TRACE_REQUEST_FUNC(NativeMemoryUsageTotal) {
  JfrNativeMemoryEvent::send_total_event(timestamp());
}

TRACE_REQUEST_FUNC(JavaMonitorStatistics) {
  EventJavaMonitorStatistics event;
  event.set_count(ObjectSynchronizer::in_use_list_count());
  event.commit();
}

Configuration enabled period
default true everyChunk
profiling true everyChunk

Field Type Description
count ulong Monitors in Use Current number of in-use monitors

JavaThreadStatistics

default profiling startTime duration every chunk 11 17 21 25 26

Category: Java Application / Statistics

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  EventSwapSpace event;
  physical_memory_size_type total_swap_space = 0;
  // Return value ignored - defaulting to 0 on failure.
  (void)os::total_swap_space(total_swap_space);
  event.set_totalSize(static_cast<s8>(total_swap_space));
  physical_memory_size_type free_swap_space = 0;
  // Return value ignored - defaulting to 0 on failure.
  (void)os::free_swap_space(free_swap_space);
  event.set_freeSize(static_cast<s8>(free_swap_space));
  event.commit();
}

TRACE_REQUEST_FUNC(JavaThreadStatistics) {
  EventJavaThreadStatistics event;
  event.set_activeCount(ThreadService::get_live_thread_count());
  event.set_daemonCount(ThreadService::get_daemon_thread_count());
  event.set_accumulatedCount(ThreadService::get_total_thread_count());
  event.set_peakCount(ThreadService::get_peak_thread_count());
  event.commit();
}

TRACE_REQUEST_FUNC(GCHeapMemoryUsage) {
  MemoryUsage usage = Universe::heap()->memory_usage();
  EventGCHeapMemoryUsage event(UNTIMED);
  event.set_used(usage.used());

Configuration enabled period
default true 1000 ms
profiling true 1000 ms

Field Type Description
activeCount long Active Threads Number of live active threads including both daemon and non-daemon threads
daemonCount long Daemon Threads Number of live daemon threads
accumulatedCount long Accumulated Threads Number of threads created and also started since JVM start
peakCount long Peak Threads Peak live thread count since JVM start or when peak count was reset

Examples 3
accumulatedCount long
1808
activeCount long
141
daemonCount long
140
peakCount long
324
startTime long: millis
251393090375
accumulatedCount long
1656
activeCount long
271
daemonCount long
270
peakCount long
305
startTime long: millis
247491962792
accumulatedCount long
2407
activeCount long
185
daemonCount long
172
peakCount long
357
startTime long: millis
252833049166

ClassLoadingStatistics

default profiling startTime duration every chunk 11 17 21 25 26

Category: Java Application / Statistics

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

      event.set_used(usage.used());
      event.set_committed(usage.committed());
      event.set_max(usage.max_size());
      event.set_starttime(timestamp());
      event.set_endtime(timestamp());
      event.commit();
    }
  }
}


TRACE_REQUEST_FUNC(ClassLoadingStatistics) {
#if INCLUDE_MANAGEMENT
  EventClassLoadingStatistics event;
  event.set_loadedClassCount(ClassLoadingService::loaded_class_count());
  event.set_unloadedClassCount(ClassLoadingService::unloaded_class_count());
  event.commit();
#else
  log_debug(jfr, system)("Unable to generate requestable event ClassLoadingStatistics. The required jvm feature 'management' is missing.");
#endif
}

class JfrClassLoaderStatsClosure : public ClassLoaderStatsClosure {
public:
  JfrClassLoaderStatsClosure() : ClassLoaderStatsClosure(nullptr) {}

Configuration enabled period
default true 1000 ms
profiling true 1000 ms

Field Type Description
loadedClassCount long Loaded Class Count Number of classes loaded since JVM start
unloadedClassCount long Unloaded Class Count Number of classes unloaded since JVM start

Examples 3
loadedClassCount long
131867
startTime long: millis
284613600958
unloadedClassCount long
4180
loadedClassCount long
100709
startTime long: millis
199287618541
unloadedClassCount long
3232
loadedClassCount long
99798
startTime long: millis
242262105917
unloadedClassCount long
3062

ClassLoaderStatistics

default profiling startTime duration every chunk 11 17 21 25 26

Category: Java Application / Statistics

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  log_debug(jfr, system)("Unable to generate requestable event ClassLoadingStatistics. The required jvm feature 'management' is missing.");
#endif
}

class JfrClassLoaderStatsClosure : public ClassLoaderStatsClosure {
public:
  JfrClassLoaderStatsClosure() : ClassLoaderStatsClosure(nullptr) {}

  bool do_entry(oop const& key, ClassLoaderStats const& cls) {
    const ClassLoaderData* this_cld = cls._class_loader != nullptr ?
      java_lang_ClassLoader::loader_data_acquire(cls._class_loader) : nullptr;
    const ClassLoaderData* parent_cld = cls._parent != nullptr ?
      java_lang_ClassLoader::loader_data_acquire(cls._parent) : nullptr;
    EventClassLoaderStatistics event;
    event.set_classLoader(this_cld);
    event.set_parentClassLoader(parent_cld);
    event.set_classLoaderData((intptr_t)cls._cld);
    event.set_classCount(cls._classes_count);
    event.set_chunkSize(cls._chunk_sz);
    event.set_blockSize(cls._block_sz);
    event.set_hiddenClassCount(cls._hidden_classes_count);
    event.set_hiddenChunkSize(cls._hidden_chunk_sz);
    event.set_hiddenBlockSize(cls._hidden_block_sz);
    event.commit();
    return true;

Configuration enabled period
default true everyChunk
profiling true everyChunk

Field Type Description
classLoader ClassLoader Class Loader Consider contributing a description to jfreventcollector.
parentClassLoader ClassLoader Parent Class Loader Consider contributing a description to jfreventcollector.
classLoaderData ulong: address ClassLoaderData Pointer Pointer to the ClassLoaderData structure in the JVM
classCount long Classes Number of loaded classes
chunkSize ulong: bytes Total Chunk Size Total size of all allocated metaspace chunks (each chunk has several blocks)
blockSize ulong: bytes Total Block Size Total size of all allocated metaspace blocks (each chunk has several blocks)
hiddenClassCount long 15+ Hidden Classes Number of hidden classes
hiddenChunkSize ulong: bytes 15+ Total Hidden Classes Chunk Size Total size of all allocated metaspace chunks for hidden classes (each chunk has several blocks)
hiddenBlockSize ulong: bytes 15+ Total Hidden Classes Block Size Total size of all allocated metaspace blocks for hidden classes (each chunk has several blocks)

Examples 3
blockSize ulong: bytes
6120
chunkSize ulong: bytes
10240
classCount long
2
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
0
name string
org/neo4j/codegen/CodeLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/neo4j/codegen
classLoaderData ulong: address
105553187723840
hiddenBlockSize ulong: bytes
0
hiddenChunkSize ulong: bytes
0
hiddenClassCount long
0
parentClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
startTime long: millis
199126682791
blockSize ulong: bytes
3160
chunkSize ulong: bytes
4096
classCount long
1
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
jdk/internal/reflect/DelegatingClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
jdk/internal/reflect
classLoaderData ulong: address
105553178244384
hiddenBlockSize ulong: bytes
0
hiddenChunkSize ulong: bytes
0
hiddenClassCount long
0
parentClassLoader ClassLoader
null
startTime long: millis
230209978958
blockSize ulong: bytes
4064
chunkSize ulong: bytes
5120
classCount long
1
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
jdk/internal/reflect/DelegatingClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
jdk/internal/reflect
classLoaderData ulong: address
105553162154656
hiddenBlockSize ulong: bytes
0
hiddenChunkSize ulong: bytes
0
hiddenClassCount long
0
parentClassLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
startTime long: millis
242226555792

ThreadAllocationStatistics

default profiling startTime every chunk 11 17 21 25 26

Category: Java Application / Statistics

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  GrowableArray<jlong> allocated(initial_size);
  GrowableArray<traceid> thread_ids(initial_size);
  JfrTicks time_stamp = JfrTicks::now();
  JfrJavaThreadIterator iter;
  while (iter.has_next()) {
    JavaThread* const jt = iter.next();
    assert(jt != nullptr, "invariant");
    allocated.append(jt->cooked_allocated_bytes());
    thread_ids.append(JFR_JVM_THREAD_ID(jt));
  }

  // Write allocation statistics to buffer.
  for(int i = 0; i < thread_ids.length(); i++) {
    EventThreadAllocationStatistics event(UNTIMED);
    event.set_allocated(allocated.at(i));
    event.set_thread(thread_ids.at(i));
    event.set_starttime(time_stamp);
    event.set_endtime(time_stamp);
    event.commit();
  }
}

/**
 *  PhysicalMemory event represents:
 *

Configuration enabled period
default true everyChunk
profiling true everyChunk

Field Type Description
allocated ulong: bytes Allocated Approximate number of bytes allocated since thread start
thread Thread Thread Consider contributing a description to jfreventcollector.

Examples 3
allocated ulong: bytes
226806096
startTime long: millis
230210215167
thread Thread
group ThreadGroup
name string
finagle/netty4
parent ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
finagle/netty4-2-24
javaThreadId long
1228
osName string
finagle/netty4-2-24
osThreadId long
175371
virtual boolean
false
allocated ulong: bytes
296267160
startTime long: millis
199126884041
thread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
reactors-io-scheduler-ForkJoinPool-35-worker-4
javaThreadId long
1248
osName string
reactors-io-scheduler-ForkJoinPool-35-worker-4
osThreadId long
71467
virtual boolean
false
allocated ulong: bytes
776488
startTime long: millis
242226660042
thread Thread
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
JFR Periodic Tasks
javaThreadId long
15
osName string
JFR Periodic Tasks
osThreadId long
26371
virtual boolean
false

FinalizerStatistics

default profiling startTime end of every chunk 18 21 25 26

Category: Java Application / Statistics

Per class statistics about finalizers

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrFinalizerStatisticsEvent.cpp:

static void send_event(const FinalizerEntry* fe, const InstanceKlass* ik, const JfrTicks& timestamp, Thread* thread) {
  assert(ik != nullptr, "invariant");
  assert(ik->has_finalizer(), "invariant");
  assert(thread != nullptr, "invariant");
  const char* const url = fe != nullptr ? fe->codesource() : nullptr;
  const traceid url_symbol_id = url != nullptr ? JfrSymbolTable::add(url) : 0;
  EventFinalizerStatistics event(UNTIMED);
  event.set_starttime(timestamp);
  event.set_endtime(timestamp);
  event.set_finalizableClass(ik);
  event.set_codeSource(url_symbol_id);
  if (fe == nullptr) {
    event.set_objects(0);
    event.set_totalFinalizersRun(0);
  } else {
    assert(fe->klass() == ik, "invariant");
    event.set_objects(fe->objects_on_heap());
    event.set_totalFinalizersRun(fe->total_finalizers_run());
  }
  event.commit();
}

void JfrFinalizerStatisticsEvent::send_unload_event(const InstanceKlass* ik) {
  if (!EventFinalizerStatistics::is_enabled()) {
    return;
  }
  Thread* const thread = Thread::current();
  ResourceMark rm(thread);
  send_event(FinalizerService::lookup(ik, thread), ik, JfrTicks::now(), thread);
}

// Finalizer events generated by the periodic task will all have the same timestamp.

class FinalizerStatisticsEventClosure : public FinalizerEntryClosure {
 private:

Configuration enabled period
default true endChunk
profiling true endChunk

Field Type Description
finalizableClass Class Class Overriding Finalize
codeSource Symbol Code Source URL from where the class was loaded
objects ulong Finalizable Objects on Heap Number of objects on heap that can be finalized
totalFinalizersRun ulong Finalizers Run Total number of finalizers run since JVM start

Examples 3
codeSource Symbol
file://[...]_1/code/experiments/jfreventcollector/harness-131340-18105539698102044895/apache-spark/lib/netty-buffer-4.1.99.Final.jar
finalizableClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
24
name string
io/netty/buffer/PoolArena$HeapArena
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
io/netty/buffer
objects ulong
40
startTime long: millis
254771133292
totalFinalizersRun ulong
0
codeSource Symbol
file://[...]_1/code/experiments/jfreventcollector/harness-130453-1906420335947283803/apache-spark/lib/netty-buffer-4.1.99.Final.jar
finalizableClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
24
name string
io/netty/buffer/PoolArena$HeapArena
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
io/netty/buffer
objects ulong
40
startTime long: millis
200136821000
totalFinalizersRun ulong
0
codeSource Symbol
file://[...]_1/code/experiments/jfreventcollector/harness-130908-6580050515449718395/apache-spark/lib/spark-core_2.13-3.5.0.jar
finalizableClass Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
org/sparkproject/jetty/util/resource/JarFileResource
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/sparkproject/jetty/util/resource
objects ulong
4
startTime long: millis
239197308417
totalFinalizersRun ulong
0

DeprecatedInvocation

default profiling startTime stackTrace 22 25 26

Category: Java Application / Statistics

A unique invocation of a method that is annotated with @Deprecated. Packages and modules that are deprecated are ignored. At most 10 000 invocation sites and only the first invocation from a class is guaranteed to be included.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/jni/jfrJniMethod.cpp:

  JfrEventSetting::set_enabled(JfrCPUTimeSampleEvent, rate > 0);
  JfrCPUTimeThreadSampling::set_rate(rate);
JVM_END

JVM_ENTRY_NO_ENV(void, jfr_set_cpu_period(JNIEnv* env, jclass jvm, jlong period_nanos))
  assert(period_nanos >= 0, "invariant");
  JfrEventSetting::set_enabled(JfrCPUTimeSampleEvent, period_nanos > 0);
  JfrCPUTimeThreadSampling::set_period(period_nanos);
JVM_END

NO_TRANSITION(void, jfr_set_miscellaneous(JNIEnv* env, jclass jvm, jlong event_type_id, jlong value))
  JfrEventSetting::set_miscellaneous(event_type_id, value);
  const JfrEventId typed_event_id = (JfrEventId)event_type_id;
  if (EventDeprecatedInvocation::eventId == typed_event_id) {
    JfrDeprecationManager::on_level_setting_update(value);
  }
NO_TRANSITION_END

NO_TRANSITION(jboolean, jfr_should_rotate_disk(JNIEnv* env, jclass jvm))
  return JfrChunkRotation::should_rotate() ? JNI_TRUE : JNI_FALSE;
NO_TRANSITION_END

NO_TRANSITION(jlong, jfr_get_type_id_from_string(JNIEnv * env, jclass jvm, jstring type))
  const char* type_name = env->GetStringUTFChars(type, nullptr);
  jlong id = JfrType::name_to_id(type_name);

Configuration enabled level stackTrace
default true forRemoval true
profiling true forRemoval true

Field Type Description
method Method Deprecated Method
invocationTime Ticks Invocation Time The time the deprecated method was invoked for the first time
forRemoval boolean For Removal

ExceptionStatistics

default profiling startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionStatisticsEvent.java

Category: Java Application / Statistics

Number of objects derived from java.lang.Throwable that have been created

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/jdk/internal/event/ExceptionStatisticsEvent.java:

package jdk.internal.event;

/**
 * Event recording number of exceptions that has been created.
 */
public class ExceptionStatisticsEvent extends Event {

    public long throwables;

    public static void commit(long timestamp, long throwables) {
        // Generated by JFR
    }

    public static boolean enabled() {
        // Generated by JFR
        return false;
    }

    public static long timestamp() {
        // Generated by JFR
        return 0;
    }
}

src/java.base/share/classes/jdk/internal/event/ThrowableTracer.java:

                ErrorThrownEvent.commit(timestamp, message, clazz);
            }
            if (ExceptionThrownEvent.shouldThrottleCommit(timestamp)) {
                ExceptionThrownEvent.commit(timestamp, message, clazz);
            }
        }
        numThrowables.incrementAndGet();
    }

    public static void traceThrowable(Class<?> clazz, String message) {
        if (ExceptionThrownEvent.enabled()) {
            long timestamp = ErrorThrownEvent.timestamp();
            if (ExceptionThrownEvent.shouldThrottleCommit(timestamp)) {
                ExceptionThrownEvent.commit(timestamp, message, clazz);
            }
        }
        numThrowables.incrementAndGet();
    }

    public static void emitStatistics() {
        long timestamp = ExceptionStatisticsEvent.timestamp();
        ExceptionStatisticsEvent.commit(timestamp, numThrowables.get());
    }
}

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);
        register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class);
    };

    private static void register(String eventClassName, Class<? extends MirrorEvent> mirrorClass) {
        mirrorLookup.put(eventClassName, mirrorClass);
    }

    static Class<? extends MirrorEvent> find(Class<? extends jdk.internal.event.Event> eventClass) {
        return find(Utils.isJDKClass(eventClass), eventClass.getName());
    }

src/jdk.jfr/share/classes/jdk/jfr/events/ExceptionStatisticsEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Description;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "ExceptionStatistics")
@Label("Exception Statistics")
@Category({ "Java Application", "Statistics" })
@Description("Number of objects derived from java.lang.Throwable that have been created")
@RemoveFields({"duration", "eventThread", "stackTrace"})
public final class ExceptionStatisticsEvent extends MirrorEvent {

    @Label("Exceptions Created")
    public long throwables;
}

Configuration enabled period
default true 1000 ms
profiling true 1000 ms

Field Type Description
throwables long Exceptions Created

Examples 3
startTime long: millis
261785650167
throwables long
2445468
startTime long: millis
239567002000
throwables long
2440504
startTime long: millis
242397676208
throwables long
2415371

DirectBufferStatistics

default profiling startTime duration stackTrace 15 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/DirectBufferStatisticsEvent.java

Category: Java Application / Statistics

Statistics of direct buffer

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        jdk.internal.event.ProcessStartEvent.class,
        jdk.internal.event.SecurityPropertyModificationEvent.class,
        jdk.internal.event.SecurityProviderServiceEvent.class,
        jdk.internal.event.SerializationMisdeclarationEvent.class,
        jdk.internal.event.SocketReadEvent.class,
        jdk.internal.event.SocketWriteEvent.class,
        jdk.internal.event.ThreadSleepEvent.class,
        jdk.internal.event.TLSHandshakeEvent.class,
        jdk.internal.event.VirtualThreadStartEvent.class,
        jdk.internal.event.VirtualThreadEndEvent.class,
        jdk.internal.event.VirtualThreadSubmitFailedEvent.class,
        jdk.internal.event.X509CertificateEvent.class,
        jdk.internal.event.X509ValidationEvent.class,
        DirectBufferStatisticsEvent.class,
        InitialSecurityPropertyEvent.class,
        MethodTraceEvent.class,
        MethodTimingEvent.class,
    };

    private static final Runnable emitExceptionStatistics = JDKEvents::emitExceptionStatistics;
    private static final Runnable emitDirectBufferStatistics = JDKEvents::emitDirectBufferStatistics;
    private static final Runnable emitContainerConfiguration = JDKEvents::emitContainerConfiguration;
    private static final Runnable emitContainerCPUUsage = JDKEvents::emitContainerCPUUsage;
    private static final Runnable emitContainerCPUThrottling = JDKEvents::emitContainerCPUThrottling;
    private static final Runnable emitContainerMemoryUsage = JDKEvents::emitContainerMemoryUsage;

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

    private static final Runnable emitInitialSecurityProperties = JDKEvents::emitInitialSecurityProperties;
    private static final Runnable emitMethodTiming = JDKEvents::emitMethodTiming;
    private static Metrics containerMetrics = null;
    private static boolean initializationTriggered;

    @SuppressWarnings("unchecked")
    public static synchronized void initialize() {
        try {
            if (initializationTriggered == false) {
                for (Class<?> eventClass : eventClasses) {
                    MetadataRepository.getInstance().register((Class<? extends Event>) eventClass);
                }
                PeriodicEvents.addJavaEvent(jdk.internal.event.ExceptionStatisticsEvent.class, emitExceptionStatistics);
                PeriodicEvents.addJavaEvent(DirectBufferStatisticsEvent.class, emitDirectBufferStatistics);
                PeriodicEvents.addJavaEvent(InitialSecurityPropertyEvent.class, emitInitialSecurityProperties);
                PeriodicEvents.addJavaEvent(MethodTimingEvent.class, emitMethodTiming);

                initializeContainerEvents();
                JFRTracing.enable();
                initializationTriggered = true;
            }
        } catch (Exception e) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.WARN, "Could not initialize JDK events. " + e.getMessage());
        }
    }

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        PeriodicEvents.removeEvent(emitExceptionStatistics);
        PeriodicEvents.removeEvent(emitDirectBufferStatistics);
        PeriodicEvents.removeEvent(emitInitialSecurityProperties);
        PeriodicEvents.removeEvent(emitMethodTiming);

        PeriodicEvents.removeEvent(emitContainerConfiguration);
        PeriodicEvents.removeEvent(emitContainerCPUUsage);
        PeriodicEvents.removeEvent(emitContainerCPUThrottling);
        PeriodicEvents.removeEvent(emitContainerMemoryUsage);
        PeriodicEvents.removeEvent(emitContainerIOUsage);
    }

    private static void emitDirectBufferStatistics() {
        DirectBufferStatisticsEvent e = new DirectBufferStatisticsEvent();
        e.commit();
    }

    private static void emitInitialSecurityProperties() {
        Properties p = SharedSecrets.getJavaSecurityPropertiesAccess().getInitialProperties();
        if (p != null) {
            for (String key : p.stringPropertyNames()) {
                InitialSecurityPropertyEvent e = new InitialSecurityPropertyEvent();
                e.key = key;
                e.value = p.getProperty(key);
                e.commit();

src/jdk.jfr/share/classes/jdk/jfr/events/DirectBufferStatisticsEvent.java:

package jdk.jfr.events;

import jdk.internal.misc.VM;
import jdk.internal.misc.VM.BufferPool;

import jdk.jfr.*;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "DirectBufferStatistics")
@Label("Direct Buffer Statistics")
@Description("Statistics of direct buffer")
public final class DirectBufferStatisticsEvent extends AbstractBufferStatisticsEvent {

    private static final BufferPool DIRECT_BUFFER_POOL = findPoolByName("direct");

    public DirectBufferStatisticsEvent() {
        super(DIRECT_BUFFER_POOL);
        this.maxCapacity = VM.maxDirectMemory();
    }

    @Label("Maximum Capacity")
    @Description("Maximum direct buffer capacity the process can use")
    @DataAmount
    final long maxCapacity;
}

Configuration enabled period
default true 5 s
profiling true 5 s

Examples 3
stackTrace StackTrace
null
startTime long: millis
248560746000
stackTrace StackTrace
null
startTime long: millis
217982922500
stackTrace StackTrace
null
startTime long: millis
274698505458

Java Development Kit

Deserialization

startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/DeserializationEvent.java

Category: Java Development Kit / Serialization

Results of deserialization and ObjectInputFilter checks

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/io/ObjectInputStream.java:

        ObjectInputFilter next = Config.getSerialFilterFactory()
                .apply(serialFilter, filter);
        if (serialFilter != null && next == null) {
            throw new IllegalStateException("filter can not be replaced with null filter");
        }
        serialFilter = next;
    }

    /**
     * Invokes the deserialization filter if non-null.
     *
     * If the filter rejects or an exception is thrown, throws InvalidClassException.
     *
     * Logs and/or commits a {@code DeserializationEvent}, if configured.
     *
     * @param clazz the class; may be null
     * @param arrayLength the array length requested; use {@code -1} if not creating an array
     * @throws InvalidClassException if it rejected by the filter or
     *        a {@link RuntimeException} is thrown
     */
    private void filterCheck(Class<?> clazz, int arrayLength)
            throws InvalidClassException {
        // Info about the stream is not available if overridden by subclass, return 0
        long bytesRead = (bin == null) ? 0 : bin.getBytesRead();
        RuntimeException ex = null;

src/java.base/share/classes/java/io/ObjectInputStream.java:

                status = ObjectInputFilter.Status.REJECTED;
                ex = e;
            }
            if (Logging.filterLogger != null) {
                // Debug logging of filter checks that fail; Tracing for those that succeed
                Logging.filterLogger.log(status == null || status == ObjectInputFilter.Status.REJECTED
                                ? Logger.Level.DEBUG
                                : Logger.Level.TRACE,
                        "ObjectInputFilter {0}: {1}, array length: {2}, nRefs: {3}, depth: {4}, bytes: {5}, ex: {6}",
                        status, clazz, arrayLength, totalObjectRefs, depth, bytesRead,
                        Objects.toString(ex, "n/a"));
            }
        }
        DeserializationEvent event = new DeserializationEvent();
        if (event.shouldCommit()) {
            event.filterConfigured = serialFilter != null;
            event.filterStatus = status != null ? status.name() : null;
            event.type = clazz;
            event.arrayLength = arrayLength;
            event.objectReferences = totalObjectRefs;
            event.depth = depth;
            event.bytesRead = bytesRead;
            event.exceptionType = ex != null ? ex.getClass() : null;
            event.exceptionMessage = ex != null ? ex.getMessage() : null;
            event.commit();

src/java.base/share/classes/jdk/internal/event/DeserializationEvent.java:

package jdk.internal.event;

/**
 * Event details relating to deserialization.
 */

public final class DeserializationEvent extends Event {
    public boolean filterConfigured;
    public String filterStatus;
    public Class<?> type;
    public int arrayLength;
    public long objectReferences;
    public long depth;
    public long bytesRead;
    public Class<?> exceptionType;
    public String exceptionMessage;
}

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

/**
 * This class registers all mirror events.
 */
final class MirrorEvents {
    private static final Map<String, Class<? extends MirrorEvent>> mirrorLookup = new ConcurrentHashMap<>();

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);

src/jdk.jfr/share/classes/jdk/jfr/events/DeserializationEvent.java:

@Category({"Java Development Kit", "Serialization"})
@Label("Deserialization")
@Name("jdk.Deserialization")
@Description("Results of deserialization and ObjectInputFilter checks")
@RemoveFields("duration")
public final class DeserializationEvent extends MirrorEvent {

    @Label("Filter Configured")
    public boolean filterConfigured;

    @Label("Filter Status")
    public String filterStatus;

    @Label ("Type")
    public Class<?> type;

    @Label ("Array Length")

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
filterConfigured boolean Filter Configured
filterStatus string Filter Status Consider contributing a description to jfreventcollector.
type Class Type Consider contributing a description to jfreventcollector.
arrayLength int Array Length
objectReferences long Object References
depth long Depth
bytesRead long Bytes Read
exceptionType Class Exception Type Consider contributing a description to jfreventcollector.
exceptionMessage string Exception Message Consider contributing a description to jfreventcollector.

Examples 3
arrayLength int
-1
bytesRead long
66312
depth long
108
exceptionMessage string
null
exceptionType Class
null
filterConfigured boolean
false
filterStatus string
null
objectReferences long
5375
startTime long: millis
237694045042
type Class
null
arrayLength int
10
bytesRead long
93853
depth long
3
exceptionMessage string
null
exceptionType Class
null
filterConfigured boolean
false
filterStatus string
null
objectReferences long
1883
startTime long: millis
198723238291
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[F
package Package
null
arrayLength int
10
bytesRead long
91653
depth long
3
exceptionMessage string
null
exceptionType Class
null
filterConfigured boolean
false
filterStatus string
null
objectReferences long
1839
startTime long: millis
229756907708
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[F
package Package
null

InitialSecurityProperty

default profiling startTime duration stackTrace 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/InitialSecurityPropertyEvent.java

Category: Java Development Kit / Security

Initial Security Properties

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        jdk.internal.event.SecurityPropertyModificationEvent.class,
        jdk.internal.event.SecurityProviderServiceEvent.class,
        jdk.internal.event.SerializationMisdeclarationEvent.class,
        jdk.internal.event.SocketReadEvent.class,
        jdk.internal.event.SocketWriteEvent.class,
        jdk.internal.event.ThreadSleepEvent.class,
        jdk.internal.event.TLSHandshakeEvent.class,
        jdk.internal.event.VirtualThreadStartEvent.class,
        jdk.internal.event.VirtualThreadEndEvent.class,
        jdk.internal.event.VirtualThreadSubmitFailedEvent.class,
        jdk.internal.event.X509CertificateEvent.class,
        jdk.internal.event.X509ValidationEvent.class,
        DirectBufferStatisticsEvent.class,
        InitialSecurityPropertyEvent.class,
        MethodTraceEvent.class,
        MethodTimingEvent.class,
    };

    private static final Runnable emitExceptionStatistics = JDKEvents::emitExceptionStatistics;
    private static final Runnable emitDirectBufferStatistics = JDKEvents::emitDirectBufferStatistics;
    private static final Runnable emitContainerConfiguration = JDKEvents::emitContainerConfiguration;
    private static final Runnable emitContainerCPUUsage = JDKEvents::emitContainerCPUUsage;
    private static final Runnable emitContainerCPUThrottling = JDKEvents::emitContainerCPUThrottling;
    private static final Runnable emitContainerMemoryUsage = JDKEvents::emitContainerMemoryUsage;
    private static final Runnable emitContainerIOUsage = JDKEvents::emitContainerIOUsage;

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

    private static final Runnable emitMethodTiming = JDKEvents::emitMethodTiming;
    private static Metrics containerMetrics = null;
    private static boolean initializationTriggered;

    @SuppressWarnings("unchecked")
    public static synchronized void initialize() {
        try {
            if (initializationTriggered == false) {
                for (Class<?> eventClass : eventClasses) {
                    MetadataRepository.getInstance().register((Class<? extends Event>) eventClass);
                }
                PeriodicEvents.addJavaEvent(jdk.internal.event.ExceptionStatisticsEvent.class, emitExceptionStatistics);
                PeriodicEvents.addJavaEvent(DirectBufferStatisticsEvent.class, emitDirectBufferStatistics);
                PeriodicEvents.addJavaEvent(InitialSecurityPropertyEvent.class, emitInitialSecurityProperties);
                PeriodicEvents.addJavaEvent(MethodTimingEvent.class, emitMethodTiming);

                initializeContainerEvents();
                JFRTracing.enable();
                initializationTriggered = true;
            }
        } catch (Exception e) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.WARN, "Could not initialize JDK events. " + e.getMessage());
        }
    }

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        PeriodicEvents.removeEvent(emitContainerMemoryUsage);
        PeriodicEvents.removeEvent(emitContainerIOUsage);
    }

    private static void emitDirectBufferStatistics() {
        DirectBufferStatisticsEvent e = new DirectBufferStatisticsEvent();
        e.commit();
    }

    private static void emitInitialSecurityProperties() {
        Properties p = SharedSecrets.getJavaSecurityPropertiesAccess().getInitialProperties();
        if (p != null) {
            for (String key : p.stringPropertyNames()) {
                InitialSecurityPropertyEvent e = new InitialSecurityPropertyEvent();
                e.key = key;
                e.value = p.getProperty(key);
                e.commit();
            }
        }
    }

    private static void emitMethodTiming() {
        if (MethodSetting.isInitialized() && MethodTimingEvent.enabled()) {
            PlatformTracer.emitTiming();
        }

src/jdk.jfr/share/classes/jdk/jfr/events/InitialSecurityPropertyEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Description;
import jdk.jfr.Label;
import jdk.jfr.Name;

@Category({"Java Development Kit", "Security"})
@Label("Initial Security Property")
@Name("jdk.InitialSecurityProperty")
@Description("Initial Security Properties")
public final class InitialSecurityPropertyEvent extends AbstractPeriodicEvent {
    @Label("Key")
    public String key;

    @Label("Value")
    public String value;
}

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
key string Key Consider contributing a description to jfreventcollector.
value string Value Consider contributing a description to jfreventcollector.

Examples 3
key string
security.overridePropertiesFile
stackTrace StackTrace
null
startTime long: millis
201508938833
value string
true
key string
jdk.tls.disabledAlgorithms
stackTrace StackTrace
null
startTime long: millis
230258183292
value string
SSLv3, TLSv1, TLSv1.1, DTLSv1.0, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, ECDH
key string
login.configuration.provider
stackTrace StackTrace
null
startTime long: millis
247491823083
value string
sun.security.provider.ConfigFile

SecurityPropertyModification

startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/SecurityPropertyModificationEvent.java

Category: Java Development Kit / Security

Excludes in stack trace: java.security.Security::setProperty

Modification of Security property

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/security/Security.java:

     * @param datum the value of the property to be set.
     *
     * @throws  NullPointerException if key or datum is {@code null}
     * @throws  IllegalArgumentException if key is reserved and cannot be
     *          used as a Security property name. Reserved keys are:
     *          "include".
     *
     * @see #getProperty
     */
    public static void setProperty(String key, String datum) {
        SecPropLoader.checkReservedKey(key);
        props.put(key, datum);

        SecurityPropertyModificationEvent spe = new SecurityPropertyModificationEvent();
        // following is a no-op if event is disabled
        spe.key = key;
        spe.value = datum;
        spe.commit();

        if (EventHelper.isLoggingSecurity()) {
            EventHelper.logSecurityPropertyEvent(key, datum);
        }
    }

    private static class Criteria {

src/java.base/share/classes/jdk/internal/event/SecurityPropertyModificationEvent.java:

package jdk.internal.event;

/**
 * Event details relating to the modification of a Security property.
 */

public final class SecurityPropertyModificationEvent extends Event {
    public String key;
    public String value;
}

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

/**
 * This class registers all mirror events.
 */
final class MirrorEvents {
    private static final Map<String, Class<? extends MirrorEvent>> mirrorLookup = new ConcurrentHashMap<>();

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);

src/jdk.jfr/share/classes/jdk/jfr/events/SecurityPropertyModificationEvent.java:

package jdk.jfr.events;

import jdk.jfr.*;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;

@Category({"Java Development Kit", "Security"})
@Label("Security Property Modification")
@Name("jdk.SecurityPropertyModification")
@Description("Modification of Security property")
@RemoveFields("duration")
@StackFilter({"java.security.Security::setProperty"})
public final class SecurityPropertyModificationEvent extends MirrorEvent {
    @Label("Key")
    public String key;

    @Label("Value")
    public String value;
}

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
key string Key Consider contributing a description to jfreventcollector.
value string Value Consider contributing a description to jfreventcollector.

SecurityProviderService

startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java

Category: Java Development Kit / Security

Excludes in stack trace: java.security.Provider::getService

Details of Provider.getInstance(String type, String algorithm) calls

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/security/Provider.java:

            key = new ServiceKey(type, algorithm, false);
            previousKey.set(key);
        }

        Service s = serviceMap.get(key);
        if (s == null) {
            s = legacyMap.get(key);
            if (s != null && !s.isValid()) {
                legacyMap.remove(key, s);
                return null;
            }
        }

        if (s != null && SecurityProviderServiceEvent.isTurnedOn()) {
            var e  = new SecurityProviderServiceEvent();
            e.provider = getName();
            e.type = type;
            e.algorithm = algorithm;
            e.commit();
        }

        return s;
    }

    // ServiceKey from previous getService() call
    // by re-using it if possible we avoid allocating a new object

src/java.base/share/classes/jdk/internal/event/SecurityProviderServiceEvent.java:

package jdk.internal.event;

/**
 * Event recording details of Provider.getService(String type, String algorithm) calls
 */

public final class SecurityProviderServiceEvent extends Event {
    private static final SecurityProviderServiceEvent EVENT = new SecurityProviderServiceEvent();

    /**
     * Returns {@code true} if event is enabled, {@code false} otherwise.
     */
    public static boolean isTurnedOn() {
        return EVENT.isEnabled();
    }

    public String type;
    public String algorithm;
    public String provider;
}

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

 * This class registers all mirror events.
 */
final class MirrorEvents {
    private static final Map<String, Class<? extends MirrorEvent>> mirrorLookup = new ConcurrentHashMap<>();

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);

src/jdk.jfr/share/classes/jdk/jfr/events/SecurityProviderServiceEvent.java:

@Category({"Java Development Kit", "Security"})
@Label("Security Provider Instance Request")
@Name("jdk.SecurityProviderService")
@Description("Details of Provider.getInstance(String type, String algorithm) calls")
@RemoveFields("duration")
@StackFilter({"java.security.Provider::getService"})
public final class SecurityProviderServiceEvent extends MirrorEvent {
    @Label("Type of Service")
    public String type;

    @Label("Algorithm Name")
    public String algorithm;

    @Label("Security Provider")
    public String provider;
}

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
type string Type of Service
algorithm string Algorithm Name
provider string Security Provider

Examples 3
algorithm string
SHA
provider string
SUN
startTime long: millis
272569756833
type string
MessageDigest
algorithm string
SHA
provider string
SUN
startTime long: millis
253194614167
type string
MessageDigest
algorithm string
SHA256withDSA
provider string
SUN
startTime long: millis
232654103500
type string
Signature

SerializationMisdeclaration

profiling startTime duration 23 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/SerializationMisdeclarationEvent.java

Category: Java Development Kit / Serialization

Methods and fields misdeclarations. The checks are usually performed just once per serializable class, the first time it is used by serialization. Under high memory pressure, a class might be re-checked again.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/io/ObjectStreamClass.java:

        if (isRecord && canonicalCtr == null) {
            deserializeEx = new ExceptionInfo(name, "record canonical constructor not found");
        } else {
            for (int i = 0; i < fields.length; i++) {
                if (fields[i].getField() == null) {
                    defaultSerializeEx = new ExceptionInfo(
                        name, "unmatched serializable field(s) declared");
                }
            }
        }
        initialized = true;

        if (SerializationMisdeclarationEvent.enabled() && serializable) {
            SerializationMisdeclarationChecker.checkMisdeclarations(cl);
        }
    }

    /**
     * Creates blank class descriptor which should be initialized via a
     * subsequent call to initProxy(), initNonProxy() or readNonProxy().
     */
    ObjectStreamClass() {
    }

src/java.base/share/classes/jdk/internal/event/SerializationMisdeclarationEvent.java:

package jdk.internal.event;

/**
 * A JFR event for serialization misdeclarations.
 * This event is mirrored in {@code jdk.jfr.events.SerializationMisdeclarationEvent}
 * where the metadata for the event is provided with annotations.
 * Some of the methods are replaced by generated methods when jfr is enabled.
 * Note that the order of the arguments of the {@link #commit(long,Class,String)}
 * method must be the same as the order of the fields.
 */
public class SerializationMisdeclarationEvent extends Event {

    public Class<?> misdeclaredClass;
    public String message;

    /**
     * Commit a serialization misdeclaration event.
     * The implementation of this method is generated automatically if jfr is enabled.
     * The order of the fields must be the same as the parameters in this method.
     * {@code commit(long,Class,String)}
     *
     * @param start             timestamp of the start of the operation
     * @param misdeclaredClass  the affected class
     * @param message           the specific event message

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

 */
final class MirrorEvents {
    private static final Map<String, Class<? extends MirrorEvent>> mirrorLookup = new ConcurrentHashMap<>();

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);

src/jdk.jfr/share/classes/jdk/jfr/events/SerializationMisdeclarationEvent.java:

@Name(Type.EVENT_NAME_PREFIX + "SerializationMisdeclaration")
@Label("Serialization Misdeclaration")
@Category({"Java Development Kit", "Serialization"})
@Description("Methods and fields misdeclarations." +
        " The checks are usually performed just once per serializable class," +
        " the first time it is used by serialization." +
        " Under high memory pressure, a class might be re-checked again.")
@RemoveFields({"duration", "stackTrace", "eventThread"})
public final class SerializationMisdeclarationEvent extends MirrorEvent {

    @Label("Misdeclared Class")
    public Class<?> misdeclaredClass;

    @Label("Message")
    public String message;

}

Configuration enabled
default false
profiling true

Field Type Description
misdeclaredClass Class Misdeclared Class Consider contributing a description to jfreventcollector.
message string Message Consider contributing a description to jfreventcollector.

TLSHandshake

startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/TLSHandshakeEvent.java

Category: Java Development Kit / Security

Excludes in stack trace: sun.security.ssl.Finished::recordEvent

Parameters used in TLS Handshake

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/jdk/internal/event/TLSHandshakeEvent.java:

package jdk.internal.event;

/**
 * Event recording details of successful TLS handshakes.
 */

public final class TLSHandshakeEvent extends Event {
    public String peerHost;
    public int peerPort;
    public String protocolVersion;
    public String cipherSuite;
    public long certificateId;
}

src/java.base/share/classes/sun/security/ssl/Finished.java:

                shc.conContext.finishHandshake();
            }
            recordEvent(shc.conContext.conSession);

            //
            // produce
            if (SSLConfiguration.serverNewSessionTicketCount > 0) {
                NewSessionTicket.t13PosthandshakeProducer.produce(shc);
            }
        }
    }

    private static void recordEvent(SSLSessionImpl session) {
        TLSHandshakeEvent event = new TLSHandshakeEvent();
        if (event.shouldCommit() || EventHelper.isLoggingSecurity()) {
            int hash = 0;
            try {
                // use hash code for Id
                hash = session
                        .getCertificateChain()[0]
                        .hashCode();
            } catch (SSLPeerUnverifiedException e) {
                 // not verified msg
            }
            long peerCertificateId = Integer.toUnsignedLong(hash);

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);
        register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class);
    };

    private static void register(String eventClassName, Class<? extends MirrorEvent> mirrorClass) {

src/jdk.jfr/share/classes/jdk/jfr/events/TLSHandshakeEvent.java:

@Category({"Java Development Kit", "Security"})
@Label("TLS Handshake")
@Name("jdk.TLSHandshake")
@Description("Parameters used in TLS Handshake")
@RemoveFields("duration")
@StackFilter("sun.security.ssl.Finished::recordEvent")
public final class TLSHandshakeEvent extends MirrorEvent {
    @Label("Peer Host")
    public String peerHost;

    @Label("Peer Port")
    public int peerPort;

    @Label("Protocol Version")
    public String protocolVersion;

    @Label("Cipher Suite")
    public String cipherSuite;

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
peerHost string Peer Host Consider contributing a description to jfreventcollector.
peerPort int Peer Port
protocolVersion string Protocol Version Consider contributing a description to jfreventcollector.
cipherSuite string Cipher Suite Consider contributing a description to jfreventcollector.
certificateId ulong: certificateId Certificate Id Peer Certificate Id

VirtualThreadSubmitFailed

default profiling startTime duration 19 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadSubmitFailedEvent.java

Category: Java Development Kit / Threading

Submit of task for virtual thread failed

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/lang/VirtualThread.java:

        if (scheduler == DEFAULT_SCHEDULER && currentCarrierThread() instanceof CarrierThread ct) {
            try {
                ct.getPool().externalSubmit(ForkJoinTask.adapt(runContinuation));
            } catch (RejectedExecutionException ree) {
                submitFailed(ree);
                throw ree;
            }
        } else {
            submitRunContinuation(scheduler, false);
        }
    }

    /**
     * If enabled, emits a JFR VirtualThreadSubmitFailedEvent.
     */
    private void submitFailed(RejectedExecutionException ree) {
        var event = new VirtualThreadSubmitFailedEvent();
        if (event.isEnabled()) {
            event.javaThreadId = threadId();
            event.exceptionMessage = ree.getMessage();
            event.commit();
        }
    }

    /**
     * Runs a task in the context of this virtual thread.
     */
    private void run(Runnable task) {

src/java.base/share/classes/jdk/internal/event/VirtualThreadSubmitFailedEvent.java:

package jdk.internal.event;

/**
 * Event recording when an attempt to submit the task for a virtual thread failed.
 */
public class VirtualThreadSubmitFailedEvent extends Event {
    public long javaThreadId;
    public String exceptionMessage;
}

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);
        register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class);
    };

    private static void register(String eventClassName, Class<? extends MirrorEvent> mirrorClass) {
        mirrorLookup.put(eventClassName, mirrorClass);
    }

src/jdk.jfr/share/classes/jdk/jfr/events/VirtualThreadSubmitFailedEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Description;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;

@Category({"Java Development Kit", "Threading"})
@Label("Virtual Thread Submit Failed")
@Name("jdk.VirtualThreadSubmitFailed")
@Description("Submit of task for virtual thread failed")
@RemoveFields("duration")
public final class VirtualThreadSubmitFailedEvent extends MirrorEvent {

    @Label("Thread Id")
    public long javaThreadId;

    @Label("Exception Message")
    public String exceptionMessage;

}

Configuration enabled stackTrace
default true true
profiling true true

Field Type Description
javaThreadId long Thread Id
exceptionMessage string Exception Message Consider contributing a description to jfreventcollector.

X509Certificate

startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/X509CertificateEvent.java

Category: Java Development Kit / Security

Details of X.509 Certificate parsed by JDK

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/jdk/internal/event/X509CertificateEvent.java:

package jdk.internal.event;


/**
 * Event recording details of X.509 Certificate.
 */

public final class X509CertificateEvent extends Event {
    private static final X509CertificateEvent EVENT = new X509CertificateEvent();

    /**
     * Returns {@code true} if event is enabled, {@code false} otherwise.
     */
    public static boolean isTurnedOn() {
        return EVENT.isEnabled();
    }

    public String algorithm;
    public String serialNumber;
    public String subject;
    public String issuer;
    public String keyType;
    public int keyLength;
    public long certificateId;

src/java.base/share/classes/sun/security/jca/JCAUtil.java:

        SecureRandom result = def;
        if (result == null) {
            synchronized (JCAUtil.class) {
                result = def;
                if (result == null) {
                    def = result = new SecureRandom();
                }
            }
        }
        return result;
    }

    public static void tryCommitCertEvent(Certificate cert) {
        if ((X509CertificateEvent.isTurnedOn() || EventHelper.isLoggingSecurity()) &&
                (cert instanceof X509Certificate x509)) {
            PublicKey pKey = x509.getPublicKey();
            String algId = x509.getSigAlgName();
            String serNum = Debug.toString(x509.getSerialNumber());
            String subject = x509.getSubjectX500Principal().toString();
            String issuer = x509.getIssuerX500Principal().toString();
            String keyType = pKey.getAlgorithm();
            int length = KeyUtil.getKeySize(pKey);
            int hashCode = x509.hashCode();
            long certifcateId = Integer.toUnsignedLong(hashCode);
            long beginDate = x509.getNotBefore().getTime();
            long endDate = x509.getNotAfter().getTime();
            if (X509CertificateEvent.isTurnedOn()) {
                X509CertificateEvent xce = new X509CertificateEvent();
                xce.algorithm = algId;
                xce.serialNumber = serNum;
                xce.subject = subject;
                xce.issuer = issuer;
                xce.keyType = keyType;
                xce.keyLength = length;
                xce.certificateId = certifcateId;
                xce.validFrom = beginDate;
                xce.validUntil = endDate;
                xce.commit();
            }

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);
        register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class);
    };

    private static void register(String eventClassName, Class<? extends MirrorEvent> mirrorClass) {
        mirrorLookup.put(eventClassName, mirrorClass);
    }

    static Class<? extends MirrorEvent> find(Class<? extends jdk.internal.event.Event> eventClass) {

src/jdk.jfr/share/classes/jdk/jfr/events/X509CertificateEvent.java:

package jdk.jfr.events;

import jdk.jfr.*;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;

@Category({"Java Development Kit", "Security"})
@Label("X509 Certificate")
@Name("jdk.X509Certificate")
@Description("Details of X.509 Certificate parsed by JDK")
@RemoveFields("duration")
public final class X509CertificateEvent extends MirrorEvent {
    @Label("Signature Algorithm")
    public String algorithm;

    @Label("Serial Number")
    public String serialNumber;

    @Label("Subject")
    public String subject;

    @Label("Issuer")
    public String issuer;

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
algorithm string Signature Algorithm
serialNumber string Serial Number Consider contributing a description to jfreventcollector.
subject string Subject Consider contributing a description to jfreventcollector.
issuer string Issuer Consider contributing a description to jfreventcollector.
keyType string Key Type Consider contributing a description to jfreventcollector.
keyLength int Key Length
certificateId ulong: certificateId Certificate Id
validFrom long: epochmillis Valid From
validUntil long: epochmillis Valid Until

Examples 3
algorithm string
SHA1withDSA
certificateId ulong: certificateId
3045411335
issuer string
CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
keyLength int
1024
keyType string
DSA
serialNumber string
46:10:1f:71
startTime long: millis
272695123833
subject string
CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
validFrom long: epochmillis
1175461745000
validUntil long: epochmillis
4329061745000
algorithm string
SHA1withDSA
certificateId ulong: certificateId
3045411335
issuer string
CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
keyLength int
1024
keyType string
DSA
serialNumber string
46:10:1f:71
startTime long: millis
233166705166
subject string
CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
validFrom long: epochmillis
1175461745000
validUntil long: epochmillis
4329061745000
algorithm string
SHA1withDSA
certificateId ulong: certificateId
3045411335
issuer string
CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
keyLength int
1024
keyType string
DSA
serialNumber string
46:10:1f:71
startTime long: millis
253316122375
subject string
CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
validFrom long: epochmillis
1175461745000
validUntil long: epochmillis
4329061745000

X509Validation

startTime duration 11 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/X509ValidationEvent.java

Category: Java Development Kit / Security

Serial numbers from X.509 Certificates forming chain of trust

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/jdk/internal/event/X509ValidationEvent.java:

package jdk.internal.event;

/**
 * Event recording details of X.509 Certificate serial numbers
 * used in X509 cert path validation.
 */

public final class X509ValidationEvent extends Event {
    public long certificateId;
    public int certificatePosition;
    public long validationCounter;
}

src/java.base/share/classes/sun/security/provider/certpath/PKIXCertPathValidator.java:

        // only add a RevocationChecker if revocation is enabled and
        // a PKIXRevocationChecker has not already been added
        if (params.revocationEnabled() && !revCheckerAdded) {
            certPathCheckers.add(new RevocationChecker(anchor, params));
        }
        // add user-specified checkers
        certPathCheckers.addAll(checkers);

        PKIXMasterCertPathValidator.validate(params.certPath(),
                                             params.certificates(),
                                             certPathCheckers);

        X509ValidationEvent xve = new X509ValidationEvent();
        if (xve.shouldCommit() || EventHelper.isLoggingSecurity()) {
            long[] certIds = params.certificates().stream()
                    .mapToInt(Certificate::hashCode)
                    .mapToLong(Integer::toUnsignedLong)
                    .toArray();
            int hash = (anchorCert != null) ?
                anchorCert.hashCode() : anchor.getCAPublicKey().hashCode();
            long anchorCertId = Integer.toUnsignedLong(hash);
            if (xve.shouldCommit()) {
                xve.certificateId = anchorCertId;
                int certificatePos = 1; // most trusted CA

src/jdk.jfr/share/classes/jdk/jfr/events/X509ValidationEvent.java:

package jdk.jfr.events;

import jdk.jfr.*;
import jdk.jfr.internal.MirrorEvent;
import jdk.jfr.internal.RemoveFields;

@Category({"Java Development Kit", "Security"})
@Label("X509 Validation")
@Name("jdk.X509Validation")
@Description("Serial numbers from X.509 Certificates forming chain of trust")
@RemoveFields("duration")
public final class X509ValidationEvent extends MirrorEvent {
    @CertificateId
    @Label("Certificate Id")
    @Unsigned
    public long certificateId;

    @Label("Certificate Position")
    @Description("Certificate position in chain of trust, 1 = trust anchor")
    public int certificatePosition;

    @Label("Validation Counter")
    public long validationCounter;
}

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);
        register("jdk.internal.event.X509ValidationEvent", X509ValidationEvent.class);
        register("jdk.internal.event.ErrorThrownEvent", ErrorThrownEvent.class);
        register("jdk.internal.event.ExceptionStatisticsEvent", ExceptionStatisticsEvent.class);
        register("jdk.internal.event.ExceptionThrownEvent", ExceptionThrownEvent.class);
    };

    private static void register(String eventClassName, Class<? extends MirrorEvent> mirrorClass) {
        mirrorLookup.put(eventClassName, mirrorClass);
    }

    static Class<? extends MirrorEvent> find(Class<? extends jdk.internal.event.Event> eventClass) {
        return find(Utils.isJDKClass(eventClass), eventClass.getName());

Configuration enabled stackTrace
default false true
profiling false true

Field Type Description
certificateId ulong: certificateId Certificate Id
certificatePosition int Certificate Position Certificate position in chain of trust, 1 = trust anchor
validationCounter long Validation Counter

Operating System

OSInformation

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Operating System

Description of the OS the JVM runs on, for example, a uname-like output

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  event.set_jvmVersion(VM_Version::internal_vm_info_string());
  event.set_javaArguments(Arguments::java_command());
  event.set_jvmArguments(Arguments::jvm_args());
  event.set_jvmFlags(Arguments::jvm_flags());
  event.set_jvmStartTime(Management::vm_init_done_time());
  event.set_pid(os::current_process_id());
  event.commit();
 }

TRACE_REQUEST_FUNC(OSInformation) {
  ResourceMark rm;
  char* os_version = nullptr;
  JfrOSInterface::os_version(&os_version);
  EventOSInformation event;
  event.set_osVersion(os_version);
  event.commit();
}

TRACE_REQUEST_FUNC(VirtualizationInformation) {
  EventVirtualizationInformation event;
  event.set_name(JfrOSInterface::virtualization_name());
  event.commit();
}

TRACE_REQUEST_FUNC(ModuleRequire) {

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
osVersion string OS Version

Examples 3
osVersion string
uname: Darwin 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041 arm64
startTime long: millis
243534710708
osVersion string
uname: Darwin 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041 arm64
startTime long: millis
273456984500
osVersion string
uname: Darwin 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041 arm64
startTime long: millis
233939043375

VirtualizationInformation

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Operating System

Description of the virtualization technology the JVM runs on

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  event.commit();
 }

TRACE_REQUEST_FUNC(OSInformation) {
  ResourceMark rm;
  char* os_version = nullptr;
  JfrOSInterface::os_version(&os_version);
  EventOSInformation event;
  event.set_osVersion(os_version);
  event.commit();
}

TRACE_REQUEST_FUNC(VirtualizationInformation) {
  EventVirtualizationInformation event;
  event.set_name(JfrOSInterface::virtualization_name());
  event.commit();
}

TRACE_REQUEST_FUNC(ModuleRequire) {
  JfrModuleEvent::generate_module_dependency_events();
}

TRACE_REQUEST_FUNC(ModuleExport) {
  JfrModuleEvent::generate_module_export_events();
}

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
name string Name

Examples 3
name string
No virtualization detected
startTime long: millis
287137244500
name string
No virtualization detected
startTime long: millis
222026515666
name string
No virtualization detected
startTime long: millis
264717718500

InitialEnvironmentVariable

default profiling startTime end of every chunk 11 17 21 25 26

Category: Operating System

Key-value pairs for environment variables at JVM startup

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrOSInterface.cpp:

  } else if (vrt == PowerFullPartitionMode) {
    return "Power full partition";
  }

  return "No virtualization detected";
}

int JfrOSInterface::generate_initial_environment_variable_events() {
  if (os::get_environ() == nullptr) {
    return OS_ERR;
  }

  if (EventInitialEnvironmentVariable::is_enabled()) {
    // One time stamp for all events, so they can be grouped together
    JfrTicks time_stamp = JfrTicks::now();
    for (char** p = os::get_environ(); *p != nullptr; p++) {
      char* variable = *p;
      char* equal_sign = strchr(variable, '=');
      if (equal_sign != nullptr) {
        // Extract key/value
        ResourceMark rm;
        ptrdiff_t key_length = equal_sign - variable;
        char* key = NEW_RESOURCE_ARRAY(char, key_length + 1);
        char* value = equal_sign + 1;
        strncpy(key, variable, key_length);
        key[key_length] = '\0';
        EventInitialEnvironmentVariable event(UNTIMED);
        event.set_starttime(time_stamp);
        event.set_endtime(time_stamp);
        event.set_key(key);
        event.set_value(value);
        event.commit();
      }
    }
  }
  return OS_OK;
}

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
key string Key
value string Value

Examples 3
key string
HOMEBREW_PREFIX
startTime long: millis
199116091500
value string
/opt/homebrew
key string
SDKMAN_CANDIDATES_API
startTime long: millis
232720215500
value string
https://api.sdkman.io/2
key string
ANDROID_HOME
startTime long: millis
242216380208
value string
[...]_1/.android

SystemProcess

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Operating System

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

    while (processes != nullptr) {
      SystemProcess* tmp = processes;
      const char* info = processes->command_line();
      if (info == nullptr) {
         info = processes->path();
      }
      if (info == nullptr) {
         info = processes->name();
      }
      if (info == nullptr) {
         info = "?";
      }
      jio_snprintf(pid_buf, sizeof(pid_buf), "%d", processes->pid());
      EventSystemProcess event(UNTIMED);
      event.set_pid(pid_buf);
      event.set_commandLine(info);
      event.set_starttime(start_time);
      event.set_endtime(end_time);
      event.commit();
      processes = processes->next();
      delete tmp;
    }
  }
}

Configuration enabled period
default true endChunk
profiling true endChunk

Field Type Description
pid string Process Identifier
commandLine string Command Line

Examples 3
commandLine string
/System/Library/Frameworks/Security.framework/Versions/A/XPCServices/com.apple.CodeSigningHelper.xpc/Contents/MacOS/com.apple.CodeSigningHelper
pid string
642
startTime long: millis
231199181958
commandLine string
/System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer
pid string
591
startTime long: millis
243796269167
commandLine string
/usr/libexec/autofsd
pid string
566
startTime long: millis
200088120250

CPUInformation

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Operating System / Processor

Characteristics and descriptions of the processor(s) the JVM is running on

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

TRACE_REQUEST_FUNC(CPUInformation) {
  CPUInformation cpu_info;
  int ret_val = JfrOSInterface::cpu_information(cpu_info);
  if (ret_val == OS_ERR) {
    log_debug(jfr, system)( "Unable to generate requestable event CPUInformation");
    return;
  }
  if (ret_val == FUNCTIONALITY_NOT_IMPLEMENTED) {
     return;
  }
  if (ret_val == OS_OK) {
    EventCPUInformation event;
    event.set_cpu(cpu_info.cpu_name());
    event.set_description(cpu_info.cpu_description());
    event.set_sockets(cpu_info.number_of_sockets());
    event.set_cores(cpu_info.number_of_cores());
    event.set_hwThreads(cpu_info.number_of_hardware_threads());
    event.commit();
  }
}

TRACE_REQUEST_FUNC(CPULoad) {
  double u = 0; // user time

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
cpu string Type
description string Description
sockets uint Sockets
cores uint Cores Approximation on a hybrid CPU
hwThreads uint Hardware Threads

Examples 3
cores uint
12
cpu string
AArch64
description string
AArch64 0x61:0x0:0x17d5b93a:0, fp, asimd, aes, pmull, sha1, sha256, crc32, lse, sha3, sha512
hwThreads uint
12
sockets uint
12
startTime long: millis
292504016125
cores uint
12
cpu string
AArch64
description string
AArch64 0x61:0x0:0x17d5b93a:0, fp, asimd, aes, pmull, sha1, sha256, crc32, lse, sha3, sha512
hwThreads uint
12
sockets uint
12
startTime long: millis
233960292333
cores uint
12
cpu string
AArch64
description string
AArch64 0x61:0x0:0x17d5b93a:0, fp, asimd, aes, pmull, sha1, sha256, crc32, lse, sha3, sha512
hwThreads uint
12
sockets uint
12
startTime long: millis
205970294125

CPUTimeStampCounter

default profiling startTime duration end of every chunk 11 17 21 25 26

Category: Operating System / Processor

Information about the CPU time stamp mechanism / (RD)TSC

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

TRACE_REQUEST_FUNC(ThreadCPULoad) {
  JfrThreadCPULoadEvent::send_events();
}

TRACE_REQUEST_FUNC(CompilerQueueUtilization) {
  JfrCompilerQueueUtilization::send_events();
}

TRACE_REQUEST_FUNC(NetworkUtilization) {
  JfrNetworkUtilization::send_events();
}

TRACE_REQUEST_FUNC(CPUTimeStampCounter) {
  EventCPUTimeStampCounter event;
  event.set_fastTimeEnabled(JfrTime::is_ft_enabled());
  event.set_fastTimeAutoEnabled(JfrTime::is_ft_supported());
  event.set_osFrequency(os::elapsed_frequency());
  event.set_fastTimeFrequency(JfrTime::frequency());
  event.commit();
}

TRACE_REQUEST_FUNC(SystemProcess) {
  char pid_buf[16];
  SystemProcess* processes = nullptr;
  int num_of_processes = 0;

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
fastTimeEnabled boolean Fast Time
fastTimeAutoEnabled boolean Trusted Platform
osFrequency long: hertz OS Frequency
fastTimeFrequency long: hertz Fast Time Frequency

Examples 3
fastTimeAutoEnabled boolean
false
fastTimeEnabled boolean
false
fastTimeFrequency long: hertz
1000000000
osFrequency long: hertz
1000000000
startTime long: millis
265731409583
fastTimeAutoEnabled boolean
false
fastTimeEnabled boolean
false
fastTimeFrequency long: hertz
1000000000
osFrequency long: hertz
1000000000
startTime long: millis
205970294625
fastTimeAutoEnabled boolean
false
fastTimeEnabled boolean
false
fastTimeFrequency long: hertz
1000000000
osFrequency long: hertz
1000000000
startTime long: millis
264781377417

CPULoad

default profiling startTime duration every chunk 11 17 21 25 26

Category: Operating System / Processor

Information about the recent CPU usage of the JVM process

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

  double t = 0; // total time
  int ret_val = OS_ERR;
  {
    // Can take some time on certain platforms, especially under heavy load.
    // Transition to native to avoid unnecessary stalls for pending safepoint synchronizations.
    ThreadToNativeFromVM transition(JavaThread::current());
    ret_val = JfrOSInterface::cpu_loads_process(&u, &s, &t);
  }
  if (ret_val == OS_ERR) {
    log_debug(jfr, system)( "Unable to generate requestable event CPULoad");
    return;
  }
  if (ret_val == OS_OK) {
    EventCPULoad event;
    event.set_jvmUser((float)u);
    event.set_jvmSystem((float)s);
    event.set_machineTotal((float)t);
    event.commit();
  }
}

TRACE_REQUEST_FUNC(ThreadCPULoad) {
  JfrThreadCPULoadEvent::send_events();
}

Configuration enabled period
default true 1000 ms
profiling true 1000 ms

Field Type Description
jvmUser float: percentage JVM User
jvmSystem float: percentage JVM System
machineTotal float: percentage Machine Total

Examples 3
jvmSystem float: percentage
0.08828383
jvmUser float: percentage
0.650165
machineTotal float: percentage
0.8295739
startTime long: millis
269971164083
jvmSystem float: percentage
0.16584158
jvmUser float: percentage
0.5173267
machineTotal float: percentage
0.805
startTime long: millis
293799309792
jvmSystem float: percentage
0.060185187
jvmUser float: percentage
0.16126543
machineTotal float: percentage
0.45846394
startTime long: millis
239566994541

ThreadCPULoad

default profiling startTime duration eventThread every chunk 11 17 21 25 26

Category: Operating System / Processor

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrThreadCPULoadEvent.cpp:

int JfrThreadCPULoadEvent::get_processor_count() {
  int cur_processor_count = os::active_processor_count();
  int last_processor_count = _last_active_processor_count;
  _last_active_processor_count = cur_processor_count;

  // If the number of processors decreases, we don't know at what point during
  // the sample interval this happened, so use the largest number to try
  // to avoid percentages above 100%
  return MAX2(cur_processor_count, last_processor_count);
}

// Returns false if the thread has not been scheduled since the last call to updateEvent
// (i.e. the delta for both system and user time is 0 milliseconds)
bool JfrThreadCPULoadEvent::update_event(EventThreadCPULoad& event, JavaThread* thread, jlong cur_wallclock_time, int processor_count) {
  JfrThreadLocal* const tl = thread->jfr_thread_local();

  jlong cur_cpu_time = os::thread_cpu_time(thread, true);
  jlong prev_cpu_time = tl->get_cpu_time();

  jlong prev_wallclock_time = tl->get_wallclock_time();
  tl->set_wallclock_time(cur_wallclock_time);

  // Threshold of 1 ms
  if (cur_cpu_time - prev_cpu_time < 1 * NANOSECS_PER_MILLISEC) {
    return false;

src/hotspot/share/jfr/periodic/jfrThreadCPULoadEvent.cpp:

void JfrThreadCPULoadEvent::send_events() {
  Thread* periodic_thread = Thread::current();
  traceid periodic_thread_id = JfrThreadLocal::thread_id(periodic_thread);
  const int processor_count = JfrThreadCPULoadEvent::get_processor_count();
  JfrTicks event_time = JfrTicks::now();
  jlong cur_wallclock_time = JfrThreadCPULoadEvent::get_wallclock_time();

  JfrJavaThreadIterator iter;
  int number_of_threads = 0;
  while (iter.has_next()) {
    JavaThread* const jt = iter.next();
    assert(jt != nullptr, "invariant");
    ++number_of_threads;
    EventThreadCPULoad event(UNTIMED);
    if (JfrThreadCPULoadEvent::update_event(event, jt, cur_wallclock_time, processor_count)) {
      event.set_starttime(event_time);
      event.set_endtime(event_time);
      if (jt != periodic_thread) {
        // Commit reads the thread id from this thread's trace data, so put it there temporarily
        JfrThreadLocal::impersonate(periodic_thread, JFR_JVM_THREAD_ID(jt));
      } else {
        JfrThreadLocal::impersonate(periodic_thread, periodic_thread_id);
      }
      event.commit();
    }
  }
  log_trace(jfr)("Measured CPU usage for %d threads in %.3f milliseconds", number_of_threads,
    (double)(JfrTicks::now() - event_time).milliseconds());
  JfrThreadLocal::stop_impersonating(periodic_thread);
}

void JfrThreadCPULoadEvent::send_event_for_thread(JavaThread* jt) {
  EventThreadCPULoad event;
  if (event.should_commit()) {
    if (update_event(event, jt, get_wallclock_time(), get_processor_count())) {
      event.commit();
    }
  }
}

src/hotspot/share/jfr/periodic/jfrThreadCPULoadEvent.hpp:

#ifndef SHARE_JFR_PERIODIC_JFRTHREADCPULOADEVENT_HPP
#define SHARE_JFR_PERIODIC_JFRTHREADCPULOADEVENT_HPP

#include "jni.h"
#include "memory/allStatic.hpp"

class JavaThread;
class EventThreadCPULoad;

class JfrThreadCPULoadEvent : public AllStatic {
  static int _last_active_processor_count;
 public:
  static jlong get_wallclock_time();
  static int get_processor_count();
  static bool update_event(EventThreadCPULoad& event, JavaThread* thread, jlong cur_wallclock_time, int processor_count);
  static void send_events();
  static void send_event_for_thread(JavaThread* jt);
};

#endif // SHARE_JFR_PERIODIC_JFRTHREADCPULOADEVENT_HPP

Configuration enabled period
default true 10 s
profiling true 10 s

Field Type Description
user float: percentage User Mode CPU Load User mode thread CPU load
system float: percentage System Mode CPU Load System mode thread CPU load

Examples 3
startTime long: millis
260805034708
system float: percentage
1.476276E-6
user float: percentage
7.858283E-6
startTime long: millis
242262176708
system float: percentage
1.2703803E-5
user float: percentage
2.1402739E-5
startTime long: millis
226174237250
system float: percentage
3.3179793E-5
user float: percentage
1.6826894E-5

ThreadContextSwitchRate

default profiling startTime duration every chunk 11 17 21 25 26

Category: Operating System / Processor

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

    // Can take some time on certain platforms, especially under heavy load.
    // Transition to native to avoid unnecessary stalls for pending safepoint synchronizations.
    ThreadToNativeFromVM transition(JavaThread::current());
    ret_val = JfrOSInterface::context_switch_rate(&rate);
  }
  if (ret_val == OS_ERR) {
    log_debug(jfr, system)( "Unable to generate requestable event ThreadContextSwitchRate");
    return;
  }
  if (ret_val == FUNCTIONALITY_NOT_IMPLEMENTED) {
    return;
  }
  if (ret_val == OS_OK) {
    EventThreadContextSwitchRate event;
    event.set_switchRate((float)rate + 0.0f);
    event.commit();
  }
}

#define SEND_FLAGS_OF_TYPE(eventType, flagType)                   \
  do {                                                            \
    JVMFlag *flag = JVMFlag::flags;                               \
    while (flag->name() != nullptr) {                             \
      if (flag->is_ ## flagType()) {                              \
        if (flag->is_unlocked()) {                                \

Configuration enabled period
default true 10 s
profiling true 10 s

Field Type Description
switchRate float: hertz Switch Rate Number of context switches per second

Examples 3
startTime long: millis
269059776875
switchRate float: hertz
28458.354
startTime long: millis
265835528458
switchRate float: hertz
20113.96
startTime long: millis
245620402041
switchRate float: hertz
19986.436

NetworkUtilization

default profiling startTime every chunk 11 17 21 25 26

Category: Operating System / Network

No additional description available. Write your own and contribute it to jfreventcollector or directly to the OpenJDK.

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrNetworkUtilization.cpp:

  static JfrTicks last_sample_instant;
  const JfrTicks cur_time = JfrTicks::now();
  if (cur_time > last_sample_instant) {
    const JfrTickspan interval = cur_time - last_sample_instant;
    for (NetworkInterface *cur = network_interfaces; cur != nullptr; cur = cur->next()) {
      InterfaceEntry& entry = get_entry(cur);
      const uint64_t current_bytes_in = cur->get_bytes_in();
      const uint64_t current_bytes_out = cur->get_bytes_out();
      const uint64_t read_rate = rate_per_second(current_bytes_in, entry.bytes_in, interval);
      const uint64_t write_rate = rate_per_second(current_bytes_out, entry.bytes_out, interval);
      if (read_rate > 0 || write_rate > 0) {
        write_interface_constant(entry);
        EventNetworkUtilization event(UNTIMED);
        event.set_starttime(cur_time);
        event.set_endtime(cur_time);
        event.set_networkInterface(entry.id);
        event.set_readRate(8 * read_rate);
        event.set_writeRate(8 * write_rate);
        event.commit();
      }
      // update existing entry with new values
      entry.bytes_in = current_bytes_in;
      entry.bytes_out = current_bytes_out;
    }

Configuration enabled period
default true 5 s
profiling true 5 s

Field Type Description
networkInterface NetworkInterfaceName Network Interface Network Interface Name
readRate long: bits-per-second Read Rate Number of incoming bits per second
writeRate long: bits-per-second Write Rate Number of outgoing bits per second

Examples 3
networkInterface NetworkInterfaceName
lo0
readRate long: bits-per-second
8112
startTime long: millis
245620298000
writeRate long: bits-per-second
8112
networkInterface NetworkInterfaceName
lo0
readRate long: bits-per-second
2904
startTime long: millis
274698500417
writeRate long: bits-per-second
2904
networkInterface NetworkInterfaceName
en0
readRate long: bits-per-second
0
startTime long: millis
270984271833
writeRate long: bits-per-second
14312

PhysicalMemory

default profiling startTime duration every chunk 11 17 21 25 26

Category: Operating System / Memory

OS Physical Memory

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

 *  PhysicalMemory event represents:
 *
 *  @totalSize == The amount of physical memory (hw) installed and reported by the OS, in bytes.
 *  @usedSize  == The amount of physical memory currently in use in the system (reserved/committed), in bytes.
 *
 *  Both fields are systemwide, i.e. represents the entire OS/HW environment.
 *  These fields do not include virtual memory.
 *
 *  If running inside a guest OS on top of a hypervisor in a virtualized environment,
 *  the total memory reported is the amount of memory configured for the guest OS by the hypervisor.
 */
TRACE_REQUEST_FUNC(PhysicalMemory) {
  physical_memory_size_type totalPhysicalMemory = os::physical_memory();
  EventPhysicalMemory event;
  event.set_totalSize(totalPhysicalMemory);
  physical_memory_size_type avail_mem = 0;
  // Return value ignored - defaulting to 0 on failure.
  (void)os::available_memory(avail_mem);
  event.set_usedSize(totalPhysicalMemory - avail_mem);
  event.commit();
}

TRACE_REQUEST_FUNC(SwapSpace) {
  EventSwapSpace event;
  physical_memory_size_type total_swap_space = 0;

Configuration enabled period
default true everyChunk
profiling true everyChunk

Field Type Description
totalSize ulong: bytes Total Size Total amount of physical memory available to OS
usedSize ulong: bytes Used Size Total amount of physical memory in use

Examples 3
startTime long: millis
208325427166
totalSize ulong: bytes
51539607552
usedSize ulong: bytes
45810008064
startTime long: millis
258428285625
totalSize ulong: bytes
51539607552
usedSize ulong: bytes
48830431232
startTime long: millis
233971124542
totalSize ulong: bytes
51539607552
usedSize ulong: bytes
50016534528

SwapSpace

default profiling startTime duration every chunk 23 25 26

Category: Operating System / Memory

OS Swap Space

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:

 */
TRACE_REQUEST_FUNC(PhysicalMemory) {
  physical_memory_size_type totalPhysicalMemory = os::physical_memory();
  EventPhysicalMemory event;
  event.set_totalSize(totalPhysicalMemory);
  physical_memory_size_type avail_mem = 0;
  // Return value ignored - defaulting to 0 on failure.
  (void)os::available_memory(avail_mem);
  event.set_usedSize(totalPhysicalMemory - avail_mem);
  event.commit();
}

TRACE_REQUEST_FUNC(SwapSpace) {
  EventSwapSpace event;
  physical_memory_size_type total_swap_space = 0;
  // Return value ignored - defaulting to 0 on failure.
  (void)os::total_swap_space(total_swap_space);
  event.set_totalSize(static_cast<s8>(total_swap_space));
  physical_memory_size_type free_swap_space = 0;
  // Return value ignored - defaulting to 0 on failure.
  (void)os::free_swap_space(free_swap_space);
  event.set_freeSize(static_cast<s8>(free_swap_space));
  event.commit();
}

Configuration enabled period
default true everyChunk
profiling true everyChunk

Field Type Description
totalSize long: bytes Total Size Total swap space available to the OS
freeSize long: bytes Free Size Free swap space

ContainerCPUThrottling

default profiling startTime duration stackTrace 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ContainerCPUThrottlingEvent.java

Category: Operating System / Processor

Container CPU throttling related information

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

    private static void initializeContainerEvents() {
        if (JVM.isContainerized() ) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, "JVM is containerized");
            containerMetrics = Container.metrics();
            if (containerMetrics != null) {
                Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, "Container metrics are available");
            }
        }
        // The registration of events and hooks are needed to provide metadata,
        // even when not running in a container
        registerEvent(ContainerConfigurationEvent.class);
        registerEvent(ContainerCPUUsageEvent.class);
        registerEvent(ContainerCPUThrottlingEvent.class);
        registerEvent(ContainerMemoryUsageEvent.class);
        registerEvent(ContainerIOUsageEvent.class);

        PeriodicEvents.addJavaEvent(ContainerConfigurationEvent.class, emitContainerConfiguration);
        PeriodicEvents.addJavaEvent(ContainerCPUUsageEvent.class, emitContainerCPUUsage);
        PeriodicEvents.addJavaEvent(ContainerCPUThrottlingEvent.class, emitContainerCPUThrottling);
        PeriodicEvents.addJavaEvent(ContainerMemoryUsageEvent.class, emitContainerMemoryUsage);
        PeriodicEvents.addJavaEvent(ContainerIOUsageEvent.class, emitContainerIOUsage);
    }

    private static void registerEvent(Class<? extends jdk.internal.event.Event> eventClass) {
        MetadataRepository.getInstance().register(eventClass);
    }

    private static void emitExceptionStatistics() {
        ThrowableTracer.emitStatistics();
    }

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

    private static void emitContainerIOUsage() {
        if (containerMetrics != null) {
            ContainerIOUsageEvent event = new ContainerIOUsageEvent();

            event.serviceRequests = containerMetrics.getBlkIOServiceCount();
            event.dataTransferred = containerMetrics.getBlkIOServiced();
            event.commit();
        }
    }

    private static void emitContainerCPUThrottling() {
        if (containerMetrics != null) {
            ContainerCPUThrottlingEvent event = new ContainerCPUThrottlingEvent();

            event.cpuElapsedSlices = containerMetrics.getCpuNumPeriods();
            event.cpuThrottledSlices = containerMetrics.getCpuNumThrottled();
            event.cpuThrottledTime = containerMetrics.getCpuThrottledTime();
            event.commit();
        }
    }

    public static void remove() {
        PeriodicEvents.removeEvent(emitExceptionStatistics);
        PeriodicEvents.removeEvent(emitDirectBufferStatistics);

src/jdk.jfr/share/classes/jdk/jfr/events/ContainerCPUThrottlingEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Description;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.Timespan;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "ContainerCPUThrottling")
@Label("CPU Throttling")
@Category({"Operating System", "Processor"})
@Description("Container CPU throttling related information")
public class ContainerCPUThrottlingEvent extends AbstractPeriodicEvent {
  @Label("CPU Elapsed Slices")
  @Description("Number of time-slice periods that have elapsed if a CPU quota has been setup for the container")
  public long cpuElapsedSlices;

  @Label("CPU Throttled Slices")
  @Description("Number of time-slice periods that the CPU has been throttled or limited due to exceeding CPU quota")
  public long cpuThrottledSlices;

  @Label("CPU Throttled Time")
  @Description("Total time duration, in nanoseconds, that the CPU has been throttled or limited due to exceeding CPU quota")
  @Timespan

Configuration enabled period
default true 30 s
profiling true 30 s

Field Type Description
cpuElapsedSlices long CPU Elapsed Slices Number of time-slice periods that have elapsed if a CPU quota has been setup for the container
cpuThrottledSlices long CPU Throttled Slices Number of time-slice periods that the CPU has been throttled or limited due to exceeding CPU quota
cpuThrottledTime long: nanos CPU Throttled Time Total time duration, in nanoseconds, that the CPU has been throttled or limited due to exceeding CPU quota

ContainerCPUUsage

default profiling startTime duration stackTrace 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ContainerCPUUsageEvent.java

Category: Operating System / Processor

Container CPU usage related information

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

    private static void initializeContainerEvents() {
        if (JVM.isContainerized() ) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, "JVM is containerized");
            containerMetrics = Container.metrics();
            if (containerMetrics != null) {
                Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, "Container metrics are available");
            }
        }
        // The registration of events and hooks are needed to provide metadata,
        // even when not running in a container
        registerEvent(ContainerConfigurationEvent.class);
        registerEvent(ContainerCPUUsageEvent.class);
        registerEvent(ContainerCPUThrottlingEvent.class);
        registerEvent(ContainerMemoryUsageEvent.class);
        registerEvent(ContainerIOUsageEvent.class);

        PeriodicEvents.addJavaEvent(ContainerConfigurationEvent.class, emitContainerConfiguration);
        PeriodicEvents.addJavaEvent(ContainerCPUUsageEvent.class, emitContainerCPUUsage);
        PeriodicEvents.addJavaEvent(ContainerCPUThrottlingEvent.class, emitContainerCPUThrottling);
        PeriodicEvents.addJavaEvent(ContainerMemoryUsageEvent.class, emitContainerMemoryUsage);
        PeriodicEvents.addJavaEvent(ContainerIOUsageEvent.class, emitContainerIOUsage);
    }

    private static void registerEvent(Class<? extends jdk.internal.event.Event> eventClass) {
        MetadataRepository.getInstance().register(eventClass);
    }

    private static void emitExceptionStatistics() {
        ThrowableTracer.emitStatistics();

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

            t.cpuShares = containerMetrics.getCpuShares();
            t.effectiveCpuCount = containerMetrics.getEffectiveCpuCount();
            t.memorySoftLimit = containerMetrics.getMemorySoftLimit();
            t.memoryLimit = containerMetrics.getMemoryLimit();
            t.swapMemoryLimit = containerMetrics.getMemoryAndSwapLimit();
            t.hostTotalMemory = JVM.hostTotalMemory();
            t.hostTotalSwapMemory = JVM.hostTotalSwapMemory();
            t.commit();
        }
    }

    private static void emitContainerCPUUsage() {
        if (containerMetrics != null) {
            ContainerCPUUsageEvent event = new ContainerCPUUsageEvent();

            event.cpuTime = containerMetrics.getCpuUsage();
            event.cpuSystemTime = containerMetrics.getCpuSystemUsage();
            event.cpuUserTime = containerMetrics.getCpuUserUsage();
            event.commit();
        }
    }
    private static void emitContainerMemoryUsage() {
        if (containerMetrics != null) {
            ContainerMemoryUsageEvent event = new ContainerMemoryUsageEvent();

src/jdk.jfr/share/classes/jdk/jfr/events/ContainerCPUUsageEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.Description;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.Timespan;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "ContainerCPUUsage")
@Label("CPU Usage")
@Category({"Operating System", "Processor"})
@Description("Container CPU usage related information")
public class ContainerCPUUsageEvent extends AbstractPeriodicEvent {
  @Label("CPU Time")
  @Description("Aggregate time consumed by all tasks in the container")
  @Timespan
  public long cpuTime;

  @Label("CPU User Time")
  @Description("Aggregate user time consumed by all tasks in the container")
  @Timespan
  public long cpuUserTime;

  @Label("CPU System Time")

Configuration enabled period
default true 30 s
profiling true 30 s

Field Type Description
cpuTime long: nanos CPU Time Aggregate time consumed by all tasks in the container
cpuUserTime long: nanos CPU User Time Aggregate user time consumed by all tasks in the container
cpuSystemTime long: nanos CPU System Time Aggregate system time consumed by all tasks in the container

ContainerConfiguration

default profiling startTime duration stackTrace 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ContainerConfigurationEvent.java

Category: Operating System

A set of container specific attributes

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

    private static void initializeContainerEvents() {
        if (JVM.isContainerized() ) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, "JVM is containerized");
            containerMetrics = Container.metrics();
            if (containerMetrics != null) {
                Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, "Container metrics are available");
            }
        }
        // The registration of events and hooks are needed to provide metadata,
        // even when not running in a container
        registerEvent(ContainerConfigurationEvent.class);
        registerEvent(ContainerCPUUsageEvent.class);
        registerEvent(ContainerCPUThrottlingEvent.class);
        registerEvent(ContainerMemoryUsageEvent.class);
        registerEvent(ContainerIOUsageEvent.class);

        PeriodicEvents.addJavaEvent(ContainerConfigurationEvent.class, emitContainerConfiguration);
        PeriodicEvents.addJavaEvent(ContainerCPUUsageEvent.class, emitContainerCPUUsage);
        PeriodicEvents.addJavaEvent(ContainerCPUThrottlingEvent.class, emitContainerCPUThrottling);
        PeriodicEvents.addJavaEvent(ContainerMemoryUsageEvent.class, emitContainerMemoryUsage);
        PeriodicEvents.addJavaEvent(ContainerIOUsageEvent.class, emitContainerIOUsage);
    }

    private static void registerEvent(Class<? extends jdk.internal.event.Event> eventClass) {
        MetadataRepository.getInstance().register(eventClass);
    }

    private static void emitExceptionStatistics() {
        ThrowableTracer.emitStatistics();
    }

    private static void emitContainerConfiguration() {
        if (containerMetrics != null) {
            ContainerConfigurationEvent t = new ContainerConfigurationEvent();
            t.containerType = containerMetrics.getProvider();
            t.cpuSlicePeriod = containerMetrics.getCpuPeriod();
            t.cpuQuota = containerMetrics.getCpuQuota();
            t.cpuShares = containerMetrics.getCpuShares();
            t.effectiveCpuCount = containerMetrics.getEffectiveCpuCount();
            t.memorySoftLimit = containerMetrics.getMemorySoftLimit();
            t.memoryLimit = containerMetrics.getMemoryLimit();
            t.swapMemoryLimit = containerMetrics.getMemoryAndSwapLimit();
            t.hostTotalMemory = JVM.hostTotalMemory();
            t.hostTotalSwapMemory = JVM.hostTotalSwapMemory();
            t.commit();

src/jdk.jfr/share/classes/jdk/jfr/events/ContainerConfigurationEvent.java:

@Name(Type.EVENT_NAME_PREFIX + "ContainerConfiguration")
@Label("Container Configuration")
@Category({"Operating System"})
@Description("A set of container specific attributes")
public final class ContainerConfigurationEvent extends AbstractPeriodicEvent {
    @Label("Container Type")
    @Description("Container type information")
    public String containerType;

    @Label("CPU Slice Period")
    @Description("Length of the scheduling period for processes within the container")
    @Timespan(Timespan.MICROSECONDS)
    public long cpuSlicePeriod;

    @Label("CPU Quota")
    @Description("Total available run-time allowed during each scheduling period for all tasks in the container")

Configuration enabled period
default true beginChunk
profiling true beginChunk

Field Type Description
containerType string Container Type Container type information
cpuSlicePeriod long: microseconds CPU Slice Period Length of the scheduling period for processes within the container
cpuQuota long: microseconds CPU Quota Total available run-time allowed during each scheduling period for all tasks in the container
cpuShares long CPU Shares Relative weighting of processes with the container used for prioritizing the scheduling of processes across all containers running on a host
effectiveCpuCount long Effective CPU Count Number of effective processors that this container has available to it
memorySoftLimit long: bytes Memory Soft Limit Hint to the operating system that allows groups to specify the minimum required amount of physical memory
memoryLimit long: bytes Memory Limit Maximum amount of physical memory that can be allocated in the container
swapMemoryLimit long: bytes Memory and Swap Limit Maximum amount of physical memory and swap space, in bytes, that can be allocated in the container
hostTotalMemory long: bytes 20+ Container Host Total Memory Total memory of the host running the container
hostTotalSwapMemory long: bytes 23+ Container Host Total Swap Memory Total swap memory of the host running the container

ContainerIOUsage

default profiling startTime duration stackTrace 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ContainerIOUsageEvent.java

Category: Operating System / File System

Container IO usage related information

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

        if (JVM.isContainerized() ) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, "JVM is containerized");
            containerMetrics = Container.metrics();
            if (containerMetrics != null) {
                Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, "Container metrics are available");
            }
        }
        // The registration of events and hooks are needed to provide metadata,
        // even when not running in a container
        registerEvent(ContainerConfigurationEvent.class);
        registerEvent(ContainerCPUUsageEvent.class);
        registerEvent(ContainerCPUThrottlingEvent.class);
        registerEvent(ContainerMemoryUsageEvent.class);
        registerEvent(ContainerIOUsageEvent.class);

        PeriodicEvents.addJavaEvent(ContainerConfigurationEvent.class, emitContainerConfiguration);
        PeriodicEvents.addJavaEvent(ContainerCPUUsageEvent.class, emitContainerCPUUsage);
        PeriodicEvents.addJavaEvent(ContainerCPUThrottlingEvent.class, emitContainerCPUThrottling);
        PeriodicEvents.addJavaEvent(ContainerMemoryUsageEvent.class, emitContainerMemoryUsage);
        PeriodicEvents.addJavaEvent(ContainerIOUsageEvent.class, emitContainerIOUsage);
    }

    private static void registerEvent(Class<? extends jdk.internal.event.Event> eventClass) {
        MetadataRepository.getInstance().register(eventClass);
    }

    private static void emitExceptionStatistics() {
        ThrowableTracer.emitStatistics();
    }

    private static void emitContainerConfiguration() {

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

    private static void emitContainerMemoryUsage() {
        if (containerMetrics != null) {
            ContainerMemoryUsageEvent event = new ContainerMemoryUsageEvent();

            event.memoryFailCount = containerMetrics.getMemoryFailCount();
            event.memoryUsage = containerMetrics.getMemoryUsage();
            event.swapMemoryUsage = containerMetrics.getMemoryAndSwapUsage();
            event.commit();
        }
    }

    private static void emitContainerIOUsage() {
        if (containerMetrics != null) {
            ContainerIOUsageEvent event = new ContainerIOUsageEvent();

            event.serviceRequests = containerMetrics.getBlkIOServiceCount();
            event.dataTransferred = containerMetrics.getBlkIOServiced();
            event.commit();
        }
    }

    private static void emitContainerCPUThrottling() {
        if (containerMetrics != null) {
            ContainerCPUThrottlingEvent event = new ContainerCPUThrottlingEvent();

src/jdk.jfr/share/classes/jdk/jfr/events/ContainerIOUsageEvent.java:

@Name(Type.EVENT_NAME_PREFIX + "ContainerIOUsage")
@Label("Container IO Usage")
@Category({"Operating System", "File System"})
@Description("Container IO usage related information")
public class ContainerIOUsageEvent extends AbstractPeriodicEvent {

  @Label("Block IO Request Count")
  @Description("Number of block IO requests to the disk that have been issued by the container")
  public long serviceRequests;

  @Label("Block IO Transfer")
  @Description("Number of block IO bytes that have been transferred to/from the disk by the container")
  @DataAmount
  public long dataTransferred;
}

Configuration enabled period
default true 30 s
profiling true 30 s

Field Type Description
serviceRequests long Block IO Request Count Number of block IO requests to the disk that have been issued by the container
dataTransferred long: bytes Block IO Transfer Number of block IO bytes that have been transferred to/from the disk by the container

ContainerMemoryUsage

default profiling startTime duration stackTrace 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ContainerMemoryUsageEvent.java

Category: Operating System / Memory

Container memory usage related information

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

    private static void initializeContainerEvents() {
        if (JVM.isContainerized() ) {
            Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, "JVM is containerized");
            containerMetrics = Container.metrics();
            if (containerMetrics != null) {
                Logger.log(LogTag.JFR_SYSTEM, LogLevel.DEBUG, "Container metrics are available");
            }
        }
        // The registration of events and hooks are needed to provide metadata,
        // even when not running in a container
        registerEvent(ContainerConfigurationEvent.class);
        registerEvent(ContainerCPUUsageEvent.class);
        registerEvent(ContainerCPUThrottlingEvent.class);
        registerEvent(ContainerMemoryUsageEvent.class);
        registerEvent(ContainerIOUsageEvent.class);

        PeriodicEvents.addJavaEvent(ContainerConfigurationEvent.class, emitContainerConfiguration);
        PeriodicEvents.addJavaEvent(ContainerCPUUsageEvent.class, emitContainerCPUUsage);
        PeriodicEvents.addJavaEvent(ContainerCPUThrottlingEvent.class, emitContainerCPUThrottling);
        PeriodicEvents.addJavaEvent(ContainerMemoryUsageEvent.class, emitContainerMemoryUsage);
        PeriodicEvents.addJavaEvent(ContainerIOUsageEvent.class, emitContainerIOUsage);
    }

    private static void registerEvent(Class<? extends jdk.internal.event.Event> eventClass) {
        MetadataRepository.getInstance().register(eventClass);
    }

    private static void emitExceptionStatistics() {
        ThrowableTracer.emitStatistics();
    }

src/jdk.jfr/share/classes/jdk/jfr/internal/JDKEvents.java:

    private static void emitContainerCPUUsage() {
        if (containerMetrics != null) {
            ContainerCPUUsageEvent event = new ContainerCPUUsageEvent();

            event.cpuTime = containerMetrics.getCpuUsage();
            event.cpuSystemTime = containerMetrics.getCpuSystemUsage();
            event.cpuUserTime = containerMetrics.getCpuUserUsage();
            event.commit();
        }
    }
    private static void emitContainerMemoryUsage() {
        if (containerMetrics != null) {
            ContainerMemoryUsageEvent event = new ContainerMemoryUsageEvent();

            event.memoryFailCount = containerMetrics.getMemoryFailCount();
            event.memoryUsage = containerMetrics.getMemoryUsage();
            event.swapMemoryUsage = containerMetrics.getMemoryAndSwapUsage();
            event.commit();
        }
    }

    private static void emitContainerIOUsage() {
        if (containerMetrics != null) {
            ContainerIOUsageEvent event = new ContainerIOUsageEvent();

src/jdk.jfr/share/classes/jdk/jfr/events/ContainerMemoryUsageEvent.java:

package jdk.jfr.events;

import jdk.jfr.Category;
import jdk.jfr.DataAmount;
import jdk.jfr.Description;
import jdk.jfr.Label;
import jdk.jfr.Name;
import jdk.jfr.internal.Type;

@Name(Type.EVENT_NAME_PREFIX + "ContainerMemoryUsage")
@Label("Container Memory Usage")
@Category({"Operating System", "Memory"})
@Description("Container memory usage related information")
public final class ContainerMemoryUsageEvent extends AbstractPeriodicEvent {
    @Label("Memory Fail Count")
    @Description("Number of times that user memory requests in the container have exceeded the memory limit")
    public long memoryFailCount;

    @Label("Memory Usage")
    @Description("Amount of physical memory, in bytes, that is currently allocated in the current container")
    @DataAmount
    public long memoryUsage;

    @Label("Memory and Swap Usage")
    @Description("Amount of physical memory and swap space, in bytes, that is currently allocated in the current container")

Configuration enabled period
default true 30 s
profiling true 30 s

Field Type Description
memoryFailCount long Memory Fail Count Number of times that user memory requests in the container have exceeded the memory limit
memoryUsage long: bytes Memory Usage Amount of physical memory, in bytes, that is currently allocated in the current container
swapMemoryUsage long: bytes Memory and Swap Usage Amount of physical memory and swap space, in bytes, that is currently allocated in the current container

ProcessStart

default profiling startTime duration 15 17 21 25 26

Source src/jdk.jfr/share/classes/jdk/jfr/events/ProcessStartEvent.java

Category: Operating System

Excludes in stack trace: java.lang.ProcessBuilder, java.lang.Runtime::exec

Operating system process started

Code Context

The event is likely defined and utilized in the following locations within the OpenJDK source code, which is licensed under the GPLv2, excluding any XML or configuration files:

src/java.base/share/classes/java/lang/ProcessBuilder.java:

        for (String s : cmdarray) {
            if (s.indexOf('\u0000') >= 0) {
                throw new IOException("invalid null character in command");
            }
        }

        try {
            Process process = ProcessImpl.start(cmdarray,
                                     environment,
                                     dir,
                                     redirects,
                                     redirectErrorStream);
            ProcessStartEvent event = new ProcessStartEvent();
            if (event.isEnabled()) {
                event.directory = dir;
                event.command = String.join(" ", cmdarray);
                event.pid = process.pid();
                event.commit();
            }
            // Racy initialization for logging; errors in configuration may throw exceptions
            System.Logger logger = LOGGER;
            if (logger == null) {
                LOGGER = logger = System.getLogger("java.lang.ProcessBuilder");
            }

src/java.base/share/classes/jdk/internal/event/ProcessStartEvent.java:

package jdk.internal.event;

/**
 * Event for the start of an OS procsss
 */

public final class ProcessStartEvent extends Event {
    public long pid;
    public String directory;
    public String command;
}

src/jdk.jfr/share/classes/jdk/jfr/internal/MirrorEvents.java:

/**
 * This class registers all mirror events.
 */
final class MirrorEvents {
    private static final Map<String, Class<? extends MirrorEvent>> mirrorLookup = new ConcurrentHashMap<>();

    // Add mirror event mapping here. See MirrorEvent class for details.
    static {
        register("jdk.internal.event.DeserializationEvent", DeserializationEvent.class);
        register("jdk.internal.event.FileForceEvent", FileForceEvent.class);
        register("jdk.internal.event.FileReadEvent", FileReadEvent.class);
        register("jdk.internal.event.FileWriteEvent", FileWriteEvent.class);
        register("jdk.internal.event.ProcessStartEvent", ProcessStartEvent.class);
        register("jdk.internal.event.SecurityPropertyModificationEvent", SecurityPropertyModificationEvent.class);
        register("jdk.internal.event.SecurityProviderServiceEvent", SecurityProviderServiceEvent.class);
        register("jdk.internal.event.SerializationMisdeclarationEvent", SerializationMisdeclarationEvent.class);
        register("jdk.internal.event.SocketReadEvent", SocketReadEvent.class);
        register("jdk.internal.event.SocketWriteEvent", SocketWriteEvent.class);
        register("jdk.internal.event.ThreadSleepEvent", ThreadSleepEvent.class);
        register("jdk.internal.event.TLSHandshakeEvent", TLSHandshakeEvent.class);
        register("jdk.internal.event.VirtualThreadStartEvent", VirtualThreadStartEvent.class);
        register("jdk.internal.event.VirtualThreadEndEvent", VirtualThreadEndEvent.class);
        register("jdk.internal.event.VirtualThreadSubmitFailedEvent", VirtualThreadSubmitFailedEvent.class);
        register("jdk.internal.event.X509CertificateEvent", X509CertificateEvent.class);

src/jdk.jfr/share/classes/jdk/jfr/events/ProcessStartEvent.java:

@Category({"Operating System"})
@Label("Process Start")
@Name("jdk.ProcessStart")
@Description("Operating system process started")
@RemoveFields("duration")
@StackFilter({"java.lang.ProcessBuilder", "java.lang.Runtime::exec"})
public final class ProcessStartEvent extends MirrorEvent {
    @Label("Process Id")
    public long pid;

    @Label("Directory")
    public String directory;

    @Label("Command")
    public String command;
}

Configuration enabled stackTrace
default true true
profiling true true

Field Type Description
pid long Process Id
directory string Directory Consider contributing a description to jfreventcollector.
command string Command Consider contributing a description to jfreventcollector.

Examples 3
command string
rm -rf [...]_1/code/experiments/jfreventcollector/harness-131340-18105539698102044895/apache-spark/naive-bayes/spark-8c817e7f-a0d2-4be3-b24d-797c260c4e12
directory string
null
pid long
97658
startTime long: millis
294476303083
command string
rm -rf [...]_1/code/experiments/jfreventcollector/harness-130908-6580050515449718395/apache-spark/dec-tree/spark-e2a5b5e5-417c-4fb9-8418-c7d0e4faae94
directory string
null
pid long
97128
startTime long: millis
271938295458
command string
rm -rf [...]_1/code/experiments/jfreventcollector/harness-130453-1906420335947283803/apache-spark/movie-lens/spark-7c9525f9-8aec-47ce-926d-04a0f03597aa
directory string
null
pid long
96539
startTime long: millis
253477205208

Types

Bytecode

14+

Bytecode Instruction

Field Type Description
bytecode string Instruction

Examples 3
invokevirtual
if_icmpne
invokeinterface

CalleeMethod

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
type string Class
name string Method Name
descriptor string Method Descriptor

Examples 3
descriptor string
()Lorg/apache/spark/storage/BlockUpdatedInfo;
name string
blockUpdatedInfo
type string
org/apache/spark/scheduler/SparkListenerBlockUpdated
descriptor string
(I)I
name string
highestOneBit
type string
java/lang/Integer
descriptor string
()I
name string
getAndDecrement
type string
java/util/concurrent/atomic/AtomicInteger

ChunkHeader

14+

Chunk Header No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
payload array byte Payload

Class

Java Class

Field Type Description
classLoader ClassLoader Class Loader Consider contributing a description to jfreventcollector.
name Symbol Name Consider contributing a description to jfreventcollector.
package Package Package Consider contributing a description to jfreventcollector.
modifiers int Access Modifiers
hidden boolean 15+ Hidden

ClassLoader

Java Class Loader

Field Type Description
type Class Type Consider contributing a description to jfreventcollector.
name Symbol Name Consider contributing a description to jfreventcollector.

CodeBlobType

Code Blob Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
type string Type

Examples 3
CodeHeap 'profiled nmethods'
CodeHeap 'profiled nmethods'
CodeHeap 'non-nmethods'

CompilerPhaseType

Compiler Phase Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
phase string Phase

CompilerType

14+

Compiler Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
compiler string Compiler

Examples 3

CopyFailed

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
objectCount ulong Object Count
firstSize ulong: bytes First Failed Object Size
smallestSize ulong: bytes Smallest Failed Object Size
totalSize ulong: bytes Total Object Size

DeoptimizationAction

14+

Deoptimization Action No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
action string Action

Examples 3
maybe_recompile
maybe_recompile
reinterpret

DeoptimizationReason

14+

Deoptimization Reason No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
reason string Reason

Examples 3
class_check
class_check
unstable_if

FlagValueOrigin

Flag Value Origin No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
origin string Origin

Examples 3
Default
Default
Default

FrameType

Frame type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
description string Description

Examples 3
Inlined
Inlined
Interpreted

G1EvacuationStatistics

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
gcId uint GC Identifier
allocated ulong: bytes Allocated Total memory allocated by PLABs
wasted ulong: bytes Wasted Total memory wasted within PLABs due to alignment or refill
used ulong: bytes Used Total memory occupied by objects within PLABs
undoWaste ulong: bytes Undo Wasted Total memory wasted due to allocation undo within PLABs
regionEndWaste ulong: bytes Region End Wasted Total memory wasted at the end of regions due to refill
regionsRefilled uint Region Refills Number of regions refilled
numPlabsFilled ulong 17+ PLAB Fills Number of PLABs filled
directAllocated ulong: bytes Allocated (Direct) Total memory allocated using direct allocation outside of PLABs
numDirectAllocated ulong 17+ Direct Allocations Number of direct allocations
failureUsed ulong: bytes Used (Failure) Total memory occupied by objects in regions where evacuation failed
failureWaste ulong: bytes Wasted (Failure) Total memory left unused in regions where evacuation failed

Examples 2
allocated ulong: bytes
0
directAllocated ulong: bytes
0
failureUsed ulong: bytes
0
failureWaste ulong: bytes
0
gcId uint
893
numDirectAllocated ulong
6182775016
numPlabsFilled ulong
34036352
regionEndWaste ulong: bytes
0
regionsRefilled uint
0
undoWaste ulong: bytes
0
used ulong: bytes
0
wasted ulong: bytes
0
allocated ulong: bytes
3543288
directAllocated ulong: bytes
213040
failureUsed ulong: bytes
0
failureWaste ulong: bytes
0
gcId uint
812
numDirectAllocated ulong
6182775016
numPlabsFilled ulong
34036352
regionEndWaste ulong: bytes
0
regionsRefilled uint
1
undoWaste ulong: bytes
0
used ulong: bytes
3280280
wasted ulong: bytes
3176

G1HeapRegionType

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

G1 Heap Region Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
type string Type

Examples 1
Free

G1YCType

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

G1 YC Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
type string Type

Examples 1
Concurrent Start

GCCause

GC Cause No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
cause string Cause

Examples 3
Allocation Failure
G1 Humongous Allocation
Heap Inspection Initiated GC

GCName

GC Name No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
name string Name

Examples 3
G1New
G1Old
ParallelScavenge

GCThresholdUpdater

GC Threshold Updater No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
updater string Updater

Examples 3
compute_new_size
compute_new_size
compute_new_size

GCWhen

GC When No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
when string When

Examples 3
Before GC
After GC
After GC

InflateCause

Inflation Cause No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
cause string Cause

MetadataType

Metadata Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
type string Type

Examples 3
Metadata
Metadata
Class

MetaspaceObjectType

Metaspace Object Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
type string Type

MetaspaceSizes

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
committed ulong: bytes Committed Committed memory for this space
used ulong: bytes Used Bytes allocated by objects in the space
reserved ulong: bytes Reserved Reserved memory for this space

Examples 3
committed ulong: bytes
586481664
reserved ulong: bytes
603979776
used ulong: bytes
584511832
committed ulong: bytes
679346176
reserved ulong: bytes
1677721600
used ulong: bytes
675471952
committed ulong: bytes
92864512
reserved ulong: bytes
1073741824
used ulong: bytes
90960120

Method

Java Method

Field Type Description
type Class Type Consider contributing a description to jfreventcollector.
name Symbol Name Consider contributing a description to jfreventcollector.
descriptor Symbol Descriptor Consider contributing a description to jfreventcollector.
modifiers int Access Modifiers
hidden boolean Hidden

Module

Module No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
name Symbol Name Consider contributing a description to jfreventcollector.
version Symbol Version Consider contributing a description to jfreventcollector.
location Symbol Location Consider contributing a description to jfreventcollector.
classLoader ClassLoader Class Loader Consider contributing a description to jfreventcollector.

NMTType

21+

Native Memory Tracking Type

Field Type Description
name string Name

NarrowOopMode

Narrow Oop Mode No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
mode string Mode

Examples 3
Zero based
Zero based
Zero based

NetworkInterfaceName

Network Interface No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
networkInterface string Network Interface Network Interface Name

Examples 3
en0
lo0
lo0

ObjectSpace

Appearing in: ParallelGC

Missing in: G1GC, SerialGC, ShenandoahGC, ZGC

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
start ulong: address Start Address Start address of the space
end ulong: address End Address End address of the space
used ulong: bytes Used Bytes allocated by objects in the space
size ulong: bytes Size Size of the space

Examples 3
end ulong: address
23519035392
size ulong: bytes
2044198912
start ulong: address
21474836480
used ulong: bytes
300829184
end ulong: address
33392951296
size ulong: bytes
3328180224
start ulong: address
30064771072
used ulong: bytes
0
end ulong: address
33709096960
size ulong: bytes
524288
start ulong: address
33708572672
used ulong: bytes
0

OldObject

Old Object No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
address ulong: address Memory Address
type Class Java Class
description string Object Description Object description
referrer Reference Referrer Object Object referencing this object

Examples 3
address ulong: address
21771403664
description string
null
referrer Reference
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[Ljava/util/concurrent/ForkJoinTask;
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
address ulong: address
21746622288
description string
null
referrer Reference
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[Ljava/util/concurrent/ForkJoinTask;
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
address ulong: address
26031857992
description string
null
referrer Reference
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[Ljava/util/concurrent/ForkJoinTask;
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent

OldObjectArray

Old Object Array No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
size int Array Size Size of array
index int Index Index in the array

OldObjectField

Old Object Field No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
name string Field Name of field
modifiers short Field Modifiers Field modifiers

OldObjectGcRoot

GC Root No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
description string Root Description Root information
system OldObjectRootSystem System The subsystem of origin for the root
type OldObjectRootType Type The root type

Examples 3
null
null
null

OldObjectRootSystem

GC Root System No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
system string System

OldObjectRootType

GC Root Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
type string Type

Package

Package No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
name Symbol Name Consider contributing a description to jfreventcollector.
module Module Module Consider contributing a description to jfreventcollector.
exported boolean Exported

Reference

Reference No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
array OldObjectArray Array Information Array or null if it is not an array
field OldObjectField Field Information Field or null if it is an array
object OldObject Object Object holder for this reference
skip int Skip Value The object is this many hops away

Examples 3
null
null
null

ReferenceType

Reference Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
type string Type

Examples 3
Final reference
Soft reference
Phantom reference

ShenandoahHeapRegionState

Appearing in: ShenandoahGC

Missing in: G1GC, ParallelGC, SerialGC, ZGC

Shenandoah Heap Region State No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
state string State

Examples 3
Regular
Collection Set
Empty Committed

StackFrame

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
method Method Java Method
lineNumber int Line Number
bytecodeIndex int Bytecode Index
type FrameType Frame Type

Examples 3
bytecodeIndex int
42
lineNumber int
314
method Method
descriptor string
()V
hidden boolean
false
modifiers int
10
name string
emitInitialSecurityProperties
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
jdk/jfr/internal/instrument/JDKEvents
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/jdk.jfr
name string
jdk.jfr
version string
21.0.7
name string
jdk/jfr/internal/instrument
type FrameType
Interpreted
bytecodeIndex int
2
lineNumber int
2577
method Method
descriptor string
(Ljava/lang/Thread;Ljdk/internal/vm/ThreadContainer;)V
hidden boolean
false
modifiers int
1
name string
start
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
0
name string
java/lang/System$2
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/lang
type FrameType
Inlined
bytecodeIndex int
37
lineNumber int
3505
method Method
descriptor string
()Ljava/util/Map$Entry;
hidden boolean
false
modifiers int
17
name string
next
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
24
name string
java/util/concurrent/ConcurrentHashMap$EntryIterator
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent
type FrameType
Inlined

StackTrace

Stacktrace No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
truncated boolean Truncated
frames array StackFrame struct Stack Frames

Symbol

Symbol No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
string string String

Examples 3
file://[...]_1/code/experiments/jfreventcollector/harness-130453-1906420335947283803/apache-spark/lib/netty-buffer-4.1.99.Final.jar
file://[...]_1/code/experiments/jfreventcollector/harness-131340-18105539698102044895/apache-spark/lib/netty-buffer-4.1.99.Final.jar
file://[...]_1/code/experiments/jfreventcollector/harness-130908-6580050515449718395/apache-spark/lib/spark-core_2.13-3.5.0.jar

Thread

Thread No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
osName string OS Thread Name
osThreadId long OS Thread Id
javaName string Java Thread Name
javaThreadId long Java Thread Id
group ThreadGroup Java Thread Group
virtual boolean 19+ Virtual Thread

ThreadGroup

Thread Group No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
parent ThreadGroup Parent Consider contributing a description to jfreventcollector.
name string Name

Examples 3
null
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
name string
system
parent ThreadGroup
null

ThreadState

Java Thread State

Field Type Description
name string Name

Examples 3
STATE_RUNNABLE
STATE_RUNNABLE
STATE_RUNNABLE

VMOperationType

VM Operation Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
type string Type

Examples 3
GenCollectForAllocation
HandshakeAllThreads
ICBufferFull

VMThreadState

25+

JVM Thread State No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
state string State

VirtualSpace

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
start ulong: address Start Address Start address of the virtual space
committedEnd ulong: address Committed End Address End address of the committed memory for the virtual space
committedSize ulong: bytes Committed Size Size of the committed memory for the virtual space
reservedEnd ulong: address Reserved End Address End address of the reserved memory for the virtual space
reservedSize ulong: bytes Reserved Size Size of the reserved memory for the virtual space

Examples 3
committedEnd ulong: address
22431137792
committedSize ulong: bytes
956301312
reservedEnd ulong: address
34359738368
reservedSize ulong: bytes
12884901888
start ulong: address
21474836480
committedEnd ulong: address
23519035392
committedSize ulong: bytes
2044198912
reservedEnd ulong: address
30064771072
reservedSize ulong: bytes
8589934592
start ulong: address
21474836480
committedEnd ulong: address
27413446656
committedSize ulong: bytes
5938610176
reservedEnd ulong: address
34359738368
reservedSize ulong: bytes
12884901888
start ulong: address
21474836480

ZPageTypeType

15+

Appearing in: ZGC

Missing in: G1GC, ParallelGC, SerialGC, ShenandoahGC

Z Page Type No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
type string Type

Examples 2
Small
Large

ZStatisticsCounterType

Appearing in: ZGC

Missing in: G1GC, ParallelGC, SerialGC, ShenandoahGC

Z Statistics Counter No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
counter string Counter

Examples 1
Mark Segment Reset Contention

ZStatisticsSamplerType

Appearing in: ZGC

Missing in: G1GC, ParallelGC, SerialGC, ShenandoahGC

Z Statistics Sampler No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Field Type Description
sampler string Sampler

Examples 1
Uncommit

XML Content Types

address

Annotation: jdk.jfr.MemoryAddress

Examples 3
34359738368
22431137792
21474836480

bits-per-second

Annotation: jdk.jfr.DataAmount(BITS), jdk.jfr.Frequency

Examples 3
0
8112
14312

bytes

Annotation: jdk.jfr.DataAmount(BYTES)

Examples 3
2056
24
262144000

bytes-per-second

Appearing in: G1GC

Missing in: ParallelGC, SerialGC, ShenandoahGC, ZGC

Annotation: jdk.jfr.DataAmount(BYTES), jdk.jfr.Frequency

Examples 2
0.0
2.4947960575463347E9

certificateId

Annotation: jdk.jfr.events.CertificateId

Examples 3
3045411335
3045411335
3045411335

epochmillis

Annotation: jdk.jfr.Timestamp(MILLISECONDS_SINCE_EPOCH)

Examples 3
1754910293523
1754910293748
-9223372036854775808

hertz

Annotation: jdk.jfr.Frequency

Examples 3
19986.436
1000000000
1000000000

microseconds

17+

Annotation: jdk.jfr.Timespan(MICROSECONDS)

millis

Annotation: jdk.jfr.Timespan(MILLISECONDS)

Examples 3
198723238291
198731549125
198721700083

nanos

Annotation: jdk.jfr.Timespan(NANOSECONDS)

Examples 3
49999952
420000000
0

percentage

Annotation: jdk.jfr.Percentage

Examples 3
0.650165
0.16126543
0.0

tickspan

Annotation: jdk.jfr.Timespan(TICKS)

Examples 3
4126005916
3768917
1859292

tickstamp

Annotation: jdk.jfr.Timestamp(TICKS)

XML Types

Class

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Parameter Type const Klass*
Field Type const Klass*
Java Type java.lang.Class
Examples 3
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1041
name string
[F
package Package
null
null
null

ClassLoader

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Parameter Type const ClassLoaderData*
Field Type const ClassLoaderData*
Examples 3
name string
bootstrap
type Class
null
name string
bootstrap
type Class
null
name string
bootstrap
type Class
null

Method

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Parameter Type const Method*
Field Type const Method*
Examples 3
descriptor string
()V
hidden boolean
false
modifiers int
10
name string
emitInitialSecurityProperties
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
jdk/jfr/internal/instrument/JDKEvents
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/jdk.jfr
name string
jdk.jfr
version string
21.0.7
name string
jdk/jfr/internal/instrument
descriptor string
(Ljava/lang/Object;)Z
hidden boolean
false
modifiers int
1
name string
equals
type Class
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
hidden boolean
false
modifiers int
1
name string
org/apache/spark/scheduler/SparkListenerBlockUpdated
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
null
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
1
name string
java/net/URLClassLoader
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
location string
null
name string
null
version string
null
name string
org/apache/spark/scheduler
descriptor string
()Ljava/util/Map$Entry;
hidden boolean
false
modifiers int
17
name string
next
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
24
name string
java/util/concurrent/ConcurrentHashMap$EntryIterator
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/util/concurrent

Module

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Parameter Type const ModuleEntry*
Field Type const ModuleEntry*
Examples 3
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7

Package

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Parameter Type const PackageEntry*
Field Type const PackageEntry*
Examples 3
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/net
null
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/java.base
name string
java.base
version string
21.0.7
name string
java/io

StackTrace

15+

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Parameter Type u8
Field Type u8
Java Type jdk.types.StackTrace
Examples 3
null
frames StackFrame
bytecodeIndex int
42
lineNumber int
314
method Method
descriptor string
()V
hidden boolean
false
modifiers int
10
name string
emitInitialSecurityProperties
type Class
classLoader ClassLoader
name string
bootstrap
type Class
null
hidden boolean
false
modifiers int
17
name string
jdk/jfr/internal/instrument/JDKEvents
package Package
exported boolean
true
module Module
classLoader ClassLoader
name string
bootstrap
type Class
null
location string
jrt:/jdk.jfr
name string
jdk.jfr
version string
21.0.7
name string
jdk/jfr/internal/instrument
type FrameType
Interpreted
truncated boolean
false
null

Thread

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Parameter Type u8
Field Type u8
Java Type java.lang.Thread
Examples 3
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
reactors-io-scheduler-ForkJoinPool-35-worker-4
javaThreadId long
1248
osName string
reactors-io-scheduler-ForkJoinPool-35-worker-4
osThreadId long
71467
virtual boolean
false
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
ForkJoinPool.commonPool-worker-11
javaThreadId long
49
osName string
ForkJoinPool.commonPool-worker-11
osThreadId long
44547
virtual boolean
false
group ThreadGroup
name string
main
parent ThreadGroup
name string
system
parent ThreadGroup
null
javaName string
block-manager-ask-thread-pool-49
javaThreadId long
1721
osName string
block-manager-ask-thread-pool-49
osThreadId long
68639
virtual boolean
false

Ticks

unsigned

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Parameter Type const Ticks&
Field Type Ticks
Java Type long
Content Type tickstamp
Examples 3
268351193750
290285174167
249331001250

Tickspan

unsigned

No description available. Write your own and contribute it to jfreventcollector. or directly to the OpenJDK.

Parameter Type const Tickspan&
Field Type Tickspan
Java Type long
Content Type tickspan

boolean

Parameter Type bool
Field Type bool
Java Type boolean
Examples 3
false
false
true

byte

Parameter Type s1
Field Type s1
Java Type byte

char

Parameter Type char
Field Type char
Java Type char

double

Parameter Type double
Field Type double
Java Type double
Examples 3
50.0
1.5625
1.5625

float

Parameter Type float
Field Type float
Java Type float
Examples 3
4.6651077
4.663123
2.1594267

int

Parameter Type s4
Field Type s4
Java Type int
Examples 3
1041
10
1

long

Parameter Type s8
Field Type s8
Java Type long
Examples 3
1883
93853
3

short

Parameter Type s2
Field Type s2
Java Type short

string

Parameter Type const char*
Field Type const char*
Java Type java.lang.String
Examples 3
bootstrap
[F
null

ubyte

unsigned

Parameter Type u1
Field Type u1
Java Type byte
Examples 3
15
7
32

uint

unsigned

Parameter Type unsigned
Field Type unsigned
Java Type int
Examples 3
826
807
124

ulong

unsigned

Parameter Type u8
Field Type u8
Java Type long
Examples 3
1814
1799
1727

ushort

unsigned

Parameter Type u2
Field Type u2
Java Type short
Examples 3