Multi-threaded background compiler and policy (cleaned up)

VERIFIED WONTFIX

Status

P2
enhancement
VERIFIED WONTFIX
9 years ago
8 years ago

People

(Reporter: siwilkin, Unassigned)

Tracking

unspecified
Q3 11 - Serrano
Dependency tree / graph
Bug Flags:
flashplayer-qrb +

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: 

This patch is a super-cleaned-up version of the background compilation work.
It is, however, against a version of the vm with the old verifier semantics (before was 413522 applied).

Essentially it combines the Scanner/DiarizingVerifier (bug 540487), PostVerfiyCompiler (bug 545094) and VMThread (bug 555765) functionality into a framework for, and implementation of, multi-threaded background compilation.

When the vm is built with AVMFEATURE_BACKGROUND_COMPILATION enabled, the old entry-point on first invocation of an AS method (MethodInfo::verify()) is re-routed to a per-AvmCore CompilationManager. The following compilation/execution modes are then supported:

- Just-in-time verify then interpret (The old RM_interp_all mode)
- Just-in-time verify with pipelined compilation (The old RM_jit_all mode)
- Just-in-time verify with pipelined compilation, only interpret $init/clinit (The old RM_mixed mode)
- Just-in-time verify then interpret, plus immediate background compilation scheduled across N compiler threads.
- Just-in-time verify then interpret, plus deferred/hot-spotted background compilation scheduled across N compiler threads.

Note:

- InvokerCompilers run on the application thread, but can proceed concurrently with the compiler threads.
- The old style of pipelined verify/jit can be invoked concurrently with compiler threads (if, for example, we needed to back-out of pinning lots of GCObjects that we might need to perform a background compile).
- With a tiny bit of work, deferred compilation on the application thread will be possible.
- The new CompilationPolicy hierarchy included with this patch is intended to eventually subsume the current ad-hoc mechanisms. I'll add the options from Rick's JITPolicyMgr patch (528375) asap.

Build flags:

AVMFEATURE_SCANNER - Pre-req of AVMFEATURE_BACKGROUND_COMPILATION. If this is enabled without AVMFEATURE_BACKGROUND_COMPILATION then the old compilation framework is used, but with the Scanner-based verifier implementation used by background compilation.
AVMFEATURE_BACKGROUND_COMPILATION - enables new the CompilationManager.

Command line flags added:

[-bc_type=[serialjit | deferred | background]]
serialjit  - perform all compilation just-in-time on the application thread.
deferred   - DISABLED! perform all compilation as deferred on the application thread.
background - perform all compilation on background threads.
The default is 'background'.

[-bc_threads N]  use N compilation threads. The default is N=1.

[-bc_hotcount N] a method must be invoked N times to be compiled; for either deferred or background compilation. Use a value of zero for immediate scheduling of background compilation. The default is N=1.

[-bc_verbose] enable verbose output from the background compilation system. (AVMPLUS_VERBOSE builds only).

Reproducible: Always
(Reporter)

Updated

9 years ago
Blocks: 538185
Depends on: 545094, 555765
(Reporter)

Comment 1

9 years ago
Created attachment 436822 [details] [diff] [review]
Initial patch (against bug 545094)

Updated

9 years ago
Flags: flashplayer-qrb+
Priority: -- → P2
Target Milestone: --- → flash10.2
(Reporter)

Updated

9 years ago
Depends on: 563119

Updated

9 years ago
Component: Virtual Machine → JIT Compiler (NanoJIT)
(Reporter)

Updated

8 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
(Reporter)

Comment 2

8 years ago
Superseded by bug 600723

Comment 3

8 years ago
bulk verifying resolved !fixed issues
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.