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

Side by Side Diff: components/metrics/proto/memory_leak_report.proto

Issue 2067733002: Add MemoryLeakReportProto enum/field for type of process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tag Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 syntax = "proto2"; 5 syntax = "proto2";
6 6
7 option optimize_for = LITE_RUNTIME; 7 option optimize_for = LITE_RUNTIME;
8 8
9 package metrics; 9 package metrics;
10 10
11 // Next tag: 5 11 // Next tag: 6
12 message MemoryLeakReportProto { 12 message MemoryLeakReportProto {
13 // The call stack at which the leak was found. This is a list of offsets 13 // The call stack at which the leak was found. This is a list of offsets
14 // within the program binary. The first entry is the deepest level of the call 14 // within the program binary. The first entry is the deepest level of the call
15 // stack. 15 // stack.
16 // 16 //
17 // Some call stack entries may not be within the Chrome binary (e.g. 17 // Some call stack entries may not be within the Chrome binary (e.g.
18 // JavaScript code). Those entries are given as the absolute offset in memory. 18 // JavaScript code). Those entries are given as the absolute offset in memory.
19 // 19 //
20 // The offsets within Chrome are determined by whether the original call stack 20 // The offsets within Chrome are determined by whether the original call stack
21 // address was within the executable region of the Chrome binary's mapping in 21 // address was within the executable region of the Chrome binary's mapping in
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // times in a row, the leak analysis escalates to the next level. For 54 // times in a row, the leak analysis escalates to the next level. For
55 // allocation sizes, the next level is to start analyzing by call stack. For 55 // allocation sizes, the next level is to start analyzing by call stack. For
56 // call stacks, the next level is to generate a memory leak report. 56 // call stacks, the next level is to generate a memory leak report.
57 optional uint32 size_suspicion_threshold = 4; 57 optional uint32 size_suspicion_threshold = 4;
58 optional uint32 call_stack_suspicion_threshold = 5; 58 optional uint32 call_stack_suspicion_threshold = 5;
59 } 59 }
60 60
61 // Parameters used to initialize the leak detector. 61 // Parameters used to initialize the leak detector.
62 optional Params params = 3; 62 optional Params params = 3;
63 63
64 // The type of Chrome process on which this leak report was generated.
65 enum ProcessType {
66 UNKNOWN_PROCESS = 0;
67 BROWSER_PROCESS = 1;
68 RENDERER_PROCESS = 2;
69 }
70 optional ProcessType source_process = 5;
71
64 ////////////////////////////////////////////////////////////////////////////// 72 //////////////////////////////////////////////////////////////////////////////
65 73
66 // Represents a single snapshot of the internal bookkeeping of the Runtime 74 // Represents a single snapshot of the internal bookkeeping of the Runtime
67 // Memory Leak Detector, which tracks the number of extant allocations (a 75 // Memory Leak Detector, which tracks the number of extant allocations (a
68 // block of heap memory that has been allocated but not yet freed). 76 // block of heap memory that has been allocated but not yet freed).
69 // 77 //
70 // Next tag: 3 78 // Next tag: 3
71 message AllocationBreakdown { 79 message AllocationBreakdown {
72 // Table of number of extant allocations for each allocation size. The i-th 80 // Table of number of extant allocations for each allocation size. The i-th
73 // entry in the vector is the net number of allocations for sizes in the 81 // entry in the vector is the net number of allocations for sizes in the
74 // range [i * 4, i * 4 + 3]. 82 // range [i * 4, i * 4 + 3].
75 repeated uint32 counts_by_size = 1; 83 repeated uint32 counts_by_size = 1;
76 84
77 // The number of extant allocations with size = |size_bytes| and made from 85 // The number of extant allocations with size = |size_bytes| and made from
78 // the call site given by |call_stack|. If it is not set, it means tracking 86 // the call site given by |call_stack|. If it is not set, it means tracking
79 // of allocs per call site for allocation size = |size_bytes| has not yet 87 // of allocs per call site for allocation size = |size_bytes| has not yet
80 // begun at the time of this entry. 88 // begun at the time of this entry.
81 optional uint32 count_for_call_stack = 2; 89 optional uint32 count_for_call_stack = 2;
82 } 90 }
83 91
84 // A record of past allocation data leading up to the circumstances that 92 // A record of past allocation data leading up to the circumstances that
85 // generated the current leak report. 93 // generated the current leak report.
86 // 94 //
87 // A new snapshot is taken every |analysis_interval_bytes| of memory 95 // A new snapshot is taken every |analysis_interval_bytes| of memory
88 // allocation. The oldest record is at the beginning. The most recent record, 96 // allocation. The oldest record is at the beginning. The most recent record,
89 // taken at the time the report was generated, is at the end. 97 // taken at the time the report was generated, is at the end.
90 repeated AllocationBreakdown alloc_breakdown_history = 4; 98 repeated AllocationBreakdown alloc_breakdown_history = 4;
91 } 99 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698