Commit 0d87af61 authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

Rename the StabilityDebugging feature to ExtendedCrashReporting.

As the activity tracking will be used to extend crash reports, rather
than for post-mortem debugging, this feature name is more appropriate.

Bug: 1044707
Change-Id: I10b59daa44d846cf9fd8bed227860cabfd59e16b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2022252Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Auto-Submit: Sigurður Ásgeirsson <siggi@chromium.org>
Commit-Queue: Brian White <bcwhite@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735845}
parent c4c26f39
...@@ -109,7 +109,7 @@ void RecordChromeModuleInfo( ...@@ -109,7 +109,7 @@ void RecordChromeModuleInfo(
void SetupStabilityDebugging() { void SetupStabilityDebugging() {
if (!base::FeatureList::IsEnabled( if (!base::FeatureList::IsEnabled(
browser_watcher::kStabilityDebuggingFeature)) { browser_watcher::kExtendedCrashReportingFeature)) {
return; return;
} }
...@@ -121,13 +121,13 @@ void SetupStabilityDebugging() { ...@@ -121,13 +121,13 @@ void SetupStabilityDebugging() {
// Check whether activities are to be recorded persistently or only in-memory. // Check whether activities are to be recorded persistently or only in-memory.
const bool in_memory_only = base::GetFieldTrialParamByFeatureAsBool( const bool in_memory_only = base::GetFieldTrialParamByFeatureAsBool(
browser_watcher::kStabilityDebuggingFeature, browser_watcher::kExtendedCrashReportingFeature,
browser_watcher::kInMemoryOnlyParam, true); browser_watcher::kInMemoryOnlyParam, true);
if (in_memory_only) { if (in_memory_only) {
base::debug::GlobalActivityTracker::CreateWithAllocator( base::debug::GlobalActivityTracker::CreateWithAllocator(
std::make_unique<base::LocalPersistentMemoryAllocator>( std::make_unique<base::LocalPersistentMemoryAllocator>(
kMemorySize, kAllocatorId, kMemorySize, kAllocatorId,
browser_watcher::kStabilityDebuggingFeature.name), browser_watcher::kExtendedCrashReportingFeature.name),
kStackDepth, 0); kStackDepth, 0);
} else { } else {
// Ensure the stability directory exists and determine the stability file's // Ensure the stability directory exists and determine the stability file's
...@@ -207,7 +207,7 @@ void SetupStabilityDebugging() { ...@@ -207,7 +207,7 @@ void SetupStabilityDebugging() {
// this is a potentially expensive operation, so done under an experiment // this is a potentially expensive operation, so done under an experiment
// to allow measuring the performance effects, if any. // to allow measuring the performance effects, if any.
const bool should_flush = base::GetFieldTrialParamByFeatureAsBool( const bool should_flush = base::GetFieldTrialParamByFeatureAsBool(
browser_watcher::kStabilityDebuggingFeature, browser_watcher::kExtendedCrashReportingFeature,
browser_watcher::kInitFlushParam, false); browser_watcher::kInitFlushParam, false);
if (should_flush) { if (should_flush) {
base::PostTask( base::PostTask(
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
namespace browser_watcher { namespace browser_watcher {
const base::Feature kStabilityDebuggingFeature{ const base::Feature kExtendedCrashReportingFeature{
"StabilityDebugging", base::FEATURE_DISABLED_BY_DEFAULT}; "ExtendedCrashReporting", base::FEATURE_DISABLED_BY_DEFAULT};
const char kInMemoryOnlyParam[] = "in_memory_only"; const char kInMemoryOnlyParam[] = "in_memory_only";
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
namespace browser_watcher { namespace browser_watcher {
// Enables recording persistent stability information, which can later be // Enables activity tracking and extending crash reports with structured
// collected in the event of an unclean shutdown. // high-level program state.
extern const base::Feature kStabilityDebuggingFeature; extern const base::Feature kExtendedCrashReportingFeature;
// Name of an experiment parameter that controls whether to record browser // Name of an experiment parameter that controls whether to record browser
// activity in-memory only. // activity in-memory only.
......
...@@ -235,8 +235,8 @@ void WatcherMetricsProviderWin::AsyncInit(base::OnceClosure done_callback) { ...@@ -235,8 +235,8 @@ void WatcherMetricsProviderWin::AsyncInit(base::OnceClosure done_callback) {
void WatcherMetricsProviderWin::CollectPostmortemReportsImpl() { void WatcherMetricsProviderWin::CollectPostmortemReportsImpl() {
SCOPED_UMA_HISTOGRAM_TIMER("ActivityTracker.Collect.TotalTime"); SCOPED_UMA_HISTOGRAM_TIMER("ActivityTracker.Collect.TotalTime");
bool is_stability_debugging_on = bool is_stability_debugging_on = base::FeatureList::IsEnabled(
base::FeatureList::IsEnabled(browser_watcher::kStabilityDebuggingFeature); browser_watcher::kExtendedCrashReportingFeature);
if (!is_stability_debugging_on) { if (!is_stability_debugging_on) {
return; // TODO(manzagop): scan for possible data to delete? return; // TODO(manzagop): scan for possible data to delete?
} }
...@@ -265,7 +265,7 @@ void WatcherMetricsProviderWin::CollectPostmortemReportsImpl() { ...@@ -265,7 +265,7 @@ void WatcherMetricsProviderWin::CollectPostmortemReportsImpl() {
// If postmortem collection is disabled, delete the files. // If postmortem collection is disabled, delete the files.
const bool should_collect = base::GetFieldTrialParamByFeatureAsBool( const bool should_collect = base::GetFieldTrialParamByFeatureAsBool(
browser_watcher::kStabilityDebuggingFeature, browser_watcher::kExtendedCrashReportingFeature,
browser_watcher::kCollectPostmortemParam, false); browser_watcher::kCollectPostmortemParam, false);
// Create a database. Note: Chrome already has a g_database in crashpad.cc but // Create a database. Note: Chrome already has a g_database in crashpad.cc but
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment