Chromium Code Reviews| Index: base/metrics/field_trial.cc |
| diff --git a/base/metrics/field_trial.cc b/base/metrics/field_trial.cc |
| index 75832654facebcfa48b91c3fcdffd6caf8a44aa9..ef2f8b756f80fba07e929b8972368cc3fdc1c67c 100644 |
| --- a/base/metrics/field_trial.cc |
| +++ b/base/metrics/field_trial.cc |
| @@ -10,6 +10,7 @@ |
| #include "base/base_switches.h" |
| #include "base/build_time.h" |
| #include "base/command_line.h" |
| +#include "base/debug/activity_tracker.h" |
| #include "base/logging.h" |
| #include "base/metrics/field_trial_param_associator.h" |
| #include "base/process/memory.h" |
| @@ -982,6 +983,11 @@ void FieldTrialList::NotifyFieldTrialGroupSelection(FieldTrial* field_trial) { |
| ActivateFieldTrialEntryWhileLocked(field_trial); |
| } |
| + // Recording for stability debugging has to be done inline as a task posted |
| + // to an observer may not get executed before a crash. |
|
Alexei Svitkine (slow)
2017/02/06 17:46:12
While you're changing this, how about setting cras
manzagop (departed)
2017/02/06 18:38:16
IIUC the problem with crash keys is the update lea
bcwhite
2017/02/07 15:58:58
Happy to do it, if it's desired, but I'll do it as
|
| + base::debug::GlobalActivityTracker::RecordFieldTrial( |
|
Alexei Svitkine (slow)
2017/02/06 17:46:12
Is this API thread safe? Because this can be calle
bcwhite
2017/02/07 15:58:59
Yes. Done.
|
| + field_trial->trial_name(), field_trial->group_name_internal()); |
| + |
| global_->observer_list_->Notify( |
| FROM_HERE, &FieldTrialList::Observer::OnFieldTrialGroupFinalized, |
| field_trial->trial_name(), field_trial->group_name_internal()); |