Backed out changeset aab899c222a0 (bug 1702310) for causing talos failures.

This commit is contained in:
Alexandru Michis 2021-04-09 05:26:23 +03:00
parent ade063249d
commit 09b48c2afd
22 changed files with 41 additions and 330 deletions

View File

@ -119,10 +119,6 @@ try_task_config_schema = Schema(
Optional("disable-pgo"): bool,
Optional("env"): {text_type: text_type},
Optional("gecko-profile"): bool,
Optional("gecko-profile-interval"): float,
Optional("gecko-profile-entries"): int,
Optional("gecko-profile-features"): text_type,
Optional("gecko-profile-threads"): text_type,
Optional(
"perftest-options",
description="Options passed from `mach perftest` to try.",

View File

@ -1715,23 +1715,11 @@ def set_retry_exit_status(config, tasks):
@transforms.add
def set_profile(config, tasks):
"""Set profiling mode for tests."""
ttconfig = config.params["try_task_config"]
profile = ttconfig.get("gecko-profile", False)
settings = (
"gecko-profile-interval",
"gecko-profile-entries",
"gecko-profile-threads",
"gecko-profile-features",
)
profile = config.params["try_task_config"].get("gecko-profile", False)
for task in tasks:
if profile and task["suite"] in ["talos", "raptor"]:
extras = task["mozharness"]["extra-options"]
extras.append("--gecko-profile")
for setting in settings:
value = ttconfig.get(setting)
if value is not None:
extras.append("--" + setting + "=" + str(value))
task["mozharness"]["extra-options"].append("--gecko-profile")
yield task

View File

@ -258,14 +258,6 @@ class Raptor(
"help": argparse.SUPPRESS,
},
],
[
["--geckoProfileFeatures"],
{
"dest": "gecko_profile_features",
"type": "str",
"help": argparse.SUPPRESS,
},
],
[
["--gecko-profile"],
{
@ -291,22 +283,6 @@ class Raptor(
"help": "How many samples to take with the profiler.",
},
],
[
["--gecko-profile-threads"],
{
"dest": "gecko_profile_threads",
"type": "str",
"help": "Comma-separated list of threads to sample.",
},
],
[
["--gecko-profile-features"],
{
"dest": "gecko_profile_features",
"type": "str",
"help": "Features to enable in the profiler.",
},
],
[
["--page-cycles"],
{
@ -611,8 +587,6 @@ class Raptor(
) or "--geckoProfile" in self.config.get("raptor_cmd_line_args", [])
self.gecko_profile_interval = self.config.get("gecko_profile_interval")
self.gecko_profile_entries = self.config.get("gecko_profile_entries")
self.gecko_profile_threads = self.config.get("gecko_profile_threads")
self.gecko_profile_features = self.config.get("gecko_profile_features")
self.test_packages_url = self.config.get("test_packages_url")
self.test_url_params = self.config.get("test_url_params")
self.host = self.config.get("host")
@ -657,22 +631,14 @@ class Raptor(
gecko_results = []
# If gecko_profile is set, we add that to Raptor's options
if self.gecko_profile:
gecko_results.append("--gecko-profile")
gecko_results.append("--geckoProfile")
if self.gecko_profile_interval:
gecko_results.extend(
["--gecko-profile-interval", str(self.gecko_profile_interval)]
["--geckoProfileInterval", str(self.gecko_profile_interval)]
)
if self.gecko_profile_entries:
gecko_results.extend(
["--gecko-profile-entries", str(self.gecko_profile_entries)]
)
if self.gecko_profile_features:
gecko_results.extend(
["--gecko-profile-features", self.gecko_profile_features]
)
if self.gecko_profile_threads:
gecko_results.extend(
["--gecko-profile-threads", self.gecko_profile_threads]
["--geckoProfileEntries", str(self.gecko_profile_entries)]
)
return gecko_results

View File

@ -60,13 +60,6 @@ TalosErrorList = PythonErrorList + [
},
]
GeckoProfilerSettings = (
"gecko_profile_interval",
"gecko_profile_entries",
"gecko_profile_features",
"gecko_profile_threads",
)
# TODO: check for running processes on script invocation
@ -174,31 +167,6 @@ class Talos(
"help": "The interval between samples taken by the profiler (milliseconds)",
},
],
[
["--gecko-profile-entries"],
{
"dest": "gecko_profile_entries",
"type": "int",
"help": "How many samples to take with the profiler",
},
],
[
["--gecko-profile-features"],
{
"dest": "gecko_profile_features",
"type": "str",
"default": None,
"help": "The features to enable in the profiler (comma-separated)",
},
],
[
["--gecko-profile-threads"],
{
"dest": "gecko_profile_threads",
"type": "str",
"help": "Comma-separated list of threads to sample.",
},
],
[
["--disable-e10s"],
{
@ -278,22 +246,10 @@ class Talos(
self.repo_path = self.config.get("repo_path")
self.obj_path = self.config.get("obj_path")
self.tests = None
extra_opts = self.config.get("talos_extra_options", [])
self.gecko_profile = (
self.config.get("gecko_profile") or "--gecko-profile" in extra_opts
)
for setting in GeckoProfilerSettings:
value = self.config.get(setting)
arg = "--" + setting.replace("_", "-")
if value is None:
try:
value = extra_opts[extra_opts.index(arg) + 1]
except ValueError:
pass # Not found
setattr(self, setting, value)
if not self.gecko_profile:
self.warning("enabling Gecko profiler for %s setting" % setting)
self.gecko_profile = True
self.gecko_profile = self.config.get(
"gecko_profile"
) or "--gecko-profile" in self.config.get("talos_extra_options", [])
self.gecko_profile_interval = self.config.get("gecko_profile_interval")
self.pagesets_name = None
self.benchmark_zip = None
self.webextensions_zip = None
@ -307,11 +263,10 @@ class Talos(
# finally, if gecko_profile is set, we add that to the talos options
if self.gecko_profile:
gecko_results.append("--gecko-profile")
for setting in GeckoProfilerSettings:
value = getattr(self, setting, None)
if value:
arg = "--" + setting.replace("_", "-")
gecko_results.extend([arg, str(value)])
if self.gecko_profile_interval:
gecko_results.extend(
["--gecko-profile-interval", str(self.gecko_profile_interval)]
)
return gecko_results
def query_abs_dirs(self):

View File

@ -308,37 +308,20 @@ class Browsertime(Perftest):
] = self.results_handler.result_dir_for_test(test)
self._init_gecko_profiling(test)
browsertime_options.append("--firefox.geckoProfiler")
for option, browser_time_option, default in (
(
"gecko_profile_features",
browsertime_options.extend(
[
"--firefox.geckoProfilerParams.features",
"js,leaf,stackwalk,cpu,threads",
),
(
"gecko_profile_threads",
"--firefox.geckoProfilerParams.threads",
"GeckoMain,Compositor",
),
(
"gecko_profile_interval",
"--firefox.geckoProfilerParams.interval",
None,
),
(
"gecko_profile_entries",
"--firefox.geckoProfilerParams.bufferSize",
None,
),
]
)
for option, browser_time_option in (
("gecko_profile_interval", "--firefox.geckoProfilerParams.interval"),
("gecko_profile_entries", "--firefox.geckoProfilerParams.bufferSize"),
):
# 0 is a valid value. The setting may be present but set to None.
value = self.config.get(option)
if value is None:
value = test.get(option)
if value is None:
value = default
if option == "gecko_profile_threads":
extra = self.config.get("gecko_profile_extra_threads", [])
value = ",".join(value.split(",") + extra)
if value is not None:
browsertime_options.extend([browser_time_option, str(value)])

View File

@ -199,23 +199,10 @@ def create_parser(mach_interface=False):
)
add_arg(
"--gecko-profile-thread",
dest="gecko_profile_extra_threads",
default=[],
dest="gecko_profile_threads",
action="append",
help="Name of the extra thread to be profiled",
)
add_arg(
"--gecko-profile-threads",
dest="gecko_profile_threads",
type=str,
help="Comma-separated list of all threads to sample",
)
add_arg(
"--gecko-profile-features",
dest="gecko_profile_features",
type=str,
help="What features to enable in the profiler",
)
add_arg(
"--symbolsPath",
dest="symbols_path",

View File

@ -266,10 +266,6 @@ def write_test_settings_json(args, test_details, oskey):
}
)
features = test_details.get("gecko_profile_features")
if features:
test_settings["raptor-options"]["gecko_profile_features"] = features
if test_details.get("newtab_per_cycle", None) is not None:
test_settings["raptor-options"]["newtab_per_cycle"] = bool(
test_details["newtab_per_cycle"]
@ -400,27 +396,17 @@ def get_raptor_test_list(args, oskey):
threads = list(
filter(None, next_test.get("gecko_profile_threads", "").split(","))
)
threads.extend(args.gecko_profile_threads.split(","))
if (
"gecko_profile_extra_threads" in args
and args.gecko_profile_extra_threads is not None
):
threads.extend(getattr(args, "gecko_profile_extra_threads", []))
threads.extend(args.gecko_profile_threads)
next_test["gecko_profile_threads"] = ",".join(threads)
LOG.info("gecko-profiling threads %s" % args.gecko_profile_threads)
if (
"gecko_profile_features" in args
and args.gecko_profile_features is not None
):
next_test["gecko_profile_features"] = args.gecko_profile_features
LOG.info("gecko-profiling features %s" % args.gecko_profile_features)
LOG.info(
"gecko-profiling extra threads %s" % args.gecko_profile_threads
)
else:
# if the gecko profiler is not enabled, ignore all of its settings
# if the gecko profiler is not enabled, ignore all of it's settings
next_test.pop("gecko_profile_entries", None)
next_test.pop("gecko_profile_interval", None)
next_test.pop("gecko_profile_threads", None)
next_test.pop("gecko_profile_features", None)
if args.debug_mode is True:
next_test["debug_mode"] = True

View File

@ -77,9 +77,6 @@ class Perftest(object):
gecko_profile=False,
gecko_profile_interval=None,
gecko_profile_entries=None,
gecko_profile_extra_threads=None,
gecko_profile_threads=None,
gecko_profile_features=None,
symbols_path=None,
host=None,
power_test=False,
@ -121,9 +118,6 @@ class Perftest(object):
"gecko_profile": gecko_profile,
"gecko_profile_interval": gecko_profile_interval,
"gecko_profile_entries": gecko_profile_entries,
"gecko_profile_extra_threads": gecko_profile_extra_threads,
"gecko_profile_threads": gecko_profile_threads,
"gecko_profile_features": gecko_profile_features,
"symbols_path": symbols_path,
"host": host,
"power_test": power_test,

View File

@ -124,9 +124,6 @@ def main(args=sys.argv[1:]):
gecko_profile=args.gecko_profile,
gecko_profile_interval=args.gecko_profile_interval,
gecko_profile_entries=args.gecko_profile_entries,
gecko_profile_extra_threads=args.gecko_profile_extra_threads,
gecko_profile_threads=args.gecko_profile_threads,
gecko_profile_features=args.gecko_profile_features,
symbols_path=args.symbols_path,
host=args.host,
power_test=args.power_test,

View File

@ -210,7 +210,6 @@ def test_get_raptor_test_list_gecko_profiling_enabled(create_args):
assert test_list[0].get("gecko_profile_entries") == "14000000"
assert test_list[0].get("gecko_profile_interval") == "1"
assert test_list[0].get("gecko_profile_threads") is None
assert test_list[0].get("gecko_profile_features") is None
def test_get_raptor_test_list_gecko_profiling_enabled_args_override(create_args):
@ -219,8 +218,7 @@ def test_get_raptor_test_list_gecko_profiling_enabled_args_override(create_args)
gecko_profile=True,
gecko_profile_entries=42,
gecko_profile_interval=100,
gecko_profile_threads="Foo",
gecko_profile_features="Mood,UserNetWorth",
gecko_profile_threads=["Foo"],
browser_cycles=1,
)
@ -231,27 +229,6 @@ def test_get_raptor_test_list_gecko_profiling_enabled_args_override(create_args)
assert test_list[0]["gecko_profile_entries"] == "42"
assert test_list[0]["gecko_profile_interval"] == "100"
assert test_list[0]["gecko_profile_threads"] == "Foo"
assert test_list[0]["gecko_profile_features"] == "Mood,UserNetWorth"
def test_get_raptor_test_list_gecko_profiling_enabled_extra_args_override(create_args):
args = create_args(
test="amazon",
gecko_profile=True,
gecko_profile_entries=42,
gecko_profile_interval=100,
gecko_profile_extra_threads=["Foo", "Oof"],
gecko_profile_threads="String,Rope",
browser_cycles=1,
)
test_list = get_raptor_test_list(args, mozinfo.os)
assert len(test_list) == 1
assert test_list[0]["name"] == "amazon"
assert test_list[0]["gecko_profile"] is True
assert test_list[0]["gecko_profile_entries"] == "42"
assert test_list[0]["gecko_profile_interval"] == "100"
assert test_list[0]["gecko_profile_threads"] == "String,Rope,Foo,Oof"
def test_get_raptor_test_list_gecko_profiling_disabled(create_args):
@ -261,7 +238,6 @@ def test_get_raptor_test_list_gecko_profiling_disabled(create_args):
gecko_profile_entries=42,
gecko_profile_interval=100,
gecko_profile_threads=["Foo"],
gecko_profile_features=["Temperature"],
browser_cycles=1,
)
@ -272,7 +248,6 @@ def test_get_raptor_test_list_gecko_profiling_disabled(create_args):
assert test_list[0].get("gecko_profile_entries") is None
assert test_list[0].get("gecko_profile_interval") is None
assert test_list[0].get("gecko_profile_threads") is None
assert test_list[0].get("gecko_profile_features") is None
def test_get_raptor_test_list_gecko_profiling_disabled_args_override(create_args):
@ -282,7 +257,6 @@ def test_get_raptor_test_list_gecko_profiling_disabled_args_override(create_args
gecko_profile_entries=42,
gecko_profile_interval=100,
gecko_profile_threads=["Foo"],
gecko_profile_features=["Temperature"],
browser_cycles=1,
)
@ -293,7 +267,6 @@ def test_get_raptor_test_list_gecko_profiling_disabled_args_override(create_args
assert test_list[0].get("gecko_profile_entries") is None
assert test_list[0].get("gecko_profile_interval") is None
assert test_list[0].get("gecko_profile_threads") is None
assert test_list[0].get("gecko_profile_features") is None
def test_get_raptor_test_list_debug_mode(create_args):

View File

@ -70,7 +70,6 @@ var geckoProfiling = false;
var geckoInterval = 1;
var geckoEntries = 1000000;
var geckoThreads = [];
var geckoFeatures = null;
var debugMode = 0;
var screenCapture = false;
@ -137,7 +136,6 @@ async function getTestSettings() {
geckoEntries = settings.gecko_profile_entries;
geckoInterval = settings.gecko_profile_interval;
geckoThreads = settings.gecko_profile_threads;
geckoFeatures = settings.gecko_profile_features;
}
if (settings.screen_capture !== undefined) {
@ -380,13 +378,10 @@ async function startGeckoProfiling() {
"status",
`starting Gecko profiling for threads: ${geckoThreads}`
);
const features = geckoFeatures
? geckoFeatures.split(",")
: ["js", "leaf", "stackwalk", "cpu", "threads", "responsiveness"];
await ext.geckoProfiler.start({
bufferSize: geckoEntries,
interval: geckoInterval,
features,
features: ["js", "leaf", "stackwalk", "cpu", "threads", "responsiveness"],
threads: geckoThreads.split(","),
});
}

View File

@ -160,18 +160,6 @@ def create_parser(mach_interface=False):
type=int,
help="How many samples to take with the profiler",
)
add_arg(
"--gecko-profile-features",
dest="gecko_profile_features",
type=str,
help="Comma-separated list of features to enable in the profiler",
)
add_arg(
"--gecko-profile-threads",
dest="gecko_profile_threads",
type=str,
help="Comma-separated list of threads to sample",
)
add_arg(
"--extension",
dest="extensions",

View File

@ -23,8 +23,7 @@ DEFAULTS = dict(
buildid="testbuildid",
init_url="getInfo.html",
env={"NO_EM_RESTART": "1"},
# base data for all tests. Note that any None here will end up converted to
# an empty string in useBaseTestDefaults.
# base data for all tests
basetest=dict(
cycles=1,
profile_path="${talos}/base_profile",
@ -68,8 +67,6 @@ GLOBAL_OVERRIDES = (
"gecko_profile",
"gecko_profile_interval",
"gecko_profile_entries",
"gecko_profile_features",
"gecko_profile_threads",
"tpcycles",
"tppagecycles",
"tpmanifest",

View File

@ -38,12 +38,7 @@ class GeckoProfile(object):
gecko_profile_interval = test_config.get("gecko_profile_interval", 1)
gecko_profile_entries = test_config.get("gecko_profile_entries", 1000000)
gecko_profile_features = test_config.get(
"gecko_profile_features", "js,leaf,stackwalk,cpu,threads"
)
gecko_profile_threads = test_config.get(
"gecko_profile_threads", "GeckoMain,Compositor"
)
gecko_profile_threads = "GeckoMain,Compositor"
if browser_config["enable_webrender"]:
gecko_profile_threads += ",WR,Renderer"
@ -72,7 +67,6 @@ class GeckoProfile(object):
"gecko_profile_interval": gecko_profile_interval,
"gecko_profile_entries": gecko_profile_entries,
"gecko_profile_dir": gecko_profile_dir,
"gecko_profile_features": gecko_profile_features,
"gecko_profile_threads": gecko_profile_threads,
}
@ -96,7 +90,6 @@ class GeckoProfile(object):
"MOZ_PROFILER_STARTUP_NO_BASE": "1",
"MOZ_PROFILER_STARTUP_INTERVAL": str(self.option("interval")),
"MOZ_PROFILER_STARTUP_ENTRIES": str(self.option("entries")),
"MOZ_PROFILER_STARTUP_FEATURES": str(self.option("features")),
"MOZ_PROFILER_STARTUP_FILTERS": str(self.option("threads")),
}
)

View File

@ -31,11 +31,7 @@ var Profiler;
var currentTest = "";
// Profiling settings.
var profiler_interval,
profiler_entries,
profiler_threadsArray,
profiler_featuresArray,
profiler_dir;
var profiler_interval, profiler_entries, profiler_threadsArray, profiler_dir;
/* eslint-disable mozilla/use-chromeutils-import */
try {
@ -66,7 +62,6 @@ var Profiler;
* The following properties on the object are respected:
* - gecko_profile_interval
* - gecko_profile_entries
* - gecko_profile_features
* - gecko_profile_threads
* - gecko_profile_dir
*/
@ -79,14 +74,11 @@ var Profiler;
Number.isFinite(obj.gecko_profile_interval * 1) &&
"gecko_profile_entries" in obj &&
Number.isFinite(obj.gecko_profile_entries * 1) &&
"gecko_profile_features" in obj &&
typeof obj.gecko_profile_features == "string" &&
"gecko_profile_threads" in obj &&
typeof obj.gecko_profile_threads == "string"
) {
profiler_interval = obj.gecko_profile_interval;
profiler_entries = obj.gecko_profile_entries;
profiler_featuresArray = obj.gecko_profile_features.split(",");
profiler_threadsArray = obj.gecko_profile_threads.split(",");
profiler_dir = obj.gecko_profile_dir;
enabled = true;
@ -103,7 +95,7 @@ var Profiler;
_profiler.StartProfiler(
profiler_entries,
profiler_interval,
profiler_featuresArray,
["js", "leaf", "stackwalk", "threads", "cpu"],
profiler_threadsArray
);
_profiler.PauseSampling();

View File

@ -119,7 +119,7 @@ TalosPowersService.prototype = {
Services.profiler.StartProfiler(
data.entries,
data.interval,
data.featuresArray,
["js", "leaf", "stackwalk", "threads", "cpu"],
data.threadsArray
);

View File

@ -32,7 +32,7 @@ var TalosContentProfiler;
var currentTest = "unknown";
// Profiler settings.
var interval, entries, featuresArray, threadsArray, profileDir;
var interval, entries, threadsArray, profileDir;
/**
* Emits a TalosContentProfiler prefixed event and then returns a Promise
@ -123,7 +123,6 @@ var TalosContentProfiler;
* The following properties on the object are respected:
* gecko_profile_interval (int)
* gecko_profile_entries (int)
* gecko_profile_features (string, comma separated list of features to enable)
* gecko_profile_threads (string, comma separated list of threads to filter with)
* gecko_profile_dir (string)
*/
@ -136,14 +135,11 @@ var TalosContentProfiler;
Number.isFinite(obj.gecko_profile_interval * 1) &&
"gecko_profile_entries" in obj &&
Number.isFinite(obj.gecko_profile_entries * 1) &&
"gecko_profile_features" in obj &&
typeof obj.gecko_profile_features == "string" &&
"gecko_profile_threads" in obj &&
typeof obj.gecko_profile_threads == "string"
) {
interval = obj.gecko_profile_interval;
entries = obj.gecko_profile_entries;
featuresArray = obj.gecko_profile_features.split(",");
threadsArray = obj.gecko_profile_threads.split(",");
profileDir = obj.gecko_profile_dir;
initted = true;
@ -184,7 +180,6 @@ var TalosContentProfiler;
return sendEventAndWait("Profiler:Begin", {
interval,
entries,
featuresArray,
threadsArray,
});
}

View File

@ -29,7 +29,6 @@ const TalosParentProfiler = {
// Profiler settings.
interval: undefined,
entries: undefined,
featuresArray: undefined,
threadsArray: undefined,
profileDir: undefined,
@ -48,7 +47,6 @@ const TalosParentProfiler = {
* The following properties on the object are respected:
* gecko_profile_interval (int)
* gecko_profile_entries (int)
* gecko_profile_features (string, comma separated list of features to enable)
* gecko_profile_threads (string, comma separated list of threads to filter with)
* gecko_profile_dir (string)
*/
@ -61,14 +59,11 @@ const TalosParentProfiler = {
Number.isFinite(obj.gecko_profile_interval * 1) &&
"gecko_profile_entries" in obj &&
Number.isFinite(obj.gecko_profile_entries * 1) &&
"gecko_profile_features" in obj &&
typeof obj.gecko_profile_features == "string" &&
"gecko_profile_threads" in obj &&
typeof obj.gecko_profile_threads == "string"
) {
this.interval = obj.gecko_profile_interval;
this.entries = obj.gecko_profile_entries;
this.featuresArray = obj.gecko_profile_features.split(",");
this.threadsArray = obj.gecko_profile_threads.split(",");
this.profileDir = obj.gecko_profile_dir;
this.initted = true;
@ -127,7 +122,6 @@ const TalosParentProfiler = {
this.TalosPowers.profilerBegin({
entries: this.entries,
interval: this.interval,
featuresArray: this.featuresArray,
threadsArray: this.threadsArray,
});
} else {

View File

@ -108,8 +108,6 @@ class TsBase(Test):
"gecko_profile",
"gecko_profile_interval",
"gecko_profile_entries",
"gecko_profile_features",
"gecko_profile_threads",
"gecko_profile_startup",
"preferences",
"xperf_counters",
@ -338,8 +336,6 @@ class PageloaderTest(Test):
"gecko_profile",
"gecko_profile_interval",
"gecko_profile_entries",
"gecko_profile_features",
"gecko_profile_threads",
"tptimeout",
"win_counters",
"w7_counters",

View File

@ -31,11 +31,7 @@ var Profiler;
var currentTest = "";
// Profiling settings.
var profiler_interval,
profiler_entries,
profiler_featuresArray,
profiler_threadsArray,
profiler_dir;
var profiler_interval, profiler_entries, profiler_threadsArray, profiler_dir;
try {
// eslint-disable-next-line mozilla/use-services
@ -65,7 +61,6 @@ var Profiler;
* The following properties on the object are respected:
* - gecko_profile_interval
* - gecko_profile_entries
* - gecko_profile_features
* - gecko_profile_threads
* - gecko_profile_dir
*/
@ -78,14 +73,11 @@ var Profiler;
Number.isFinite(obj.gecko_profile_interval * 1) &&
"gecko_profile_entries" in obj &&
Number.isFinite(obj.gecko_profile_entries * 1) &&
"gecko_profile_features" in obj &&
typeof obj.gecko_profile_features == "string" &&
"gecko_profile_threads" in obj &&
typeof obj.gecko_profile_threads == "string"
) {
profiler_interval = obj.gecko_profile_interval;
profiler_entries = obj.gecko_profile_entries;
profiler_featuresArray = obj.gecko_profile_features.split(",");
profiler_threadsArray = obj.gecko_profile_threads.split(",");
profiler_dir = obj.gecko_profile_dir;
enabled = true;
@ -102,7 +94,7 @@ var Profiler;
_profiler.StartProfiler(
profiler_entries,
profiler_interval,
profiler_featuresArray,
["js", "leaf", "stackwalk", "threads", "cpu"],
profiler_threadsArray
);
_profiler.PauseSampling();

View File

@ -31,11 +31,7 @@ var Profiler;
var currentTest = "";
// Profiling settings.
var profiler_interval,
profiler_entries,
profiler_featuresArray,
profiler_threadsArray,
profiler_dir;
var profiler_interval, profiler_entries, profiler_threadsArray, profiler_dir;
try {
// eslint-disable-next-line mozilla/use-services
@ -65,7 +61,6 @@ var Profiler;
* The following properties on the object are respected:
* - gecko_profile_interval
* - gecko_profile_entries
* - gecko_profile_features
* - gecko_profile_threads
* - gecko_profile_dir
*/
@ -78,14 +73,11 @@ var Profiler;
Number.isFinite(obj.gecko_profile_interval * 1) &&
"gecko_profile_entries" in obj &&
Number.isFinite(obj.gecko_profile_entries * 1) &&
"gecko_profile_features" in obj &&
typeof obj.gecko_profile_features == "string" &&
"gecko_profile_threads" in obj &&
typeof obj.gecko_profile_threads == "string"
) {
profiler_interval = obj.gecko_profile_interval;
profiler_entries = obj.gecko_profile_entries;
profiler_featuresArray = obj.gecko_profile_features.split(",");
profiler_threadsArray = obj.gecko_profile_threads.split(",");
profiler_dir = obj.gecko_profile_dir;
enabled = true;
@ -102,7 +94,7 @@ var Profiler;
_profiler.StartProfiler(
profiler_entries,
profiler_interval,
profiler_featuresArray,
["js", "leaf", "stackwalk", "threads", "cpu"],
profiler_threadsArray
);
_profiler.PauseSampling();

View File

@ -328,39 +328,6 @@ class GeckoProfile(TryConfig):
"help": "Create and upload a gecko profile during talos/raptor tasks.",
},
],
[
["--gecko-profile-interval"],
{
"dest": "gecko_profile_interval",
"type": float,
"help": "How frequently to take samples (ms)",
},
],
[
["--gecko-profile-entries"],
{
"dest": "gecko_profile_entries",
"type": int,
"help": "How many samples to take with the profiler",
},
],
[
["--gecko-profile-features"],
{
"dest": "gecko_profile_features",
"type": str,
"default": None,
"help": "Set the features enabled for the profiler.",
},
],
[
["--gecko-profile-threads"],
{
"dest": "gecko_profile_threads",
"type": str,
"help": "Comma-separated list of threads to sample.",
},
],
# For backwards compatibility
[
["--talos-profile"],
@ -383,25 +350,10 @@ class GeckoProfile(TryConfig):
],
]
def try_config(
self,
profile,
gecko_profile_interval,
gecko_profile_entries,
gecko_profile_features,
gecko_profile_threads,
**kwargs
):
if profile or not all(
kwargs.get(s) is None
for s in (gecko_profile_features, gecko_profile_threads)
):
def try_config(self, profile, **kwargs):
if profile:
return {
"gecko-profile": True,
"gecko-profile-interval": gecko_profile_interval,
"gecko-profile-entries": gecko_profile_entries,
"gecko-profile-features": gecko_profile_features,
"gecko-profile-threads": gecko_profile_threads,
}