Commit 5c70c738 authored by Francois Doray's avatar Francois Doray Committed by Chromium LUCI CQ

[tracing] Remove unused background tracing category presets.

This CL removes unused background tracing category presets so we
don't have to unnecessarily maintain them. This reduces technical
debt.

Bug: 1157487
Change-Id: I3d2c2eda3fa2ea730cf0cac46936733ea5f19862
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2586105
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: default avatarssid <ssid@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841096}
parent 45ebbbe5
......@@ -40,7 +40,7 @@ const char kValidTracingConfig[] = R"(
"scenario_name": "BrowserProcess",
"configs": [
{
"category": "BENCHMARK_NAVIGATION",
"custom_categories": "base,toplevel",
"rule": "MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE",
"histogram_name": "Omnibox.CharTypedToRepaintLatency.ToPaint",
"histogram_lower_value": 1
......
......@@ -5,6 +5,7 @@
#include "chrome/browser/tracing/background_tracing_metrics_provider.h"
#include "base/bind.h"
#include "components/tracing/common/trace_startup_config.h"
#include "content/public/browser/background_tracing_config.h"
#include "content/public/browser/background_tracing_manager.h"
#include "content/public/test/browser_task_environment.h"
......@@ -25,7 +26,8 @@ class BackgroundTracingMetricsProviderTest : public testing::Test {
base::DictionaryValue dict;
dict.SetString("mode", "REACTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......
......@@ -17,6 +17,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "components/metrics/metrics_pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/tracing/common/trace_startup_config.h"
#include "components/variations/variations_params_manager.h"
#include "content/public/browser/background_tracing_config.h"
#include "content/public/browser/background_tracing_manager.h"
......@@ -50,7 +51,8 @@ class ChromeTracingDelegateBrowserTest : public InProcessBrowserTest {
base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -253,8 +255,8 @@ class ChromeTracingDelegateBrowserTestOnStartup
// We need to replace the config JSON with the full one here, as we can't
// pass JSON through the fieldtrial switch parsing.
if (config_text == "default_config_for_testing") {
return "{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"category\": "
"\"BENCHMARK\",\"configs\": [{\"rule\": "
return "{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"custom_categories\": "
"\"base,toplevel\",\"configs\": [{\"rule\": "
"\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\",\"trigger_name\":"
"\"test\"}]}";
}
......
......@@ -37,16 +37,6 @@ const size_t kTraceConfigFileSizeLimit = 64 * 1024;
#if defined(OS_ANDROID)
const base::FilePath::CharType kAndroidTraceConfigFile[] =
FILE_PATH_LITERAL("/data/local/chrome-trace-config.json");
const char kDefaultStartupCategories[] =
"startup,browser,toplevel,toplevel.flow,ipc,EarlyJava,cc,Java,navigation,"
"loading,gpu,disabled-by-default-cpu_profiler,download_service,"
"disabled-by-default-histogram_samples,"
"disabled-by-default-user_action_samples,-*";
#else
const char kDefaultStartupCategories[] =
"benchmark,toplevel,startup,disabled-by-default-file,toplevel.flow,"
"download_service,-*";
#endif
// String parameters that can be used to parse the trace config file content.
......@@ -57,6 +47,18 @@ const char kResultDirectoryParam[] = "result_directory";
} // namespace
// static
const char TraceStartupConfig::kDefaultStartupCategories[] =
#if defined(OS_ANDROID)
"startup,browser,toplevel,toplevel.flow,ipc,EarlyJava,cc,Java,navigation,"
"loading,gpu,disabled-by-default-cpu_profiler,download_service,"
"disabled-by-default-histogram_samples,"
"disabled-by-default-user_action_samples,-*";
#else
"benchmark,toplevel,startup,disabled-by-default-file,toplevel.flow,"
"download_service,-*";
#endif
// static
TraceStartupConfig* TraceStartupConfig::GetInstance() {
return base::Singleton<TraceStartupConfig, base::DefaultSingletonTraits<
......
......@@ -99,6 +99,9 @@ class TRACING_EXPORT TraceStartupConfig {
kProto,
};
// Exposed for testing.
static const char kDefaultStartupCategories[];
static TraceStartupConfig* GetInstance();
// Default minimum startup trace config with enough events to debug issues.
......
......@@ -1724,8 +1724,6 @@ source_set("browser") {
"storage_partition_impl_map.h",
"theme_helper.cc",
"theme_helper.h",
"tracing/background_memory_tracing_observer.cc",
"tracing/background_memory_tracing_observer.h",
"tracing/background_startup_tracing_observer.cc",
"tracing/background_startup_tracing_observer.h",
"tracing/background_tracing_active_scenario.cc",
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/tracing/background_memory_tracing_observer.h"
#include "base/trace_event/memory_dump_request_args.h"
#include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h"
namespace content {
// static
BackgroundMemoryTracingObserver*
BackgroundMemoryTracingObserver::GetInstance() {
static auto* instance = new BackgroundMemoryTracingObserver();
return instance;
}
BackgroundMemoryTracingObserver::BackgroundMemoryTracingObserver() {}
BackgroundMemoryTracingObserver::~BackgroundMemoryTracingObserver() {}
void BackgroundMemoryTracingObserver::OnScenarioActivated(
const BackgroundTracingConfigImpl* config) {}
void BackgroundMemoryTracingObserver::OnScenarioAborted() {}
void BackgroundMemoryTracingObserver::OnTracingEnabled(
BackgroundTracingConfigImpl::CategoryPreset preset) {
if (preset !=
BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_MEMORY_LIGHT)
return;
memory_instrumentation::MemoryInstrumentation::GetInstance()
->RequestGlobalDumpAndAppendToTrace(
base::trace_event::MemoryDumpType::EXPLICITLY_TRIGGERED,
base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND,
base::trace_event::MemoryDumpDeterminism::NONE,
memory_instrumentation::MemoryInstrumentation::
RequestGlobalMemoryDumpAndAppendToTraceCallback());
}
} // namespace content
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_BROWSER_TRACING_BACKGROUND_MEMORY_TRACING_OBSERVER_H_
#define CONTENT_BROWSER_TRACING_BACKGROUND_MEMORY_TRACING_OBSERVER_H_
#include "content/browser/tracing/background_tracing_manager_impl.h"
namespace content {
class CONTENT_EXPORT BackgroundMemoryTracingObserver
: public BackgroundTracingManagerImpl::EnabledStateObserver {
public:
static BackgroundMemoryTracingObserver* GetInstance();
void OnScenarioActivated(const BackgroundTracingConfigImpl* config) override;
void OnScenarioAborted() override;
void OnTracingEnabled(
BackgroundTracingConfigImpl::CategoryPreset preset) override;
private:
BackgroundMemoryTracingObserver();
~BackgroundMemoryTracingObserver() override;
DISALLOW_COPY_AND_ASSIGN(BackgroundMemoryTracingObserver);
};
} // namespace content
#endif // CONTENT_BROWSER_TRACING_BACKGROUND_MEMORY_TRACING_OBSERVER_H_
......@@ -34,11 +34,11 @@ const BackgroundTracingRule* FindReachedCodeRuleInConfig(
return nullptr;
}
std::unique_ptr<BackgroundTracingConfigImpl> GetGpuConfig() {
std::unique_ptr<BackgroundTracingConfigImpl> GetStartupConfig() {
auto rules_dict = std::make_unique<base::DictionaryValue>();
rules_dict->SetString("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED");
rules_dict->SetString("trigger_name", "test");
rules_dict->SetString("category", "BENCHMARK_GPU");
rules_dict->SetString("category", "BENCHMARK_STARTUP");
base::DictionaryValue dict;
auto rules_list = std::make_unique<base::ListValue>();
rules_list->Append(std::move(rules_dict));
......@@ -80,15 +80,15 @@ void TestReachedCodeRuleExists(const BackgroundTracingConfigImpl& config,
}
}
void TestGpuConfigExists(const BackgroundTracingConfigImpl& config) {
bool found_gpu = false;
void TestStartupConfigExists(const BackgroundTracingConfigImpl& config) {
bool found_startup = false;
for (const auto& rule : config.rules()) {
if (rule->category_preset() ==
BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_GPU) {
found_gpu = true;
BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_STARTUP) {
found_startup = true;
}
}
EXPECT_TRUE(found_gpu);
EXPECT_TRUE(found_startup);
}
} // namespace
......@@ -106,9 +106,9 @@ TEST(BackgroundReachedCodeTracingObserverTest,
EXPECT_FALSE(observer.enabled_in_current_session());
EXPECT_FALSE(base::android::IsReachedCodeProfilerEnabled());
// A GPU config without preference set should not set preference and keep
// A startup config without preference set should not set preference and keep
// config same.
config_impl = GetGpuConfig();
config_impl = GetStartupConfig();
ASSERT_TRUE(config_impl);
EXPECT_FALSE(base::android::IsReachedCodeProfilerEnabled());
......@@ -118,7 +118,7 @@ TEST(BackgroundReachedCodeTracingObserverTest,
EXPECT_FALSE(base::android::IsReachedCodeProfilerEnabled());
EXPECT_EQ(1u, config_impl->rules().size());
TestReachedCodeRuleExists(*config_impl, false);
TestGpuConfigExists(*config_impl);
TestStartupConfigExists(*config_impl);
// A reached code config without profiler should stay config same.
config_impl = GetReachedCodeConfig();
......@@ -149,8 +149,8 @@ TEST(BackgroundReachedCodeTracingObserverTest,
config_impl->tracing_mode());
TestReachedCodeRuleExists(*config_impl, true);
// A GPU config with profiler on should not enabled reached code config.
config_impl = GetGpuConfig();
// A startup config with profiler on should not enabled reached code config.
config_impl = GetStartupConfig();
config_impl =
observer.IncludeReachedCodeConfigIfNeeded(std::move(config_impl));
EXPECT_FALSE(observer.enabled_in_current_session());
......@@ -161,7 +161,7 @@ TEST(BackgroundReachedCodeTracingObserverTest,
config_impl->tracing_mode());
TestReachedCodeRuleExists(*config_impl, false);
TestGpuConfigExists(*config_impl);
TestStartupConfigExists(*config_impl);
}
} // namespace content
......@@ -5,6 +5,7 @@
#include "content/browser/tracing/background_startup_tracing_observer.h"
#include "build/build_config.h"
#include "components/tracing/common/trace_startup_config.h"
#include "content/browser/tracing/background_tracing_rule.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -87,17 +88,18 @@ TEST(BackgroundStartupTracingObserverTest, IncludeStartupConfigIfNeeded) {
EXPECT_EQ(1u, config_impl->rules().size());
TestStartupRuleExists(*config_impl, true);
// A GPU config without preference set should not set preference and keep
// A custom config without preference set should not set preference and keep
// config same.
std::unique_ptr<base::DictionaryValue> rules_dict(
new base::DictionaryValue());
rules_dict->SetString("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED");
rules_dict->SetString("trigger_name", "test");
rules_dict->SetString("category", "BENCHMARK_GPU");
base::DictionaryValue dict;
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
rules_list->Append(std::move(rules_dict));
dict.Set("configs", std::move(rules_list));
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
config_impl = BackgroundTracingConfigImpl::ReactiveFromDict(&dict);
ASSERT_TRUE(config_impl);
......@@ -108,8 +110,8 @@ TEST(BackgroundStartupTracingObserverTest, IncludeStartupConfigIfNeeded) {
EXPECT_EQ(1u, config_impl->rules().size());
TestStartupRuleExists(*config_impl, false);
// A GPU config with preference set should include startup config and disable
// preference.
// A custom config with preference set should include startup config and
// disable preference.
preferences->SetBackgroundStartupTracingEnabled(true);
config_impl = observer->IncludeStartupConfigIfNeeded(std::move(config_impl));
EXPECT_TRUE(observer->enabled_in_current_session());
......@@ -119,15 +121,10 @@ TEST(BackgroundStartupTracingObserverTest, IncludeStartupConfigIfNeeded) {
EXPECT_EQ(BackgroundTracingConfig::TracingMode::REACTIVE,
config_impl->tracing_mode());
TestStartupRuleExists(*config_impl, true);
EXPECT_EQ(
config_impl->category_preset(),
BackgroundTracingConfigImpl::CategoryPreset::CUSTOM_CATEGORY_PRESET);
bool found_gpu = false;
for (const auto& rule : config_impl->rules()) {
if (rule->category_preset() ==
BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_GPU) {
found_gpu = true;
}
}
EXPECT_TRUE(found_gpu);
preferences->SetBackgroundStartupTracingEnabled(false);
}
......
......@@ -38,21 +38,7 @@ const char kEnabledDataSourcesKey[] = "enabled_data_sources";
const char kConfigCategoryKey[] = "category";
const char kConfigCustomCategoriesKey[] = "custom_categories";
const char kConfigTraceConfigKey[] = "trace_config";
const char kConfigCategoryBenchmark[] = "BENCHMARK";
const char kConfigCategoryBenchmarkDeep[] = "BENCHMARK_DEEP";
const char kConfigCategoryBenchmarkGPU[] = "BENCHMARK_GPU";
const char kConfigCategoryBenchmarkIPC[] = "BENCHMARK_IPC";
const char kConfigCategoryBenchmarkStartup[] = "BENCHMARK_STARTUP";
const char kConfigCategoryBenchmarkBlinkGC[] = "BENCHMARK_BLINK_GC";
const char kConfigCategoryBenchmarkMemoryHeavy[] = "BENCHMARK_MEMORY_HEAVY";
const char kConfigCategoryBenchmarkMemoryLight[] = "BENCHMARK_MEMORY_LIGHT";
const char kConfigCategoryBenchmarkExecutionMetric[] =
"BENCHMARK_EXECUTION_METRIC";
const char kConfigCategoryBenchmarkNavigation[] = "BENCHMARK_NAVIGATION";
const char kConfigCategoryBenchmarkRenderers[] = "BENCHMARK_RENDERERS";
const char kConfigCategoryBenchmarkServiceworker[] = "BENCHMARK_SERVICEWORKER";
const char kConfigCategoryBenchmarkPower[] = "BENCHMARK_POWER";
const char kConfigCategoryBlinkStyle[] = "BLINK_STYLE";
const char kConfigCategoryCustom[] = "CUSTOM";
const char kConfigCustomConfig[] = "CUSTOM_CONFIG";
......@@ -69,7 +55,7 @@ const char kConfigInterningResetIntervalMs[] = "interning_reset_interval_ms";
BackgroundTracingConfigImpl::BackgroundTracingConfigImpl(
TracingMode tracing_mode)
: BackgroundTracingConfig(tracing_mode),
category_preset_(BackgroundTracingConfigImpl::BENCHMARK) {}
category_preset_(BackgroundTracingConfigImpl::BENCHMARK_STARTUP) {}
BackgroundTracingConfigImpl::~BackgroundTracingConfigImpl() {}
......@@ -77,119 +63,27 @@ BackgroundTracingConfigImpl::~BackgroundTracingConfigImpl() {}
std::string BackgroundTracingConfigImpl::CategoryPresetToString(
BackgroundTracingConfigImpl::CategoryPreset category_preset) {
switch (category_preset) {
case BackgroundTracingConfigImpl::BENCHMARK:
return kConfigCategoryBenchmark;
case BackgroundTracingConfigImpl::BENCHMARK_DEEP:
return kConfigCategoryBenchmarkDeep;
case BackgroundTracingConfigImpl::BENCHMARK_GPU:
return kConfigCategoryBenchmarkGPU;
case BackgroundTracingConfigImpl::BENCHMARK_IPC:
return kConfigCategoryBenchmarkIPC;
case BackgroundTracingConfigImpl::BENCHMARK_STARTUP:
return kConfigCategoryBenchmarkStartup;
case BackgroundTracingConfigImpl::BENCHMARK_BLINK_GC:
return kConfigCategoryBenchmarkBlinkGC;
case BackgroundTracingConfigImpl::BENCHMARK_MEMORY_HEAVY:
return kConfigCategoryBenchmarkMemoryHeavy;
case BackgroundTracingConfigImpl::BENCHMARK_MEMORY_LIGHT:
return kConfigCategoryBenchmarkMemoryLight;
case BackgroundTracingConfigImpl::BENCHMARK_EXECUTION_METRIC:
return kConfigCategoryBenchmarkExecutionMetric;
case BackgroundTracingConfigImpl::BENCHMARK_NAVIGATION:
return kConfigCategoryBenchmarkNavigation;
case BackgroundTracingConfigImpl::BENCHMARK_RENDERERS:
return kConfigCategoryBenchmarkRenderers;
case BackgroundTracingConfigImpl::BENCHMARK_SERVICEWORKER:
return kConfigCategoryBenchmarkServiceworker;
case BackgroundTracingConfigImpl::BENCHMARK_POWER:
return kConfigCategoryBenchmarkPower;
case BackgroundTracingConfigImpl::BLINK_STYLE:
return kConfigCategoryBlinkStyle;
case BackgroundTracingConfigImpl::CUSTOM_CATEGORY_PRESET:
return kConfigCategoryCustom;
case BackgroundTracingConfigImpl::CUSTOM_TRACE_CONFIG:
return kConfigCustomConfig;
case BackgroundTracingConfigImpl::CATEGORY_PRESET_UNSET:
NOTREACHED();
return "";
}
NOTREACHED();
return "";
}
// static
bool BackgroundTracingConfigImpl::StringToCategoryPreset(
const std::string& category_preset_string,
BackgroundTracingConfigImpl::CategoryPreset* category_preset) {
if (category_preset_string == kConfigCategoryBenchmark) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkDeep) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_DEEP;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkGPU) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_GPU;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkIPC) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_IPC;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkStartup) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_STARTUP;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkBlinkGC) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_BLINK_GC;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkMemoryHeavy) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_MEMORY_HEAVY;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkMemoryLight) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_MEMORY_LIGHT;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkExecutionMetric) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_EXECUTION_METRIC;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkNavigation) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_NAVIGATION;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkRenderers) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_RENDERERS;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkServiceworker) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_SERVICEWORKER;
return true;
}
if (category_preset_string == kConfigCategoryBenchmarkPower) {
*category_preset = BackgroundTracingConfigImpl::BENCHMARK_POWER;
return true;
}
if (category_preset_string == kConfigCategoryBlinkStyle) {
*category_preset = BackgroundTracingConfigImpl::BLINK_STYLE;
return true;
}
return false;
}
......@@ -480,92 +374,16 @@ TraceConfig BackgroundTracingConfigImpl::GetConfigForCategoryPreset(
BackgroundTracingConfigImpl::CategoryPreset preset,
base::trace_event::TraceRecordMode record_mode) {
switch (preset) {
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK:
return TraceConfig("benchmark,toplevel", record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_DEEP:
return TraceConfig(
"*,disabled-by-default-benchmark.detailed,"
"disabled-by-default-v8.cpu_profile,"
"disabled-by-default-v8.runtime_stats",
record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_GPU:
return TraceConfig(
"benchmark,toplevel,gpu,base,mojom,ipc,"
"disabled-by-default-system_stats,disabled-by-default-cpu_profiler",
record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_IPC:
return TraceConfig("benchmark,toplevel,ipc", record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_STARTUP: {
auto config =
tracing::TraceStartupConfig::GetDefaultBrowserStartupConfig();
config.SetTraceRecordMode(record_mode);
return config;
}
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_BLINK_GC:
return TraceConfig("blink_gc,disabled-by-default-blink_gc", record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::
BENCHMARK_EXECUTION_METRIC:
return TraceConfig("blink.console,v8", record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_NAVIGATION: {
auto config = TraceConfig(
"benchmark,toplevel,ipc,base,browser,navigation,omnibox,ui,shutdown,"
"safe_browsing,Java,EarlyJava,loading,startup,mojom,renderer_host,"
"disabled-by-default-system_stats,disabled-by-default-cpu_profiler,"
"dwrite,fonts,ServiceWorker,passwords,disabled-by-default-file,sql,"
"disabled-by-default-user_action_samples",
record_mode);
// Filter only browser process events.
base::trace_event::TraceConfig::ProcessFilterConfig process_config(
{base::GetCurrentProcId()});
config.SetProcessFilterConfig(process_config);
return config;
}
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_RENDERERS:
return TraceConfig(
"benchmark,toplevel,ipc,base,ui,v8,renderer,blink,blink_gc,mojom,"
"latency,latencyInfo,renderer_host,cc,memory,dwrite,fonts,browser,"
"ServiceWorker,disabled-by-default-v8.gc,disabled-by-default-file,"
"disabled-by-default-blink_gc,disabled-by-default-lifecycles,"
"disabled-by-default-renderer.scheduler,"
"disabled-by-default-system_stats,disabled-by-default-cpu_profiler,"
"passwords,sql,disabled-by-default-user_action_samples",
record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_SERVICEWORKER:
return TraceConfig(
"benchmark,toplevel,ipc,base,ServiceWorker,CacheStorage,Blob,"
"IndexedDB,loading,mojom,navigation,renderer,blink,blink_gc,blink."
"user_timing,blink.worker,fonts,startup,disabled-by-default-cpu_"
"profiler,disabled-by-default-network",
record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_POWER:
return TraceConfig(
"benchmark,toplevel,ipc,base,audio,compositor,gpu,media,memory,midi,"
"native,omnibox,renderer,skia,task_scheduler,ui,v8,views,webaudio,"
"disabled-by-default-cpu_profiler,disabled-by-default-user_action_"
"samples",
record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BLINK_STYLE:
return TraceConfig("blink_style", record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_MEMORY_HEAVY:
return TraceConfig("-*,disabled-by-default-memory-infra", record_mode);
case BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_MEMORY_LIGHT: {
// On memory light mode, the periodic memory dumps are disabled.
base::trace_event::TraceConfig::MemoryDumpConfig memory_config;
memory_config.allowed_dump_modes =
std::set<base::trace_event::MemoryDumpLevelOfDetail>(
{base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND});
TraceConfig config("-*,disabled-by-default-memory-infra", record_mode);
config.ResetMemoryDumpConfig(memory_config);
return config;
}
case BackgroundTracingConfigImpl::CategoryPreset::CATEGORY_PRESET_UNSET:
case BackgroundTracingConfigImpl::CategoryPreset::CUSTOM_CATEGORY_PRESET:
case BackgroundTracingConfigImpl::CategoryPreset::CUSTOM_TRACE_CONFIG:
default:
NOTREACHED();
return TraceConfig();
}
NOTREACHED();
return TraceConfig();
}
BackgroundTracingRule* BackgroundTracingConfigImpl::AddRule(
......
......@@ -33,20 +33,7 @@ class CONTENT_EXPORT BackgroundTracingConfigImpl
CATEGORY_PRESET_UNSET,
CUSTOM_CATEGORY_PRESET,
CUSTOM_TRACE_CONFIG,
BENCHMARK,
BENCHMARK_DEEP,
BENCHMARK_GPU,
BENCHMARK_IPC,
BENCHMARK_STARTUP,
BENCHMARK_BLINK_GC,
BENCHMARK_MEMORY_HEAVY,
BENCHMARK_MEMORY_LIGHT,
BENCHMARK_EXECUTION_METRIC,
BENCHMARK_NAVIGATION,
BENCHMARK_RENDERERS,
BENCHMARK_SERVICEWORKER,
BENCHMARK_POWER,
BLINK_STYLE,
};
CategoryPreset category_preset() const { return category_preset_; }
......@@ -118,6 +105,8 @@ class CONTENT_EXPORT BackgroundTracingConfigImpl
void SetBufferSizeLimits(const base::DictionaryValue* dict);
int GetMaximumTraceBufferSizeKb() const;
// A trace config extracted from the "trace_config" field of the input
// dictionnary.
base::trace_event::TraceConfig trace_config_;
CategoryPreset category_preset_;
std::vector<std::unique_ptr<BackgroundTracingRule>> rules_;
......
......@@ -94,7 +94,7 @@ TEST_F(BackgroundTracingConfigTest, PreemptiveConfigFromInvalidString) {
// Missing rules.
EXPECT_FALSE(
ReadFromJSONString("{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"category\": "
"\"BENCHMARK\",\"configs\": []}"));
"\"BENCHMARK_STARTUP\",\"configs\": []}"));
// Missing or invalid configs
EXPECT_FALSE(ReadFromJSONString(
......@@ -187,11 +187,12 @@ TEST_F(BackgroundTracingConfigTest, PreemptiveConfigFromValidString) {
config = ReadFromJSONString(
"{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"category\": "
"\"BENCHMARK\",\"configs\": [{\"rule\": "
"\"BENCHMARK_STARTUP\",\"configs\": [{\"rule\": "
"\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\", \"trigger_name\":\"foo\"}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::PREEMPTIVE);
EXPECT_EQ(config->category_preset(), BackgroundTracingConfigImpl::BENCHMARK);
EXPECT_EQ(config->category_preset(),
BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
EXPECT_EQ(config->rules().size(), 1u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"rule\":\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\","
......@@ -199,12 +200,13 @@ TEST_F(BackgroundTracingConfigTest, PreemptiveConfigFromValidString) {
config = ReadFromJSONString(
"{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"category\": "
"\"BENCHMARK\",\"configs\": [{\"rule\": "
"\"BENCHMARK_STARTUP\",\"configs\": [{\"rule\": "
"\"MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE\", "
"\"histogram_name\":\"foo\", \"histogram_value\": 1}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::PREEMPTIVE);
EXPECT_EQ(config->category_preset(), BackgroundTracingConfigImpl::BENCHMARK);
EXPECT_EQ(config->category_preset(),
BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
EXPECT_EQ(config->rules().size(), 1u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"histogram_lower_value\":1,\"histogram_name\":\"foo\","
......@@ -213,13 +215,14 @@ TEST_F(BackgroundTracingConfigTest, PreemptiveConfigFromValidString) {
config = ReadFromJSONString(
"{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"category\": "
"\"BENCHMARK\",\"configs\": [{\"rule\": "
"\"BENCHMARK_STARTUP\",\"configs\": [{\"rule\": "
"\"MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE\", "
"\"histogram_name\":\"foo\", \"histogram_value\": 1, "
"\"histogram_repeat\":false}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::PREEMPTIVE);
EXPECT_EQ(config->category_preset(), BackgroundTracingConfigImpl::BENCHMARK);
EXPECT_EQ(config->category_preset(),
BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
EXPECT_EQ(config->rules().size(), 1u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"histogram_lower_value\":1,\"histogram_name\":\"foo\","
......@@ -228,13 +231,14 @@ TEST_F(BackgroundTracingConfigTest, PreemptiveConfigFromValidString) {
config = ReadFromJSONString(
"{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"category\": "
"\"BENCHMARK\",\"configs\": [{\"rule\": "
"\"BENCHMARK_STARTUP\",\"configs\": [{\"rule\": "
"\"MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE\", "
"\"histogram_name\":\"foo\", \"histogram_lower_value\": 1, "
"\"histogram_upper_value\": 2}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::PREEMPTIVE);
EXPECT_EQ(config->category_preset(), BackgroundTracingConfigImpl::BENCHMARK);
EXPECT_EQ(config->category_preset(),
BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
EXPECT_EQ(config->rules().size(), 1u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"histogram_lower_value\":1,\"histogram_name\":\"foo\","
......@@ -243,13 +247,14 @@ TEST_F(BackgroundTracingConfigTest, PreemptiveConfigFromValidString) {
config = ReadFromJSONString(
"{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"category\": "
"\"BENCHMARK\",\"configs\": [{\"rule\": "
"\"BENCHMARK_STARTUP\",\"configs\": [{\"rule\": "
"\"MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE\", "
"\"histogram_name\":\"foo\", \"histogram_lower_value\": 1, "
"\"histogram_upper_value\": 2, \"histogram_repeat\":false}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::PREEMPTIVE);
EXPECT_EQ(config->category_preset(), BackgroundTracingConfigImpl::BENCHMARK);
EXPECT_EQ(config->category_preset(),
BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
EXPECT_EQ(config->rules().size(), 1u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"histogram_lower_value\":1,\"histogram_name\":\"foo\","
......@@ -258,13 +263,14 @@ TEST_F(BackgroundTracingConfigTest, PreemptiveConfigFromValidString) {
config = ReadFromJSONString(
"{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"category\": "
"\"BENCHMARK\",\"configs\": [{\"rule\": "
"\"BENCHMARK_STARTUP\",\"configs\": [{\"rule\": "
"\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\", \"trigger_name\":\"foo1\"}, "
"{\"rule\": \"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\", "
"\"trigger_name\":\"foo2\"}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::PREEMPTIVE);
EXPECT_EQ(config->category_preset(), BackgroundTracingConfigImpl::BENCHMARK);
EXPECT_EQ(config->category_preset(),
BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
EXPECT_EQ(config->rules().size(), 2u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"rule\":\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\","
......@@ -292,56 +298,24 @@ TEST_F(BackgroundTracingConfigTest, PreemptiveConfigFromValidString) {
TEST_F(BackgroundTracingConfigTest, ValidPreemptiveCategoryToString) {
std::unique_ptr<BackgroundTracingConfigImpl> config = ReadFromJSONString(
"{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"category\": "
"\"BENCHMARK\",\"configs\": [{\"rule\": "
"\"BENCHMARK_STARTUP\",\"configs\": [{\"rule\": "
"\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\", \"trigger_name\":\"foo\"}]}");
BackgroundTracingConfigImpl::CategoryPreset categories[] = {
BackgroundTracingConfigImpl::BENCHMARK,
BackgroundTracingConfigImpl::BENCHMARK_DEEP,
BackgroundTracingConfigImpl::BENCHMARK_GPU,
BackgroundTracingConfigImpl::BENCHMARK_IPC,
BackgroundTracingConfigImpl::BENCHMARK_STARTUP,
BackgroundTracingConfigImpl::BENCHMARK_BLINK_GC,
BackgroundTracingConfigImpl::BENCHMARK_MEMORY_HEAVY,
BackgroundTracingConfigImpl::BENCHMARK_MEMORY_LIGHT,
BackgroundTracingConfigImpl::BENCHMARK_EXECUTION_METRIC,
BackgroundTracingConfigImpl::BENCHMARK_NAVIGATION,
BackgroundTracingConfigImpl::BENCHMARK_RENDERERS,
BackgroundTracingConfigImpl::BENCHMARK_SERVICEWORKER,
BackgroundTracingConfigImpl::BENCHMARK_POWER,
BackgroundTracingConfigImpl::BLINK_STYLE,
};
const char* category_strings[] = {"BENCHMARK",
"BENCHMARK_DEEP",
"BENCHMARK_GPU",
"BENCHMARK_IPC",
"BENCHMARK_STARTUP",
"BENCHMARK_BLINK_GC",
"BENCHMARK_MEMORY_HEAVY",
"BENCHMARK_MEMORY_LIGHT",
"BENCHMARK_EXECUTION_METRIC",
"BENCHMARK_NAVIGATION",
"BENCHMARK_RENDERERS",
"BENCHMARK_SERVICEWORKER",
"BENCHMARK_POWER",
"BLINK_STYLE"};
for (size_t i = 0;
i <
sizeof(categories) / sizeof(BackgroundTracingConfigImpl::CategoryPreset);
i++) {
config->set_category_preset(categories[i]);
std::string expected =
std::string("{\"category\":\"") + category_strings[i] +
std::string(
"\",\"configs\":[{\"rule\":"
"\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\",\"trigger_name\":"
"\"foo\"}],\"mode\":\"PREEMPTIVE_TRACING_MODE\"}");
EXPECT_EQ(ConfigToString(config.get()), expected.c_str());
std::unique_ptr<BackgroundTracingConfigImpl> config2 =
ReadFromJSONString(expected);
EXPECT_EQ(config->category_preset(), config2->category_preset());
}
constexpr BackgroundTracingConfigImpl::CategoryPreset kCategoryPreset =
BackgroundTracingConfigImpl::BENCHMARK_STARTUP;
constexpr const char kCategoryString[] = "BENCHMARK_STARTUP";
config->set_category_preset(kCategoryPreset);
std::string expected =
std::string("{\"category\":\"") + kCategoryString +
std::string(
"\",\"configs\":[{\"rule\":"
"\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\",\"trigger_name\":"
"\"foo\"}],\"mode\":\"PREEMPTIVE_TRACING_MODE\"}");
EXPECT_EQ(ConfigToString(config.get()), expected.c_str());
std::unique_ptr<BackgroundTracingConfigImpl> config2 =
ReadFromJSONString(expected);
EXPECT_EQ(config->category_preset(), config2->category_preset());
}
TEST_F(BackgroundTracingConfigTest, ReactiveConfigFromValidString) {
......@@ -350,40 +324,40 @@ TEST_F(BackgroundTracingConfigTest, ReactiveConfigFromValidString) {
config = ReadFromJSONString(
"{\"mode\":\"REACTIVE_TRACING_MODE\",\"configs\": [{\"rule\": "
"\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\", "
"\"category\": \"BENCHMARK\",\"trigger_delay\":30,"
"\"category\": \"BENCHMARK_STARTUP\",\"trigger_delay\":30,"
"\"trigger_name\": \"foo\"}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::REACTIVE);
EXPECT_EQ(config->rules().size(), 1u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"category\":\"BENCHMARK\","
"{\"category\":\"BENCHMARK_STARTUP\","
"\"rule\":\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\","
"\"trigger_delay\":30,\"trigger_name\":\"foo\"}");
config = ReadFromJSONString(
"{\"mode\":\"REACTIVE_TRACING_MODE\",\"configs\": [{\"rule\": "
"\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\", "
"\"category\": \"BENCHMARK_DEEP\", \"trigger_delay\":30, "
"\"category\": \"BENCHMARK_STARTUP\", \"trigger_delay\":30, "
"\"trigger_name\": \"foo\"}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::REACTIVE);
EXPECT_EQ(config->rules().size(), 1u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"category\":\"BENCHMARK_DEEP\","
"{\"category\":\"BENCHMARK_STARTUP\","
"\"rule\":\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\","
"\"trigger_delay\":30,\"trigger_name\":\"foo\"}");
config = ReadFromJSONString(
"{\"mode\":\"REACTIVE_TRACING_MODE\",\"configs\": [{\"rule\": "
"\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\", "
"\"category\": \"BENCHMARK_DEEP\",\"trigger_delay\":30,"
"\"category\": \"BENCHMARK_STARTUP\",\"trigger_delay\":30,"
"\"trigger_name\": \"foo\",\"trigger_delay\":30,"
"\"trigger_chance\": 0.5}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::REACTIVE);
EXPECT_EQ(config->rules().size(), 1u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"category\":\"BENCHMARK_DEEP\","
"{\"category\":\"BENCHMARK_STARTUP\","
"\"rule\":\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\","
"\"trigger_chance\":0.5,\"trigger_delay\":30,"
"\"trigger_name\":\"foo\"}");
......@@ -391,19 +365,19 @@ TEST_F(BackgroundTracingConfigTest, ReactiveConfigFromValidString) {
config = ReadFromJSONString(
"{\"mode\":\"REACTIVE_TRACING_MODE\",\"configs\": [{\"rule\": "
"\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\", "
"\"category\": \"BENCHMARK_DEEP\", \"trigger_name\": "
"\"category\": \"BENCHMARK_STARTUP\", \"trigger_name\": "
"\"foo1\"},{\"rule\": "
"\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\", "
"\"category\": \"BENCHMARK_DEEP\", \"trigger_name\": \"foo2\"}]}");
"\"category\": \"BENCHMARK_STARTUP\", \"trigger_name\": \"foo2\"}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::REACTIVE);
EXPECT_EQ(config->rules().size(), 2u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"category\":\"BENCHMARK_DEEP\","
"{\"category\":\"BENCHMARK_STARTUP\","
"\"rule\":\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\","
"\"trigger_delay\":30,\"trigger_name\":\"foo1\"}");
EXPECT_EQ(RuleToString(config->rules()[1]),
"{\"category\":\"BENCHMARK_DEEP\","
"{\"category\":\"BENCHMARK_STARTUP\","
"\"rule\":\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\","
"\"trigger_delay\":30,\"trigger_name\":\"foo2\"}");
......@@ -411,13 +385,13 @@ TEST_F(BackgroundTracingConfigTest, ReactiveConfigFromValidString) {
"{\"mode\":\"REACTIVE_TRACING_MODE\",\"configs\": [{\"rule\": "
"\"TRACE_AT_RANDOM_INTERVALS\","
"\"stop_tracing_on_repeated_reactive\": true,"
"\"category\": \"BENCHMARK_DEEP\","
"\"category\": \"BENCHMARK_STARTUP\","
"\"timeout_min\":10, \"timeout_max\":20}]}");
EXPECT_TRUE(config);
EXPECT_EQ(config->tracing_mode(), BackgroundTracingConfig::REACTIVE);
EXPECT_EQ(config->rules().size(), 1u);
EXPECT_EQ(RuleToString(config->rules()[0]),
"{\"category\":\"BENCHMARK_DEEP\",\"rule\":\"TRACE_AT_RANDOM_"
"{\"category\":\"BENCHMARK_STARTUP\",\"rule\":\"TRACE_AT_RANDOM_"
"INTERVALS\",\"stop_tracing_on_repeated_reactive\":true,"
"\"timeout_max\":20,\"timeout_min\":10}");
......@@ -444,19 +418,20 @@ TEST_F(BackgroundTracingConfigTest, ValidPreemptiveConfigToString) {
// Default values
EXPECT_EQ(ConfigToString(config.get()),
"{\"category\":\"BENCHMARK\",\"configs\":[],\"mode\":\"PREEMPTIVE_"
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[],\"mode\":"
"\"PREEMPTIVE_"
"TRACING_MODE\"}");
// Change category_preset
config->set_category_preset(BackgroundTracingConfigImpl::BENCHMARK_DEEP);
config->set_category_preset(BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
EXPECT_EQ(ConfigToString(config.get()),
"{\"category\":\"BENCHMARK_DEEP\",\"configs\":[],\"mode\":"
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[],\"mode\":"
"\"PREEMPTIVE_TRACING_MODE\"}");
{
config.reset(
new BackgroundTracingConfigImpl(BackgroundTracingConfig::PREEMPTIVE));
config->set_category_preset(BackgroundTracingConfigImpl::BENCHMARK_DEEP);
config->set_category_preset(BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED");
......@@ -464,7 +439,7 @@ TEST_F(BackgroundTracingConfigTest, ValidPreemptiveConfigToString) {
config->AddPreemptiveRule(dict.get());
EXPECT_EQ(ConfigToString(config.get()),
"{\"category\":\"BENCHMARK_DEEP\",\"configs\":[{\"rule\":"
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[{\"rule\":"
"\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\",\"trigger_name\":"
"\"foo\"}],\"mode\":\"PREEMPTIVE_TRACING_MODE\"}");
}
......@@ -472,7 +447,7 @@ TEST_F(BackgroundTracingConfigTest, ValidPreemptiveConfigToString) {
{
config.reset(
new BackgroundTracingConfigImpl(BackgroundTracingConfig::PREEMPTIVE));
config->set_category_preset(BackgroundTracingConfigImpl::BENCHMARK_DEEP);
config->set_category_preset(BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED");
......@@ -482,7 +457,7 @@ TEST_F(BackgroundTracingConfigTest, ValidPreemptiveConfigToString) {
EXPECT_EQ(
ConfigToString(config.get()),
"{\"category\":\"BENCHMARK_DEEP\",\"configs\":[{\"rule\":"
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[{\"rule\":"
"\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\",\"trigger_chance\":0.5,"
"\"trigger_name\":\"foo\"}],\"mode\":\"PREEMPTIVE_TRACING_MODE\"}");
}
......@@ -490,7 +465,7 @@ TEST_F(BackgroundTracingConfigTest, ValidPreemptiveConfigToString) {
{
config.reset(
new BackgroundTracingConfigImpl(BackgroundTracingConfig::PREEMPTIVE));
config->set_category_preset(BackgroundTracingConfigImpl::BENCHMARK_DEEP);
config->set_category_preset(BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED");
......@@ -501,7 +476,7 @@ TEST_F(BackgroundTracingConfigTest, ValidPreemptiveConfigToString) {
config->AddPreemptiveRule(dict.get());
EXPECT_EQ(ConfigToString(config.get()),
"{\"category\":\"BENCHMARK_DEEP\",\"configs\":[{\"rule\":"
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[{\"rule\":"
"\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\",\"trigger_name\":"
"\"foo1\"},{\"rule\":\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\","
"\"trigger_name\":\"foo2\"}],\"mode\":\"PREEMPTIVE_TRACING_"
......@@ -521,12 +496,13 @@ TEST_F(BackgroundTracingConfigTest, ValidPreemptiveConfigToString) {
second_dict->SetInteger("histogram_upper_value", 2);
config->AddPreemptiveRule(second_dict.get());
EXPECT_EQ(ConfigToString(config.get()),
"{\"category\":\"BENCHMARK\",\"configs\":[{\"histogram_lower_"
"value\":1,\"histogram_name\":\"foo\",\"histogram_repeat\":true,"
"\"histogram_upper_value\":2,\"rule\":\"MONITOR_AND_DUMP_WHEN_"
"SPECIFIC_HISTOGRAM_AND_VALUE\"}],\"mode\":\"PREEMPTIVE_TRACING_"
"MODE\"}");
EXPECT_EQ(
ConfigToString(config.get()),
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[{\"histogram_lower_"
"value\":1,\"histogram_name\":\"foo\",\"histogram_repeat\":true,"
"\"histogram_upper_value\":2,\"rule\":\"MONITOR_AND_DUMP_WHEN_"
"SPECIFIC_HISTOGRAM_AND_VALUE\"}],\"mode\":\"PREEMPTIVE_TRACING_"
"MODE\"}");
}
{
......@@ -543,12 +519,13 @@ TEST_F(BackgroundTracingConfigTest, ValidPreemptiveConfigToString) {
second_dict->SetInteger("trigger_delay", 10);
config->AddPreemptiveRule(second_dict.get());
EXPECT_EQ(ConfigToString(config.get()),
"{\"category\":\"BENCHMARK\",\"configs\":[{\"histogram_lower_"
"value\":1,\"histogram_name\":\"foo\",\"histogram_repeat\":true,"
"\"histogram_upper_value\":2,\"rule\":\"MONITOR_AND_DUMP_WHEN_"
"SPECIFIC_HISTOGRAM_AND_VALUE\",\"trigger_delay\":10}],\"mode\":"
"\"PREEMPTIVE_TRACING_MODE\"}");
EXPECT_EQ(
ConfigToString(config.get()),
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[{\"histogram_lower_"
"value\":1,\"histogram_name\":\"foo\",\"histogram_repeat\":true,"
"\"histogram_upper_value\":2,\"rule\":\"MONITOR_AND_DUMP_WHEN_"
"SPECIFIC_HISTOGRAM_AND_VALUE\",\"trigger_delay\":10}],\"mode\":"
"\"PREEMPTIVE_TRACING_MODE\"}");
}
{
......@@ -565,12 +542,13 @@ TEST_F(BackgroundTracingConfigTest, ValidPreemptiveConfigToString) {
second_dict->SetInteger("trigger_delay", 10);
config->AddPreemptiveRule(second_dict.get());
EXPECT_EQ(ConfigToString(config.get()),
"{\"category\":\"BENCHMARK\",\"configs\":[{\"histogram_lower_"
"value\":1,\"histogram_name\":\"foo\",\"histogram_repeat\":true,"
"\"histogram_upper_value\":2,\"rule\":\"MONITOR_AND_DUMP_WHEN_"
"SPECIFIC_HISTOGRAM_AND_VALUE\",\"trigger_delay\":10}],\"mode\":"
"\"PREEMPTIVE_TRACING_MODE\"}");
EXPECT_EQ(
ConfigToString(config.get()),
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[{\"histogram_lower_"
"value\":1,\"histogram_name\":\"foo\",\"histogram_repeat\":true,"
"\"histogram_upper_value\":2,\"rule\":\"MONITOR_AND_DUMP_WHEN_"
"SPECIFIC_HISTOGRAM_AND_VALUE\",\"trigger_delay\":10}],\"mode\":"
"\"PREEMPTIVE_TRACING_MODE\"}");
}
}
......@@ -586,7 +564,7 @@ TEST_F(BackgroundTracingConfigTest, InvalidPreemptiveConfigToString) {
config->AddPreemptiveRule(dict.get());
EXPECT_EQ(ConfigToString(config.get()),
"{\"category\":\"BENCHMARK\",\"configs\":[],\"mode\":"
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[],\"mode\":"
"\"PREEMPTIVE_TRACING_MODE\"}");
}
......@@ -602,7 +580,7 @@ TEST_F(BackgroundTracingConfigTest, InvalidPreemptiveConfigToString) {
second_dict->SetInteger("histogram_lower_value", 1);
EXPECT_EQ(ConfigToString(config.get()),
"{\"category\":\"BENCHMARK\",\"configs\":[],\"mode\":"
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[],\"mode\":"
"\"PREEMPTIVE_TRACING_MODE\"}");
}
......@@ -619,7 +597,7 @@ TEST_F(BackgroundTracingConfigTest, InvalidPreemptiveConfigToString) {
second_dict->SetInteger("histogram_upper_value", 1);
EXPECT_EQ(ConfigToString(config.get()),
"{\"category\":\"BENCHMARK\",\"configs\":[],\"mode\":"
"{\"category\":\"BENCHMARK_STARTUP\",\"configs\":[],\"mode\":"
"\"PREEMPTIVE_TRACING_MODE\"}");
}
}
......@@ -640,12 +618,13 @@ TEST_F(BackgroundTracingConfigTest, ValidReactiveConfigToString) {
dict->SetString("rule", "TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL");
dict->SetString("trigger_name", "foo");
config->AddReactiveRule(dict.get(),
BackgroundTracingConfigImpl::BENCHMARK_DEEP);
BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
EXPECT_EQ(ConfigToString(config.get()),
"{\"configs\":[{\"category\":\"BENCHMARK_DEEP\",\"rule\":\"TRACE_"
"ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\",\"trigger_delay\":30,"
"\"trigger_name\":\"foo\"}],\"mode\":\"REACTIVE_TRACING_MODE\"}");
EXPECT_EQ(
ConfigToString(config.get()),
"{\"configs\":[{\"category\":\"BENCHMARK_STARTUP\",\"rule\":\"TRACE_"
"ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\",\"trigger_delay\":30,"
"\"trigger_name\":\"foo\"}],\"mode\":\"REACTIVE_TRACING_MODE\"}");
}
{
......@@ -656,17 +635,18 @@ TEST_F(BackgroundTracingConfigTest, ValidReactiveConfigToString) {
dict->SetString("rule", "TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL");
dict->SetString("trigger_name", "foo1");
config->AddReactiveRule(dict.get(),
BackgroundTracingConfigImpl::BENCHMARK_DEEP);
BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
dict->SetString("trigger_name", "foo2");
config->AddReactiveRule(dict.get(),
BackgroundTracingConfigImpl::BENCHMARK_DEEP);
BackgroundTracingConfigImpl::BENCHMARK_STARTUP);
EXPECT_EQ(
ConfigToString(config.get()),
"{\"configs\":[{\"category\":\"BENCHMARK_DEEP\",\"rule\":\"TRACE_"
"{\"configs\":[{\"category\":\"BENCHMARK_STARTUP\",\"rule\":\"TRACE_"
"ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\",\"trigger_delay\":30,"
"\"trigger_name\":\"foo1\"},{\"category\":\"BENCHMARK_DEEP\",\"rule\":"
"\"trigger_name\":\"foo1\"},{\"category\":\"BENCHMARK_STARTUP\","
"\"rule\":"
"\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\",\"trigger_delay\":30,"
"\"trigger_name\":\"foo2\"}],\"mode\":\"REACTIVE_TRACING_MODE\"}");
}
......@@ -680,7 +660,7 @@ TEST_F(BackgroundTracingConfigTest, BufferLimitConfig) {
config = ReadFromJSONString(
"{\"mode\":\"REACTIVE_TRACING_MODE\",\"configs\": [{\"rule\": "
"\"TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL\", "
"\"category\": \"BENCHMARK\",\"trigger_delay\":30,"
"\"category\": \"BENCHMARK_STARTUP\",\"trigger_delay\":30,"
"\"trigger_name\": \"foo\"}],\"low_ram_buffer_size_kb\":800,"
"\"medium_ram_buffer_size_kb\":1000,\"mobile_network_buffer_size_kb\":"
"300,\"max_buffer_size_kb\":1000,\"upload_limit_kb\":500,"
......
......@@ -27,6 +27,7 @@
#include "base/test/trace_event_analyzer.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "components/tracing/common/trace_startup_config.h"
#include "content/browser/devtools/protocol/devtools_protocol_test_support.h"
#include "content/browser/tracing/background_startup_tracing_observer.h"
#include "content/browser/tracing/background_tracing_active_scenario.h"
......@@ -401,7 +402,8 @@ std::unique_ptr<BackgroundTracingConfig> CreatePreemptiveConfig() {
base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -424,6 +426,8 @@ std::unique_ptr<BackgroundTracingConfig> CreateReactiveConfig() {
base::DictionaryValue dict;
dict.SetString("mode", "REACTIVE_TRACING_MODE");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -432,7 +436,6 @@ std::unique_ptr<BackgroundTracingConfig> CreateReactiveConfig() {
rules_dict->SetString("rule", "TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL");
rules_dict->SetString("trigger_name", "reactive_test");
rules_dict->SetBoolean("stop_tracing_on_repeated_reactive", true);
rules_dict->SetString("category", "BENCHMARK");
rules_list->Append(std::move(rules_dict));
}
dict.Set("configs", std::move(rules_list));
......@@ -447,7 +450,8 @@ std::unique_ptr<BackgroundTracingConfig> CreateReactiveConfig() {
std::unique_ptr<BackgroundTracingConfig> CreateSystemConfig() {
base::DictionaryValue dict;
dict.SetString("mode", "SYSTEM_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list =
std::make_unique<base::ListValue>();
......@@ -552,8 +556,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
background_tracing_helper.WaitForTracingEnabled();
{
TRACE_EVENT1("benchmark", "TestAllowlist", "test_allowlist", "abc");
TRACE_EVENT1("benchmark", "TestNotAllowlist", "test_not_allowlist", "abc");
TRACE_EVENT1("startup", "TestAllowlist", "test_allowlist", "abc");
TRACE_EVENT1("startup", "TestNotAllowlist", "test_not_allowlist", "abc");
}
TestTriggerHelper trigger_helper;
......@@ -696,7 +700,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -753,7 +758,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -891,7 +897,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -937,6 +944,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
base::DictionaryValue dict;
dict.SetString("mode", "REACTIVE_TRACING_MODE");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -944,7 +953,6 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
new base::DictionaryValue());
rules_dict->SetString("rule", "TRACE_ON_NAVIGATION_UNTIL_TRIGGER_OR_FULL");
rules_dict->SetString("trigger_name", "reactive_test1");
rules_dict->SetString("category", "BENCHMARK");
rules_dict->SetDouble("trigger_chance", 0.0);
rules_list->Append(std::move(rules_dict));
......@@ -983,7 +991,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -1040,7 +1049,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest, CustomConfig) {
base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
dict.SetKey("trace_config", std::move(*base::JSONReader::Read(R"(
{
"included_categories": ["*"],
......@@ -1215,6 +1225,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
base::DictionaryValue dict;
dict.SetString("mode", "REACTIVE_TRACING_MODE");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -1224,7 +1236,6 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
"MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE");
rules_dict->SetString("histogram_name", "fake");
rules_dict->SetInteger("histogram_value", 1);
rules_dict->SetString("category", "BENCHMARK");
rules_list->Append(std::move(rules_dict));
}
......@@ -1260,7 +1271,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -1304,7 +1316,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -1346,7 +1359,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
SetActiveScenarioFailsWithInvalidPreemptiveConfig) {
base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE");
dict.SetString("category", "BENCHMARK");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -1476,6 +1490,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
base::DictionaryValue dict;
dict.SetString("mode", "REACTIVE_TRACING_MODE");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -1485,7 +1501,6 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
rules_dict->SetString("trigger_name", "reactive_test1");
rules_dict->SetBoolean("stop_tracing_on_repeated_reactive", true);
rules_dict->SetInteger("trigger_delay", 10);
rules_dict->SetString("category", "BENCHMARK");
rules_list->Append(std::move(rules_dict));
}
{
......@@ -1495,7 +1510,6 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
rules_dict->SetString("trigger_name", "reactive_test2");
rules_dict->SetBoolean("stop_tracing_on_repeated_reactive", true);
rules_dict->SetInteger("trigger_delay", 10);
rules_dict->SetString("category", "BENCHMARK");
rules_list->Append(std::move(rules_dict));
}
dict.Set("configs", std::move(rules_list));
......@@ -1579,6 +1593,8 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
base::DictionaryValue dict;
dict.SetString("mode", "REACTIVE_TRACING_MODE");
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
......@@ -1588,7 +1604,6 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest,
rules_dict->SetString("trigger_name", "reactive_test");
rules_dict->SetBoolean("stop_tracing_on_repeated_reactive", false);
rules_dict->SetInteger("trigger_delay", 10);
rules_dict->SetString("category", "BENCHMARK");
rules_list->Append(std::move(rules_dict));
}
dict.Set("configs", std::move(rules_list));
......@@ -1693,16 +1708,16 @@ IN_PROC_BROWSER_TEST_F(BackgroundTracingManagerBrowserTest, RunStartupTracing) {
base::DictionaryValue dict;
std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{
std::unique_ptr<base::DictionaryValue> rules_dict(
new base::DictionaryValue());
auto rules_dict = std::make_unique<base::DictionaryValue>();
rules_dict->SetString("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED");
rules_dict->SetString("trigger_name", "gpu-config");
rules_dict->SetString("trigger_name", "foo");
rules_dict->SetBoolean("stop_tracing_on_repeated_reactive", false);
rules_dict->SetInteger("trigger_delay", 10);
rules_dict->SetString("category", "BENCHMARK_GPU");
rules_list->Append(std::move(rules_dict));
}
dict.Set("configs", std::move(rules_list));
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
std::unique_ptr<BackgroundTracingConfig> config(
BackgroundTracingConfigImpl::ReactiveFromDict(&dict));
......
......@@ -21,7 +21,6 @@
#include "build/build_config.h"
#include "components/tracing/common/trace_startup_config.h"
#include "components/variations/variations_associated_data.h"
#include "content/browser/tracing/background_memory_tracing_observer.h"
#include "content/browser/tracing/background_startup_tracing_observer.h"
#include "content/browser/tracing/background_tracing_active_scenario.h"
#include "content/browser/tracing/background_tracing_agent_client_impl.h"
......@@ -87,7 +86,6 @@ void BackgroundTracingManagerImpl::ActivateForProcess(
BackgroundTracingManagerImpl::BackgroundTracingManagerImpl()
: delegate_(GetContentClient()->browser()->GetTracingDelegate()),
trigger_handle_ids_(0) {
AddEnabledStateObserver(BackgroundMemoryTracingObserver::GetInstance());
AddEnabledStateObserver(BackgroundStartupTracingObserver::GetInstance());
#if defined(OS_ANDROID)
AddEnabledStateObserver(&BackgroundReachedCodeTracingObserver::GetInstance());
......
......@@ -70,7 +70,6 @@ const AllowlistEntry kEventArgsAllowlist[] = {
{"base", "ScopedBlockingCall*", kScopedBlockingCallAllowedArgs},
{"base", "ScopedMayLoadLibraryAtBackgroundPriority",
kScopedBlockingCallAllowedArgs},
{"benchmark", "TestAllowlist*", nullptr},
{"blink", "MemoryPressureListenerRegistry::onMemoryPressure",
kMemoryPressureEventsAllowedArgs},
{"browser", "KeyedServiceFactory::GetServiceForContext", nullptr},
......@@ -88,7 +87,7 @@ const AllowlistEntry kEventArgsAllowlist[] = {
{"renderer_host", "*", kRendererHostAllowedArgs},
{"shutdown", "*", nullptr},
{"startup", "PrefProvider::PrefProvider", nullptr},
{"task_scheduler", "*", nullptr},
{"startup", "TestAllowlist*", nullptr},
{"toplevel", "*", nullptr},
{"toplevel.ipc", "TaskAnnotator::RunTask", kTopLevelIpcRunTaskAllowedArgs},
{TRACE_DISABLED_BY_DEFAULT("cpu_profiler"), "*", nullptr},
......
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