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

Unified Diff: chrome/profiling/memlog_receiver.h

Issue 2943733002: Add out-of-process memory logging stream parsing. (Closed)
Patch Set: Add TODO 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
« no previous file with comments | « chrome/profiling/memlog_connection_manager.cc ('k') | chrome/profiling/memlog_receiver_pipe_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..49f94fbbd48af512a972e925caa1e539f7fab26a
--- /dev/null
+++ b/chrome/profiling/memlog_receiver.h
@@ -0,0 +1,31 @@
+// 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 <vector>
+
+#include "base/memory/ref_counted.h"
+#include "chrome/common/profiling/memlog_stream.h"
+#include "chrome/profiling/address.h"
+
+namespace profiling {
+
+// A log receiver is a sink for parsed allocation events. See also
+// MemlogStreamReceiver which is for the unparsed data blocks.
+class MemlogReceiver {
+ public:
+ virtual ~MemlogReceiver() {}
+
+ virtual void OnHeader(const StreamHeader& header) = 0;
+ virtual void OnAlloc(const AllocPacket& alloc_packet,
+ std::vector<Address>&& stack) = 0;
+ virtual void OnFree(const FreePacket& free_packet) = 0;
+ virtual void OnComplete() = 0;
+};
+
+} // namespace profiling
+
+#endif // CHROME_PROFILING_MEMLOG_RECEIVER_H_
« no previous file with comments | « chrome/profiling/memlog_connection_manager.cc ('k') | chrome/profiling/memlog_receiver_pipe_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698