Closed Bug 983692 Opened 12 years ago Closed 11 years ago

PJS: Rewrite testing mechanism to use magic globals rather than magic parameters

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: nmatsakis, Unassigned)

References

Details

Attachments

(1 obsolete file)

To make reproducible tests, we need to be able to run things like `mapPar` in distinct modes (force parallel, etc). Unfortunately, the mechanism we used for this was to pass an extra argument. This means it's available to end users, which is bad. I think the right mechanism, though it's a bit hacky, is to have some global variable in ForkJoin.cpp (or in the context, maybe) storing the current mode, and expose some functions in TestingFunctions.cpp for modifying this value. This way we can be sure that in production firefox the mode is never changed. It also avoids us having to figure out how to thread mode arguments everywhere and makes writing the tests more reliable (if you neglect to thread the mode, the various helpers like `assertParallelExecSucceeds` don't work).
Note: we might also want to disable work stealing in some exec modes. In particular, it can hide bugs if one thread (e.g., the main thread) steals all the work.
(And has actively done so already, though I can't be bothered to fish up the bug # right now)
Attached patch Bug983686.diff (obsolete) — Splinter Review
This seems to work via manual inspection.
Attachment #8391278 - Flags: review?(shu)
Comment on attachment 8391278 [details] [diff] [review] Bug983686.diff Attached to wrong bug :)
Attachment #8391278 - Attachment is obsolete: true
Attachment #8391278 - Flags: review?(shu)
Blocks: PJS
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: