Class TraceLogger
- java.lang.Object
-
- janala.logger.AbstractLogger
-
- edu.berkeley.cs.jqf.instrument.tracing.TraceLogger
-
- All Implemented Interfaces:
Logger
public class TraceLogger extends AbstractLogger
A singleton class which manages per-thread tracers. This class is used both to log instrumented instructions viaSingleSnoop
, as well as to provide programmatic access to emitTraceEvent
s.- Author:
- Rohan Padhye
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
emit(TraceEvent event)
Emits a trace event for the current thread.static TraceLogger
get()
Returns a handle to the singleton instance.protected void
log(Instruction instruction)
Logs an instrumented byteode instruction for the current thread.void
remove()
Removes the trace logger for the current thread-
Methods inherited from class janala.logger.AbstractLogger
AALOAD, AASTORE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CASTORE, CHECKCAST, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DLOAD, DMUL, DNEG, DREM, DRETURN, DSTORE, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FLOAD, flush, FMUL, FNEG, FREM, FRETURN, FSTORE, FSUB, GETFIELD, GETSTATIC, GETVALUE_boolean, GETVALUE_byte, GETVALUE_char, GETVALUE_double, GETVALUE_float, GETVALUE_int, GETVALUE_long, GETVALUE_Object, GETVALUE_short, GETVALUE_void, GOTO, HEAPLOAD, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IINC, ILOAD, IMUL, INEG, INSTANCEOF, INVOKEINTERFACE, INVOKEMETHOD_END, INVOKEMETHOD_EXCEPTION, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, JSR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDC, LDC, LDC, LDC, LDC, LDC, LDIV, LLOAD, LMUL, LNEG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE, LSUB, LUSHR, LXOR, MAKE_SYMBOLIC, METHOD_BEGIN, METHOD_BEGIN, METHOD_THROW, MONITORENTER, MONITOREXIT, MULTIANEWARRAY, NEW, NEWARRAY, NOP, POP, POP2, PUTFIELD, PUTSTATIC, RET, RETURN, SALOAD, SASTORE, SIPUSH, SPECIAL, SWAP, TABLESWITCH
-
-
-
-
Method Detail
-
get
public static TraceLogger get()
Returns a handle to the singleton instance.- Returns:
- a handle to the singleton instance
-
log
protected void log(Instruction instruction)
Logs an instrumented byteode instruction for the current thread.- Specified by:
log
in classAbstractLogger
-
emit
public void emit(TraceEvent event)
Emits a trace event for the current thread.- Parameters:
event
- the event to be emitted
-
remove
public void remove()
Removes the trace logger for the current thread
-
-