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

Side by Side Diff: src/libplatform/tracing/trace-writer.h

Issue 2367603002: [tracing] Support ConvertableToTraceFormat argument type. (Closed)
Patch Set: Fix layout tests failures & reland. Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/libplatform/tracing/trace-object.cc ('k') | src/libplatform/tracing/trace-writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SRC_LIBPLATFORM_TRACING_TRACE_WRITER_H_ 5 #ifndef SRC_LIBPLATFORM_TRACING_TRACE_WRITER_H_
6 #define SRC_LIBPLATFORM_TRACING_TRACE_WRITER_H_ 6 #define SRC_LIBPLATFORM_TRACING_TRACE_WRITER_H_
7 7
8 #include "include/libplatform/v8-tracing.h" 8 #include "include/libplatform/v8-tracing.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace platform { 11 namespace platform {
12 namespace tracing { 12 namespace tracing {
13 13
14 class JSONTraceWriter : public TraceWriter { 14 class JSONTraceWriter : public TraceWriter {
15 public: 15 public:
16 explicit JSONTraceWriter(std::ostream& stream); 16 explicit JSONTraceWriter(std::ostream& stream);
17 ~JSONTraceWriter(); 17 ~JSONTraceWriter();
18 void AppendTraceEvent(TraceObject* trace_event) override; 18 void AppendTraceEvent(TraceObject* trace_event) override;
19 void Flush() override; 19 void Flush() override;
20 20
21 private: 21 private:
22 void AppendArgValue(uint8_t type, TraceObject::ArgValue value); 22 void AppendArgValue(uint8_t type, TraceObject::ArgValue value);
23 void AppendArgValue(v8::ConvertableToTraceFormat*);
23 24
24 std::ostream& stream_; 25 std::ostream& stream_;
25 bool append_comma_ = false; 26 bool append_comma_ = false;
26 }; 27 };
27 28
28 } // namespace tracing 29 } // namespace tracing
29 } // namespace platform 30 } // namespace platform
30 } // namespace v8 31 } // namespace v8
31 32
32 #endif // SRC_LIBPLATFORM_TRACING_TRACE_WRITER_H_ 33 #endif // SRC_LIBPLATFORM_TRACING_TRACE_WRITER_H_
OLDNEW
« no previous file with comments | « src/libplatform/tracing/trace-object.cc ('k') | src/libplatform/tracing/trace-writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698