Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: include/libplatform/v8-tracing.h

Issue 2307163002: [Tracing] Expose trace serialization as part of tracing interface (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | src/libplatform/tracing/trace-serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/libplatform/v8-tracing.h
diff --git a/include/libplatform/v8-tracing.h b/include/libplatform/v8-tracing.h
index 7646ea5489664300ec7ad64ea1dbce6451c15424..a60d6fa77b613cc81011959a825f58043fef3daa 100644
--- a/include/libplatform/v8-tracing.h
+++ b/include/libplatform/v8-tracing.h
@@ -246,6 +246,20 @@ class TracingController {
void operator=(const TracingController&) = delete;
};
+class TraceSerializer {
+ public:
+ explicit TraceSerializer(std::ostream& stream);
+ void WritePrefix();
+ void AppendTraceEvent(TraceObject* trace_event);
+ void WriteSuffix();
+
+ private:
+ void AppendArgValue(uint8_t type, TraceObject::ArgValue value);
+
+ std::ostream& stream_;
+ bool append_comma_ = false;
+};
+
} // namespace tracing
} // namespace platform
} // namespace v8
« no previous file with comments | « BUILD.gn ('k') | src/libplatform/tracing/trace-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698