?? ixperfprofacc.h
字號:
* **/PUBLIC voidixPerfProfAccBusPmuResultsGet (IxPerfProfAccBusPmuResults *BusPmuResults);/** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccBusPmuPMSRGet ( UINT32 *pmsrValue) * @brief Get values of PMSR * * This API gets the Previous Master Slave Register * value and returns it to the calling function. This value indicates * which master or slave accessed the north, south bus or sdram last. * The value returned by this function is a 32 bit value and is read * from location of an offset 0x0024 of the base value. * * The PMSR value returned indicate the following: * <pre> * * ************************************************************************************* * * Bit * Name * Description * * * * * ************************************************************************************* * * [31:18] *Reserved* * * ************************************************************************************* * * [17:12] * PSS * Indicates which of the slaves on * * * * * ARBS was previously * * * * * accessed by the AHBS. * * * * * [000001] Expansion Bus * * * * * [000010] SDRAM Controller * * * * * [000100] PCI * * * * * [001000] Queue Manager * * * * * [010000] AHB-APB Bridge * * * * * [100000] Reserved * * ************************************************************************************* * * [11:8] * PSN * Indicates which of the Slaves on * * * * * ARBN was previously * * * * * accessed the AHBN. * * * * * [0001] SDRAM Controller * * * * * [0010] AHB-AHB Bridge * * * * * [0100] Reserved * * * * * [1000] Reserved * * ************************************************************************************* * * [7:4] * PMS * Indicates which of the Masters on * * * * * ARBS was previously * * * * * accessing the AHBS. * * * * * [0001] Gasket * * * * * [0010] AHB-AHB Bridge * * * * * [0100] PCI * * * * * [1000] APB * * ************************************************************************************* * * [3:0] * PMN * Indicates which of the Masters on * * * * * ARBN was previously * * * * * accessing the AHBN. * * * * * [0001] NPEA * * * * * [0010] NPEB * * * * * [0100] NPEC * * * * * [1000] Reserved * * ************************************************************************************* * </pre> * * @param *pmsrValue UINT32 [out] - Pointer to return PMSR value. Users need to * allocate storage for psmrValue. * * @return none * * @li Reentrant : no * @li ISR Callable : no * **/PUBLIC voidixPerfProfAccBusPmuPMSRGet (UINT32 *pmsrValue);/** * The APIs below are specifically used for Xcycle module. **//** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccXcycleBaselineRun ( UINT32 *numBaselineCycle) * * @brief Perform baseline for Xcycle * * @param *numBaselineCycle UINT32 [out] - pointer to baseline value after * calibration. Calling function are responsible for * allocating memory space for this pointer. * * Global Data : * - None. * * This function MUST be run before the Xcycle tool can be used. This * function must be run immediately when the OS boots up with no other * addition programs running. * Addition note : This API will measure the time needed to perform * a fix amount of CPU instructions (~ 1 second worth of loops) as a * highest priority task and with interrupt disabled. The time measured * is known as the baseline - interpreted as the shortest time * needed to complete the amount of CPU instructions. The baseline is * returned as unit of time in 66Mhz clock tick. * * @return * - IX_PERFPROF_ACC_STATUS_SUCCESS - successful run, result is returned * - IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_SET_FAIL - failed to change * task priority * - IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_RESTORE_FAIL - failed to * restore task priority * - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility * is running * - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS - Xcycle * tool has already started * * @li Reentrant : no * @li ISR Callable : no * */PUBLIC IxPerfProfAccStatusixPerfProfAccXcycleBaselineRun( UINT32 *numBaselineCycle); /** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccXcycleStart( UINT32 numMeasurementsRequested); * * @brief Start the measurement * * @param numMeasurementsRequested UINT32 [in] - number of measurements * to perform. Value can be 0 to * IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS. * 0 indicate continuous measurement. * * Global Data : * - None. * * * Start the measurements immediately. * numMeasurementsRequested specifies number of measurements to run. * If numMeasurementsRequested is set to 0, the measurement will * be performed continuously until IxPerfProfAccXcycleStop() * is called. * It is estimated that 1 measurement takes approximately 1 second during * low CPU utilization, therefore 128 measurement takes approximately 128 sec. * When CPU utilization is high, the measurement will take longer. * This function spawn a task the perform the measurement and returns. * The measurement may continue even if this function returns. * * IMPORTANT: Under heavy CPU utilization, the task spawn by this * function may starve and fail to respond to stop command. User * may need to kill the task manually in this case. * * There are only IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS * storage available so storing is wrapped around if measurements are * more than IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS. * * * @return * - IX_PERFPROF_ACC_STATUS_SUCCESS - successful start, a thread is created * in the background to perform measurement. * - IX_PERFPROF_ACC_STATUS_XCYCLE_PRIORITY_SET_FAIL - failed to set * task priority * - IX_PERFPROF_ACC_STATUS_XCYCLE_THREAD_CREATE_FAIL - failed to create * thread to perform measurement. * - IX_PERFPROF_ACC_STATUS_XCYCLE_NO_BASELINE - baseline is not available * - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_REQUEST_OUT_OF_RANGE - * value is larger than IX_PERFPROF_ACC_XCYCLE_MAX_NUM_OF_MEASUREMENTS * - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS - Xcycle tool * has already started * - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is * running * * @li Reentrant : no * @li ISR Callable : no * */PUBLIC IxPerfProfAccStatusixPerfProfAccXcycleStart ( UINT32 numMeasurementsRequested); /** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccXcycleStop(void); * * @brief Stop the Xcycle measurement * * @param None * * Global Data : * - None. * * Stop Xcycle measurements immediately. If the measurements have stopped * or not started, return IX_PERFPROF_STATUS_XCYCLE_MEASUREMENT_NOT_RUNNING. * Note: This function does not stop measurement cold. The measurement thread * may need a few seconds to complete the last measurement. User needs to use * ixPerfProfAccXcycleInProgress() to determine if measurement is indeed * completed. * * @return * - IX_PERFPROF_ACC_STATUS_SUCCESS - successful measurement is stopped * - IX_PERFPROF_STATUS_XCYCLE_MEASUREMENT_NOT_RUNNING - no measurement running * * @li Reentrant : no * @li ISR Callable : no * */PUBLIC IxPerfProfAccStatusixPerfProfAccXcycleStop(void); /** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccXcycleResultsGet( IxPerfProfAccXcycleResults *xcycleResult ) * * @brief Get the results of Xcycle measurement * * @param *xcycleResult @ref IxPerfProfAccXcycleResults [out] - Pointer to * results of last measurements. Calling function are * responsible for allocating memory space for this pointer. * * Global Data : * - None. * * Retrieve the results of last measurement. User should use * ixPerfProfAccXcycleInProgress() to check if measurement is completed * before getting the results. * * @return * - IX_PERFPROF_ACC_STATUS_SUCCESS - successful * - IX_PERFPROF_ACC_STATUS_FAIL - result is not complete. * - IX_PERFPROF_ACC_STATUS_XCYCLE_NO_BASELINE - baseline is performed * - IX_PERFPROF_ACC_STATUS_XCYCLE_MEASUREMENT_IN_PROGRESS - Xcycle * tool is still running * * @li Reentrant : no * @li ISR Callable : no * */PUBLIC IxPerfProfAccStatusixPerfProfAccXcycleResultsGet ( IxPerfProfAccXcycleResults *xcycleResult); /** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccXcycleInProgress (void) * * @brief Check if Xcycle is running * * @param None * Global Data : * - None. * * Check if Xcycle measuring task is running. * * @return * - TRUE - Xcycle is running * - FALSE - Xcycle is not running * * @li Reentrant : no * @li ISR Callable : no * */PUBLIC BOOLixPerfProfAccXcycleInProgress(void); #ifdef __linux/** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccXscalePmuTimeSampCreateProcFile * * @brief Enables proc file to call module function * * @param None * * Global Data : * - None. * * This function is declared globally to enable /proc directory system to call * and execute the function when the registered file is called. This function is not meant to * be called by the user. * * @return * - Length of data written to file. * * @li Reentrant : no * @li ISR Callable : no * */intixPerfProfAccXscalePmuTimeSampCreateProcFile (char *buf, char **start, off_t offset, int count, int *eof, void *data);/** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccXscalePmuEventSampCreateProcFile * * @brief Enables proc file to call module function * * @param None * * Global Data : * - None. * * This function is declared globally to enable /proc directory system to call * and execute the function when the registered file is called. This function is not meant to * be called by the user. * * @return * - Length of data written to file. * * @li Reentrant : no * @li ISR Callable : no * */intixPerfProfAccXscalePmuEventSampCreateProcFile (char *buf, char **start, off_t offset, int count, int *eof, void *data);#endif /* ifdef __linux */#endif /* ndef IXPERFPROFACC_H *//** *@} defgroup IxPerfProfAcc */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -