Logo Search packages:      
Sourcecode: visualvm version File versions  Download package

org::netbeans::lib::profiler::instrumentation::CodeRegionEntryExitCallsInjector Class Reference

Inheritance diagram for org::netbeans::lib::profiler::instrumentation::CodeRegionEntryExitCallsInjector:

org::netbeans::lib::profiler::instrumentation::Injector org::netbeans::lib::profiler::global::CommonConstants org::netbeans::lib::profiler::instrumentation::SingleMethodScaner org::netbeans::lib::profiler::instrumentation::JavaClassConstants

List of all members.


Detailed Description

Specialized subclass of Injector, that provides injection of our standard Code Region instrumentation - codeRegionEntry() and codeRegionExit() calls - in appropriate places.

Author:
Misha Dmitriev

Definition at line 53 of file CodeRegionEntryExitCallsInjector.java.


Public Member Functions

byte[] instrumentMethod ()
void setClassAndMethod (ClassInfo clazz, int methodIdx)

Static Public Attributes

static final byte ADJUST_TIME = 5
static final int AGENT_ID_ANY = -1
static final int AGENT_STATE_CONNECTED = 3
static final int AGENT_STATE_DIFFERENT_ID = 4
static final int AGENT_STATE_NOT_RUNNING = 0
static final int AGENT_STATE_OTHER_SESSION_IN_PROGRESS = 5
static final int AGENT_STATE_READY_DIRECT = 2
static final int AGENT_STATE_READY_DYNAMIC = 1
static final int AGENT_VERSION_10_M10 = 2
static final int AGENT_VERSION_10_M9 = 1
static final int AGENT_VERSION_60_BETA1 = 8
static final int AGENT_VERSION_60_M10 = 7
static final int AGENT_VERSION_60_M5 = 3
static final int AGENT_VERSION_60_M6 = 4
static final int AGENT_VERSION_60_M7 = 5
static final int AGENT_VERSION_60_M8 = 6
static final int ARCH_32 = 32
static final int ARCH_64 = 64
static final byte BUFFEREVENT_PROFILEPOINT_HIT = 26
static final String CALIBRATION_PSEUDO_CLASS_NAME = "____Profiler+Calibration+Run____"
static final byte COMPACT_EVENT_FORMAT_BYTE_MASK = (byte) 0x80
static final char COMPACT_EVENT_METHOD_ID_MASK = 0x3FFF
static final int CONSTANT_Class = 7
static final int CONSTANT_Double = 6
static final int CONSTANT_Fieldref = 9
static final int CONSTANT_Float = 4
static final int CONSTANT_Integer = 3
static final int CONSTANT_InterfaceMethodref = 11
static final int CONSTANT_Long = 5
static final int CONSTANT_Methodref = 10
static final int CONSTANT_NameAndType = 12
static final int CONSTANT_String = 8
static final int CONSTANT_Unicode = 2
static final int CONSTANT_Utf8 = 1
static final int CPU_INSTR_FULL = 0
static final int CPU_INSTR_SAMPLED = 1
static final int CURRENT_AGENT_VERSION = AGENT_VERSION_60_BETA1
static final int DEFAULT_MAJOR_VERSION = 46
static final int DEFAULT_MINOR_VERSION = 0
static final String ENGINE_WARNING = "*** Profiler engine warning: "
static final int EVENT_BUFFER_SIZE_IN_BYTES = 1200000
static final int FILTER_CONTAINS = 20
static final int FILTER_ENDS_WITH = 30
static final int FILTER_EQUALS = 40
static final int FILTER_NONE = 0
static final int FILTER_REGEXP = 50
static final int FILTER_STARTS_WITH = 10
static final int INJ_CODE_REGION = 8
static final int INJ_MAXNUMBER = 11
static final int INJ_OBJECT_ALLOCATIONS = 9
static final int INJ_OBJECT_LIVENESS = 10
static final int INJ_RECURSIVE_MARKER_METHOD = 2
static final int INJ_RECURSIVE_NORMAL_METHOD = 0
static final int INJ_RECURSIVE_ROOT_METHOD = 1
static final int INJ_RECURSIVE_SAMPLED_MARKER_METHOD = 5
static final int INJ_RECURSIVE_SAMPLED_NORMAL_METHOD = 3
static final int INJ_RECURSIVE_SAMPLED_ROOT_METHOD = 4
static final int INJ_REFLECT_METHOD_INVOKE = 6
static final int INJ_SERVLET_DO_METHOD = 7
static final int INSTR_CODE_REGION = 1
static final int INSTR_MAXNUMBER = 6
static final int INSTR_MEMORY_BASE = 4
static final int INSTR_NONE = 0
static final int INSTR_OBJECT_ALLOCATIONS = 4
static final int INSTR_OBJECT_LIVENESS = 5
static final int INSTR_RECURSIVE_FULL = 2
static final int INSTR_RECURSIVE_SAMPLED = 3
static final int INSTRSCHEME_EAGER = 2
static final int INSTRSCHEME_LAZY = 1
static final int INSTRSCHEME_TOTAL = 3
static final String INVOKE_METHOD_NAME = "invoke"
static final String INVOKE_METHOD_SIGNATURE = "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;"
static final String JAVA_LANG_REFLECT_METHOD_DOTTED_CLASS_NAME = "java.lang.reflect.Method"
static final String JAVA_LANG_REFLECT_METHOD_SLASHED_CLASS_NAME = "java/lang/reflect/Method"
static final int JAVA_MAGIC = -889275714
static final int JAVA_MAJOR_VERSION = 48
static final int JAVA_MIN_MAJOR_VERSION = 45
static final int JAVA_MIN_MINOR_VERSION = 3
static final int JAVA_MINOR_VERSION = 0
static final int JDK_15 = 2
static final String JDK_15_STRING = "jdk15"
static final int JDK_16 = 3
static final String JDK_16_STRING = "jdk16"
static final int JDK_17 = 4
static final String JDK_17_STRING = "jdk17"
static final int JDK_UNSUPPORTED = -1
static final String JDK_UNSUPPORTED_STRING = "UNSUPPORTED_JDK"
static final byte MARKER_ENTRY = 3
static final byte MARKER_ENTRY_UNSTAMPED = 18
static final byte MARKER_EXIT = 4
static final byte MARKER_EXIT_UNSTAMPED = 19
static final char MAX_METHOD_ID_FOR_COMPACT_FORMAT = 0x3FFF
static final byte METHOD_ENTRY = 6
static final byte METHOD_ENTRY_COMPACT_BYTE_MASK = (byte) 0x80
static final char METHOD_ENTRY_COMPACT_MASK = 0x8000
static final byte METHOD_ENTRY_MONITOR = 22
static final byte METHOD_ENTRY_SLEEP = 24
static final byte METHOD_ENTRY_UNSTAMPED = 16
static final byte METHOD_ENTRY_WAIT = 20
static final byte METHOD_EXIT = 7
static final byte METHOD_EXIT_COMPACT_BYTE_MASK = (byte) 0xC0
static final char METHOD_EXIT_COMPACT_MASK = 0xC000
static final byte METHOD_EXIT_MONITOR = 23
static final byte METHOD_EXIT_SLEEP = 25
static final byte METHOD_EXIT_UNSTAMPED = 17
static final byte METHOD_EXIT_WAIT = 21
static final byte NEW_THREAD = 11
static final String NO_CLASS_NAME = "*NO_CLASS_NAME*"
static final String NO_METHOD_NAME = "*NO_METHOD_NAME*"
static final String NO_METHOD_SIGNATURE = "*NO_METHOD_SIGNATURE*"
static final byte OBJ_ALLOC_STACK_TRACE = 12
static final byte OBJ_GC_HAPPENED = 15
static final byte OBJ_LIVENESS_STACK_TRACE = 14
static final int opc_aaload = 50
static final int opc_aastore = 83
static final int opc_aconst_null = 1
static final int opc_aload = 25
static final int opc_aload_0 = 42
static final int opc_aload_1 = 43
static final int opc_aload_2 = 44
static final int opc_aload_3 = 45
static final int opc_anewarray = 189
static final int opc_areturn = 176
static final int opc_arraylength = 190
static final int opc_astore = 58
static final int opc_astore_0 = 75
static final int opc_astore_1 = 76
static final int opc_astore_2 = 77
static final int opc_astore_3 = 78
static final int opc_athrow = 191
static final int opc_baload = 51
static final int opc_bastore = 84
static final int opc_bipush = 16
static final int opc_breakpoint = 202
static final int opc_caload = 52
static final int opc_castore = 85
static final int opc_checkcast = 192
static final int opc_d2f = 144
static final int opc_d2i = 142
static final int opc_d2l = 143
static final int opc_dadd = 99
static final int opc_daload = 49
static final int opc_dastore = 82
static final int opc_dcmpg = 152
static final int opc_dcmpl = 151
static final int opc_dconst_0 = 14
static final int opc_dconst_1 = 15
static final int opc_ddiv = 111
static final int opc_dead = -2
static final int opc_dload = 24
static final int opc_dload_0 = 38
static final int opc_dload_1 = 39
static final int opc_dload_2 = 40
static final int opc_dload_3 = 41
static final int opc_dmul = 107
static final int opc_dneg = 119
static final int opc_drem = 115
static final int opc_dreturn = 175
static final int opc_dstore = 57
static final int opc_dstore_0 = 71
static final int opc_dstore_1 = 72
static final int opc_dstore_2 = 73
static final int opc_dstore_3 = 74
static final int opc_dsub = 103
static final int opc_dup = 89
static final int opc_dup2 = 92
static final int opc_dup2_x1 = 93
static final int opc_dup2_x2 = 94
static final int opc_dup_x1 = 90
static final int opc_dup_x2 = 91
static final int opc_f2d = 141
static final int opc_f2i = 139
static final int opc_f2l = 140
static final int opc_fadd = 98
static final int opc_faload = 48
static final int opc_fastore = 81
static final int opc_fcmpg = 150
static final int opc_fcmpl = 149
static final int opc_fconst_0 = 11
static final int opc_fconst_1 = 12
static final int opc_fconst_2 = 13
static final int opc_fdiv = 110
static final int opc_fload = 23
static final int opc_fload_0 = 34
static final int opc_fload_1 = 35
static final int opc_fload_2 = 36
static final int opc_fload_3 = 37
static final int opc_fmul = 106
static final int opc_fneg = 118
static final int opc_frem = 114
static final int opc_freturn = 174
static final int opc_fstore = 56
static final int opc_fstore_0 = 67
static final int opc_fstore_1 = 68
static final int opc_fstore_2 = 69
static final int opc_fstore_3 = 70
static final int opc_fsub = 102
static final int opc_getfield = 180
static final int opc_getstatic = 178
static final int opc_goto = 167
static final int opc_goto_w = 200
static final int opc_i2b = 145
static final int opc_i2c = 146
static final int opc_i2d = 135
static final int opc_i2f = 134
static final int opc_i2l = 133
static final int opc_i2s = 147
static final int opc_iadd = 96
static final int opc_iaload = 46
static final int opc_iand = 126
static final int opc_iastore = 79
static final int opc_iconst_0 = 3
static final int opc_iconst_1 = 4
static final int opc_iconst_2 = 5
static final int opc_iconst_3 = 6
static final int opc_iconst_4 = 7
static final int opc_iconst_5 = 8
static final int opc_iconst_m1 = 2
static final int opc_idiv = 108
static final int opc_if_acmpeq = 165
static final int opc_if_acmpne = 166
static final int opc_if_icmpeq = 159
static final int opc_if_icmpge = 162
static final int opc_if_icmpgt = 163
static final int opc_if_icmple = 164
static final int opc_if_icmplt = 161
static final int opc_if_icmpne = 160
static final int opc_ifeq = 153
static final int opc_ifge = 156
static final int opc_ifgt = 157
static final int opc_ifle = 158
static final int opc_iflt = 155
static final int opc_ifne = 154
static final int opc_ifnonnull = 199
static final int opc_ifnull = 198
static final int opc_iinc = 132
static final int opc_iload = 21
static final int opc_iload_0 = 26
static final int opc_iload_1 = 27
static final int opc_iload_2 = 28
static final int opc_iload_3 = 29
static final int opc_imul = 104
static final int opc_ineg = 116
static final int opc_instanceof = 193
static final int opc_invokeinterface = 185
static final int opc_invokespecial = 183
static final int opc_invokestatic = 184
static final int opc_invokevirtual = 182
static final int opc_ior = 128
static final int opc_irem = 112
static final int opc_ireturn = 172
static final int opc_ishl = 120
static final int opc_ishr = 122
static final int opc_istore = 54
static final int opc_istore_0 = 59
static final int opc_istore_1 = 60
static final int opc_istore_2 = 61
static final int opc_istore_3 = 62
static final int opc_isub = 100
static final int opc_iushr = 124
static final int opc_ixor = 130
static final int opc_jsr = 168
static final int opc_jsr_w = 201
static final int opc_l2d = 138
static final int opc_l2f = 137
static final int opc_l2i = 136
static final int opc_label = -1
static final int opc_ladd = 97
static final int opc_laload = 47
static final int opc_land = 127
static final int opc_lastore = 80
static final int opc_lcmp = 148
static final int opc_lconst_0 = 9
static final int opc_lconst_1 = 10
static final int opc_ldc = 18
static final int opc_ldc2_w = 20
static final int opc_ldc_w = 19
static final int opc_ldiv = 109
static final int[] opc_length
static final int opc_lload = 22
static final int opc_lload_0 = 30
static final int opc_lload_1 = 31
static final int opc_lload_2 = 32
static final int opc_lload_3 = 33
static final int opc_lmul = 105
static final int opc_lneg = 117
static final int opc_lookupswitch = 171
static final int opc_lor = 129
static final int opc_lrem = 113
static final int opc_lreturn = 173
static final int opc_lshl = 121
static final int opc_lshr = 123
static final int opc_lstore = 55
static final int opc_lstore_0 = 63
static final int opc_lstore_1 = 64
static final int opc_lstore_2 = 65
static final int opc_lstore_3 = 66
static final int opc_lsub = 101
static final int opc_lushr = 125
static final int opc_lxor = 131
static final int opc_monitorenter = 194
static final int opc_monitorexit = 195
static final int opc_multianewarray = 197
static final int opc_new = 187
static final int opc_newarray = 188
static final int opc_nop = 0
static final int opc_pop = 87
static final int opc_pop2 = 88
static final int opc_putfield = 181
static final int opc_putstatic = 179
static final int opc_ret = 169
static final int opc_return = 177
static final int opc_saload = 53
static final int opc_sastore = 86
static final int opc_sipush = 17
static final int opc_swap = 95
static final int opc_tableswitch = 170
static final int opc_try = -3
static final int opc_wide = 196
static final int opc_xxxunusedxxx = 186
static final String PLEASE_REPORT_PROBLEM = "*** Please report this problem to feedback@profiler.netbeans.org"
static final String[] PRIMITIVE_ARRAY_TYPE_NAMES
static final String PROFILER_DOTTED_CLASS_PREFIX = "org.netbeans.lib.profiler."
static final String PROFILER_SEPARATE_EXEC_THREAD_NAME = "*** JFluid Separate Command Execution Thread"
static final String PROFILER_SERVER_SLASHED_CLASS_PREFIX = "org/netbeans/lib/profiler/server/"
static final String PROFILER_SERVER_THREAD_NAME = "*** Profiler Agent Communication Thread"
static final String PROFILER_SPECIAL_EXEC_THREAD_NAME = "*** Profiler Agent Special Execution Thread"
static final byte RESET_COLLECTORS = 10
static final byte ROOT_ENTRY = 1
static final byte ROOT_EXIT = 2
static final byte SERVLET_DO_METHOD = 27
static final byte SET_FOLLOWING_EVENTS_THREAD = 13
static final int SORTING_COLUMN_DEFAULT = -1
static final int T_BOOLEAN = 4
static final int T_BYTE = 8
static final int T_CHAR = 5
static final int T_DOUBLE = 7
static final int T_FLOAT = 6
static final int T_INT = 10
static final int T_LONG = 11
static final int T_SHORT = 9
static final byte THREAD_STATUS_MONITOR = 3
static final java.awt.Color THREAD_STATUS_MONITOR_COLOR = new java.awt.Color(255, 114, 102)
static final String THREAD_STATUS_MONITOR_STRING = messages.getString("CommonConstants_ThreadStatusMonitorString")
static final byte THREAD_STATUS_RUNNING = 1
static final java.awt.Color THREAD_STATUS_RUNNING_COLOR = new java.awt.Color(58, 228, 103)
static final String THREAD_STATUS_RUNNING_STRING = messages.getString("CommonConstants_ThreadStatusRunningString")
static final byte THREAD_STATUS_SLEEPING = 2
static final java.awt.Color THREAD_STATUS_SLEEPING_COLOR = new java.awt.Color(155, 134, 221)
static final String THREAD_STATUS_SLEEPING_STRING = messages.getString("CommonConstants_ThreadStatusSleepingString")
static final byte THREAD_STATUS_UNKNOWN = -1
static final java.awt.Color THREAD_STATUS_UNKNOWN_COLOR = java.awt.Color.LIGHT_GRAY
static final String THREAD_STATUS_UNKNOWN_STRING = messages.getString("CommonConstants_ThreadStatusUnknownString")
static final byte THREAD_STATUS_WAIT = 4
static final java.awt.Color THREAD_STATUS_WAIT_COLOR = new java.awt.Color(255, 228, 90)
static final String THREAD_STATUS_WAIT_STRING = messages.getString("CommonConstants_ThreadStatusWaitString")
static final byte THREAD_STATUS_ZOMBIE = 0
static final java.awt.Color THREAD_STATUS_ZOMBIE_COLOR = java.awt.Color.BLACK
static final String THREAD_STATUS_ZOMBIE_STRING = messages.getString("CommonConstants_ThreadStatusZombieString")
static final byte THREADS_RESUMED = 9
static final byte THREADS_SUSPENDED = 8
static final byte TWO_TIMESTAMP_EVENTS = 6

