[webkit-dev] Baseline JIT, DFG JIT on separate thread
Filip Pizlo
fpizlo at apple.com
Wed Jun 26 08:28:30 PDT 2013
On Jun 26, 2013, at 7:36 AM, Gabor Rapcsanyi <rgabor at inf.u-szeged.hu> wrote:
> Hello!
>
> As I saw the DFG optimization and compilation are running on the main thread in JSC. I'm wondering if there is any known technical issue which block the parallelization of this?
This is damn hard. In ToT, the DFG JIT queries profiling data and byte code as it is being mutated by the main thread. It also queries the heap. And allocates in the heap. And allocates StringImpl's and passes them around and free's them; those same StringImpl's may be used by the program. Those aren't thread-safe ref-counted.
> I would like to investigate this area if there is no strong objections to put these to separate thread.
> Any comments or ideas would be appreciated.
But I already implemented it. See the dfgFourthTier branch, and this bug: https://bugs.webkit.org/show_bug.cgi?id=112839. The last change needed for concurrent DFG JIT landed in http://trac.webkit.org/changeset/150465, though there was some bug-tail after that; I don't remember the bugs or revisions. In the end it was a >8% speed-up on SunSpider with additional speed-ups on other compiler-heavy benchmarks. Obviously, it was neutral on long-running tests where start-up time isn't measured (V8, Octane, Kraken, etc).
Making the baseline JIT concurrent should be easier, but also less profitable, since the baseline JIT is really fast. I don't have plans to do that. Also, though it'll be easier than the concurrent DFG, it still won't be obvious; the baseline JIT also does evil things to profiling and the heap.
We're planning on merging the dfgFourthTier branch back once the FTL work (https://bugs.webkit.org/show_bug.cgi?id=112840) stabilizes a bit more, and once it looks like the worst of the concurrent JIT bug-tail is over. We're not there yet but will be, maybe in the next month.
-Filip
>
> Regards,
> Gabor Rapcsanyi
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
More information about the webkit-dev
mailing list