#include <SkEventTracer.h>
|
virtual | ~SkEventTracer ()=default |
|
virtual const uint8_t * | getCategoryGroupEnabled (const char *name)=0 |
|
virtual const char * | getCategoryGroupName (const uint8_t *categoryEnabledFlag)=0 |
|
virtual SkEventTracer::Handle | addTraceEvent (char phase, const uint8_t *categoryEnabledFlag, const char *name, uint64_t id, int32_t numArgs, const char **argNames, const uint8_t *argTypes, const uint64_t *argValues, uint8_t flags)=0 |
|
virtual void | updateTraceEventDuration (const uint8_t *categoryEnabledFlag, const char *name, SkEventTracer::Handle handle)=0 |
|
virtual void | newTracingSection (const char *) |
|
Definition at line 23 of file SkEventTracer.h.
◆ Handle
◆ CategoryGroupEnabledFlags
Enumerator |
---|
kEnabledForRecording_CategoryGroupEnabledFlags | |
kEnabledForMonitoring_CategoryGroupEnabledFlags | |
kEnabledForEventCallback_CategoryGroupEnabledFlags | |
Definition at line 53 of file SkEventTracer.h.
53 {
54
56
58
60 };
@ kEnabledForRecording_CategoryGroupEnabledFlags
@ kEnabledForEventCallback_CategoryGroupEnabledFlags
@ kEnabledForMonitoring_CategoryGroupEnabledFlags
◆ ~SkEventTracer()
virtual SkEventTracer::~SkEventTracer |
( |
| ) |
|
|
virtualdefault |
◆ SkEventTracer() [1/2]
SkEventTracer::SkEventTracer |
( |
| ) |
|
|
protecteddefault |
◆ SkEventTracer() [2/2]
◆ addTraceEvent()
virtual SkEventTracer::Handle SkEventTracer::addTraceEvent |
( |
char |
phase, |
|
|
const uint8_t * |
categoryEnabledFlag, |
|
|
const char * |
name, |
|
|
uint64_t |
id, |
|
|
int32_t |
numArgs, |
|
|
const char ** |
argNames, |
|
|
const uint8_t * |
argTypes, |
|
|
const uint64_t * |
argValues, |
|
|
uint8_t |
flags |
|
) |
| |
|
pure virtual |
◆ getCategoryGroupEnabled()
virtual const uint8_t * SkEventTracer::getCategoryGroupEnabled |
( |
const char * |
name | ) |
|
|
pure virtual |
◆ getCategoryGroupName()
virtual const char * SkEventTracer::getCategoryGroupName |
( |
const uint8_t * |
categoryEnabledFlag | ) |
|
|
pure virtual |
◆ GetInstance()
Gets the event tracer. If this is the first call to SetInstance or GetIntance then a default event tracer is installed and returned.
Definition at line 63 of file SkEventTracer.cpp.
63 {
64 if (
auto tracer =
gUserTracer.load(std::memory_order_acquire)) {
65 return tracer;
66 }
70 return defaultTracer;
71}
static std::atomic< SkEventTracer * > gUserTracer
◆ newTracingSection()
virtual void SkEventTracer::newTracingSection |
( |
const char * |
| ) |
|
|
inlinevirtual |
◆ operator=()
◆ SetInstance()
bool SkEventTracer::SetInstance |
( |
SkEventTracer * |
tracer, |
|
|
bool |
leakTracer = false |
|
) |
| |
|
static |
If this is the first call to SetInstance or GetInstance then the passed instance is installed and true is returned. Otherwise, false is returned. In either case ownership of the tracer is transferred and it will be deleted when no longer needed.
Not deleting the tracer on process exit should not cause problems as the whole heap is about to go away with the process. This can also improve performance by reducing the amount of work needed.
- Parameters
-
leakTracer | Do not delete tracer on process exit. |
Definition at line 49 of file SkEventTracer.cpp.
49 {
51 if (!
gUserTracer.compare_exchange_strong(expected, tracer)) {
52 delete tracer;
53 return false;
54 }
55
56
57 if (!leakTracer) {
59 }
60 return true;
61}
◆ updateTraceEventDuration()
virtual void SkEventTracer::updateTraceEventDuration |
( |
const uint8_t * |
categoryEnabledFlag, |
|
|
const char * |
name, |
|
|
SkEventTracer::Handle |
handle |
|
) |
| |
|
pure virtual |
The documentation for this class was generated from the following files: