зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1395540 - Part 4: Fix the DMD stacks. r=njn
This runs the DMD files through the DMD stack fixer so that we end up with usable stacks instead of just offsets into libxul. --HG-- extra : rebase_source : 486a9e0f97e9a0b5374784c8c5986449a7c12478
This commit is contained in:
Родитель
8ac1b58cf5
Коммит
4ee0f7aef5
|
@ -4,6 +4,7 @@
|
|||
|
||||
import fnmatch
|
||||
import glob
|
||||
import gzip
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
@ -116,11 +117,16 @@ class TestMemoryUsage(MarionetteTestCase):
|
|||
"""
|
||||
Handles moving DMD reports from the temp dir to our resultsDir.
|
||||
"""
|
||||
from dmd import fixStackTraces
|
||||
|
||||
# Move DMD files from temp dir to resultsDir.
|
||||
tmpdir = tempfile.gettempdir()
|
||||
tmp_files = os.listdir(tmpdir)
|
||||
for f in fnmatch.filter(tmp_files, "dmd-*.json.gz"):
|
||||
f = os.path.join(tmpdir, f)
|
||||
self.logger.info("Fixing stacks for %s, this may take a while" % f)
|
||||
isZipped = True
|
||||
fixStackTraces(f, isZipped, gzip.open)
|
||||
shutil.move(f, self._resultsDir)
|
||||
|
||||
# Also attempt to cleanup the unified memory reports.
|
||||
|
|
|
@ -171,6 +171,10 @@ class MachCommands(MachCommandBase):
|
|||
for k, v in env_vars[arch].iteritems():
|
||||
os.environ[k] = v
|
||||
|
||||
# Also add the bin dir to the python path so we can use dmd.py
|
||||
if bin_dir not in sys.path:
|
||||
sys.path.append(bin_dir)
|
||||
|
||||
for k, v in kwargs.iteritems():
|
||||
setattr(args, k, v)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче