Class FunctionCallRecorder
java.lang.Object
com.github.beothorn.agent.recorder.FunctionCallRecorder
This class is responsible for recording the call stack of a function call.
Usually, this should be written following OO principles of encapsulation.
But this class bytecode is injected on the actual code, and having stuff private
seems to cause some issues. You will see some questionable visibility choices here.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidenterConstructor(Constructor<?> constructor) static voidenterFunction(Method method) static voidexit()static StringgetClassNameFor(Constructor<?> constructor) static StringgetClassNameFor(Method method) static voidstatic voidonEnter(String threadName, String name, String className, String method, long entryTime, String[][] arguments) static voidstatic voidstatic voidsetShouldCaptureStacktrace(boolean captureStacktrace) static voidsetStartTrigger(String startTriggerFunctionNam) static voidsetStopTrigger(String stopTriggerFunctionNam)
-
Field Details
-
stackPerThread
-
shouldPrintQualified
public static boolean shouldPrintQualified -
shouldCaptureStacktrace
public static boolean shouldCaptureStacktrace -
isRecording
public static boolean isRecording -
startTrigger
-
stopTrigger
-
-
Constructor Details
-
FunctionCallRecorder
public FunctionCallRecorder()
-
-
Method Details
-
enterFunction
-
enterConstructor
-
exit
public static void exit() -
setStartTrigger
-
setShouldCaptureStacktrace
public static void setShouldCaptureStacktrace(boolean captureStacktrace) -
setStopTrigger
-
getClassNameFor
-
getClassNameFor
-
onEnter
-
onEnter
-
onLeave
-
onLeave
-
getOldCallStack
-
getFinalCallStack
-