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

Unified Diff: public/platform/WebMemoryAllocatorDump.h

Issue 1111383002: [tracing] Expose memory-infra tracing infrastructure to Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Wrapping at 80 cols Created 5 years, 8 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 | « public/platform/Platform.h ('k') | public/platform/WebMemoryDumpProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebMemoryAllocatorDump.h
diff --git a/public/platform/WebMemoryAllocatorDump.h b/public/platform/WebMemoryAllocatorDump.h
new file mode 100644
index 0000000000000000000000000000000000000000..71d256aed9e2d9ad4bc5a3ac1c87d0fd352c11ca
--- /dev/null
+++ b/public/platform/WebMemoryAllocatorDump.h
@@ -0,0 +1,32 @@
+// Copyright 2015 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.
+
+#ifndef WebMemoryAllocatorDump_h
+#define WebMemoryAllocatorDump_h
+
+#include "WebCommon.h"
+#include "WebNonCopyable.h"
+#include "WebString.h"
+
+namespace blink {
+
+// A container which holds all the attributes of a particular dump for a given
+// allocator.
+class BLINK_PLATFORM_EXPORT WebMemoryAllocatorDump : public WebNonCopyable {
+public:
+ // Adds a scalar attribute to the dump.
+ // Arguments:
+ // name: name of the attribute. Typical names, emitted by most allocators
+ // dump providers are: "outer_size", "inner_size", "objects_count".
+ // units: the units for the attribute. Gives a hint to the trace-viewer UI
+ // about the semantics of the attribute.
+ // Currently supported values are "bytes" and "objects".
+ // value: the value of the attribute.
+ virtual void AddScalar(const WebString& name, const char* units, uint64_t value) { }
+ virtual void AddString(const WebString& name, const char* units, const WebString& value) { }
+};
+
+} // namespace blink
+
+#endif // WebMemoryAllocatorDump_h
« no previous file with comments | « public/platform/Platform.h ('k') | public/platform/WebMemoryDumpProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698