mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
Bug 1715081 - Reformat leakcheck for large leaks to include directory. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D188771
This commit is contained in:
parent
e55b9034e2
commit
1f78f5c832
@ -3798,6 +3798,7 @@ toolbar#nav-bar {
|
||||
ignore_missing_leaks=ignoreMissingLeaks,
|
||||
log=self.log,
|
||||
stack_fixer=get_stack_fixer_function(utilityPath, options.symbolsPath),
|
||||
scope=manifestToFilter,
|
||||
)
|
||||
|
||||
self.log.info("runtests.py | Running tests: end.")
|
||||
|
@ -125,6 +125,7 @@ def process_single_leak_file(
|
||||
if name in allowed:
|
||||
limit = leak_allowed[name]
|
||||
leak_allowed = limit is None or numLeaked <= limit
|
||||
|
||||
log.mozleak_object(
|
||||
processType, numLeaked, name, scope=scope, allowed=leak_allowed
|
||||
)
|
||||
|
@ -395,19 +395,34 @@ class TbplFormatter(BaseFormatter):
|
||||
if data["bytes"] == 0:
|
||||
return "TEST-PASS | leakcheck | %s no leaks detected!\n" % data["process"]
|
||||
|
||||
message = ""
|
||||
bigLeakers = [
|
||||
"nsGlobalWindowInner",
|
||||
"nsGlobalWindowOuter",
|
||||
"Document",
|
||||
"nsDocShell",
|
||||
"BrowsingContext",
|
||||
"BackstagePass",
|
||||
]
|
||||
for bigLeakName in bigLeakers:
|
||||
if bigLeakName in data["objects"]:
|
||||
message = "leakcheck large %s | %s" % (bigLeakName, data["scope"])
|
||||
break
|
||||
|
||||
# Create a comma delimited string of the first N leaked objects found,
|
||||
# to aid with bug summary matching in TBPL. Note: The order of the objects
|
||||
# had no significance (they're sorted alphabetically).
|
||||
max_objects = 5
|
||||
object_summary = ", ".join(data["objects"][:max_objects])
|
||||
if len(data["objects"]) > max_objects:
|
||||
object_summary += ", ..."
|
||||
if message == "":
|
||||
max_objects = 5
|
||||
object_summary = ", ".join(data["objects"][:max_objects])
|
||||
if len(data["objects"]) > max_objects:
|
||||
object_summary += ", ..."
|
||||
|
||||
message = "leakcheck | %s %d bytes leaked (%s)\n" % (
|
||||
data["process"],
|
||||
data["bytes"],
|
||||
object_summary,
|
||||
)
|
||||
message = "leakcheck | %s %d bytes leaked (%s)\n" % (
|
||||
data["process"],
|
||||
data["bytes"],
|
||||
object_summary,
|
||||
)
|
||||
|
||||
# data["bytes"] will include any expected leaks, so it can be off
|
||||
# by a few thousand bytes.
|
||||
|
Loading…
x
Reference in New Issue
Block a user