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

Unified Diff: chrome/profiling/memlog_receiver.h

Issue 2943733002: Add out-of-process memory logging stream parsing. (Closed)
Patch Set: Remove version Created 3 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
Index: chrome/profiling/memlog_receiver.h
diff --git a/chrome/profiling/memlog_receiver.h b/chrome/profiling/memlog_receiver.h
new file mode 100644
index 0000000000000000000000000000000000000000..0f5adf43f859a97ff94608d39f7f44305abaca36
--- /dev/null
+++ b/chrome/profiling/memlog_receiver.h
@@ -0,0 +1,32 @@
+// Copyright 2017 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 CHROME_PROFILING_MEMLOG_RECEIVER_H_
+#define CHROME_PROFILING_MEMLOG_RECEIVER_H_
+
+#include "base/memory/ref_counted.h"
+#include "chrome/common/profiling/memlog_stream.h"
+#include "chrome/profiling/address.h"
+#include "chrome/profiling/stack.h"
+
+namespace profiling {
+
+class Stack;
+
+// A log receiver is a sink for parsed allocation events. See also
+// MemlogStreamReceiver which is for the unparsed data blocks.
+class MemlogReceiver {
+ public:
+ MemlogReceiver() {}
awong 2017/06/19 20:00:13 Why do we need to declare the default constructor?
brettw 2017/06/19 23:29:45 Because of mistake.
brettw 2017/06/19 23:33:45 Sorry, forgot to update after our conversation. I
+ virtual ~MemlogReceiver() {}
+
+ virtual void OnHeader(const StreamHeader& header) = 0;
+ virtual void OnAlloc(const AllocPacket& alloc_packet, Stack&& stack) = 0;
+ virtual void OnFree(const FreePacket& free_packet) = 0;
+ virtual void OnComplete() = 0;
+};
+
+} // namespace profiling
+
+#endif // CHROME_PROFILING_MEMLOG_RECEIVER_H_

Powered by Google App Engine
This is Rietveld 408576698