Protected Member Functions

void addExceptionTableEntry (int startPC, int endPC, int handlerPC, int typeCPIndex)
void appendCode (byte[] appendedBytes, int appendedBytesCount)
byte[] createPackedMethodInfo ()
int getByte (int pos)
int getInt (int pos)
short getShort (int pos)
int getU2 (int pos)
int getU4 (int pos)
void initBytecodesArray ()
void injectCodeAndRewrite (byte[] injectedBytes, int injectedBytesCount, int injectionPos, boolean injectionBindsToFollowingInstruction)
void insertProfilingPoints (RuntimeProfilingPoint[] points, int ppHitCPMethodIdx)
int opcodeLength (int bci)
void putInt (int pos, int value)
void putShort (int pos, short value)
void putU4 (int pos, int value)

Static Protected Member Functions

static int align (int n)
static int getU2 (byte[] buf, int pos)
static int getU4 (byte[] buf, int pos)
static void putByte (byte[] buf, int pos, int value)
static void putU2 (byte[] buf, int pos, int value)
static void putU4 (byte[] buf, int pos, int value)

Protected Attributes

int baseCPoolCount
int bci0
int bci1
byte[] bytecodes
int bytecodesLength
int bytecodesStartIdx
ClassInfo clazz
byte[] exceptionTable
int excTableEntryCount
int maxLocals
int maxStack
int methodIdx
int origBytecodesLength
int origExcTableEntryCount
byte[] origMethodInfo

Static Protected Attributes

static byte[] injectedCode
static int injectedCodeLen
static int injectedCodeMethodIdxPos

Package Functions

 CodeRegionEntryExitCallsInjector (ClassInfo clazz, int baseCPoolCount, int methodIdx, int bci0, int bci1)
void handleJumpWiden (int bci, int delta)

Static Package Functions

 [static initializer]

Static Package Attributes

static final ResourceBundle messages = ResourceBundle.getBundle("org.netbeans.lib.profiler.global.Bundle")

Private Member Functions

void injectCodeRegionEntry ()
void injectCodeRegionExits (int firstRetIdx, int totalReturns, int lastInstrIdx)

Static Private Member Functions

static void initializeInjectedCode ()

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index