fokiac.blogg.se

Citation itrace
Citation itrace













Both components live in a single executable, a Pintool. These two components are instrumentation and analysis code.

#CITATION ITRACE CODE#

The code to execute at insertion points.A mechanism that decides where and what code is inserted.Although there are some exceptions for conditional branches, generally speaking, if an instruction is never executed then it will not be instrumented.Ĭonceptually, instrumentation consists of two components: It does not matter in what section they reside. Pin instruments all instructions that are actually excuted. When generating code, Pin gives the user an opportunity to inject their own code (instrumentation). The original code is only used for reference. In JIT mode, the only code ever executed is the generated code. Pin makes this efficient by keeping all of the generated code in memory so it can be reused and directly branching from one sequence to another. After regaining control, Pin generates more code for the branch target and continues execution. The generated code sequence is almost identical to the original one, but Pin ensures that it regains control when a branch exits the sequence. It then transfers control to the generated sequence.

citation itrace

Pin intercepts the execution of the first instruction of the executable and generates ("compiles") new code for the straight line code sequence starting at this instruction. The input to this compiler is not bytecode, however, but a regular executable. The best way to think about Pin is as a "just in time" (JIT) compiler.

  • Avoiding Deadlocks in Multi-threaded Applications.
  • Instrumenting Multi-threaded Applications.
  • Floating Point Support in Analysis Routines.
  • It is easy to derive new tools using the examples as a template. Pin includes the source code for a large number of example instrumentation tools like basic block profilers, cache simulators, instruction trace generators, etc. Limited access to symbol and debug information is available as well. Pin automatically saves and restores the registers that are overwritten by the injected code so the application continues to work. Pin provides a rich API that abstracts away the underlying instruction set idiosyncracies and allows context information such as register contents to be passed to the injected code as parameters. This also makes it possible to attach Pin to an already running process. The code is added dynamically while the executable is running. Pin allows a tool to insert arbitrary code (written in C or C++) in arbitrary places in the executable.

    citation itrace

    It supports the Linux*, macOS* and Windows* operating systems and executables for the IA-32, Intel(R) 64 and Intel(R) Many Integrated Core architectures. Pin is a tool for the instrumentation of programs.













    Citation itrace