| |||
Home > Class Reference > The CADIProfiling class > CADIProfiling::CADIProfileSetup() |
This informs the target of the memory regions that are to be profiled. This function must be called only once before any number of calls to either of the following:
CADIProfileControl(CADI_PROF_CNTL_Start)
CADIProfileControl(CADI_PROF_CNTL_Stop)
.
virtual CADIReturn_t CADIProfiling::CADIProfileSetup(CADIProfileType_t type, uint32_t regionCount, CADIProfileRegion_t * region) =0;
where:
type
is the type of profiling, execution addresses or data access, to which these regions apply. It is one of the values defined in CADIProfileType_t:
CADI_PROF_TYPE_Execution
CADI_PROF_TYPE_Memory
is used
with CADIProfileGetMemory()
CADI_PROF_TYPE_Trace
is used
with CADIProfileGetTrace()
.
regionCount
is the number of regions.
region
contains the description of the memory areas being added (see CADIProfileRegion_t). The caller allocates the required memory for this array.
The return value must be CADI_STATUS_IllegalArgument
if
any of the following are true
:
any region spans unpopulated memory
any region spans illegal memory
any region overlaps another region
the address space of a region is not consistent with the profiling type.