PxProfilerCallback

Defined in include/foundation/PxProfiler.h

class PxProfilerCallback

The pure virtual callback interface for general purpose instrumentation and profiling of GameWorks modules as well as applications.

Public Functions

virtual void *zoneStart(const char *eventName, bool detached, uint64_t contextId) = 0

Mark the beginning of a nested profile block.

Parameters
  • eventName[in] Event name. Must be a persistent const char *

  • detached[in] True for cross thread events

  • contextId[in] the context id of this zone. Zones with the same id belong to the same group. 0 is used for no specific group.

Returns

Returns implementation-specific profiler data for this event

virtual void zoneEnd(void *profilerData, const char *eventName, bool detached, uint64_t contextId) = 0

Mark the end of a nested profile block.

Note

eventName plus contextId can be used to uniquely match up start and end of a zone.

Parameters
  • profilerData[in] The data returned by the corresponding zoneStart call (or NULL if not available)

  • eventName[in] The name of the zone ending, must match the corresponding name passed with ‘zoneStart’. Must be a persistent const char *.

  • detached[in] True for cross thread events. Should match the value passed to zoneStart.

  • contextId[in] The context of this zone. Should match the value passed to zoneStart.

inline virtual void recordData(int32_t value, const char *valueName, uint64_t contextId)

Record integer data to be displayed in the profiler.

Parameters
  • value[in] The integer data point to be recorded.

  • valueName[in] The name of the data being recorded. Must be a persistent const char *

  • contextId[in] The context of this data.

inline virtual void recordData(float value, const char *valueName, uint64_t contextId)

Record float data to be displayed in the profiler.

Parameters
  • value[in] The floating point data to be recorded.

  • valueName[in] The name of the data being recorded. Must be a persistent const char *

  • contextId[in] The context of this data.

inline virtual void recordFrame(const char *name, uint64_t contextId)

Record a frame marker to be displayed in the profiler.

Markers that have identical names will be displayed in the profiler along with the time between each of the markers. A frame counter will display the frame marker count.

Parameters
  • name[in] The name of the frame. Must be a persistent const char *

  • contextId[in] The context of the frame.

Protected Functions

inline virtual ~PxProfilerCallback()