OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |