|
GTPin
|
Interface of the memory buffer that stores profile data of the kernel More...
Data Structures | |
| class | gtpin::GtProfileArray |
| Class that represents an array of data records in the profile buffer. More... | |
| class | gtpin::GtProfileTrace |
| Class that represents a trace - sequence of data records chronologically collected and stored in the profile buffer. More... | |
| class | gtpin::IGtProfileBuffer |
| Abstract representation of the profile data storage. More... | |
| class | gtpin::IGtProfileBufferAllocator |
| Abstract class that provides interface for allocation (reservation) memory blocks in the profile buffer. More... | |
Interface of the memory buffer that stores profile data of the kernel
Profile buffer is the aggregate storage for all data collected by a single run of the instrumented kernel.
The storage is allocated at the instrumentation phase, when the tool handles the IGtTool::OnKernelBuild callback. The allocation interface is provided by the IGtProfileBufferAllocator object that is sent to the tool along with the callback (see IGtKernelInstrument::ProfileBufferAllocator()).
For storage of a simple structure, the allocation can be done by a single call to the IGtProfileBufferAllocator::Allocate function. If a tool needs multiple complex structures for its profile data, it can allocate space incrementally, by calling IGtProfileBufferAllocator::Allocate per each structure separately. In this case, the profile buffer allocator will aggregate all allocation requests to accomodate all of them in a single, contiguous memory buffer.
Real assignment of the physical memory space for the profile buffer occurs when the tool calls the IGtKernelDispatch::CreateProfileBuffer function during the IGtTool::OnKernelRun callback handling. This fuction returns the IGtProfileBuffer object that provides read/write access to the data in the allocated profile buffer.
Both IGtProfileBuffer and IGtProfileBufferAllocator are abstract interfaces that allow allocation and manipulation of profile data of any complexity. Additionally, GTPin API provides two inline wrappers of these interfaces that implement the two most popular profile data structures:
Copyright (C) 2013-2025 Intel Corporation
SPDX-License-Identifier: MIT
1.7.4