8 #ifndef PXR_BASE_TRACE_EVENT_H
9 #define PXR_BASE_TRACE_EVENT_H
108 _type(_InternalEventType::
Begin),
119 _type(_InternalEventType::
Begin),
128 _type(_InternalEventType::
End),
139 _type(_InternalEventType::
End),
150 _type(_InternalEventType::
Timespan),
160 _type(_InternalEventType::
Marker),
171 _type(_InternalEventType::
Marker),
184 new (&_payload)
double(value);
196 new (&_payload)
double(value);
205 _type(_InternalEventType::ScopeData),
207 new (&_payload)
bool(data);
214 _type(_InternalEventType::ScopeData),
216 new (&_payload) int64_t(data);
223 _type(_InternalEventType::ScopeData),
225 new (&_payload) int64_t(data);
232 _type(_InternalEventType::ScopeData),
234 new (&_payload) uint64_t(data);
241 _type(_InternalEventType::ScopeData),
243 new (&_payload)
double(data);
250 _type(_InternalEventType::ScopeDataLarge),
252 new (&_payload)
const char*(data);
270 enum class _InternalEventType : uint8_t {
286 _InternalEventType _type;
288 PayloadStorage _payload;
293 #endif // PXR_BASE_TRACE_EVENT_H
The event represents an marker without a duration.
TraceEvent(EndTag, const Key &key, TimeStamp ts, TraceCategoryId cat)
Constructor for End events that takes a specific TimeStamp ts.
TraceEvent(DataTag, const Key &key, int64_t data, TraceCategoryId cat)
GT_API const UT_StringHolder time
The event is storing an double.
TraceEvent(MarkerTag, const Key &key, TraceCategoryId cat)
#define PXR_NAMESPACE_OPEN_SCOPE
GLsizei const GLfloat * value
uint64_t ArchGetTickTime()
TraceEvent(DataTag, const Key &key, bool data, TraceCategoryId cat)
TRACE_API TraceEventData GetData() const
Returns the data stored in a data event.
The event is storing an unsigned integer.
The event is storing a bool.
TRACE_API EventType GetType() const
Returns the type of the event.
TraceEvent(EndTag, const Key &key, TraceCategoryId cat)
TRACE_API double GetCounterValue() const
Return the counter value associated with this event.
The event represents the ending timestamp of a scope.
TraceEvent(CounterValueTag, const Key &key, double value, TraceCategoryId cat)
Constructor for Counter value events.
TRACE_API TimeStamp GetStartTimeStamp() const
Returns the start time of a timespan event.
TraceEvent(DataTag, const Key &key, int data, TraceCategoryId cat)
The event is storing a string.
TRACE_API std::pair< TimeStamp, TimeStamp > GetTimeSpanStamps() const
TraceEvent(TimespanTag, const Key &key, TimeStamp startTime, TimeStamp endTime, TraceCategoryId cat)
Constructor for Timespan events that takes the start time and end time.
TraceEvent(BeginTag, const Key &key, TraceCategoryId cat)
TRACE_API TimeStamp GetEndTimeStamp() const
Returns the end time of a timespan event.
TraceEvent & operator=(const TraceEvent &)=delete
The event is storing an integer.
TraceEvent(CounterDeltaTag, const Key &key, double value, TraceCategoryId cat)
Constructor for Counter delta events.
The event is not storing any data.
The event represents the beginning timestamp of a scope.
TraceEvent(DataTag, const Key &key, double data, TraceCategoryId cat)
DataType
The different types of data that can be stored in a TraceEvent instance.
#define PXR_NAMESPACE_CLOSE_SCOPE
uint64_t TimeStamp
Time in "ticks".
The event is an unknown type.
const Key & GetKey() const
Return this event's key.
EventType
Valid event types.
The event stores data that is associated with its enclosing scope.
TRACE_API TimeStamp GetTimeStamp() const
Return the time stamp associated with this event.
TraceEvent(MarkerTag, const Key &key, TimeStamp ts, TraceCategoryId cat)
Constructor for Mark events that takes a specific TimeStamp ts.
TraceEvent(BeginTag, const Key &key, TimeStamp ts, TraceCategoryId cat)
Constructor for Begin events that takes a specific TimeStamp ts.
The event represents a change in a counter.
uint32_t TraceCategoryId
Categories that a TraceReporter can use to filter events.
The event represents begin and end timestamp of a scope.
void SetTimeStamp(TimeStamp time)
Sets the events timestamp to time.
TraceEvent(DataTag, const Key &key, const char *data, TraceCategoryId cat)
The event represents the value of a counter.
TraceCategoryId GetCategory() const
Returns the event's category id.
TraceEvent(DataTag, const Key &key, uint64_t data, TraceCategoryId cat)