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"( ...@@ -40,7 +40,7 @@ const char kValidTracingConfig[] = R"(
"scenario_name": "BrowserProcess", "scenario_name": "BrowserProcess",
"configs": [ "configs": [
{ {
"category": "BENCHMARK_NAVIGATION", "custom_categories": "base,toplevel",
"rule": "MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE", "rule": "MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE",
"histogram_name": "Omnibox.CharTypedToRepaintLatency.ToPaint", "histogram_name": "Omnibox.CharTypedToRepaintLatency.ToPaint",
"histogram_lower_value": 1 "histogram_lower_value": 1
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "chrome/browser/tracing/background_tracing_metrics_provider.h" #include "chrome/browser/tracing/background_tracing_metrics_provider.h"
#include "base/bind.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_config.h"
#include "content/public/browser/background_tracing_manager.h" #include "content/public/browser/background_tracing_manager.h"
#include "content/public/test/browser_task_environment.h" #include "content/public/test/browser_task_environment.h"
...@@ -25,7 +26,8 @@ class BackgroundTracingMetricsProviderTest : public testing::Test { ...@@ -25,7 +26,8 @@ class BackgroundTracingMetricsProviderTest : public testing::Test {
base::DictionaryValue dict; base::DictionaryValue dict;
dict.SetString("mode", "REACTIVE_TRACING_MODE"); 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()); std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{ {
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/in_process_browser_test.h"
#include "components/metrics/metrics_pref_names.h" #include "components/metrics/metrics_pref_names.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/tracing/common/trace_startup_config.h"
#include "components/variations/variations_params_manager.h" #include "components/variations/variations_params_manager.h"
#include "content/public/browser/background_tracing_config.h" #include "content/public/browser/background_tracing_config.h"
#include "content/public/browser/background_tracing_manager.h" #include "content/public/browser/background_tracing_manager.h"
...@@ -50,7 +51,8 @@ class ChromeTracingDelegateBrowserTest : public InProcessBrowserTest { ...@@ -50,7 +51,8 @@ class ChromeTracingDelegateBrowserTest : public InProcessBrowserTest {
base::DictionaryValue dict; base::DictionaryValue dict;
dict.SetString("mode", "PREEMPTIVE_TRACING_MODE"); 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()); std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
{ {
...@@ -253,8 +255,8 @@ class ChromeTracingDelegateBrowserTestOnStartup ...@@ -253,8 +255,8 @@ class ChromeTracingDelegateBrowserTestOnStartup
// We need to replace the config JSON with the full one here, as we can't // We need to replace the config JSON with the full one here, as we can't
// pass JSON through the fieldtrial switch parsing. // pass JSON through the fieldtrial switch parsing.
if (config_text == "default_config_for_testing") { if (config_text == "default_config_for_testing") {
return "{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"category\": " return "{\"mode\":\"PREEMPTIVE_TRACING_MODE\", \"custom_categories\": "
"\"BENCHMARK\",\"configs\": [{\"rule\": " "\"base,toplevel\",\"configs\": [{\"rule\": "
"\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\",\"trigger_name\":" "\"MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED\",\"trigger_name\":"
"\"test\"}]}"; "\"test\"}]}";
} }
......
...@@ -37,16 +37,6 @@ const size_t kTraceConfigFileSizeLimit = 64 * 1024; ...@@ -37,16 +37,6 @@ const size_t kTraceConfigFileSizeLimit = 64 * 1024;
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
const base::FilePath::CharType kAndroidTraceConfigFile[] = const base::FilePath::CharType kAndroidTraceConfigFile[] =
FILE_PATH_LITERAL("/data/local/chrome-trace-config.json"); 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 #endif
// String parameters that can be used to parse the trace config file content. // String parameters that can be used to parse the trace config file content.
...@@ -57,6 +47,18 @@ const char kResultDirectoryParam[] = "result_directory"; ...@@ -57,6 +47,18 @@ const char kResultDirectoryParam[] = "result_directory";
} // namespace } // 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 // static
TraceStartupConfig* TraceStartupConfig::GetInstance() { TraceStartupConfig* TraceStartupConfig::GetInstance() {
return base::Singleton<TraceStartupConfig, base::DefaultSingletonTraits< return base::Singleton<TraceStartupConfig, base::DefaultSingletonTraits<
......
...@@ -99,6 +99,9 @@ class TRACING_EXPORT TraceStartupConfig { ...@@ -99,6 +99,9 @@ class TRACING_EXPORT TraceStartupConfig {
kProto, kProto,
}; };
// Exposed for testing.
static const char kDefaultStartupCategories[];
static TraceStartupConfig* GetInstance(); static TraceStartupConfig* GetInstance();
// Default minimum startup trace config with enough events to debug issues. // Default minimum startup trace config with enough events to debug issues.
......
...@@ -1724,8 +1724,6 @@ source_set("browser") { ...@@ -1724,8 +1724,6 @@ source_set("browser") {
"storage_partition_impl_map.h", "storage_partition_impl_map.h",
"theme_helper.cc", "theme_helper.cc",
"theme_helper.h", "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.cc",
"tracing/background_startup_tracing_observer.h", "tracing/background_startup_tracing_observer.h",
"tracing/background_tracing_active_scenario.cc", "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( ...@@ -34,11 +34,11 @@ const BackgroundTracingRule* FindReachedCodeRuleInConfig(
return nullptr; return nullptr;
} }
std::unique_ptr<BackgroundTracingConfigImpl> GetGpuConfig() { std::unique_ptr<BackgroundTracingConfigImpl> GetStartupConfig() {
auto rules_dict = std::make_unique<base::DictionaryValue>(); auto rules_dict = std::make_unique<base::DictionaryValue>();
rules_dict->SetString("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED"); rules_dict->SetString("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED");
rules_dict->SetString("trigger_name", "test"); rules_dict->SetString("trigger_name", "test");
rules_dict->SetString("category", "BENCHMARK_GPU"); rules_dict->SetString("category", "BENCHMARK_STARTUP");
base::DictionaryValue dict; base::DictionaryValue dict;
auto rules_list = std::make_unique<base::ListValue>(); auto rules_list = std::make_unique<base::ListValue>();
rules_list->Append(std::move(rules_dict)); rules_list->Append(std::move(rules_dict));
...@@ -80,15 +80,15 @@ void TestReachedCodeRuleExists(const BackgroundTracingConfigImpl& config, ...@@ -80,15 +80,15 @@ void TestReachedCodeRuleExists(const BackgroundTracingConfigImpl& config,
} }
} }
void TestGpuConfigExists(const BackgroundTracingConfigImpl& config) { void TestStartupConfigExists(const BackgroundTracingConfigImpl& config) {
bool found_gpu = false; bool found_startup = false;
for (const auto& rule : config.rules()) { for (const auto& rule : config.rules()) {
if (rule->category_preset() == if (rule->category_preset() ==
BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_GPU) { BackgroundTracingConfigImpl::CategoryPreset::BENCHMARK_STARTUP) {
found_gpu = true; found_startup = true;
} }
} }
EXPECT_TRUE(found_gpu); EXPECT_TRUE(found_startup);
} }
} // namespace } // namespace
...@@ -106,9 +106,9 @@ TEST(BackgroundReachedCodeTracingObserverTest, ...@@ -106,9 +106,9 @@ TEST(BackgroundReachedCodeTracingObserverTest,
EXPECT_FALSE(observer.enabled_in_current_session()); EXPECT_FALSE(observer.enabled_in_current_session());
EXPECT_FALSE(base::android::IsReachedCodeProfilerEnabled()); 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 same.
config_impl = GetGpuConfig(); config_impl = GetStartupConfig();
ASSERT_TRUE(config_impl); ASSERT_TRUE(config_impl);
EXPECT_FALSE(base::android::IsReachedCodeProfilerEnabled()); EXPECT_FALSE(base::android::IsReachedCodeProfilerEnabled());
...@@ -118,7 +118,7 @@ TEST(BackgroundReachedCodeTracingObserverTest, ...@@ -118,7 +118,7 @@ TEST(BackgroundReachedCodeTracingObserverTest,
EXPECT_FALSE(base::android::IsReachedCodeProfilerEnabled()); EXPECT_FALSE(base::android::IsReachedCodeProfilerEnabled());
EXPECT_EQ(1u, config_impl->rules().size()); EXPECT_EQ(1u, config_impl->rules().size());
TestReachedCodeRuleExists(*config_impl, false); TestReachedCodeRuleExists(*config_impl, false);
TestGpuConfigExists(*config_impl); TestStartupConfigExists(*config_impl);
// A reached code config without profiler should stay config same. // A reached code config without profiler should stay config same.
config_impl = GetReachedCodeConfig(); config_impl = GetReachedCodeConfig();
...@@ -149,8 +149,8 @@ TEST(BackgroundReachedCodeTracingObserverTest, ...@@ -149,8 +149,8 @@ TEST(BackgroundReachedCodeTracingObserverTest,
config_impl->tracing_mode()); config_impl->tracing_mode());
TestReachedCodeRuleExists(*config_impl, true); TestReachedCodeRuleExists(*config_impl, true);
// A GPU config with profiler on should not enabled reached code config. // A startup config with profiler on should not enabled reached code config.
config_impl = GetGpuConfig(); config_impl = GetStartupConfig();
config_impl = config_impl =
observer.IncludeReachedCodeConfigIfNeeded(std::move(config_impl)); observer.IncludeReachedCodeConfigIfNeeded(std::move(config_impl));
EXPECT_FALSE(observer.enabled_in_current_session()); EXPECT_FALSE(observer.enabled_in_current_session());
...@@ -161,7 +161,7 @@ TEST(BackgroundReachedCodeTracingObserverTest, ...@@ -161,7 +161,7 @@ TEST(BackgroundReachedCodeTracingObserverTest,
config_impl->tracing_mode()); config_impl->tracing_mode());
TestReachedCodeRuleExists(*config_impl, false); TestReachedCodeRuleExists(*config_impl, false);
TestGpuConfigExists(*config_impl); TestStartupConfigExists(*config_impl);
} }
} // namespace content } // namespace content
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "content/browser/tracing/background_startup_tracing_observer.h" #include "content/browser/tracing/background_startup_tracing_observer.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "components/tracing/common/trace_startup_config.h"
#include "content/browser/tracing/background_tracing_rule.h" #include "content/browser/tracing/background_tracing_rule.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -87,17 +88,18 @@ TEST(BackgroundStartupTracingObserverTest, IncludeStartupConfigIfNeeded) { ...@@ -87,17 +88,18 @@ TEST(BackgroundStartupTracingObserverTest, IncludeStartupConfigIfNeeded) {
EXPECT_EQ(1u, config_impl->rules().size()); EXPECT_EQ(1u, config_impl->rules().size());
TestStartupRuleExists(*config_impl, true); 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. // config same.
std::unique_ptr<base::DictionaryValue> rules_dict( std::unique_ptr<base::DictionaryValue> rules_dict(
new base::DictionaryValue()); new base::DictionaryValue());
rules_dict->SetString("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED"); rules_dict->SetString("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED");
rules_dict->SetString("trigger_name", "test"); rules_dict->SetString("trigger_name", "test");
rules_dict->SetString("category", "BENCHMARK_GPU");
base::DictionaryValue dict; base::DictionaryValue dict;
std::unique_ptr<base::ListValue> rules_list(new base::ListValue()); std::unique_ptr<base::ListValue> rules_list(new base::ListValue());
rules_list->Append(std::move(rules_dict)); rules_list->Append(std::move(rules_dict));
dict.Set("configs", std::move(rules_list)); dict.Set("configs", std::move(rules_list));
dict.SetString("custom_categories",
tracing::TraceStartupConfig::kDefaultStartupCategories);
config_impl = BackgroundTracingConfigImpl::ReactiveFromDict(&dict); config_impl = BackgroundTracingConfigImpl::ReactiveFromDict(&dict);
ASSERT_TRUE(config_impl); ASSERT_TRUE(config_impl);
...@@ -108,8 +110,8 @@ TEST(BackgroundStartupTracingObserverTest, IncludeStartupConfigIfNeeded) { ...@@ -108,8 +110,8 @@ TEST(BackgroundStartupTracingObserverTest, IncludeStartupConfigIfNeeded) {
EXPECT_EQ(1u, config_impl->rules().size()); EXPECT_EQ(1u, config_impl->rules().size());
TestStartupRuleExists(*config_impl, false); TestStartupRuleExists(*config_impl, false);
// A GPU config with preference set should include startup config and disable // A custom config with preference set should include startup config and
// preference. // disable preference.
preferences->SetBackgroundStartupTracingEnabled(true); preferences->SetBackgroundStartupTracingEnabled(true);
config_impl = observer->IncludeStartupConfigIfNeeded(std::move(config_impl)); config_impl = observer->IncludeStartupConfigIfNeeded(std::move(config_impl));
EXPECT_TRUE(observer->enabled_in_current_session()); EXPECT_TRUE(observer->enabled_in_current_session());
...@@ -119,15 +121,10 @@ TEST(BackgroundStartupTracingObserverTest, IncludeStartupConfigIfNeeded) { ...@@ -119,15 +121,10 @@ TEST(BackgroundStartupTracingObserverTest, IncludeStartupConfigIfNeeded) {
EXPECT_EQ(BackgroundTracingConfig::TracingMode::REACTIVE, EXPECT_EQ(BackgroundTracingConfig::TracingMode::REACTIVE,
config_impl->tracing_mode()); config_impl->tracing_mode());
TestStartupRuleExists(*config_impl, true); 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); preferences->SetBackgroundStartupTracingEnabled(false);
} }
......
...@@ -33,20 +33,7 @@ class CONTENT_EXPORT BackgroundTracingConfigImpl ...@@ -33,20 +33,7 @@ class CONTENT_EXPORT BackgroundTracingConfigImpl
CATEGORY_PRESET_UNSET, CATEGORY_PRESET_UNSET,
CUSTOM_CATEGORY_PRESET, CUSTOM_CATEGORY_PRESET,
CUSTOM_TRACE_CONFIG, CUSTOM_TRACE_CONFIG,
BENCHMARK,
BENCHMARK_DEEP,
BENCHMARK_GPU,
BENCHMARK_IPC,
BENCHMARK_STARTUP, 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_; } CategoryPreset category_preset() const { return category_preset_; }
...@@ -118,6 +105,8 @@ class CONTENT_EXPORT BackgroundTracingConfigImpl ...@@ -118,6 +105,8 @@ class CONTENT_EXPORT BackgroundTracingConfigImpl
void SetBufferSizeLimits(const base::DictionaryValue* dict); void SetBufferSizeLimits(const base::DictionaryValue* dict);
int GetMaximumTraceBufferSizeKb() const; int GetMaximumTraceBufferSizeKb() const;
// A trace config extracted from the "trace_config" field of the input
// dictionnary.
base::trace_event::TraceConfig trace_config_; base::trace_event::TraceConfig trace_config_;
CategoryPreset category_preset_; CategoryPreset category_preset_;
std::vector<std::unique_ptr<BackgroundTracingRule>> rules_; std::vector<std::unique_ptr<BackgroundTracingRule>> rules_;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "components/tracing/common/trace_startup_config.h" #include "components/tracing/common/trace_startup_config.h"
#include "components/variations/variations_associated_data.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_startup_tracing_observer.h"
#include "content/browser/tracing/background_tracing_active_scenario.h" #include "content/browser/tracing/background_tracing_active_scenario.h"
#include "content/browser/tracing/background_tracing_agent_client_impl.h" #include "content/browser/tracing/background_tracing_agent_client_impl.h"
...@@ -87,7 +86,6 @@ void BackgroundTracingManagerImpl::ActivateForProcess( ...@@ -87,7 +86,6 @@ void BackgroundTracingManagerImpl::ActivateForProcess(
BackgroundTracingManagerImpl::BackgroundTracingManagerImpl() BackgroundTracingManagerImpl::BackgroundTracingManagerImpl()
: delegate_(GetContentClient()->browser()->GetTracingDelegate()), : delegate_(GetContentClient()->browser()->GetTracingDelegate()),
trigger_handle_ids_(0) { trigger_handle_ids_(0) {
AddEnabledStateObserver(BackgroundMemoryTracingObserver::GetInstance());
AddEnabledStateObserver(BackgroundStartupTracingObserver::GetInstance()); AddEnabledStateObserver(BackgroundStartupTracingObserver::GetInstance());
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
AddEnabledStateObserver(&BackgroundReachedCodeTracingObserver::GetInstance()); AddEnabledStateObserver(&BackgroundReachedCodeTracingObserver::GetInstance());
......
...@@ -70,7 +70,6 @@ const AllowlistEntry kEventArgsAllowlist[] = { ...@@ -70,7 +70,6 @@ const AllowlistEntry kEventArgsAllowlist[] = {
{"base", "ScopedBlockingCall*", kScopedBlockingCallAllowedArgs}, {"base", "ScopedBlockingCall*", kScopedBlockingCallAllowedArgs},
{"base", "ScopedMayLoadLibraryAtBackgroundPriority", {"base", "ScopedMayLoadLibraryAtBackgroundPriority",
kScopedBlockingCallAllowedArgs}, kScopedBlockingCallAllowedArgs},
{"benchmark", "TestAllowlist*", nullptr},
{"blink", "MemoryPressureListenerRegistry::onMemoryPressure", {"blink", "MemoryPressureListenerRegistry::onMemoryPressure",
kMemoryPressureEventsAllowedArgs}, kMemoryPressureEventsAllowedArgs},
{"browser", "KeyedServiceFactory::GetServiceForContext", nullptr}, {"browser", "KeyedServiceFactory::GetServiceForContext", nullptr},
...@@ -88,7 +87,7 @@ const AllowlistEntry kEventArgsAllowlist[] = { ...@@ -88,7 +87,7 @@ const AllowlistEntry kEventArgsAllowlist[] = {
{"renderer_host", "*", kRendererHostAllowedArgs}, {"renderer_host", "*", kRendererHostAllowedArgs},
{"shutdown", "*", nullptr}, {"shutdown", "*", nullptr},
{"startup", "PrefProvider::PrefProvider", nullptr}, {"startup", "PrefProvider::PrefProvider", nullptr},
{"task_scheduler", "*", nullptr}, {"startup", "TestAllowlist*", nullptr},
{"toplevel", "*", nullptr}, {"toplevel", "*", nullptr},
{"toplevel.ipc", "TaskAnnotator::RunTask", kTopLevelIpcRunTaskAllowedArgs}, {"toplevel.ipc", "TaskAnnotator::RunTask", kTopLevelIpcRunTaskAllowedArgs},
{TRACE_DISABLED_BY_DEFAULT("cpu_profiler"), "*", nullptr}, {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