RavEngine
Loading...
Searching...
No Matches
physx::profile::ZoneImpl< TNameProvider > Class Template Reference
Inheritance diagram for physx::profile::ZoneImpl< TNameProvider >:
[legend]
Collaboration diagram for physx::profile::ZoneImpl< TNameProvider >:
[legend]

Public Member Functions

 ZoneImpl (PxAllocatorCallback *inAllocator, const char *inName, uint32_t bufferSize=0x10000, const TNameProvider &inProvider=TNameProvider())
 
void doAddName (const char *inName, uint16_t inEventId, bool inCompileTimeEnabled)
 
virtual void flushEventIdNameMap ()
 Specifies that it is a safe point to flush read-write name map into read-only map. Make sure getEventIdForName is not called from a different thread.
 
virtual uint16_t getEventIdForName (const char *inName)
 Get or create a new event id for a given name. If you pass in a previously defined event name (including one returned) from the name provider) you will just get the same event id back.
 
virtual uint16_t getEventIdsForNames (const char **inNames, uint32_t inLen)
 Reserve a contiguous set of profile event ids for a set of names.
 
virtual void setProfileZoneManager (PxProfileZoneManager *inMgr)
 Set profile zone manager for the zone.
 
virtual PxProfileZoneManager * getProfileZoneManager ()
 Get profile zone manager for the zone.
 
const char * getName ()
 Get profile zone name.
 
PxProfileEventBufferClient * getEventBufferClient ()
 
void addClient (PxProfileZoneClient &inClient)
 Adds new client.
 
void removeClient (PxProfileZoneClient &inClient)
 Removes a client.
 
virtual bool hasClients () const
 Check if manager has clients.
 
virtual PxProfileNames getProfileNames () const
 Returns profile event names.
 
virtual void release ()
 Release the profile zone.
 
virtual void handleBufferFlush (const uint8_t *inData, uint32_t inLength)
 
virtual void handleClientRemoved ()
 Happens if something removes all the clients from the manager.
 
virtual void startEvent (uint16_t inId, uint64_t contextId)
 Send a start profile event, optionally with a context. Events are sorted by thread and context in the client side.
 
virtual void stopEvent (uint16_t inId, uint64_t contextId)
 Send a stop profile event, optionally with a context. Events are sorted by thread and context in the client side.
 
virtual void startEvent (uint16_t inId, uint64_t contextId, uint32_t threadId)
 Send a start profile event, optionally with a context. Events are sorted by thread and context in the client side.
 
virtual void stopEvent (uint16_t inId, uint64_t contextId, uint32_t threadId)
 Send a stop profile event, optionally with a context. Events are sorted by thread and context in the client side.
 
virtual void atEvent (uint16_t inId, uint64_t contextId, uint32_t threadId, uint64_t start, uint64_t stop)
 
virtual void eventValue (uint16_t inId, uint64_t contextId, int64_t inValue)
 
virtual void flushProfileEvents ()
 Flush profile events. Sends the profile event buffer to hooked clients.
 

Additional Inherited Members

- Static Public Member Functions inherited from physx::profile::PxProfileZone
static PxProfileZone & createProfileZone (PxAllocatorCallback *inAllocator, const char *inSDKName, PxProfileNames inNames=PxProfileNames(), uint32_t inEventBufferByteSize=0x10000)
 Create a new profile zone.

 
- Static Public Attributes inherited from physx::profile::PxProfileEventSender
static const uint32_t CrossThreadId = 99999789
 Use this as a thread id for events that start on one thread and end on another.
 
- Protected Member Functions inherited from physx::profile::PxProfileNameProvider
PxProfileNameProvider & operator= (const PxProfileNameProvider &)
 

Member Function Documentation

◆ addClient()

template<typename TNameProvider >
void physx::profile::ZoneImpl< TNameProvider >::addClient ( PxProfileZoneClient &  inClient)
inlinevirtual

Adds new client.

Parameters
inClientClient to add.

Implements physx::profile::PxProfileZoneClientManager.

◆ atEvent()

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::atEvent ( uint16_t  inId,
uint64_t  contextId,
uint32_t  threadId,
uint64_t  start,
uint64_t  stop 
)
inlinevirtual

◆ eventValue()

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::eventValue ( uint16_t  inId,
uint64_t  contextId,
int64_t  inValue 
)
inlinevirtual

Set an specific events value. This is different than the profiling value for the event; it is a value recorded and kept around without a timestamp associated with it. This value is displayed when the event itself is processed.

Implements physx::profile::PxProfileEventSender.

◆ flushEventIdNameMap()

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::flushEventIdNameMap ( )
inlinevirtual

Specifies that it is a safe point to flush read-write name map into read-only map. Make sure getEventIdForName is not called from a different thread.

Implements physx::profile::PxProfileZone.

◆ flushProfileEvents()

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::flushProfileEvents ( )
inlinevirtual

Flush profile events. Sends the profile event buffer to hooked clients.

Implements physx::profile::PxProfileEventFlusher.

