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

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

Issue 2592233002: [memory-infra] Make thread check at unregistration stricter for new dump providers (Closed)
Patch Set: Use set instead of searching string list Created 3 years, 11 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 | base/trace_event/memory_dump_manager.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_MANAGER_H_ 5 #ifndef BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 6 #define BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 // runner affinity (MDPs belonging to the same task runners are adjacent). 359 // runner affinity (MDPs belonging to the same task runners are adjacent).
360 MemoryDumpProviderInfo::OrderedSet dump_providers_; 360 MemoryDumpProviderInfo::OrderedSet dump_providers_;
361 361
362 // A copy of mdpinfo list that support polling. It must be accessed only on 362 // A copy of mdpinfo list that support polling. It must be accessed only on
363 // the dump thread if dump thread exists. 363 // the dump thread if dump thread exists.
364 MemoryDumpProviderInfo::OrderedSet dump_providers_for_polling_; 364 MemoryDumpProviderInfo::OrderedSet dump_providers_for_polling_;
365 365
366 // Shared among all the PMDs to keep state scoped to the tracing session. 366 // Shared among all the PMDs to keep state scoped to the tracing session.
367 scoped_refptr<MemoryDumpSessionState> session_state_; 367 scoped_refptr<MemoryDumpSessionState> session_state_;
368 368
369 // The list of names of dump providers that are blacklisted from strict thread
370 // affinity check on unregistration.
371 std::unordered_set<StringPiece, StringPieceHash>
372 strict_thread_check_blacklist_;
373
369 MemoryDumpManagerDelegate* delegate_; // Not owned. 374 MemoryDumpManagerDelegate* delegate_; // Not owned.
370 375
371 // When true, this instance is in charge of coordinating periodic dumps. 376 // When true, this instance is in charge of coordinating periodic dumps.
372 bool is_coordinator_; 377 bool is_coordinator_;
373 378
374 // Protects from concurrent accesses to the |dump_providers_*| and |delegate_| 379 // Protects from concurrent accesses to the |dump_providers_*| and |delegate_|
375 // to guard against disabling logging while dumping on another thread. 380 // to guard against disabling logging while dumping on another thread.
376 Lock lock_; 381 Lock lock_;
377 382
378 // Optimization to avoid attempting any memory dump (i.e. to not walk an empty 383 // Optimization to avoid attempting any memory dump (i.e. to not walk an empty
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 425 }
421 426
422 private: 427 private:
423 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate); 428 DISALLOW_COPY_AND_ASSIGN(MemoryDumpManagerDelegate);
424 }; 429 };
425 430
426 } // namespace trace_event 431 } // namespace trace_event
427 } // namespace base 432 } // namespace base
428 433
429 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_ 434 #endif // BASE_TRACE_EVENT_MEMORY_DUMP_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698