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

Side by Side Diff: base/trace_event/memory_dump_provider_info.h

Issue 2929673005: Code cleanup and typos in trace_event [NFC] (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « base/trace_event/memory_dump_manager.h ('k') | base/trace_event/memory_peak_detector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_INFO_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_INFO_H_
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_INFO_H_ 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_INFO_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
(...skipping 13 matching lines...) Expand all
24 // whether it has been disabled, etc.) 24 // whether it has been disabled, etc.)
25 // More importantly, having a refptr to this object guarantees that a MDP that 25 // More importantly, having a refptr to this object guarantees that a MDP that
26 // is not thread-bound (hence which can only be unregistered via 26 // is not thread-bound (hence which can only be unregistered via
27 // MDM::UnregisterAndDeleteDumpProviderSoon()) will stay alive as long as the 27 // MDM::UnregisterAndDeleteDumpProviderSoon()) will stay alive as long as the
28 // refptr is held. 28 // refptr is held.
29 // 29 //
30 // Lifetime: 30 // Lifetime:
31 // At any time, there is at most one instance of this class for each instance 31 // At any time, there is at most one instance of this class for each instance
32 // of a given MemoryDumpProvider, but there might be several scoped_refptr 32 // of a given MemoryDumpProvider, but there might be several scoped_refptr
33 // holding onto each of this. Specifically: 33 // holding onto each of this. Specifically:
34 // - In nominal conditions, there is a refptr for each registerd MDP in the 34 // - In nominal conditions, there is a refptr for each registered MDP in the
35 // MDM's |dump_providers_| list. 35 // MDM's |dump_providers_| list.
36 // - In most cases, the only refptr (in the |dump_providers_| list) is destroyed 36 // - In most cases, the only refptr (in the |dump_providers_| list) is destroyed
37 // by MDM::UnregisterDumpProvider(). 37 // by MDM::UnregisterDumpProvider().
38 // - However, when MDM starts a dump, the list of refptrs is copied into the 38 // - However, when MDM starts a dump, the list of refptrs is copied into the
39 // ProcessMemoryDumpAsyncState. That list is pruned as MDP(s) are invoked. 39 // ProcessMemoryDumpAsyncState. That list is pruned as MDP(s) are invoked.
40 // - If UnregisterDumpProvider() is called on a non-thread-bound MDP while a 40 // - If UnregisterDumpProvider() is called on a non-thread-bound MDP while a
41 // dump is in progress, the extar extra of the handle is destroyed in 41 // dump is in progress, the extar extra of the handle is destroyed in
42 // MDM::SetupNextMemoryDump() or MDM::InvokeOnMemoryDump(), when the copy 42 // MDM::SetupNextMemoryDump() or MDM::InvokeOnMemoryDump(), when the copy
43 // inside ProcessMemoryDumpAsyncState is erase()-d. 43 // inside ProcessMemoryDumpAsyncState is erase()-d.
44 // - The PeakDetector can keep extra refptrs when enabled. 44 // - The PeakDetector can keep extra refptrs when enabled.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 friend class base::RefCountedThreadSafe<MemoryDumpProviderInfo>; 103 friend class base::RefCountedThreadSafe<MemoryDumpProviderInfo>;
104 ~MemoryDumpProviderInfo(); 104 ~MemoryDumpProviderInfo();
105 105
106 DISALLOW_COPY_AND_ASSIGN(MemoryDumpProviderInfo); 106 DISALLOW_COPY_AND_ASSIGN(MemoryDumpProviderInfo);
107 }; 107 };
108 108
109 } // namespace trace_event 109 } // namespace trace_event
110 } // namespace base 110 } // namespace base
111 111
112 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_INFO_H_ 112 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_PROVIDER_INFO_H_
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_manager.h ('k') | base/trace_event/memory_peak_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698