Lines Matching refs:traceEvent

113     TraceEvent* traceEvent = reinterpret_cast<TraceEvent*>(storagePtr);  in addTraceEvent()  local
114 traceEvent->fPhase = phase; in addTraceEvent()
115 traceEvent->fNumArgs = numArgs; in addTraceEvent()
116 traceEvent->fSize = size; in addTraceEvent()
117 traceEvent->fName = name; in addTraceEvent()
118 traceEvent->fID = id; in addTraceEvent()
119 traceEvent->fClockBegin = std::chrono::steady_clock::now().time_since_epoch().count(); in addTraceEvent()
120 traceEvent->fClockEnd = 0; in addTraceEvent()
121 traceEvent->fThreadID = SkGetThreadID(); in addTraceEvent()
123 TraceEventArg* traceEventArgs = traceEvent->args(); in addTraceEvent()
124 char* stringTableBase = traceEvent->stringTable(); in addTraceEvent()
153 TraceEvent* traceEvent = reinterpret_cast<TraceEvent*>(handle); in updateTraceEventDuration() local
154 traceEvent->fClockEnd = std::chrono::steady_clock::now().time_since_epoch().count(); in updateTraceEventDuration()
213 static void trace_event_to_json(SkJSONWriter* writer, TraceEvent* traceEvent, in trace_event_to_json() argument
218 if (TRACE_EVENT_PHASE_CREATE_OBJECT == traceEvent->fPhase) { in trace_event_to_json()
219 SkASSERT(nullptr == baseTypeResolver->find(traceEvent->fID)); in trace_event_to_json()
220 baseTypeResolver->set(traceEvent->fID, traceEvent->fName); in trace_event_to_json()
221 } else if (TRACE_EVENT_PHASE_DELETE_OBJECT == traceEvent->fPhase) { in trace_event_to_json()
222 SkASSERT(nullptr != baseTypeResolver->find(traceEvent->fID)); in trace_event_to_json()
223 baseTypeResolver->remove(traceEvent->fID); in trace_event_to_json()
228 char phaseString[2] = { traceEvent->fPhase, 0 }; in trace_event_to_json()
230 writer->appendString("name", traceEvent->fName); in trace_event_to_json()
231 if (0 != traceEvent->fID) { in trace_event_to_json()
233 writer->appendPointer("id", reinterpret_cast<void*>(traceEvent->fID)); in trace_event_to_json()
238 uint64_t relativeTimestamp = static_cast<int64_t>(traceEvent->fClockBegin - in trace_event_to_json()
241 if (0 != traceEvent->fClockEnd) { in trace_event_to_json()
242 double dur = static_cast<double>(traceEvent->fClockEnd - traceEvent->fClockBegin) * 1E-3; in trace_event_to_json()
246 writer->appendS64("tid", serializationState->getShortThreadID(traceEvent->fThreadID)); in trace_event_to_json()
251 if (traceEvent->fNumArgs) { in trace_event_to_json()
253 const char* stringTable = traceEvent->stringTable(); in trace_event_to_json()
255 if (TRACE_EVENT_PHASE_SNAPSHOT_OBJECT == traceEvent->fPhase && in trace_event_to_json()
256 baseTypeResolver->find(traceEvent->fID) && in trace_event_to_json()
257 0 != strcmp(*baseTypeResolver->find(traceEvent->fID), traceEvent->fName)) { in trace_event_to_json()
260 writer->appendString("base_type", *baseTypeResolver->find(traceEvent->fID)); in trace_event_to_json()
264 for (int i = 0; i < traceEvent->fNumArgs; ++i) { in trace_event_to_json()
265 const TraceEventArg* arg = traceEvent->args() + i; in trace_event_to_json()
314 TraceEvent* traceEvent = reinterpret_cast<TraceEvent*>(block.fBlock.get()); in flush() local
316 trace_event_to_json(writer, traceEvent, serializationState); in flush()
317 traceEvent = traceEvent->next(); in flush()