winIDEA SDK
IConnectProfiler Struct Reference

Description

The IConnectProfiler interface provides access to real-time measurement functions exported by winIDEA.

#include <i_Connect.h>

Inheritance diagram for IConnectProfiler:
IConnectProfiler2

Classes

struct  SInfo
 Stores profiling parameters. More...
 
struct  SStatistic
 Stores statistic results. All times are returned in nanoseconds. More...
 
struct  SStatus
 Stores profiler status. More...
 

Public Types

enum  EConfigFlags {
  cfTimeStampCycles = isys::IConnectProfiler::EConfigFlags::cfTimeStampCycles , cfTimeStampTime = isys::IConnectProfiler::EConfigFlags::cfTimeStampTime ,
  cfTimeStampM0 = isys::IConnectProfiler::EConfigFlags::cfTimeStampM0 , cfTimeStampM1 = isys::IConnectProfiler::EConfigFlags::cfTimeStampM1 ,
  cfTimeStampM2 = isys::IConnectProfiler::EConfigFlags::cfTimeStampM2 , cfTimeStampM3 = isys::IConnectProfiler::EConfigFlags::cfTimeStampM3 ,
  cfTimeStampM4 = isys::IConnectProfiler::EConfigFlags::cfTimeStampM4 , cfTimeStampM5 = isys::IConnectProfiler::EConfigFlags::cfTimeStampM5 ,
  cfTimeStampM6 = isys::IConnectProfiler::EConfigFlags::cfTimeStampM6 , cfTimeStampM7 = isys::IConnectProfiler::EConfigFlags::cfTimeStampM7 ,
  cfTimeStampM8 = isys::IConnectProfiler::EConfigFlags::cfTimeStampM8 , cfTimeStampM9 = isys::IConnectProfiler::EConfigFlags::cfTimeStampM9 ,
  cfTimeStampMask = isys::IConnectProfiler::EConfigFlags::cfTimeStampMask
}
 
enum  EAreaFlags {
  afValueTypeMask = 0x0000000F , afTypeFunction = 0x00000010 ,
  afTypeRoutine = 0x00000020 , afTypeVariable = 0x00000030 ,
  afTypeRegion = 0x00000040 , afTypeSingleData = 0x00000050 ,
  afTypeSingleData1 = 0x00000060 , afAreaMask = 0x000000F0 ,
  afFunctionIncludeLines = 0x00000100 , afDataTaskID = 0x00000100 ,
  afDataSingleData = 0x00000200
}
 Area Flags. More...
 
enum  EActivateFlags {
  aStart = 0x00000001 , aStop = 0x00000002 ,
  aStartStopMask = 0x00000003
}
 Flags for profiler activation/deactivation. More...
 
enum  EGetStatusFlags {
  gsfNumRecorded = isys::IConnectProfiler::EGetStatusFlags::gsfNumRecorded , gsfNumAnalyzed = isys::IConnectProfiler::EGetStatusFlags::gsfNumAnalyzed ,
  gsfNumMask = isys::IConnectProfiler::EGetStatusFlags::gsfNumMask
}
 
enum  EResultFlags {
  rfByHandle = 0x00000001 , rfAllAreas = 0x00000002 ,
  rfFilterTask = 0x00000010 , rfFilterValue = 0x00000020 ,
  rfType0 = 0x00000000 , rfType_Mask = 0xF0000000
}
 Result flags. More...
 

Public Member Functions

virtual HRESULT StartConfig (DWORD dwStartConfigFlags, const struct SProfilerStartingPoint *pStartingPoint) PURE
 Begins configuration for a new session of the profiler. More...
 
virtual HRESULT AddArea (DWORD dwAreaFlags, DWORD *pdwHandle, LPCSTR pszName, BYTE byMemArea=0, ADDRESS aAddress=0, ADDRESS aSize=0, DWORD dwNumExits=0, ADDRESS *paExits=NULL) PURE
 Adds an area to the current profiler configuration. More...
 
virtual HRESULT Activate (DWORD dwActivateFlags) PURE
 Activates or deactivates the profiler. More...
 
virtual HRESULT GetHistory (DWORD dwResultFlags, DWORD dwHandle, DWORD dwTask, DWORD dwValue, DWORD dwHistoryBase, DWORD *pdwNumHistories, struct SProfilerHistory *pHistories) PURE
 Retrieves history of invocations for specified area(s). More...
 

Member Enumeration Documentation

◆ EActivateFlags

Flags for profiler activation/deactivation.

Enumerator
aStart 

Activates (arms) the profiler.

aStop 

Deactivates the profiler - note that the profiler deactivates automatically when the trace buffer is filled.

aStartStopMask 

mask for XXX values

◆ EAreaFlags

Area Flags.

Enumerator
afValueTypeMask 

lower 4 bits used as by EProfilerDataValueType

afTypeFunction 

The (execution) area is a high level function.

afTypeRoutine 

The (execution) area is a low level routine.

afTypeVariable 

The (data) area is variable specified by its name.

afTypeRegion 

The (data) area is a region of memory specified by address and size.

afTypeSingleData 

Area is the 'single data' (OTM style) object.

if CPUs single data resource is configurable, byMemArea/aAddress and aSize should be specified

afTypeSingleData1 

Area is the 'single data' 1 (IT</DQM style) object.

Index is set in aAddress

afAreaMask 

the mask

afFunctionIncludeLines 

valid with afTypeFunction - includes function lines of the specified function

afDataTaskID 

valid with afTypeVariable, afTypeRegion, identifies that the specified area is the task ID object

afDataSingleData 

obsolete

◆ EConfigFlags

Deprecated:
For C++ use flags from isys::IConnectProfiler::EConfigFlags (i_ConnectTypes.h), for other languages the right type is automatically used. Provided for backwards compatibility.
Enumerator
cfTimeStampCycles 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampTime 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampM0 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampM1 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampM2 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampM3 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampM4 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampM5 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampM6 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampM7 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampM8 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampM9 

See isys::IConnectProfiler::EConfigFlags.

cfTimeStampMask 

See isys::IConnectProfiler::EConfigFlags.

◆ EGetStatusFlags

Deprecated:
For C++ use flags from isys::IConnectProfiler::EGetStatusFlags (i_ConnectTypes.h), for other languages the right type is automatically used. Provided for backwards compatibility.
Enumerator
gsfNumRecorded 

See isys::IConnectProfiler::EGetStatusFlags.

gsfNumAnalyzed 

See isys::IConnectProfiler::EGetStatusFlags.

gsfNumMask 

See isys::IConnectProfiler::EGetStatusFlags.

◆ EResultFlags

Result flags.

Enumerator
rfByHandle 

retrieve data for the area specified by dwHandle only

rfAllAreas 

retrieve data for all areas

rfFilterTask 

include only data within specified task; use with rfByHandle or rfAllAreas

rfFilterValue 

include data results for a specific value of a data area only; use with rfByHandle.

rfType0 

default formating of results

rfType_Mask 

Mask for result type.

Member Function Documentation

◆ Activate()

virtual HRESULT IConnectProfiler::Activate ( DWORD  dwActivateFlags)
virtual

Activates or deactivates the profiler.

When activating the profiler, the configured areas are evaluated at this time. Activation can fail if an area symbol does not evaluate or number of resulting monitoring points exceeds hardware capabilities.

Returns
ICONNECT_E_ERROR - The requested operation could not be performed. Either the configuration is invalid or the profiler is not available.
S_FALSE - Activate(aStop) was called but the profiler is not active
Parameters
dwActivateFlagssee IConnectProfiler::EActivateFlags

◆ AddArea()

virtual HRESULT IConnectProfiler::AddArea ( DWORD  dwAreaFlags,
DWORD *  pdwHandle,
LPCSTR  pszName,
BYTE  byMemArea = 0,
ADDRESS  aAddress = 0,
ADDRESS  aSize = 0,
DWORD  dwNumExits = 0,
ADDRESS *  paExits = NULL 
)
virtual

Adds an area to the current profiler configuration.

When adding function, and it does not exist, error is NOT reported by this function, but when IConnectProfiler::Activate() is called.

Returns
ICONNECT_E_BAD_ID - The area could not be added. Either an area with that name already exists, or parameters are not valid.
Parameters
dwAreaFlagssee IConnectProfiler::EAreaFlags
pdwHandleSpecifies the location of a DWORD type variable that will accept the handle of the new area. This handle is subsequently used in calls to GetStatistics and GetHistory.
pszNameSpecifies the name of the area. For afTypeFunction and afTypeVariable, this name is used to obtain the address. For afTypeRoutine and afTypeRegion the name will be displayed in the profiler window.
byMemAreaSpecifies mem area for afTypeRoutine or starting address for afTypeRegion.
aAddressSpecifies the entry point for afTypeRoutine or starting address for afTypeRegion. for encoded afTypeSingleData it's the ID
aSizeSpecifies the MAU size for afTypeRegion.
dwNumExitsSpecifies the number of exits for afTypeRoutine.
paExitsPoints to an array of ADDRESS type objects, each specifying an exit point from afTypeRoutine object. The array must contain dwNumExits elements.

◆ GetHistory()

virtual HRESULT IConnectProfiler::GetHistory ( DWORD  dwResultFlags,
DWORD  dwHandle,
DWORD  dwTask,
DWORD  dwValue,
DWORD  dwHistoryBase,
DWORD *  pdwNumHistories,
struct SProfilerHistory *  pHistories 
)
virtual

Retrieves history of invocations for specified area(s).

Parameters
dwResultFlagsSee IConnectProfiler::EResultFlags
dwHandleHandle of the area for which the statistics should be retrieved; used with rfByHandle.
dwTaskTask ID for which the statistics should be retrieved; used with rfFilterTask.
dwValueData value for which the statistics should be retrieved. Used with rfFilterValue.
dwHistoryBaseSpecifies the zero based offset of the history. Use this in consecutive calls to GetHistory:
  SProfilerHistory aHistories[0x100];
  for (DWORD dwHistoryBase = 0; ; )
  {
    DWORD dwNumHistories = 0x100;
    pIConnectProfiler->GetHistory(IConnectProfiler::rfAllAreas, 0, 0, 0,
                                  dwHistoryBase, &dwNumHistories, aHistories);
    if (0 == dwNumHistories)
      break;
    ProcessHistories(dwNumHistories, aHistories);
    dwHistoryBase += dwNumHistories;
  }
  
pdwNumHistoriesOn input, specifies the size of array pHistories points to (i.e. the maximum number of histories to retrieve). On output, specifies the number of histories placed into pHistories.
pHistoriesSpecifies the location of array of SProfilerHistory objects that will receive the history results.

◆ StartConfig()

virtual HRESULT IConnectProfiler::StartConfig ( DWORD  dwStartConfigFlags,
const struct SProfilerStartingPoint *  pStartingPoint 
)
virtual

Begins configuration for a new session of the profiler.

Once a profiler is configured, it can be activated any number of times.

Parameters
dwStartConfigFlagsSee IConnectProfiler::EConfigFlags, which define wanted resolution. The actual resolution selected depends on hardware.
pStartingPointSpecifies the condition that triggers the profiler after it has been activated.