RESOLVED FIXED Bug 115052
Simplify baseline JIT loop hint slow path
https://bugs.webkit.org/show_bug.cgi?id=115052
Summary Simplify baseline JIT loop hint slow path
Mark Lam
Reported 2013-04-23 12:31:28 PDT
Currently, the baseline JIT loop hint slow path ensures that the JIT optimization counters will be incremented if the watchdog timer fires but does not result in termination. This costs us the space of a few instructions per loop hint site, but does not buy us much. We can simplify the code by assuming that the watchdog timer firing will be mutually exclusive with the JIT needing to OSR exit and optimizing the function. In practice, this is almost always true. In the event that the watchdog timer fires at the same time the JIT needs to OSR exit, we can defer servicing the watchdog until the next pass. The timing of the watchdog is not exact anyway. It is fine to hold off servicing the watchdog timer as long as it’s not indefinitely (which is not a problem here). Credit for this observation goes to Geoff Garen. Patch coming soon.
Attachments
benchmark result: run 1: DFG disabled, watchdog enabled (22.69 KB, text/plain)
2013-04-23 12:36 PDT, Mark Lam
no flags
benchmark result: run 2: DFG disabled, watchdog enabled (22.76 KB, text/plain)
2013-04-23 12:37 PDT, Mark Lam
no flags
benchmark result: run 1: DFG disabled, watchdog disabled (22.75 KB, text/plain)
2013-04-23 12:38 PDT, Mark Lam
no flags
benchmark result: run 2: DFG disabled, watchdog disabled (22.42 KB, text/plain)
2013-04-23 12:39 PDT, Mark Lam
no flags
the fix (4.15 KB, patch)
2013-04-23 13:00 PDT, Mark Lam
ggaren: review+
Mark Lam
Comment 1 2013-04-23 12:36:57 PDT
Created attachment 199315 [details] benchmark result: run 1: DFG disabled, watchdog enabled
Mark Lam
Comment 2 2013-04-23 12:37:39 PDT
Created attachment 199316 [details] benchmark result: run 2: DFG disabled, watchdog enabled
Mark Lam
Comment 3 2013-04-23 12:38:21 PDT
Created attachment 199317 [details] benchmark result: run 1: DFG disabled, watchdog disabled
Mark Lam
Comment 4 2013-04-23 12:39:03 PDT
Created attachment 199318 [details] benchmark result: run 2: DFG disabled, watchdog disabled
Mark Lam
Comment 5 2013-04-23 13:00:45 PDT
Created attachment 199319 [details] the fix With the watchdog disable, the performance is unaffected. With the watchdog enabled, the performance is most unaffected except for Kraken which seemed to be trending slightly slower.
Geoffrey Garen
Comment 6 2013-04-23 13:37:01 PDT
Comment on attachment 199319 [details] the fix r=me
Mark Lam
Comment 7 2013-04-23 13:54:07 PDT
Thanks for the review. Landed in r148989: <http://trac.webkit.org/changeset/148989>.
Note You need to log in before you can comment on or make changes to this bug.