APIdia Launch Partner
Top Description Constructors Methods
jdk.jfr.tracing

public final Class MethodTracer

extends Object
Class Inheritance
Imports
jdk.jfr.events.MethodTimingEvent, .MethodTraceEvent, jdk.jfr.internal.JVM, jdk.jfr.internal.tracing.PlatformTracer

This class serves as the frontend for method tracing capabilities. The jdk.jfr.tracing package is exported to all modules when the first method tracing filter is applied.

A malicious user could craft bytecode that invoke these methods with an invalid method ID, resulting in an event where the method field is incorrect or null. This is considered acceptable.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static long
public static void
timing(long startTime, long methodId)

public static void
timingObjectInit(long startTime, long methodId)

public static void
trace(long startTime, long methodId)

public static void
traceObjectInit(long startTime, long methodId)

public static void
traceTiming(long startTime, long methodId)

public static void
traceTimingObjectInit(long startTime, long methodId)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MethodTracerback to summary
private MethodTracer()

Method Detail

timestampback to summary
public static long timestamp()
timingback to summary
public static void timing(long startTime, long methodId)
timingObjectInitback to summary
public static void timingObjectInit(long startTime, long methodId)
traceback to summary
public static void trace(long startTime, long methodId)
traceObjectInitback to summary
public static void traceObjectInit(long startTime, long methodId)
traceTimingback to summary
public static void traceTiming(long startTime, long methodId)
traceTimingObjectInitback to summary
public static void traceTimingObjectInit(long startTime, long methodId)