⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ixperfprofacc.h

📁 AMCC POWERPC 44X系列的U-BOOT文件
💻 H
📖 第 1 页 / 共 4 页
字号:
 * * @param	samplingRate UINT32 [in] - sampling rate is the number of *       	clock counts before a counter overflow interrupt is generated, *        	at which, a sample is taken; the rate specified cannot be greater *          than the counter size of 32bits or set to zero. * @param 	clkCntDiv BOOL [in] - enables/disables the clock divider. When  *		true, the divider is enabled and the clock count will be incremented *          by one at each 64th processor clock cycle.  When false, the divider *			is disabled and the clock count will be incremented at every  *			processor clock cycle.  * * This API starts the time based sampling to determine the frequency with  * which lines of code are being executed.  Sampling is done at the rate  * specified by the user.  At each sample,the value of the program counter * is determined.  Each of these occurrences are recorded to determine the  * frequency with which the Xscale code is being executed. This API has to be  * called before ixPerfProfAccXscalePmuTimeSampStop can be called. * * @return *	- IX_PERFPROF_ACC_STATUS_SUCCESS if time based sampling is started  *        successfully *	- IX_PERFPROF_ACC_STATUS_FAIL if unable to start the sampling * 	- IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is  *	  running  *               * @li   Reentrant    : no * @li   ISR Callable : no * */PUBLIC IxPerfProfAccStatus ixPerfProfAccXscalePmuTimeSampStart(	UINT32 samplingRate, 	BOOL clkCntDiv);/** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccXscalePmuTimeSampStop(   IxPerfProfAccXscalePmuEvtCnt *clkCount,   IxPerfProfAccXscalePmuSamplePcProfile *timeProfile) * * @brief Stops the time based sampling * * @param	*clkCount @ref IxPerfProfAccXscalePmuEvtCnt [out]  - pointer to the  *			struct containing the final clock count and its overflow.  It is the *			user's responsibility to allocate the memory for this pointer. * @param 	*timeProfile @ref IxPerfProfAccXscalePmuSamplePcProfile [out] - *          pointer to the array of profiles for each program counter value; *          the user should set the size of the array to  *			IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES.  It is the user's  * 			responsibility to allocate the memory for this pointer. * * This API stops the time based sampling.  The results are stored in the  * pointers allocated by the user.  It can only be called once * ixPerfProfAccXscalePmuTimeSampStart has been called. * * @return *	- IX_PERFPROF_ACC_STATUS_SUCCESS if time based sampling is stopped  *        successfully *	- IX_PERFPROF_ACC_STATUS_XSCALE_PMU_START_NOT_CALLED if *	  ixPerfProfAccXscalePmuTimeSampStart not called first *               * @li   Reentrant    : no * @li   ISR Callable : no * */PUBLIC IxPerfProfAccStatusixPerfProfAccXscalePmuTimeSampStop(	IxPerfProfAccXscalePmuEvtCnt *clkCount,	IxPerfProfAccXscalePmuSamplePcProfile *timeProfile);/** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccXscalePmuEventSampStart(   UINT32 numEvents,   IxPerfProfAccXscalePmuEvent pmuEvent1,   UINT32 eventRate1,   IxPerfProfAccXscalePmuEvent pmuEvent2,   UINT32 eventRate2,   IxPerfProfAccXscalePmuEvent pmuEvent3,   UINT32 eventRate3,   IxPerfProfAccXscalePmuEvent pmuEvent4,   UINT32 eventRate4) * * @brief Starts the event based sampling * * @param	numEvents UINT32 [in] - the number of PMU events that are  *	  		to be monitored as specified by the user. The value should be *          between 1-4 events at a time. * @param 	pmuEvent1 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU  *    		event to be monitored by counter 1 * @param 	eventRate1 UINT32 [in] - sampling rate of counter 1. The rate is  *			the number of events before a sample taken.  If 0 is specified, the *			the full counter value (0xFFFFFFFF) is used. The rate must not be  *			greater than the full counter value. * @param 	pmuEvent2 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU  *    		event to be monitored by counter 2  * @param 	eventRate2 UINT32 [in] -  sampling rate of counter 2. The rate is  *			the number of events before a sample taken. If 0 is specified, the  *			full counter value (0xFFFFFFFF) is used. The rate must not be  *          greater than the full counter value. * @param 	pmuEvent3 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU  *    		event to be monitored by counter 3 * @param 	eventRate3 UINT32 [in] -  sampling rate of counter 3. The rate is  *			the number of events before a sample taken.  If 0 is specified, the  *			full counter value (0xFFFFFFFF) is used.  The rate must not be  *          greater than the full counter value. * @param 	pmuEvent4 @ref IxPerfProfAccXscalePmuEvent [in] - the specific PMU  *    		event to be monitored by counter 4 * @param 	eventRate4 UINT32 [in] -  sampling rate of counter 4. The rate is  *			the number of events before a sample taken.  If 0 is specified, the  *			full counter value (0xFFFFFFFF) is used. The rate must not be  *          greater than the full counter value. * * Starts the event based sampling to determine the frequency with  * which events are being executed.  The sampling rate is the number of events, * as specified by the user,  before a counter overflow interrupt is  * generated.  A sample is taken at each counter overflow interrupt.  At each * sample,the value of the program counter determines the corresponding  * location in the code.  Each of these occurrences are recorded to determine  * the frequency with which the Xscale code in each event is executed. This API * has to be called before ixPerfProfAccXscalePmuEventSampStop can be called. * * @return *	- IX_PERFPROF_ACC_STATUS_SUCCESS if event based sampling is started  *	  successfully *	- IX_PERFPROF_ACC_STATUS_FAIL if unable to start the sampling *	- IX_PERFPROF_ACC_STATUS_XSCALE_PMU_NUM_INVALID if the number of events  *        specified is out of the valid range *	- IX_PERFPROF_ACC_STATUS_XSCALE_PMU_EVENT_INVALID if the value of the *        PMU event specified does not exist *      - IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility is *        running  *               * @li   Reentrant    : no * @li   ISR Callable : no * */PUBLIC IxPerfProfAccStatusixPerfProfAccXscalePmuEventSampStart(	UINT32 numEvents,	IxPerfProfAccXscalePmuEvent pmuEvent1,	UINT32 eventRate1,    IxPerfProfAccXscalePmuEvent pmuEvent2,    UINT32 eventRate2,    IxPerfProfAccXscalePmuEvent pmuEvent3,    UINT32 eventRate3,    IxPerfProfAccXscalePmuEvent pmuEvent4,    UINT32 eventRate4);/** * @ingroup IxPerfProfAcc * * @fn ixPerfProfAccXscalePmuEventSampStop(   IxPerfProfAccXscalePmuSamplePcProfile *eventProfile1,   IxPerfProfAccXscalePmuSamplePcProfile *eventProfile2,   IxPerfProfAccXscalePmuSamplePcProfile *eventProfile3,   IxPerfProfAccXscalePmuSamplePcProfile *eventProfile4) * * @brief Stops the event based sampling * * @param       *eventProfile1 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -  *              pointer to the array of profiles for each program counter value; *              the user should set the size of the array to  *				IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES. It is the  *				users's responsibility to allocate memory for this pointer. * @param       *eventProfile2 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -  *              pointer to the array of profiles for each program counter value; *              the user should set the size of the array to  *				IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES.  It is the  *				users's responsibility to allocate memory for this pointer. * @param       *eventProfile3 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -  *              pointer to the array of profiles for each program counter value; *              the user should set the size of the array to  *				IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES.  It is the  *				users's responsibility to allocate memory for this pointer. * @param       *eventProfile4 @ref IxPerfProfAccXscalePmuSamplePcProfile [out] -  *              pointer to the array of profiles for each program counter value; *              the user should set the size of the array to  *				IX_PERFPROF_ACC_XSCALE_PMU_MAX_PROFILE_SAMPLES.  It is the  *				users's responsibility to allocate memory for this pointer. * * This API stops the event based sampling.  The results are stored in the  * pointers allocated by the user.  It can only be called once  * ixPerfProfAccEventSampStart has been called. * * @return  *      - IX_PERFPROF_ACC_STATUS_SUCCESS if event based sampling is stopped  *         successfully *      - IX_PERFPROF_ACC_STATUS_XSCALE_PMU_START_NOT_CALLED if *          ixPerfProfAccEventSampStart not called first. *               * @li   Reentrant    : no * @li   ISR Callable : no * */PUBLIC IxPerfProfAccStatus ixPerfProfAccXscalePmuEventSampStop(    IxPerfProfAccXscalePmuSamplePcProfile *eventProfile1,    IxPerfProfAccXscalePmuSamplePcProfile *eventProfile2,    IxPerfProfAccXscalePmuSamplePcProfile *eventProfile3,    IxPerfProfAccXscalePmuSamplePcProfile *eventProfile4);/**                                                                              * @ingroup IxPerfProfAcc                                                       *                                                                               * @fn ixPerfProfAccXscalePmuResultsGet(IxPerfProfAccXscalePmuResults *results)      *                                                                               * @brief Reads the current value of the counters and their overflow                                         *                                                                               * @param *results @ref IxPerfProfAccXscalePmuResults [out] - pointer to the           results struct.  It is the user's responsibility to allocate memory          for this pointer *                                                                               * This API reads the value of all four event counters and the clock counter,  * and the associated overflows.  It does not give results associated with  * sampling, i.e. PC and their frequencies.  This API can be called at any time * once a process has been started. If it is called before a process has started * the user should be aware that the values it contains are default values and  * might be meaningless.  The values of the counters are stored in the pointer  * allocated by the client. *                                                                     * @return - none *               * @li   Reentrant    : no * @li   ISR Callable : no * */                                                                             PUBLIC void                                                     ixPerfProfAccXscalePmuResultsGet(IxPerfProfAccXscalePmuResults *results);    /** * @ingroup IxPerfProfAcc *  * @fn ixPerfProfAccBusPmuStart(        IxPerfProfAccBusPmuMode mode,         IxPerfProfAccBusPmuEventCounters1 pecEvent1,        IxPerfProfAccBusPmuEventCounters2 pecEvent2,         IxPerfProfAccBusPmuEventCounters3 pecEvent3,         IxPerfProfAccBusPmuEventCounters4 pecEvent4,        IxPerfProfAccBusPmuEventCounters5 pecEvent5,         IxPerfProfAccBusPmuEventCounters6 pecEvent6,         IxPerfProfAccBusPmuEventCounters7 pecEvent7) * @brief Initializes all the counters and selects events to be monitored. * * Function initializes all the counters and assigns the events associated  * with the counters. Users send in the mode and events they want to count. * This API verifies if the combination chosen is appropriate  * and sets all the registers accordingly. Selecting HALT mode will result * in an error. User should use ixPerfProfAccBusPmuStop() to HALT.  *  *  * @param mode @ref IxPerfProfAccStateBusPmuMode [in] - Mode selection. * @param pecEvent1 @ref IxPerfProfAccBusPmuEventCounters1 [in] - Event for PEC1. * @param pecEvent2 @ref IxPerfProfAccBusPmuEventCounters2 [in] - Event for PEC2. * @param pecEvent3 @ref IxPerfProfAccBusPmuEventCounters3 [in] - Event for PEC3. * @param pecEvent4 @ref IxPerfProfAccBusPmuEventCounters4 [in] - Event for PEC4. * @param pecEvent5 @ref IxPerfProfAccBusPmuEventCounters5 [in] - Event for PEC5. * @param pecEvent6 @ref IxPerfProfAccBusPmuEventCounters6 [in] - Event for PEC6. * @param pecEvent7 @ref IxPerfProfAccBusPmuEventCounters7 [in] - Event for PEC7. * * @return  *      - IX_PERFPROF_ACC_STATUS_SUCCESS - Initialization executed  *        successfully.   *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_MODE_ERROR - Error in selection of  * 		  mode. Only NORTH, SOUTH and SDRAM modes are allowed.  *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC1_ERROR - Error in selection of  *        event for PEC1 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC2_ERROR - Error in selection of  *        event for PEC2  *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC3_ERROR - Error in selection of  *        event for PEC3 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC4_ERROR - Error in selection of  *        event for PEC4 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC5_ERROR - Error in selection of  *        event for PEC5 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC6_ERROR - Error in selection of  *        event for PEC6 *      - IX_PERFPROF_ACC_STATUS_BUS_PMU_PEC7_ERROR - Error in selection of  *        event for PEC7 * 		- IX_PERFPROF_ACC_STATUS_ANOTHER_UTIL_IN_PROGRESS - another utility  * 		  is running * 		- IX_PERFPROF_ACC_STATUS_FAIL - Failed to start because interrupt  * 		  service routine fails to bind.   *               * @li   Reentrant    : no * @li   ISR Callable : no * **/PUBLIC IxPerfProfAccStatus ixPerfProfAccBusPmuStart (        IxPerfProfAccBusPmuMode mode,         IxPerfProfAccBusPmuEventCounters1 pecEvent1,        IxPerfProfAccBusPmuEventCounters2 pecEvent2,         IxPerfProfAccBusPmuEventCounters3 pecEvent3,         IxPerfProfAccBusPmuEventCounters4 pecEvent4,        IxPerfProfAccBusPmuEventCounters5 pecEvent5,         IxPerfProfAccBusPmuEventCounters6 pecEvent6,         IxPerfProfAccBusPmuEventCounters7 pecEvent7);/** * @ingroup IxPerfProfAcc *  * @fn ixPerfProfAccBusPmuStop(void) * @brief Stops all counters.  *  * This function stops all the PECs by setting the halt bit in the ESR. * * * @return  *      - IX_PERFPROF_ACC_STATUS_SUCCESS - Counters successfully halted. *      - IX_PERFPROF_ACC_STATUS_FAIL - Counters could'nt be halted.  *		- IX_PERFPROF_ACC_STATUS_BUS_PMU_START_NOT_CALLED - the  * 		  ixPerfProfAccBusPmuStart() function is not called. *               * @li   Reentrant    : no * @li   ISR Callable : no * **/PUBLIC IxPerfProfAccStatus ixPerfProfAccBusPmuStop (void);/** * @ingroup IxPerfProfAcc *  * @fn ixPerfProfAccBusPmuResultsGet (		IxPerfProfAccBusPmuResults *busPmuResults) * @brief Gets values of all counters  *  * This function is responsible for getting all the counter values from the  * lower API and putting it into an array for the user. * * @param *busPmuResults @ref IxPerfProfAccBusPmuResults [out] *           - Pointer to a structure of arrays to store all counter values. * * @return  none *               * @li   Reentrant    : no * @li   ISR Callable : no

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -