Clone shared-memory test functions in order to test inlining properly

RESOLVED FIXED in Firefox 40

Status

()

Core
JavaScript Engine: JIT
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: lth, Assigned: lth)

Tracking

(Blocks: 1 bug)

unspecified
mozilla40
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
The test cases in jit-test/tests/atomics/basic-tests.js call test functions on a variety of shared array types.  This plethora of type information confuses the JIT's call optimizer during testing runs; as the tests are written now, only the Int8 primitives are inlined properly, the others are shunted to the interpreter.  The result is poor test coverage (for --ion-eager --ion-offthread-compile=off).

The most reliable fix here is to clone the test function for each type, and this is easily done.
(Assignee)

Updated

3 years ago
Component: JavaScript Engine → JavaScript Engine: JIT
(Assignee)

Comment 1

3 years ago
Created attachment 8592804 [details] [diff] [review]
Clone functions that are applied to different array types

Using function.toSource() and eval seemed expedient, but I'm happy to change that if there's a different canonical, reliable way to do this.
Attachment #8592804 - Flags: review?(jdemooij)
Comment on attachment 8592804 [details] [diff] [review]
Clone functions that are applied to different array types

Review of attachment 8592804 [details] [diff] [review]:
-----------------------------------------------------------------

Seems ok if it makes the test more useful.
Attachment #8592804 - Flags: review?(jdemooij) → review+
(Assignee)

Comment 5

3 years ago
Yeah, the cloned test cases show their value: more diverse jitted code is being generated, which means that a missing instruction in the ARM simulator (UXTH) is being hit, I have that fix in a later patch but I guess I'll move it :)
(Assignee)

Updated

3 years ago
Depends on: 1156386
(Assignee)

Comment 6

3 years ago
Try is green for this patch on top of bug 1156386, which implements UXTH:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ecb70a782d4f
https://hg.mozilla.org/mozilla-central/rev/1ff8096ab54b
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.