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

Side by Side Diff: chrome/browser/chrome_browser_field_trials_desktop.cc

Issue 1980743002: Track thread activities in order to diagnose hangs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@readwrite-mmf
Patch Set: addressed review comments Created 4 years, 4 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
OLDNEW
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 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/activity_tracker.h"
10 #include "base/metrics/field_trial.h" 11 #include "base/metrics/field_trial.h"
12 #include "base/path_service.h"
11 #include "chrome/browser/prerender/prerender_field_trial.h" 13 #include "chrome/browser/prerender/prerender_field_trial.h"
14 #include "chrome/common/chrome_paths.h"
12 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
13 #include "chrome/common/variations/variations_util.h" 16 #include "chrome/common/variations/variations_util.h"
14 #include "components/variations/variations_associated_data.h" 17 #include "components/variations/variations_associated_data.h"
15 #include "content/public/common/content_switches.h" 18 #include "content/public/common/content_switches.h"
16 19
17 namespace chrome { 20 namespace chrome {
18 21
19 namespace { 22 namespace {
20 23
21 void SetupLightSpeedTrials() { 24 void SetupLightSpeedTrials() {
(...skipping 17 matching lines...) Expand all
39 params["batch_size"] + "/" + params["total_batches"] + 42 params["batch_size"] + "/" + params["total_batches"] +
40 "/" + params["server1"] + "/" + params["server2"] + 43 "/" + params["server1"] + "/" + params["server2"] +
41 "/" + params["server3"] + "/" + params["server4"] + 44 "/" + params["server3"] + "/" + params["server4"] +
42 "/" + params["server5"] + "/" + params["server6"]; 45 "/" + params["server5"] + "/" + params["server6"];
43 46
44 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 47 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
45 switches::kWebRtcStunProbeTrialParameter, cmd_param); 48 switches::kWebRtcStunProbeTrialParameter, cmd_param);
46 #endif 49 #endif
47 } 50 }
48 51
52 void SetupActivityTracking() {
Alexei Svitkine (slow) 2016/08/04 14:27:05 SetupHangDebugging?
Alexei Svitkine (slow) 2016/08/04 18:16:45 Ping.
bcwhite 2016/08/04 19:15:07 Done.
bcwhite 2016/08/04 19:15:07 Done. Was waiting to resolve other names.
53 // Track code activities (such as posting task, blocking on locks, and
54 // joining threads) that can cause threads to hang.
55 base::FilePath activity_file;
56 bool success = base::PathService::Get(chrome::DIR_USER_DATA, &activity_file);
57 DCHECK(success);
58 activity_file = activity_file.AppendASCII("HangDebugInfo");
59 base::debug::SetupGlobalActivityTrackerFieldTrial(activity_file);
60 }
61
49 } // namespace 62 } // namespace
50 63
51 void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line) { 64 void SetupDesktopFieldTrials(const base::CommandLine& parsed_command_line) {
52 prerender::ConfigurePrerender(parsed_command_line); 65 prerender::ConfigurePrerender(parsed_command_line);
53 SetupLightSpeedTrials(); 66 SetupLightSpeedTrials();
54 SetupStunProbeTrial(); 67 SetupStunProbeTrial();
68 SetupActivityTracking();
55 } 69 }
56 70
57 } // namespace chrome 71 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698