Ctools Use Case Library
|
ctools_Result ctools_cpt_eventtrace_open | ( | const ctools_cpt_eventtracecfg * | EventTrace_params) |
Description
Opens CP Tracer New Request event capture, based on user configuration inputs.
[in] | EventTrace_params | ctools_cpt_eventtracecfg provides user defined configuration structure for New Request event capture. |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_EVTPROFILE_ERROR and CTOOLS_CPT_EVTPROFILE_BUSY |
Example API call:
ctools_Result ctools_cpt_globalclose | ( | void | ) |
Description
Close all open CP Tracer modules which are currently opened for the required use case.
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_SINGLECLOSE_ERROR and CTOOLS_CPT_NOT_OPEN |
ctools_Result ctools_cpt_globalstart | ( | void | ) |
Description
Start all open CP Tracer modules which are currently opened for the required use case.
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_SINGLESTART_ERROR and CTOOLS_CPT_NOT_OPEN |
Example API call:
ctools_Result ctools_cpt_globalstop | ( | void | ) |
Description
Stop all open CP Tracer modules which are currently opened for the required use case.
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_SINGLESTOP_ERROR, CTOOLS_CPT_NOT_STARTED and CTOOLS_CPT_NOT_OPEN |
Example API call:
ctools_Result ctools_cpt_masterprofile_open | ( | const ctools_cpt_masterprofilecfg * | MasterProfile_params) |
Description
Opens CP Tracer Master bandwidth profiler based on user configuration inputs.
[in] | MasterProfile_params | ctools_cpt_masterprofilecfg provides user defined configuration structure for Master bandwidth profiling. |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_MASTERPROFILE_ERROR and CTOOLS_CPT_MASTERPROFILE_BUSY |
Example API call:
ctools_Result ctools_cpt_singleclose | ( | eCPT_ModID | CPT_ModId) |
Description
Close the specified CP Tracer module and release all associated resources.
[in] | CPT_ModId | eCPT_ModID provides the CPT module ID for which its associated use-case needs to be started. |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_SINGLECLOSE_ERROR and CTOOLS_CPT_NOT_OPEN |
Example API call:
ctools_Result ctools_cpt_singlestart | ( | eCPT_ModID | CPT_ModId) |
Description
Start the use-case associated with CPT module passed as an input. The use-case gets associated with an CPT module from the Open API call (CPT_EventTrace_open, CPT_MasterProfile_open and CPT_TotalProfile_open).
[in] | CPT_ModId | eCPT_ModID provides the CPT module ID for which its associated use-case needs to be started. |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_SINGLESTART_ERROR and CTOOLS_CPT_NOT_OPEN |
Example API call:
ctools_Result ctools_cpt_singlestop | ( | eCPT_ModID | CPT_ModId) |
Description
Stop the use-case associated with CPT module passed as an input. The use-case gets associated with an CPT module from the Open API call (CPT_EventTrace_open, CPT_MasterProfile_open and CPT_TotalProfile_open).
[in] | CPT_ModId | eCPT_ModID provides the CPT module ID for which its associated use-case needs to be started. |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_SINGLESTOP_ERROR, CTOOLS_CPT_NOT_STARTED and CTOOLS_CPT_NOT_OPEN |
Example API call:
ctools_Result ctools_cpt_sysbwprofile_open | ( | const ctools_cpt_sysprofilecfg * | SysProfile_params) |
Description
Opens CP Tracer System bandwidth profiler based on user configuration inputs.
[in] | SysProfile_params | ctools_cpt_sysprofilecfg provides user defined configuration structure for System bandwidth profiling. |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_SYSPROFILE_ERROR and CTOOLS_CPT_SYSPROFILE_BUSY |
Example API call:
ctools_Result ctools_cpt_syslatprofile_open | ( | const ctools_cpt_sysprofilecfg * | SysProfile_params) |
Description
Opens CP Tracer System latency profiler based on user configuration inputs.
[in] | SysProfile_params | ctools_cpt_sysprofilecfg provides user defined configuration structure for System latency profiling. |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_SYSPROFILE_ERROR and CTOOLS_CPT_SYSPROFILE_BUSY |
Example API call:
ctools_Result ctools_cpt_totalprofile_open | ( | const ctools_cpt_totalprofilecfg * | TotalProfile_params) |
Description
Opens CP Tracer Total bandwidth profiler based on user configuration inputs.
[in] | TotalProfile_params | ctools_cpt_totalprofilecfg provides user defined configuration structure for Total bandwidth profiling. |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_CPT_ENABLE_ERROR, CTOOLS_CPT_TOTALPROFILE_ERROR and CTOOLS_CPT_TOTALPROFILE_BUSY |
Example API call:
ctools_Result ctools_dsptrace_init | ( | void | ) |
Description
The very first function to be called once per system initialization for resource initializations
Success | - CTOOLS_SOK |
Failure | - CTOOLS_DSPTRACE_OPEN_ERROR, CTOOLS_DSPTRACE_SETCLK_ERROR, CTOOLS_DSPTRACE_ENABLE_ERROR and CTOOLS_DSPETB_NOT_ENABLED |
ctools_Result ctools_dsptrace_shutdown | ( | void | ) |
Description
The very final function to be called to release all DSP Trace related resources
Success | - DBG_TOOLS_SOK |
Failure | - CTOOLS_DSPTRACE_DISABLE_ERROR, CTOOLS_DSPTRACE_CLOSE_ERROR and CTOOLS_AET_RELJOB_ERROR |
ctools_Result ctools_edma_resrc_get | ( | uint32_t * | num_params, |
uint32_t * | num_channels | ||
) |
Description
Get the EDMA resouces for the ETB drain
[in] | num_params | number of parameters needed to drain ETB using EDMA |
[in] | num_channels | number of channels needed to drain ETB using EDMA |
Success | - DBG_TOOLS_SOK |
ctools_Result ctools_etb_cpu_drain | ( | const void * | data_p, |
uint32_t | size_in, | ||
uint32_t * | size_out, | ||
uint32_t * | wrap_flag, | ||
ctools_etb_types_e | etb_type | ||
) |
Description
CPU based draining of DSP ETB or System ETB.
[in] | data_p | pointer to the linear buffer |
[in] | size_in | Size of the 32-bit linear buffer (should be multiple of 4k) |
[out] | size_out | number of valid 32-bit words in the linear buffer |
[out] | wrap_flag | pointer to the ETB wrap flag. Specifies whether ETB is wrapped or not |
[in] | etb_type | Specifies whether the ETB being drained is a DSP ETB or System ETB |
Success | - CTOOLS_SOK |
Failure | - trace job close err return status - CTOOLS_RESOURCE_CLOSE_ERROR |
ctools_Result ctools_etb_edma_drain | ( | ctools_edma_result_t * | pct_res, |
ctools_etb_types_e | etb_type | ||
) |
Description
EDMA based draining of DSP ETB or System ETB.
[in] | pct_res | pointer to the edma result structure |
[in] | etb_type | Specifies whether the ETB being drained is a DSP ETB or System ETB |
Success | - CTOOLS_SOK |
Failure | - trace job close err return status - CTOOLS_RESOURCE_CLOSE_ERROR |
ctools_Result ctools_etb_init | ( | const ctools_etb_drain_e | etb_drain_opt, |
const ctools_etb_config_t * | config, | ||
ctools_etb_types_e | etb_type | ||
) |
Description
Initializes DSP ETB or System ETB
[in] | etb_drain_opt | etb drain option for the traces captured in ETB |
[in] | config | pointer to trace configurations |
[in] | etb_type | Specifies whether the ETB being initialized is a DSP ETB or System ETB |
Success | - CTOOLS_SOK |
Result | - Init failure |
ctools_Result ctools_memwatch_aetint_setup | ( | uint32_t * | data_StartAddress, |
uint32_t * | data_EndAddress | ||
) |
Description
The function opens and enables watch point on a memory range. Whenever a write is done to the specified memory range, the AET generates an interrupt, which is applied as an input to the Core Interrupt controller (Core INTC). The Core INTC can be configured to route this interrupt as an exception to the CPU.
[in] | data_StartAddress | Start address of the data to be monitored |
[in] | data_EndAddress | End address of the data to be monitored |
CTOOLS_SOK | - Success |
Failure | - CTOOLS_RESOURCE_BUSY, CTOOLS_AET_CLAIM_ERROR, CTOOLS_AET_SETUPJOB_ERROR and CTOOLS_AET_ENABLE_ERROR |
ctools_Result ctools_memwatch_close | ( | void | ) |
Description
The function closes and free up resources allocated for memory watch point.
Success | - CTOOLS_SOK |
ctools_Result ctools_memwatch_disable | ( | void | ) |
Description
The function disables memory watch point.
Success | - CTOOLS_SOK |
ctools_Result ctools_memwatch_enable | ( | void | ) |
Description
The function enables memory watch point.
Success | - CTOOLS_SOK |
Failure | - CTOOLS_RESOURCE_BUSY, CTOOLS_AET_CLAIM_ERROR, CTOOLS_AET_SETUPJOB_ERROR and CTOOLS_AET_ENABLE_ERROR |
ctools_Result ctools_memwatch_store_pc_setup | ( | uint32_t * | data_StartAddress, |
uint32_t * | data_EndAddress | ||
) |
Description
The function opens and enables watch point on a memory range. For every write to the specified memory range, the AET performs a store Program Address and captures the exact location in code, where the write happened. The list of writes to the specified memory range are captured in the ETB.
[in] | data_StartAddress | Start address of the data to be monitored |
[in] | data_EndAddress | End address of the data to be monitored |
CTOOLS_SOK | - Success |
Failure | - CTOOLS_RESOURCE_BUSY, CTOOLS_AET_CLAIM_ERROR, CTOOLS_AET_SETUPJOB_ERROR and CTOOLS_AET_ENABLE_ERROR |
ctools_Result ctools_pct_close | ( | void | ) |
Description
Close PC trace jobs associated with the current active PC trace use case
Success | - CTOOLS_SOK |
ctools_Result ctools_pct_setup | ( | const void * | pct_start_symb, |
const void * | pct_stop_symb | ||
) |
Description
Open and initialize the trace job for the pc trace and timing
[in] | pct_start_symb | start function to trigger the PC trace start |
[in] | pct_stop_symb | start function to trigger the PC trace stop |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_RESOURCE_BUSY, CTOOLS_AET_CLAIM_ERROR, CTOOLS_AET_SETUPJOB_ERROR and CTOOLS_AET_ENABLE_ERROR |
ctools_Result ctools_pct_start_exc | ( | void | ) |
Description
Open and initialize the trace job for the pc and timing
Success | - CTOOLS_SOK |
Failure | - CTOOLS_RESOURCE_BUSY, CTOOLS_AET_CLAIM_ERROR, CTOOLS_AET_SETUPJOB_ERROR and CTOOLS_AET_ENABLE_ERROR |
ctools_Result ctools_pct_start_now | ( | void | ) |
Description
Start the PC trace and Timing information now
Success | - CTOOLS_SOK |
Failure | - CTOOLS_RESOURCE_BUSY, CTOOLS_AET_CLAIM_ERROR, CTOOLS_AET_SETUPJOB_ERROR and CTOOLS_AET_ENABLE_ERROR |
ctools_Result ctools_pct_stop_now | ( | void | ) |
Description
Stop the PC Trace and Timing Information capture now
Success | - CTOOLS_SOK |
Failure | - CTOOLS_INVALID_CALL_SEQ |
ctools_Result ctools_pct_terminate_all | ( | void | ) |
Description
This API can be used to gracefully terminate all current PC trace jobs and can be called at any point in one's application SW.
Success | - CTOOLS_SOK |
ctools_Result ctools_stat_prof_end | ( | void | ) |
Description
End and close statistical profiling trace job for profiling the application.
CTOOLS_SOK | - Success |
Example API call:
ctools_Result ctools_stat_prof_start | ( | uint32_t | SamplingPeriod) |
Description
The function opens and initializes all trace resources required for a statistical profiling job. The Trace job is started immediately, after it is setup.
[in] | SamplingPeriod | Periodic sampling period (CPU cycles) between two PC trace captures. Please, select a prime number to reduce the probability of coinciding with a periodic event in the application. The Sampling period selected depends on maximum size of Trace buffer and the application which is profiled statistically. Please, make sure that this period doesn't coincide with other periodic events in the application. |
CTOOLS_SOK | - Success |
Failure | - CTOOLS_RESOURCE_BUSY, CTOOLS_AET_CLAIM_ERROR, CTOOLS_AET_SETUPJOB_ERROR and CTOOLS_AET_ENABLE_ERROR |
Example API call:
ctools_Result ctools_systemtrace_getdcmdata | ( | STM_DCM_InfoObj * | DCM_Info) |
Description
This function can be used by the App SW to get DCM data for the current system trace session.
[in] | DCM_Info | Pointer to STM DCM info object |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_INVALID_PARAM |
ctools_Result ctools_systemtrace_init | ( | const ctools_sys_trace_opts_e | sys_trace_options) |
Description
The very first function to be called once per system initialization for system trace resource initializations
[in] | sys_trace_options | Provide option to capture either CPT or SW messages or both CPT and SW messages |
Success | - CTOOLS_SOK |
Failure | - CTOOLS_SYSTEMTRACE_ENABLE_ERROR and CTOOLS_SYSETB_NOT_ENABLED |
ctools_Result ctools_systemtrace_shutdown | ( | const ctools_sys_trace_opts_e | sys_trace_options) |
Description
The very final function to be called to release all the resources used for system trace
[in] | sys_trace_options | Provide option to capture either CPT or SW messages or both CPT and SW messages |
Success | - CTOOLS_SOK |