зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 9 changesets (bug 1597005) for SM bustages on autospider.py . CLOSED TREE
Backed out changeset eb0d6b29ae1d (bug 1597005) Backed out changeset 48267c5a8d23 (bug 1597005) Backed out changeset 159a37cef898 (bug 1597005) Backed out changeset e050ede804bb (bug 1597005) Backed out changeset 1e511ad72b2d (bug 1597005) Backed out changeset 1cd0d40914b6 (bug 1597005) Backed out changeset 89dd6ea71d80 (bug 1597005) Backed out changeset 7dac8fdaeada (bug 1597005) Backed out changeset 124766c078e2 (bug 1597005)
This commit is contained in:
Родитель
e59d6a3d4e
Коммит
ce00124553
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
@ -110,7 +110,6 @@ OUTDIR = os.path.join(OBJDIR, "out")
|
|||
POBJDIR = posixpath.join(PDIR.source, args.objdir)
|
||||
MAKE = env.get('MAKE', 'make')
|
||||
MAKEFLAGS = env.get('MAKEFLAGS', '-j6' + ('' if AUTOMATION else ' -s'))
|
||||
PYTHON = sys.executable
|
||||
|
||||
for d in ('scripts', 'js_src', 'source', 'tooltool', 'fetches'):
|
||||
info("DIR.{name} = {dir}".format(name=d, dir=getattr(DIR, d)))
|
||||
|
@ -346,7 +345,7 @@ REPLACEMENTS = {
|
|||
# Add in environment variable settings for this variant. Normally used to
|
||||
# modify the flags passed to the shell or to set the GC zeal mode.
|
||||
for k, v in variant.get('env', {}).items():
|
||||
env[k] = v.format(**REPLACEMENTS)
|
||||
env[k.encode('ascii')] = v.encode('ascii').format(**REPLACEMENTS)
|
||||
|
||||
if AUTOMATION:
|
||||
# Currently only supported on linux64.
|
||||
|
@ -435,16 +434,12 @@ def run_test_command(command, **kwargs):
|
|||
return status
|
||||
|
||||
|
||||
default_test_suites = frozenset(['jstests', 'jittest', 'jsapitests', 'checks'])
|
||||
nondefault_test_suites = frozenset(['gdb'])
|
||||
all_test_suites = default_test_suites | nondefault_test_suites
|
||||
|
||||
test_suites = set(default_test_suites)
|
||||
test_suites = set(['jstests', 'jittest', 'jsapitests', 'checks'])
|
||||
|
||||
|
||||
def normalize_tests(tests):
|
||||
if 'all' in tests:
|
||||
return default_test_suites
|
||||
return test_suites
|
||||
return tests
|
||||
|
||||
|
||||
|
@ -514,11 +509,6 @@ if 'jsapitests' in test_suites:
|
|||
results.append(st)
|
||||
if 'jstests' in test_suites:
|
||||
results.append(run_test_command([MAKE, 'check-jstests']))
|
||||
if 'gdb' in test_suites:
|
||||
test_script = os.path.join(DIR.js_src, "gdb", "run-tests.py")
|
||||
auto_args = ["-s", "-o", "--no-progress"] if AUTOMATION else []
|
||||
extra_args = env.get('GDBTEST_EXTRA_ARGS', '').split(' ')
|
||||
results.append(run_test_command([PYTHON, test_script, *auto_args, *extra_args, OBJDIR]))
|
||||
|
||||
# FIXME bug 1291449: This would be unnecessary if we could run msan with -mllvm
|
||||
# -msan-keep-going, but in clang 3.8 it causes a hang during compilation.
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"configure-args": "--enable-rust-simd",
|
||||
"debug": true,
|
||||
"optimize": false,
|
||||
"skip-tests": {
|
||||
"all": ["jstests", "jittest", "jsapitests"]
|
||||
},
|
||||
"extra-tests": {
|
||||
"all": ["gdb"]
|
||||
},
|
||||
"env": {
|
||||
"GDBTEST_EXTRA_ARGS": "--exclude=unwind"
|
||||
},
|
||||
"use_minidump": false
|
||||
}
|
|
@ -17,7 +17,6 @@ SOURCES += [
|
|||
|
||||
UNIFIED_SOURCES += [
|
||||
'tests/test-asmjs.cpp',
|
||||
'tests/test-ExecutableAllocator.cpp',
|
||||
'tests/test-GCCellPtr.cpp',
|
||||
'tests/test-Interpreter.cpp',
|
||||
'tests/test-jsid.cpp',
|
||||
|
@ -25,19 +24,12 @@ UNIFIED_SOURCES += [
|
|||
'tests/test-JSString.cpp',
|
||||
'tests/test-JSSymbol.cpp',
|
||||
'tests/test-jsval.cpp',
|
||||
'tests/test-prettyprinters.cpp',
|
||||
'tests/test-Root.cpp',
|
||||
'tests/test-unwind.cpp',
|
||||
'tests/typedef-printers.cpp',
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
'tests/test-prettyprinters.cpp'
|
||||
]
|
||||
|
||||
# Test expects to see pre-typedef names of base classes, but the compiler will
|
||||
# normally omit those from the debuginfo.
|
||||
SOURCES['tests/test-prettyprinters.cpp'].flags += ['-fno-eliminate-unused-debug-types']
|
||||
|
||||
DEFINES['EXPORT_JS_API'] = True
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
"""
|
||||
All jitted code is allocated via the ExecutableAllocator class. Make GDB aware
|
||||
of them, such that we can query for pages which are containing code which are
|
||||
allocated by the Jits.
|
||||
"""
|
||||
|
||||
import gdb
|
||||
import mozilla.prettyprinters
|
||||
from mozilla.prettyprinters import pretty_printer, ptr_pretty_printer
|
||||
|
||||
# Forget any printers from previous loads of this module.
|
||||
mozilla.prettyprinters.clear_module_printers(__name__)
|
||||
|
||||
# Cache information about the JSString type for this objfile.
|
||||
|
||||
class jsjitExecutableAllocatorCache(object):
|
||||
def __init__(self):
|
||||
self.d = None
|
||||
|
||||
def __getattr__(self, name):
|
||||
if self.d is None:
|
||||
self.initialize()
|
||||
return self.d[name]
|
||||
|
||||
def initialize(self):
|
||||
self.d = {}
|
||||
self.d['ExecutableAllocator'] = gdb.lookup_type('js::jit::ExecutableAllocator')
|
||||
self.d['ExecutablePool'] = gdb.lookup_type('js::jit::ExecutablePool')
|
||||
self.d['HashNumber'] = gdb.lookup_type('mozilla::HashNumber')
|
||||
|
||||
|
||||
@pretty_printer("js::jit::ExecutableAllocator")
|
||||
class jsjitExecutableAllocator(object):
|
||||
def __init__(self, value, cache):
|
||||
if not cache.mod_ExecutableAllocator:
|
||||
cache.mod_ExecutableAllocator = jsjitExecutableAllocatorCache()
|
||||
self.value = value
|
||||
self.cache = cache.mod_ExecutableAllocator
|
||||
|
||||
def to_string(self):
|
||||
return "ExecutableAllocator([%s])" % ', '.join([str(x) for x in self])
|
||||
|
||||
def __iter__(self):
|
||||
return self.PoolIterator(self)
|
||||
|
||||
class PoolIterator(object):
|
||||
def __init__(self, allocator):
|
||||
self.allocator = allocator
|
||||
self.entryType = allocator.cache.ExecutablePool.pointer()
|
||||
self.hashNumType = allocator.cache.HashNumber
|
||||
# Emulate the HashSet::Range
|
||||
self.table = allocator.value['m_pools']['mImpl']['mTable']
|
||||
self.index = 0
|
||||
kHashNumberBits = 32
|
||||
hashShift = allocator.value['m_pools']['mImpl']['mHashShift']
|
||||
self.capacity = 1 << (kHashNumberBits - hashShift)
|
||||
if self.table == 0:
|
||||
self.capacity = 0
|
||||
# auto hashes = reinterpret_cast<HashNumber*>(mTable);
|
||||
self.hashes = self.table.cast(self.hashNumType.pointer())
|
||||
# auto entries = reinterpret_cast<Entry*>(&hashes[capacity()]);
|
||||
self.entries = (self.hashes + self.capacity).cast(self.entryType.pointer())
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def next(self):
|
||||
return self.__next__()
|
||||
|
||||
def __next__(self):
|
||||
cur = self.index
|
||||
if cur >= self.capacity:
|
||||
raise StopIteration()
|
||||
self.index = self.index + 1
|
||||
if self.hashes[cur] > 1: # table[i]->isLive()
|
||||
return self.entries[cur]
|
||||
return self.__next__()
|
||||
|
||||
|
||||
@ptr_pretty_printer("js::jit::ExecutablePool")
|
||||
class jsjitExecutablePool(mozilla.prettyprinters.Pointer):
|
||||
def __init__(self, value, cache):
|
||||
if not cache.mod_ExecutableAllocator:
|
||||
cache.mod_ExecutableAllocator = jsjitExecutableAllocatorCache()
|
||||
self.value = value
|
||||
self.cache = cache.mod_ExecutableAllocator
|
||||
|
||||
def to_string(self):
|
||||
pages = self.value['m_allocation']['pages']
|
||||
size = self.value['m_allocation']['size']
|
||||
return "ExecutablePool %08x-%08x" % (pages, pages + size)
|
|
@ -84,7 +84,7 @@ class JSStringPtr(Common):
|
|||
yield chars[i]
|
||||
|
||||
def to_string(self, maxlen=200):
|
||||
s = ''
|
||||
s = u''
|
||||
invalid_chars_allowed = 2
|
||||
for c in self.chars():
|
||||
if len(s) >= maxlen:
|
||||
|
|
|
@ -13,7 +13,6 @@ import mozilla.prettyprinters
|
|||
# Import the pretty-printer modules. As a side effect, loading these
|
||||
# modules registers their printers with mozilla.prettyprinters.
|
||||
import mozilla.GCCellPtr
|
||||
import mozilla.ExecutableAllocator
|
||||
import mozilla.Interpreter
|
||||
import mozilla.IonGraph
|
||||
import mozilla.JSObject
|
||||
|
|
|
@ -78,7 +78,3 @@ def HandleJSID(value, cache):
|
|||
@pretty_printer('JS::MutableHandle<long>')
|
||||
def MutableHandleJSID(value, cache):
|
||||
return mozilla.Root.MutableHandle(value, cache, jsid)
|
||||
|
||||
@pretty_printer('JS::PropertyKey')
|
||||
def PropertyKey(value, cache):
|
||||
return mozilla.jsid.jsid(value, cache)
|
||||
|
|
|
@ -238,18 +238,7 @@ def build_test_exec(builddir):
|
|||
|
||||
|
||||
def run_tests(tests, summary):
|
||||
jobs = OPTIONS.workercount
|
||||
# python 3.3 fixed a bug with concurrently writing .pyc files.
|
||||
# https://bugs.python.org/issue13146
|
||||
embedded_version = subprocess.check_output([
|
||||
OPTIONS.gdb_executable,
|
||||
'--batch',
|
||||
'--ex', 'python import sys; print(sys.hexversion)'
|
||||
]).decode('ascii').strip()
|
||||
if hex(int(embedded_version)) < '0x3030000':
|
||||
jobs = 1
|
||||
|
||||
pool = TaskPool(tests, job_limit=jobs, timeout=OPTIONS.timeout)
|
||||
pool = TaskPool(tests, job_limit=OPTIONS.workercount, timeout=OPTIONS.timeout)
|
||||
pool.run_all()
|
||||
|
||||
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
#include "gdb-tests.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
#include "jit/ExecutableAllocator.h"
|
||||
#include "vm/JSContext.h"
|
||||
|
||||
FRAGMENT(ExecutableAllocator, empty) {
|
||||
using namespace js::jit;
|
||||
ExecutableAllocator execAlloc;
|
||||
|
||||
breakpoint();
|
||||
|
||||
use(execAlloc);
|
||||
}
|
||||
|
||||
FRAGMENT(ExecutableAllocator, onepool) {
|
||||
using namespace js::jit;
|
||||
ExecutablePool* pool = nullptr;
|
||||
ExecutableAllocator execAlloc;
|
||||
execAlloc.alloc(cx, 16 * 1024, &pool, CodeKind::Baseline);
|
||||
|
||||
breakpoint();
|
||||
|
||||
use(pool);
|
||||
use(execAlloc);
|
||||
}
|
||||
|
||||
FRAGMENT(ExecutableAllocator, twopools) {
|
||||
using namespace js::jit;
|
||||
const size_t INIT_ALLOC_SIZE = 16 * 1024;
|
||||
const size_t ALLOC_SIZE = 32 * 1024;
|
||||
ExecutablePool* init = nullptr;
|
||||
ExecutablePool* pool = nullptr;
|
||||
ExecutableAllocator execAlloc;
|
||||
size_t allocated = 0;
|
||||
|
||||
execAlloc.alloc(cx, INIT_ALLOC_SIZE, &init, CodeKind::Baseline);
|
||||
|
||||
do { // Keep allocating until we get a second pool.
|
||||
execAlloc.alloc(cx, ALLOC_SIZE, &pool, CodeKind::Ion);
|
||||
allocated += ALLOC_SIZE;
|
||||
} while (pool == init);
|
||||
|
||||
breakpoint();
|
||||
|
||||
use(execAlloc);
|
||||
init->release(INIT_ALLOC_SIZE, CodeKind::Baseline);
|
||||
init->release(allocated - ALLOC_SIZE, CodeKind::Ion);
|
||||
pool->release(ALLOC_SIZE, CodeKind::Ion);
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
# Tests for ExecutableAllocator pretty-printing
|
||||
# Ignore flake8 errors "undefined name 'assert_regexp_pretty'"
|
||||
# As it caused by the way we instanciate this file
|
||||
# flake8: noqa: F821
|
||||
|
||||
assert_subprinter_registered('SpiderMonkey', 'JS::GCCellPtr')
|
||||
|
||||
run_fragment('ExecutableAllocator.empty')
|
||||
|
||||
assert_pretty('execAlloc', 'ExecutableAllocator([])')
|
||||
|
||||
run_fragment('ExecutableAllocator.onepool')
|
||||
|
||||
reExecPool = 'ExecutablePool [a-f0-9]{8,}-[a-f0-9]{8,}'
|
||||
assert_regexp_pretty('pool', reExecPool)
|
||||
assert_regexp_pretty('execAlloc', 'ExecutableAllocator\(\[' + reExecPool + '\]\)')
|
||||
|
||||
run_fragment('ExecutableAllocator.twopools')
|
||||
|
||||
assert_regexp_pretty(
|
||||
'execAlloc', 'ExecutableAllocator\(\[' + reExecPool + ', ' + reExecPool + '\]\)')
|
|
@ -4,4 +4,4 @@
|
|||
|
||||
run_fragment('JSString.subclasses')
|
||||
|
||||
assert_pretty('linear', '"Hi!"')
|
||||
assert_pretty('flat', '"Hi!"')
|
||||
|
|
|
@ -20,20 +20,8 @@ assert_eq(implemented_type_names('c'), ['C'])
|
|||
assert_eq(implemented_type_names('c_'), ['C_', 'C'])
|
||||
assert_eq(implemented_type_names('e'), ['E', 'C', 'D'])
|
||||
assert_eq(implemented_type_names('e_'), ['E_', 'E', 'C', 'D'])
|
||||
|
||||
# Some compilers strip trivial typedefs in the debuginfo from classes' base
|
||||
# classes. Sometimes this can be fixed with -fno-eliminate-unused-debug-types,
|
||||
# but not always. Allow this test to pass if the typedefs are stripped.
|
||||
#
|
||||
# It would probably be better to figure out how to make the compiler emit them,
|
||||
# since I think this test is here for a reason.
|
||||
if gdb.lookup_type('F').fields()[0].name == 'C_':
|
||||
# We have the typedef info.
|
||||
assert_eq(implemented_type_names('f'), ['F', 'C_', 'D_', 'C', 'D'])
|
||||
assert_eq(implemented_type_names('h'), ['H', 'F', 'G', 'C_', 'D_', 'C', 'D'])
|
||||
else:
|
||||
assert_eq(implemented_type_names('f'), ['F', 'C', 'D'])
|
||||
assert_eq(implemented_type_names('h'), ['H', 'F', 'G', 'C', 'D'])
|
||||
assert_eq(implemented_type_names('f'), ['F', 'C_', 'D_', 'C', 'D'])
|
||||
assert_eq(implemented_type_names('h'), ['H', 'F', 'G', 'C_', 'D_', 'C', 'D'])
|
||||
|
||||
# Check that our pretty-printers aren't interfering with printing other types.
|
||||
assert_pretty('10', '10')
|
||||
|
|
|
@ -70,11 +70,7 @@ void zydisDisassemble(const uint8_t* code, size_t codeLen,
|
|||
|
||||
// Pad out to the limit if necessary
|
||||
if (strlen(buffer) < LIMIT) {
|
||||
// gcc with -O0 will incorrectly warn here.
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-overflow"
|
||||
sprintf(buffer+strlen(buffer), "%*s", int(LIMIT-strlen(buffer)), "");
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
// If too long then flush and provide an appropriate indent
|
||||
|
@ -96,3 +92,4 @@ void zydisDisassemble(const uint8_t* code, size_t codeLen,
|
|||
# undef LIMSTR
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,13 +178,3 @@ sm-fuzzing-linux64/opt:
|
|||
symbol: SM(f)
|
||||
run:
|
||||
spidermonkey-variant: fuzzing
|
||||
|
||||
sm-gdb-linux64/debug:
|
||||
description: "Spidermonkey GDB Pretty-printers"
|
||||
index:
|
||||
job-name: sm-gdb-linux64
|
||||
treeherder:
|
||||
platform: linux64/debug
|
||||
symbol: SM(gdb)
|
||||
run:
|
||||
spidermonkey-variant: gdb
|
||||
|
|
|
@ -54,7 +54,6 @@ RUN apt-get update && \
|
|||
file \
|
||||
gawk \
|
||||
gcc-multilib \
|
||||
gdb \
|
||||
gnupg \
|
||||
jq \
|
||||
libucl1 \
|
||||
|
|
|
@ -17,7 +17,7 @@ pushd $PACKAGE_DIR
|
|||
|
||||
tar -xjvf $UPLOAD_DIR/mozjs-*.tar.bz2
|
||||
|
||||
: ${PYTHON3:=python3}
|
||||
: ${PYTHON:=python2.7}
|
||||
|
||||
# Build the freshly extracted, packaged SpiderMonkey.
|
||||
pushd ./mozjs-*/js/src
|
||||
|
@ -26,7 +26,7 @@ pushd ./mozjs-*/js/src
|
|||
# packaged builds. Unset it.
|
||||
unset MOZ_AUTOMATION
|
||||
|
||||
AUTOMATION=1 $PYTHON3 ./devtools/automation/autospider.py --skip-tests=checks $SPIDERMONKEY_VARIANT
|
||||
AUTOMATION=1 $PYTHON ./devtools/automation/autospider.py --skip-tests=checks $SPIDERMONKEY_VARIANT
|
||||
popd
|
||||
|
||||
# Copy artifacts for upload by TaskCluster
|
||||
|
|
|
@ -4,11 +4,11 @@ set -x
|
|||
|
||||
source $(dirname $0)/sm-tooltool-config.sh
|
||||
|
||||
: ${PYTHON3:=python3}
|
||||
: ${PYTHON:=python2.7}
|
||||
|
||||
# Run the script
|
||||
export MOZ_UPLOAD_DIR="$(cd "$UPLOAD_DIR"; pwd)"
|
||||
AUTOMATION=1 $PYTHON3 $SRCDIR/js/src/devtools/automation/autospider.py ${SPIDERMONKEY_PLATFORM:+--platform=$SPIDERMONKEY_PLATFORM} $SPIDERMONKEY_VARIANT
|
||||
AUTOMATION=1 $PYTHON $SRCDIR/js/src/devtools/automation/autospider.py ${SPIDERMONKEY_PLATFORM:+--platform=$SPIDERMONKEY_PLATFORM} $SPIDERMONKEY_VARIANT
|
||||
BUILD_STATUS=$?
|
||||
|
||||
# Ensure upload dir exists
|
||||
|
|
Загрузка…
Ссылка в новой задаче