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

Unified Diff: runtime/vm/trace_buffer.h

Issue 328663008: Add support to trace warnings in TraceBuffer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | « runtime/vm/parser.cc ('k') | runtime/vm/trace_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/trace_buffer.h
===================================================================
--- runtime/vm/trace_buffer.h (revision 37297)
+++ runtime/vm/trace_buffer.h (working copy)
@@ -12,10 +12,12 @@
namespace dart {
class JSONStream;
+class Script;
struct TraceBufferEntry {
int64_t micros;
char* message;
+ bool message_is_escaped;
bool empty() const {
return message == NULL;
}
@@ -32,18 +34,23 @@
void Clear();
// Internally message is copied.
- void Trace(int64_t micros, const char* message);
+ void Trace(int64_t micros, const char* msg, bool msg_is_escaped = false);
// Internally message is copied.
- void Trace(const char* message);
+ void Trace(const char* msg, bool msg_is_escaped = false);
void TraceF(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
void PrintToJSONStream(JSONStream* stream) const;
+ // Accessors for testing.
+ TraceBufferEntry* At(intptr_t i) const { return &ring_[RingIndex(i)]; }
+ intptr_t Length() const { return ring_cursor_; }
+
private:
TraceBuffer(Isolate* isolate, intptr_t capacity);
void Cleanup();
- void Fill(TraceBufferEntry* entry, int64_t micros, char* msg);
- void AppendTrace(int64_t micros, char* message);
+ void Fill(TraceBufferEntry* entry, int64_t micros,
+ char* msg, bool msg_is_escaped = false);
+ void AppendTrace(int64_t micros, char* msg, bool msg_is_escaped = false);
Isolate* isolate_;
TraceBufferEntry* ring_;
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/trace_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698