◆ getEventIdForName()

template<typename TNameProvider >
virtual uint16_t physx::profile::ZoneImpl< TNameProvider >::getEventIdForName ( const char *  inName)
inlinevirtual

Get or create a new event id for a given name. If you pass in a previously defined event name (including one returned) from the name provider) you will just get the same event id back.

Parameters
inNameProfile event name.

Implements physx::profile::PxProfileZone.

◆ getEventIdsForNames()

template<typename TNameProvider >
virtual uint16_t physx::profile::ZoneImpl< TNameProvider >::getEventIdsForNames ( const char **  inNames,
uint32_t  inLen 
)
inlinevirtual

Reserve a contiguous set of profile event ids for a set of names.

This function does not do any meaningful error checking other than to ensure that if it does generate new ids they are contiguous. If the first name is already registered, that is the ID that will be returned regardless of what other names are registered. Thus either use this function alone (without the above function) or don't use it.
If you register "one","two","three" and the function returns an id of 4, then "one" is mapped to 4, "two" is mapped to 5, and "three" is mapped to 6.

Parameters
inNamesset of names to register.
inLenLength of the name list.
Returns
The first id associated with the first name. The rest of the names will be associated with monotonically incrementing uint16_t values from the first id.

Implements physx::profile::PxProfileZone.

◆ getName()

template<typename TNameProvider >
const char * physx::profile::ZoneImpl< TNameProvider >::getName ( )
inlinevirtual

Get profile zone name.

Returns
Zone name.

Implements physx::profile::PxProfileZone.

◆ getProfileNames()

template<typename TNameProvider >
virtual PxProfileNames physx::profile::ZoneImpl< TNameProvider >::getProfileNames ( ) const
inlinevirtual

Returns profile event names.

Returns
Profile event names.

Implements physx::profile::PxProfileNameProvider.

◆ getProfileZoneManager()

template<typename TNameProvider >
virtual PxProfileZoneManager * physx::profile::ZoneImpl< TNameProvider >::getProfileZoneManager ( )
inlinevirtual

Get profile zone manager for the zone.

Returns
Profile zone manager.

Implements physx::profile::PxProfileZone.

◆ handleBufferFlush()

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::handleBufferFlush ( const uint8_t *  inData,
uint32_t  inLength 
)
inlinevirtual

◆ handleClientRemoved()

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::handleClientRemoved ( )
inlinevirtual

Happens if something removes all the clients from the manager.

Implements physx::profile::PxProfileEventBufferClient.

◆ hasClients()

template<typename TNameProvider >
virtual bool physx::profile::ZoneImpl< TNameProvider >::hasClients ( ) const
inlinevirtual

Check if manager has clients.

Returns
True if manager has added clients.

Implements physx::profile::PxProfileZoneClientManager.

◆ release()

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::release ( )
inlinevirtual

Release the profile zone.

Implements physx::profile::PxProfileZone.

◆ removeClient()

template<typename TNameProvider >
void physx::profile::ZoneImpl< TNameProvider >::removeClient ( PxProfileZoneClient &  inClient)
inlinevirtual

Removes a client.

Parameters
inClientClient to remove.

Implements physx::profile::PxProfileZoneClientManager.

◆ setProfileZoneManager()

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::setProfileZoneManager ( PxProfileZoneManager *  inMgr)
inlinevirtual

Set profile zone manager for the zone.

Parameters
inMgrProfile zone manager.

Implements physx::profile::PxProfileZone.

◆ startEvent() [1/2]

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::startEvent ( uint16_t  inId,
uint64_t  contextId 
)
inlinevirtual

Send a start profile event, optionally with a context. Events are sorted by thread and context in the client side.

Parameters
inIdProfile event id.
contextIdContext id.

Implements physx::profile::PxProfileEventSender.

◆ startEvent() [2/2]

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::startEvent ( uint16_t  inId,
uint64_t  contextId,
uint32_t  threadId 
)
inlinevirtual

Send a start profile event, optionally with a context. Events are sorted by thread and context in the client side.

Parameters
inIdProfile event id.
contextIdContext id.
threadIdThread id.

Implements physx::profile::PxProfileEventSender.

◆ stopEvent() [1/2]

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::stopEvent ( uint16_t  inId,
uint64_t  contextId 
)
inlinevirtual

Send a stop profile event, optionally with a context. Events are sorted by thread and context in the client side.

Parameters
inIdProfile event id.
contextIdContext id.

Implements physx::profile::PxProfileEventSender.

◆ stopEvent() [2/2]

template<typename TNameProvider >
virtual void physx::profile::ZoneImpl< TNameProvider >::stopEvent ( uint16_t  inId,
uint64_t  contextId,
uint32_t  threadId 
)
inlinevirtual

Send a stop profile event, optionally with a context. Events are sorted by thread and context in the client side.

Parameters
inIdProfile event id.
contextIdContext id.
threadIdThread id.

Implements physx::profile::PxProfileEventSender.


The documentation for this class was generated from the following file: