Skip to content
Yun Lin edited this page Dec 8, 2020 · 2 revisions
  • Relevant project: microbat_instrumentator
  1. microbat.instrumentation.runtime.ExecutionTracer: The subject program will be instrumented with invocation to this class to trace multiple runtime events such as passing line, write/read a variable, enter/exit a method, etc.
  2. microbat.instrumentation.runtime.TracerStore: It stores all the traces during execution, multiple traces indicate a concurrent program.
  3. microbat.instrumentation.TraceAgent: It starts the execution of a subject program, and stores the traces in trace file or database.
  4. microbat.instrumentation.instr package: All the classes are used to instrument code into subject program. More details can be referred in https://github.com/llmhyy/microbat/wiki/Instrumentation.
  • Execution Mode One important point for trace collection is to avoid finite recursion when we use some fundamental Java library such as ArrayList and HashMap. As we will use ArrayList and HashMap in the instrumentation code, we do not want to run instrumented code in those Java classes. Otherwise, we will cause the subject program have infinite recursions until the program stack overflows. To this end, we use two modes to execute the program.

//To be continued.