APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.jfr.internal

public final Class EventInstrumentation

extends Object
Class Inheritance
Static Imports
jdk.jfr.internal.util.Bytecode.classDesc, .Bytecode.getfield, .Bytecode.invokestatic, .Bytecode.invokevirtual, .Bytecode.putfield

Class responsible for adding instrumentation to a subclass of Event.

Field Summary

Modifier and TypeField and Description
private final ClassDesc
private final long
private static final Bytecode.FieldDesc
private final boolean
private final ClassInspector
public static final long
public static final long
public static final long
public static final long
public static final long
public static final long
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private final Bytecode.MethodDesc
private final boolean
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private static final ClassDesc
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
EventInstrumentation(ClassInspector
class inspector
inspector
,
long
the event type ID to use
id
,
boolean
guard against event configuration being null. Needed when instrumentation is added before registration (bytesForEagerInstrumentation)
guardEventConfiguration
)

Creates an EventInstrumentation object.

Method Summary

Modifier and TypeMethod and Description
pack-priv byte[]
private void
getDuration(CodeBuilder codeBuilder)

private void
private static void
private boolean
private Consumer<CodeBuilder>
private static boolean
private static boolean
private void
methodBegin(CodeBuilder codeBuilder)

private void
private void
private void
methodEnd(CodeBuilder codeBuilder)

private void
private void
private void
private void
private void
private void
private void
private void
private void
setDuration(CodeBuilder codeBuilder, Consumer<CodeBuilder> expression)

private void
private void
private void
updateInstanceCommit(CodeBuilder.BlockCodeBuilder blockCodeBuilder, Label end, Label excluded)

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

eventClassDescback to summary
private final ClassDesc eventClassDesc
eventTypeIdback to summary
private final long eventTypeId
FIELD_EVENT_CONFIGURATIONback to summary
private static final Bytecode.FieldDesc FIELD_EVENT_CONFIGURATION
guardEventConfigurationback to summary
private final boolean guardEventConfiguration
inspectorback to summary
private final ClassInspector inspector
MASK_NON_THROTTLE_BITSback to summary
public static final long MASK_NON_THROTTLE_BITS
MASK_THROTTLEback to summary
public static final long MASK_THROTTLE
MASK_THROTTLE_BITSback to summary
public static final long MASK_THROTTLE_BITS
MASK_THROTTLE_CHECKback to summary
public static final long MASK_THROTTLE_CHECK
MASK_THROTTLE_CHECK_FAILback to summary
public static final long MASK_THROTTLE_CHECK_FAIL
MASK_THROTTLE_CHECK_SUCCESSback to summary
public static final long MASK_THROTTLE_CHECK_SUCCESS
METHOD_BEGINback to summary
private static final Bytecode.MethodDesc METHOD_BEGIN
METHOD_COMMITback to summary
private static final Bytecode.MethodDesc METHOD_COMMIT
METHOD_DURATIONback to summary
private static final Bytecode.MethodDesc METHOD_DURATION
METHOD_ENABLEDback to summary
private static final Bytecode.MethodDesc METHOD_ENABLED
METHOD_ENDback to summary
private static final Bytecode.MethodDesc METHOD_END
METHOD_EVENT_CONFIGURATION_GET_SETTINGback to summary
private static final Bytecode.MethodDesc METHOD_EVENT_CONFIGURATION_GET_SETTING
METHOD_EVENT_CONFIGURATION_SHOULD_COMMIT_LONGback to summary
private static final Bytecode.MethodDesc METHOD_EVENT_CONFIGURATION_SHOULD_COMMIT_LONG
METHOD_EVENT_CONFIGURATION_SHOULD_THROTTLE_COMMIT_LONGback to summary
private static final Bytecode.MethodDesc METHOD_EVENT_CONFIGURATION_SHOULD_THROTTLE_COMMIT_LONG
METHOD_EVENT_CONFIGURATION_SHOULD_THROTTLE_COMMIT_LONG_LONGback to summary
private static final Bytecode.MethodDesc METHOD_EVENT_CONFIGURATION_SHOULD_THROTTLE_COMMIT_LONG_LONG
METHOD_EVENT_SHOULD_COMMITback to summary
private static final Bytecode.MethodDesc METHOD_EVENT_SHOULD_COMMIT
METHOD_EVENT_SHOULD_THROTTLE_COMMIT_LONGback to summary
private static final Bytecode.MethodDesc METHOD_EVENT_SHOULD_THROTTLE_COMMIT_LONG
METHOD_EVENT_SHOULD_THROTTLE_COMMIT_LONG_LONGback to summary
private static final Bytecode.MethodDesc METHOD_EVENT_SHOULD_THROTTLE_COMMIT_LONG_LONG
METHOD_GET_EVENT_WRITERback to summary
private static final Bytecode.MethodDesc METHOD_GET_EVENT_WRITER
METHOD_IS_ENABLEDback to summary
private static final Bytecode.MethodDesc METHOD_IS_ENABLED
METHOD_RESETback to summary
private static final Bytecode.MethodDesc METHOD_RESET
METHOD_SHOULD_COMMIT_LONGback to summary
private static final Bytecode.MethodDesc METHOD_SHOULD_COMMIT_LONG
METHOD_THROTTLEback to summary
private static final Bytecode.MethodDesc METHOD_THROTTLE
METHOD_TIME_STAMPback to summary
private static final Bytecode.MethodDesc METHOD_TIME_STAMP
METHOD_TRY_UPDATE_EPOCH_FIELDback to summary
private static final Bytecode.MethodDesc METHOD_TRY_UPDATE_EPOCH_FIELD
staticCommitMethodback to summary
private final Bytecode.MethodDesc staticCommitMethod
throttledback to summary
private final boolean throttled
TYPE_EVENT_CONFIGURATIONback to summary
private static final ClassDesc TYPE_EVENT_CONFIGURATION
TYPE_EVENT_WRITERback to summary
private static final ClassDesc TYPE_EVENT_WRITER
TYPE_ISEback to summary
private static final ClassDesc TYPE_ISE
TYPE_OBJECTback to summary
private static final ClassDesc TYPE_OBJECT
untypedEventConfigurationback to summary
private final boolean untypedEventConfiguration

