Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/chrome_browser_field_trials_desktop.h" | 5 #include "chrome/browser/chrome_browser_field_trials_desktop.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 105 | 105 |
| 106 module.file = "chrome.dll"; | 106 module.file = "chrome.dll"; |
| 107 module.debug_file = "chrome.dll.pdb"; | 107 module.debug_file = "chrome.dll.pdb"; |
| 108 | 108 |
| 109 global_tracker->RecordModuleInfo(module); | 109 global_tracker->RecordModuleInfo(module); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void SetupStabilityDebugging() { | 112 void SetupStabilityDebugging() { |
| 113 if (!base::FeatureList::IsEnabled( | 113 if (!base::FeatureList::IsEnabled( |
| 114 browser_watcher::kStabilityDebuggingFeature)) { | 114 browser_watcher::kStabilityDebuggingFeature)) { |
| 115 base::debug::GlobalActivityTracker::DisableFieldTrialRecording(); | |
|
Alexei Svitkine (slow)
2017/02/07 16:14:06
I notice SetupStabilityDebugging() is only called
bcwhite
2017/02/07 17:39:31
Good catch. Added call to disable on non-Win plat
| |
| 115 return; | 116 return; |
| 116 } | 117 } |
| 117 | 118 |
| 118 // TODO(bcwhite): Adjust these numbers once there is real data to show | 119 // TODO(bcwhite): Adjust these numbers once there is real data to show |
| 119 // just how much of an arena is necessary. | 120 // just how much of an arena is necessary. |
| 120 const size_t kMemorySize = 1 << 20; // 1 MiB | 121 const size_t kMemorySize = 1 << 20; // 1 MiB |
| 121 const int kStackDepth = 4; | 122 const int kStackDepth = 4; |
| 122 const uint64_t kAllocatorId = 0; | 123 const uint64_t kAllocatorId = 0; |
| 123 | 124 |
| 124 // Ensure the stability directory exists and determine the stability file's | 125 // Ensure the stability directory exists and determine the stability file's |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 154 CHECK(::GetModuleFileName(nullptr, exe_file, arraysize(exe_file))); | 155 CHECK(::GetModuleFileName(nullptr, exe_file, arraysize(exe_file))); |
| 155 | 156 |
| 156 base::string16 product_name; | 157 base::string16 product_name; |
| 157 base::string16 version_number; | 158 base::string16 version_number; |
| 158 base::string16 channel_name; | 159 base::string16 channel_name; |
| 159 base::string16 special_build; | 160 base::string16 special_build; |
| 160 install_static::GetExecutableVersionDetails(exe_file, &product_name, | 161 install_static::GetExecutableVersionDetails(exe_file, &product_name, |
| 161 &version_number, &special_build, | 162 &version_number, &special_build, |
| 162 &channel_name); | 163 &channel_name); |
| 163 | 164 |
| 164 base::debug::ActivityUserData& global_data = global_tracker->user_data(); | 165 base::debug::ActivityUserData& global_data = global_tracker->global_data(); |
| 165 global_data.SetString(browser_watcher::kStabilityProduct, product_name); | 166 global_data.SetString(browser_watcher::kStabilityProduct, product_name); |
| 166 global_data.SetString(browser_watcher::kStabilityVersion, version_number); | 167 global_data.SetString(browser_watcher::kStabilityVersion, version_number); |
| 167 global_data.SetString(browser_watcher::kStabilityChannel, channel_name); | 168 global_data.SetString(browser_watcher::kStabilityChannel, channel_name); |
| 168 global_data.SetString(browser_watcher::kStabilitySpecialBuild, | 169 global_data.SetString(browser_watcher::kStabilitySpecialBuild, |
| 169 special_build); | 170 special_build); |
| 170 #if defined(ARCH_CPU_X86) | 171 #if defined(ARCH_CPU_X86) |
| 171 global_data.SetString(browser_watcher::kStabilityPlatform, "Win32"); | 172 global_data.SetString(browser_watcher::kStabilityPlatform, "Win32"); |
| 172 #elif defined(ARCH_CPU_X86_64) | 173 #elif defined(ARCH_CPU_X86_64) |
| 173 global_data.SetString(browser_watcher::kStabilityPlatform, "Win64"); | 174 global_data.SetString(browser_watcher::kStabilityPlatform, "Win64"); |
| 174 #endif | 175 #endif |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 190 #endif // defined(OS_WIN) | 191 #endif // defined(OS_WIN) |
| 191 // Activate the experiment as early as possible to increase its visibility | 192 // Activate the experiment as early as possible to increase its visibility |
| 192 // (e.g. the likelihood of its presence in the serialized system profile). | 193 // (e.g. the likelihood of its presence in the serialized system profile). |
| 193 // This also needs to happen before the browser rendez-vous attempt | 194 // This also needs to happen before the browser rendez-vous attempt |
| 194 // (NotifyOtherProcessOrCreate) in PreMainMessageLoopRun so the corresponding | 195 // (NotifyOtherProcessOrCreate) in PreMainMessageLoopRun so the corresponding |
| 195 // metrics are tagged. | 196 // metrics are tagged. |
| 196 base::FeatureList::IsEnabled(features::kDesktopFastShutdown); | 197 base::FeatureList::IsEnabled(features::kDesktopFastShutdown); |
| 197 } | 198 } |
| 198 | 199 |
| 199 } // namespace chrome | 200 } // namespace chrome |
| OLD | NEW |