Profile

The Profile object supports profiling of the DSP code. More...

Functions

HPI_ERR HPI_ProfileOpenAll (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 wProfileIndex, HPI_HPROFILE *phProfile, HW16 *pwMaxProfiles)
 Open all the profiles on a particular adapter.
HPI_ERR HPI_ProfileGet (HPI_HSUBSYS *phSubSys, HPI_HPROFILE hProfile, HW16 wIndex, HW16 *pwSeconds, HW32 *pdwMicroSeconds, HW32 *pdwCallCount, HW32 *pdwMaxMicroSeconds, HW32 *pdwMinMicroSeconds)
 Reads a single profile from the DSP's profile store.
HPI_ERR HPI_ProfileGetIdleCount (HPI_HSUBSYS *phSubSys, HPI_HPROFILE hProfile, HW16 wIndex, HW32 *pdwIdleCycles, HW32 *pdwCount)
HPI_ERR HPI_ProfileGetUtilization (HPI_HSUBSYS *phSubSys, HPI_HPROFILE hProfile, HW32 *pdwUtilization)
 Get the DSP utilization in 1/100 of a percent.
HPI_ERR HPI_ProfileGetName (HPI_HSUBSYS *phSubSys, HPI_HPROFILE hProfile, HW16 wIndex, char *szName, HW16 nNameLength)
 Get the name of a profile.
HPI_ERR HPI_ProfileStartAll (HPI_HSUBSYS *phSubSys, HPI_HPROFILE hProfile)
 Start profiling running.
HPI_ERR HPI_ProfileStopAll (HPI_HSUBSYS *phSubSys, HPI_HPROFILE hProfile)
 Stop profiling.

Detailed Description

The Profile object supports profiling of the DSP code.

It should be used as a development tool for measuring DSP code operation. Comments in AXPROF.H describe the DSP side of the profiling operation. In general this set of functions is intended for AudioScience internel use.


Function Documentation

HPI_ERR HPI_ProfileOpenAll HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW16  wProfileIndex,
HPI_HPROFILE *  phProfile,
HW16 *  pwMaxProfiles
 

Open all the profiles on a particular adapter.

If the adapter does not have profiling enabled, the function will return an error.

The complete profile set of all profiles can be thought of as any array of execution timings/profiles. Each indexed profile corresponds to the execution of a particular segment of DSP code.

Note that HPI_ProfileStartAll() must be called after HPI_ProfileOpenAll() to start the profiling operation on the DSP.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
wAdapterIndex  Adapter index.
wProfileIndex  Corresponds to DSP index.
phProfile  Returned profile handle.
pwMaxProfiles  Returned maximum number of profile bins supported.

HPI_ERR HPI_ProfileGet HPI_HSUBSYS *  phSubSys,
HPI_HPROFILE  hProfile,
HW16  wIndex,
HW16 *  pwSeconds,
HW32 *  pdwMicroSeconds,
HW32 *  pdwCallCount,
HW32 *  pdwMaxMicroSeconds,
HW32 *  pdwMinMicroSeconds
 

Reads a single profile from the DSP's profile store.

The input is a handle to the profiles (hProfiles - returned from HPI_ProfileOpenAll() ) and an index that addresses one of the profiles (wIndex). The index may range from 0 to wMaxProfiles (returned by HPI_ProfileOpenAll() ). The return parameters describe the execution of the profiled section of DSP code.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hProfile  Handle of profile object.
wIndex  Index of the profile to retrieve.
pwSeconds  Returned number of seconds spent executing the profiled code.
pdwMicroSeconds  Returned fractional seconds spent executing the profiled code (measured in $\mu s$, range 0-999,999).
pdwCallCount  Returned number of times the profiled code was executed.
pdwMaxMicroSeconds  Returned maximum $\mu s$ spent executing the profiled code (range 0-8,388,608, or 8 s).
pdwMinMicroSeconds  Returned minimum $\mu s$ spent executing the profiled code (range 0-8,388,608, or 8 s).

HPI_ERR HPI_ProfileGetIdleCount HPI_HSUBSYS *  phSubSys,
HPI_HPROFILE  hProfile,
HW16  wIndex,
HW32 *  pdwIdleCycles,
HW32 *  pdwCount
 

Deprecated:
this function is no longer supported. Please use HPI_ProfileGetUtilization() instead.

HPI_ERR HPI_ProfileGetUtilization HPI_HSUBSYS *  phSubSys,
HPI_HPROFILE  hProfile,
HW32 *  pdwUtilization
 

Get the DSP utilization in 1/100 of a percent.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hProfile  Handle of profile object.
pdwUtilization  Returned DSP utilization in 100ths of a percent.

HPI_ERR HPI_ProfileGetName HPI_HSUBSYS *  phSubSys,
HPI_HPROFILE  hProfile,
HW16  wIndex,
char *  szName,
HW16  nNameLength
 

Get the name of a profile.

A typical adapter can support multiple "named" profiles simultaneously. This function allows an application (or GUI) to read the names of the profiles from the DSP so as to correctly label the returned timing information.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hProfile  Handle of profile object.
wIndex  Index of the profile to retrieve the name of.
szName  Pointer to a string that will have the name returned in it.
nNameLength  Length of the szName string.

HPI_ERR HPI_ProfileStartAll HPI_HSUBSYS *  phSubSys,
HPI_HPROFILE  hProfile
 

Start profiling running.

This starts profile counters and timers running. It is up to the user to periodically call HPI_ProfileGet() to retrieve timing information.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hProfile  Handle of profile object.

HPI_ERR HPI_ProfileStopAll HPI_HSUBSYS *  phSubSys,
HPI_HPROFILE  hProfile
 

Stop profiling.

When profiling is stopped counters are no longer updated.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hProfile  Handle of profile object.


Generated on Tue Nov 18 12:59:31 2008 for AudioScience HPI by  doxygen 1.4.6-NO