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

pack-priv final Class Transform

extends Object
implements CodeTransform
Class Inheritance
All Implemented Interfaces
java.lang.classfile.CodeTransform, java.lang.classfile.ClassFileTransform
Imports
java.lang.classfile.ClassModel, .CodeBuilder, .CodeElement, .CodeModel, .CodeTransform, .Label, .TypeKind, java.lang.classfile.instruction.InvokeInstruction, .ReturnInstruction, .ThrowInstruction, java.lang.constant.ClassDesc, java.util.ArrayList, .List, jdk.jfr.internal.util.Bytecode, .Bytecode.MethodDesc, jdk.jfr.tracing.MethodTracer

Class that transforms the bytecode of a method so it can call the appropriate methods in the jdk.jfr.tracing.MethodTracer class.

The method ID is determined by native code.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ClassModel
private final Method
private static final ClassDesc
private final boolean
private static final Bytecode.MethodDesc
private int
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private static final Bytecode.MethodDesc
private final List<Transform.TryBlock>

Constructor Summary

AccessConstructor and Description
pack-priv
Transform(ClassModel classModel, CodeModel model, Method method)

Method Summary

Modifier and TypeMethod and Description
public void
accept(CodeBuilder builder, CodeElement element)

Implements java.lang.classfile.ClassFileTransform.accept.

Transform an element by taking the appropriate actions on the builder.

private void
acceptConstructor(CodeBuilder builder, CodeElement element, boolean isConstructorInvocation)

private void
private void
private void
private void
public void
atEnd(CodeBuilder builder)

Overrides default java.lang.classfile.ClassFileTransform.atEnd.

Take any final action during transformation of a classfile entity.

private void
private int
private void
private static int
private static void
invokeTiming(CodeBuilder builder, String suffix)

private static void
invokeTrace(CodeBuilder builder, String suffix)

private static void
private boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classModelback to summary
private final ClassModel classModel
methodback to summary
private final Method method
METHOD_TRACER_CLASSback to summary
private static final ClassDesc METHOD_TRACER_CLASS
simplifiedInstrumentationback to summary
private final boolean simplifiedInstrumentation
TIMESTAMP_METHODback to summary
private static final Bytecode.MethodDesc TIMESTAMP_METHOD
timestampSlotback to summary
private int timestampSlot
TIMING_METHODback to summary
private static final Bytecode.MethodDesc TIMING_METHOD
TRACE_METHODback to summary
private static final Bytecode.MethodDesc TRACE_METHOD
TRACE_TIMING_METHODback to summary
private static final Bytecode.MethodDesc TRACE_TIMING_METHOD
tryBlocksback to summary
private final List<Transform.TryBlock> tryBlocks

Constructor Detail

Transformback to summary
pack-priv Transform(ClassModel classModel, CodeModel model, Method method)

Method Detail

acceptback to summary
public void accept(CodeBuilder builder, CodeElement element)

Implements java.lang.classfile.ClassFileTransform.accept.

Doc from java.lang.classfile.ClassFileTransform.accept.

Transform an element by taking the appropriate actions on the builder. Used when transforming a classfile entity (class, method, field, method body.) If no transformation is desired, the element can be presented to B#with(ClassFileElement). If the element is to be dropped, no action is required.

This method is called by the Class-File API. Users should never call this method.

Annotations
@Override
acceptConstructorback to summary
private void acceptConstructor(CodeBuilder builder, CodeElement element, boolean isConstructorInvocation)
acceptMethodback to summary
private void acceptMethod(CodeBuilder builder, CodeElement element)
acceptSimplifiedInstrumentationback to summary
private void acceptSimplifiedInstrumentation(CodeBuilder builder, CodeElement element)
addCatchHandlerback to summary
private void addCatchHandler(Transform.TryBlock block, CodeBuilder builder)
addTracingback to summary
private void addTracing(CodeBuilder builder)
atEndback to summary
public void atEnd(CodeBuilder builder)

Overrides default java.lang.classfile.ClassFileTransform.atEnd.

Doc from java.lang.classfile.ClassFileTransform.atEnd.

Take any final action during transformation of a classfile entity. Called after all elements of the class are presented to accept(ClassFileBuilder, ClassFileElement).

This method is called by the Class-File API. Users should never call this method.

Annotations
@Override
beginTryBlockback to summary
private void beginTryBlock(CodeBuilder builder)
constructorInvocationsback to summary
private int constructorInvocations(List<CodeElement> elementList)
endTryBlockback to summary
private void endTryBlock(CodeBuilder builder)
invokeTimestampback to summary
private static int invokeTimestamp(CodeBuilder builder)
invokeTimingback to summary
private static void invokeTiming(CodeBuilder builder, String suffix)
invokeTraceback to summary
private static void invokeTrace(CodeBuilder builder, String suffix)
invokeTraceTimingback to summary
private static void invokeTraceTiming(CodeBuilder builder, String suffix)
isConstructorInvocationback to summary
private boolean isConstructorInvocation(CodeElement element)
jdk.jfr.internal.tracing back to summary

private Class Transform.TryBlock

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv Label
pack-priv Label

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

endback to summary
pack-priv Label end
startback to summary
pack-priv Label start

Constructor Detail

TryBlockback to summary
private TryBlock()