Chromium Code Reviews| 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..fa6810bf3c661f79b80d8a755f4544a18d2966aa 100644 |
| --- a/chrome/common/profiling/memlog_stream.h |
| +++ b/chrome/common/profiling/memlog_stream.h |
| @@ -5,10 +5,45 @@ |
| #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 kStreamVersion = 1; |
| + |
| +static const uint32_t kAllocPacketType = 0xA1A1A1A1; |
| +static const uint32_t kFreePacketType = 0xFEFEFEFE; |
| + |
| +#pragma pack(push, 1) |
| +struct StreamHeader { |
| + uint32_t signature; // kStreamSignature |
| + uint32_t version; |
| + |
| + char proctype[16]; |
|
Boris Vidolov
2017/06/16 21:16:46
What will this be?
brettw
2017/06/16 23:58:13
I meant to delete that but did it in the next path
|
| +}; |
| + |
| +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; |
|
Boris Vidolov
2017/06/16 21:16:45
No stack trace here?
brettw
2017/06/16 23:58:13
No, I didn't hook up free stack traces. It's easy
|
| +}; |
| +#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. |