Constructor Detail

EventInstrumentationback to summary
pack-priv EventInstrumentation(ClassInspector inspector, long id, boolean guardEventConfiguration)

Creates an EventInstrumentation object.

Parameters
inspector:ClassInspector

class inspector

id:long

the event type ID to use

guardEventConfiguration:boolean

guard against event configuration being null. Needed when instrumentation is added before registration (bytesForEagerInstrumentation)

Method Detail

buildInstrumentedback to summary
pack-priv byte[] buildInstrumented()
getDurationback to summary
private void getDuration(CodeBuilder codeBuilder)
getEventConfigurationback to summary
private void getEventConfiguration(CodeBuilder codeBuilder)
getEventWriterback to summary
private static void getEventWriter(CodeBuilder codeBuilder)
hasUntypedConfigurationback to summary
private boolean hasUntypedConfiguration()
instrumentableback to summary
private Consumer<CodeBuilder> instrumentable(MethodModel method)
isMethodback to summary
private static boolean isMethod(MethodModel m, Bytecode.MethodDesc desc)
isStaticback to summary
private static boolean isStatic(MethodModel method)
methodBeginback to summary
private void methodBegin(CodeBuilder codeBuilder)
methodCommitback to summary
private void methodCommit(CodeBuilder codeBuilder)
methodEnabledStaticback to summary
private void methodEnabledStatic(CodeBuilder codeBuilder)
methodEndback to summary
private void methodEnd(CodeBuilder codeBuilder)
methodIsEnabledback to summary
private void methodIsEnabled(CodeBuilder codeBuilder)
methodShouldCommitback to summary
private void methodShouldCommit(CodeBuilder codeBuilder)
methodShouldCommitStaticback to summary
private void methodShouldCommitStatic(CodeBuilder codeBuilder)
methodShouldCommitStaticback to summary
private void methodShouldCommitStatic(CodeBuilder codeBuilder, Bytecode.MethodDesc method)
methodShouldCommitThrottleStaticLongback to summary
private void methodShouldCommitThrottleStaticLong(CodeBuilder codeBuilder)
methodShouldCommitThrottleStaticLongLongback to summary
private void methodShouldCommitThrottleStaticLongLong(CodeBuilder codeBuilder)
methodTimestampback to summary
private void methodTimestamp(CodeBuilder codeBuilder)
methodTryUpdateEpochFieldback to summary
private void methodTryUpdateEpochField(CodeBuilder codeBuilder)
setDurationback to summary
private void setDuration(CodeBuilder codeBuilder, Consumer<CodeBuilder> expression)
throwMissingDurationback to summary
private void throwMissingDuration(CodeBuilder codeBuilder, String method)
transformback to summary
private void transform(ClassBuilder clb, ClassElement cle)
updateInstanceCommitback to summary
private void updateInstanceCommit(CodeBuilder.BlockCodeBuilder blockCodeBuilder, Label end, Label excluded)
updateStaticCommitback to summary
private void updateStaticCommit(CodeBuilder.BlockCodeBuilder blockCodeBuilder, Label excluded)