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

Unified Diff: components/tracing/core/string_interning.cc

Issue 2308583003: tracing v2: Introduce TraceBufferReader to read-back the trace buffer (Closed)
Patch Set: DISALLOW_COPY_AND_ASSIGN + cctype for isalnum 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
Index: components/tracing/core/string_interning.cc
diff --git a/components/tracing/core/string_interning.cc b/components/tracing/core/string_interning.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e50b220f2c3302525e3669afed4f917c77d61c79
--- /dev/null
+++ b/components/tracing/core/string_interning.cc
@@ -0,0 +1,19 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/tracing/core/string_interning.h"
+
+namespace tracing {
+namespace v2 {
+
+// TODO(primiano): there is a possibile optimization here: if we somehow
+// guarantee that kInternedStringBase is always laid out before any other string
+// in the binary, we can minimize the ptr distance and hence reduce the number
+// of bytes required to VarInt-encode it. Very likely this can be done using
+// __attribute__((section(X))) on Linux or __attribute__((section("__TEXT,X")))
+// on OSX.
+const char kInternedStringBase[] = "{[Tracing v2]}";
+
+} // namespace v2
+} // namespace tracing

Powered by Google App Engine
This is Rietveld 408576698