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

Unified Diff: chrome/common/profiling/memlog_stream.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 | « no previous file | chrome/profiling/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/profiling/memlog_stream.h
diff --git a/chrome/common/profiling/memlog_stream.h b/chrome/common/profiling/memlog_stream.h
index 7a9e98d2c4a700473ceabd9632777e12a823586d..44557a74e3d700392db966e6df14f32d2bd75695 100644
--- a/chrome/common/profiling/memlog_stream.h
+++ b/chrome/common/profiling/memlog_stream.h
@@ -5,10 +5,41 @@
#ifndef CHROME_COMMON_PROFILING_MEMLOG_STREAM_H_
#define CHROME_COMMON_PROFILING_MEMLOG_STREAM_H_
+#include <stdint.h>
+
#include "build/build_config.h"
namespace profiling {
+static const uint32_t kStreamSignature = 0xF6103B71;
+
+static const uint32_t kAllocPacketType = 0xA1A1A1A1;
+static const uint32_t kFreePacketType = 0xFEFEFEFE;
+
+#pragma pack(push, 1)
+struct StreamHeader {
+ uint32_t signature; // kStreamSignature
+};
+
+struct AllocPacket {
+ uint32_t op; // = kAllocPacketType
+
+ uint64_t time;
+ uint64_t address;
+ uint64_t size;
+
+ uint32_t stack_len;
+ // Immediately followed by |stack_len| more addresses.
+};
+
+struct FreePacket {
+ uint32_t op; // = kFreePacketType
+
+ uint64_t time;
+ uint64_t address;
+};
+#pragma pack(pop)
+
#if defined(OS_WIN)
// Prefix for pipe name for communicating between chrome processes and the
// memlog process. The pipe ID is appended to this to get the pipe name.
« no previous file with comments | « no previous file | chrome/profiling/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698