Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "base/debug/trace_event_impl.h" | 5 #include "base/debug/trace_event_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 const size_t kTraceEventBatchChunks = 1000 / kTraceBufferChunkSize; | 76 const size_t kTraceEventBatchChunks = 1000 / kTraceBufferChunkSize; |
| 77 // Can store results for 30 seconds with 1 ms sampling interval. | 77 // Can store results for 30 seconds with 1 ms sampling interval. |
| 78 const size_t kMonitorTraceEventBufferChunks = 30000 / kTraceBufferChunkSize; | 78 const size_t kMonitorTraceEventBufferChunks = 30000 / kTraceBufferChunkSize; |
| 79 // ECHO_TO_CONSOLE needs a small buffer to hold the unfinished COMPLETE events. | 79 // ECHO_TO_CONSOLE needs a small buffer to hold the unfinished COMPLETE events. |
| 80 const size_t kEchoToConsoleTraceEventBufferChunks = 256; | 80 const size_t kEchoToConsoleTraceEventBufferChunks = 256; |
| 81 | 81 |
| 82 const int kThreadFlushTimeoutMs = 3000; | 82 const int kThreadFlushTimeoutMs = 3000; |
| 83 | 83 |
| 84 #if !defined(OS_NACL) | 84 #if !defined(OS_NACL) |
| 85 // These categories will cause deadlock when ECHO_TO_CONSOLE. crbug.com/325575. | 85 // These categories will cause deadlock when ECHO_TO_CONSOLE. crbug.com/325575. |
| 86 const char kEchoToConsoleCategoryFilter[] = "-ipc,-task"; | 86 const char kEchoToConsoleCategoryFilter[] = |
| 87 "-cc,-renderer,-ipc,-task,-toplevel,-views,-ui,-V8,-v8,-webkit,-renderer_" | |
| 88 "host,-blink,-browser,-net,-loader"; | |
|
piman
2014/09/25 21:42:50
?
| |
| 87 #endif | 89 #endif |
| 88 | 90 |
| 89 const char kSyntheticDelayCategoryFilterPrefix[] = "DELAY("; | 91 const char kSyntheticDelayCategoryFilterPrefix[] = "DELAY("; |
| 90 | 92 |
| 91 #define MAX_CATEGORY_GROUPS 100 | 93 #define MAX_CATEGORY_GROUPS 100 |
| 92 | 94 |
| 93 // Parallel arrays g_category_groups and g_category_group_enabled are separate | 95 // Parallel arrays g_category_groups and g_category_group_enabled are separate |
| 94 // so that a pointer to a member of g_category_group_enabled can be easily | 96 // so that a pointer to a member of g_category_group_enabled can be easily |
| 95 // converted to an index into g_category_groups. This allows macros to deal | 97 // converted to an index into g_category_groups. This allows macros to deal |
| 96 // only with char enabled pointers from g_category_group_enabled, and we can | 98 // only with char enabled pointers from g_category_group_enabled, and we can |
| (...skipping 2474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2571 } | 2573 } |
| 2572 | 2574 |
| 2573 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { | 2575 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { |
| 2574 if (*category_group_enabled_) { | 2576 if (*category_group_enabled_) { |
| 2575 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, | 2577 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, |
| 2576 name_, event_handle_); | 2578 name_, event_handle_); |
| 2577 } | 2579 } |
| 2578 } | 2580 } |
| 2579 | 2581 |
| 2580 } // namespace trace_event_internal | 2582 } // namespace trace_event_internal |
| OLD | NEW |