|
GTPin
|
Instrumentor of the GEN kernel. More...
#include <igt_kernel.h>
Public Member Functions | |
| virtual const IGtKernel & | Kernel () const =0 |
| Get IGtKernel interface to the kernel being instrumented. | |
| virtual const IGtCfg & | Cfg () const =0 |
| Get IGtCfg interface to the kernel being instrumented. | |
| virtual const IGtGenCoder & | Coder () const =0 |
| Get IGtGenCoder interface to the kernel being instrumented. | |
| virtual IGtProfileBufferAllocator & | ProfileBufferAllocator () const =0 |
| Get IGtProfileBufferAllocator interface to the kernel being instrumented. | |
| virtual IGtMemoryMapper & | MemoryMapper ()=0 |
| Get IGtMemoryMapper interface to the kernel being instrumented. | |
| virtual IGtIargFactory & | IargFactory () const =0 |
| virtual bool | InstrumentInstruction (const IGtIns &ins, GtIpoint ipoint, const IGtGenProcedure &proc)=0 |
| Insert the specified instrumentation procedure before/after the specified instruction. | |
| virtual bool | InstrumentBbl (const IGtBbl &bbl, GtIpoint ipoint, const IGtGenProcedure &proc)=0 |
| Insert the specified instrumentation procedure before/after the specified BBL. | |
| virtual bool | InstrumentEdge (const IGtEdge &igtEdge, const IGtGenProcedure &proc)=0 |
| Insert the specified instrumentation procedure to the destination bbl and execute it only when entering from the source bbl of the given edge. | |
| virtual bool | InstrumentEntries (const IGtGenProcedure &proc)=0 |
| Insert the specified instrumentation procedure at all entries to the kernel. | |
| virtual bool | InstrumentExits (const IGtGenProcedure &proc)=0 |
| Insert the specified instrumentation procedure at all exits of the kernel - before each EOT instruction in the original code of the kernel. | |
| virtual bool | RemoveInstruction (const IGtIns &ins)=0 |
| Remove the specified instruction from the original code of the kernel. | |
| virtual bool | SetProfileFilter (uint32_t sliceMask, uint32_t dualSubsliceMask, uint32_t subsliceMask, uint32_t euMask, uint32_t threadMask)=0 |
| Set the profiling filter that controls which version of the kernel code, instrumented or original, will run on the HW slice/EU/thread. | |
| virtual bool | LinkHliModule (IGtHliModuleHandle moduleHandle)=0 |
| Link the kernel with the specified High-Level Instrumentation (HLI) module. | |
Instrumentor of the GEN kernel.
For each new binary kernel created by the compiler, GTPin invokes the IGtTool::OnKernelBuild function. This function, implemented by the tool, receives the IGtKernelInstrument object that refers to the kernel being compiled and provides methods for instrumenting the kernel. Part of these methods are implemented by the IGtKernelInstrument object itself, while many other methods are implemented by referred objects that provide interfaces like IGtCfg, IGtGenCoder, IGtInsFactory, etc.
| virtual const IGtCfg& gtpin::IGtKernelInstrument::Cfg | ( | ) | const [pure virtual] |
Get IGtCfg interface to the kernel being instrumented.
| virtual const IGtGenCoder& gtpin::IGtKernelInstrument::Coder | ( | ) | const [pure virtual] |
Get IGtGenCoder interface to the kernel being instrumented.
| virtual IGtIargFactory& gtpin::IGtKernelInstrument::IargFactory | ( | ) | const [pure virtual] |
Get Get IGtIargFactory interface to the factory of arguments of the High-Level Instrumentation (HLI) functions
| virtual bool gtpin::IGtKernelInstrument::InstrumentBbl | ( | const IGtBbl & | bbl, |
| GtIpoint | ipoint, | ||
| const IGtGenProcedure & | proc | ||
| ) | [pure virtual] |
Insert the specified instrumentation procedure before/after the specified BBL.
| [in] | bbl | BBL in the original code of the kernel |
| [in] | ipoint | Location in the original code, relative to 'bbl' |
| [in] | proc | Instrumentation procedure to be inserted at the specified location |
| virtual bool gtpin::IGtKernelInstrument::InstrumentEdge | ( | const IGtEdge & | igtEdge, |
| const IGtGenProcedure & | proc | ||
| ) | [pure virtual] |
Insert the specified instrumentation procedure to the destination bbl and execute it only when entering from the source bbl of the given edge.
| [in] | edge | edge between two basic blocks in the original code of the kernel |
| [in] | proc | Instrumentation procedure to be inserted at the specified location |
| virtual bool gtpin::IGtKernelInstrument::InstrumentEntries | ( | const IGtGenProcedure & | proc | ) | [pure virtual] |
Insert the specified instrumentation procedure at all entries to the kernel.
| [in] | proc | Instrumentation procedure to be inserted |
| virtual bool gtpin::IGtKernelInstrument::InstrumentExits | ( | const IGtGenProcedure & | proc | ) | [pure virtual] |
Insert the specified instrumentation procedure at all exits of the kernel - before each EOT instruction in the original code of the kernel.
| [in] | proc | Instrumentation procedure to be inserted |
| virtual bool gtpin::IGtKernelInstrument::InstrumentInstruction | ( | const IGtIns & | ins, |
| GtIpoint | ipoint, | ||
| const IGtGenProcedure & | proc | ||
| ) | [pure virtual] |
Insert the specified instrumentation procedure before/after the specified instruction.
| [in] | ins | Instruction in the original code of the kernel |
| [in] | ipoint | Location in the original code, relative to 'ins' |
| [in] | proc | Instrumentation procedure to be inserted at the specified location |
| virtual const IGtKernel& gtpin::IGtKernelInstrument::Kernel | ( | ) | const [pure virtual] |
Get IGtKernel interface to the kernel being instrumented.
| virtual bool gtpin::IGtKernelInstrument::LinkHliModule | ( | IGtHliModuleHandle | moduleHandle | ) | [pure virtual] |
Link the kernel with the specified High-Level Instrumentation (HLI) module.
| [in] | moduleHandle | Handle to a module in the HLI library (see HliLibrary) |
| virtual IGtMemoryMapper& gtpin::IGtKernelInstrument::MemoryMapper | ( | ) | [pure virtual] |
Get IGtMemoryMapper interface to the kernel being instrumented.
| virtual IGtProfileBufferAllocator& gtpin::IGtKernelInstrument::ProfileBufferAllocator | ( | ) | const [pure virtual] |
Get IGtProfileBufferAllocator interface to the kernel being instrumented.
| virtual bool gtpin::IGtKernelInstrument::RemoveInstruction | ( | const IGtIns & | ins | ) | [pure virtual] |
Remove the specified instruction from the original code of the kernel.
| [in] | ins | Instruction to be removed from the original code of the kernel |
| virtual bool gtpin::IGtKernelInstrument::SetProfileFilter | ( | uint32_t | sliceMask, |
| uint32_t | dualSubsliceMask, | ||
| uint32_t | subsliceMask, | ||
| uint32_t | euMask, | ||
| uint32_t | threadMask | ||
| ) | [pure virtual] |
Set the profiling filter that controls which version of the kernel code, instrumented or original, will run on the HW slice/EU/thread.
The profiling filter comprises a number of bit masks associated with HW components. Each bit in the mask represents a HW component with the corresponding ID. Instrumented code will be executed on HW components whose corresponding bits in all masks are set on.
| [in] | sliceMask | Slice mask |
| [in] | dualSubsliceMask | Dual subslice mask |
| [in] | subsliceMask | Subslice mask |
| [in] | euMask | EU imask |
| [in] | threadMask | HW thread mask |
Copyright (C) 2013-2025 Intel Corporation
SPDX-License-Identifier: MIT
1.7.4