
Intel® IXP400 Software
This pointer is interpreted as “the number of
2.Create a thread that runs the code to be monitored. To begin the Xcycle measurements, call the start function, with parameter:
ixPerfProfAccXcycleStart(UINT32 numMeasurementsRequested)
This 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 one measurement takes approximately 1 s during low CPU utilization, therefore 128 measurement takes approximately 128 s.
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.
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.
3.If ixPerfProfAccXcycleStart() is called with an input of zero, this indicates continuous measurements. In this case, the measurements are stopped, by calling the stop function:
ixPerfProfAccXcycleStop(void)
As it takes the measurements some time to complete, the user should call the following function to determine if any measurements are still running:
ixPerfProfAccXcycleInProgress(void)
4.To obtain the results of the measurements made, the user should call the results function, with parameter:
ixPerfProfAccXcycleResultsGet(IxPerfProfAccXcycleResults *xcycleResult)
The result contains:
—float maxIdlePercentage — Maximum percentage of Idle cycles
—float minIdlePercentage — Minimum percentage of Idle cycles
—float aveIdlePercentage — Average percentage of Idle cycles
—UINT32 totalMeasurements — Total number of measurement made
If the user has declared a pointer IxPerfProfAccXcycleResults *xcycleResult, the user may then print out the results of the xcycle measurements as shown in Figure 88.
Figure 88. Display Xcycle Measurement
printf("Maximum percentage of idle cycles = %f\n",
April 2005 | IXP400 Software Version 2.0 | Programmer’s Guide |
264 | Document Number: 252539, Revision: 007 |
|