Currently we often end up optimizing code with incomplete value profiling coverage - as in, the typical predicted type will be based on only one recorded value. We're pretty good at making reasonable guesses even with incomplete information, but the fact that the code relies on this is kind of sad. It would be better if we could reliably get multiple recorded values. We can do this, if we LUB (least-upper-bound, or ValueProfile::computeUpdatedPrediction()) all value profiles a few times between when profiling starts and when OSR is triggered. One way to make that happen is to make the execution counter have some random value that is smaller than the required threshold for OSR. This will cause each function to take an OSR slow path without actually triggering optimization, which will in turn give us an opportunity to LUB all value profiles.
Created attachment 149162 [details] the patch
Attachment 149162 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1 Source/JavaScriptCore/runtime/JSGlobalObject.h:178: The parameter name "globalData" adds no information, so it should be removed. [readability/parameter_name] [5] Source/JavaScriptCore/runtime/JSGlobalObject.h:178: The parameter name "structure" adds no information, so it should be removed. [readability/parameter_name] [5] Source/JavaScriptCore/runtime/JSGlobalObject.h:178: The parameter name "globalObjectMethodTable" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 3 in 15 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 149162 [details] the patch Attachment 149162 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/13025585
Created attachment 149163 [details] the patch Fix style, attempt to fix Windows.
Comment on attachment 149163 [details] the patch Attachment 149163 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/13027636
Created attachment 149377 [details] patch for landing, hopefully Already reviewed by Gavin. Now I'm just trying to get Win to build.
Comment on attachment 149377 [details] patch for landing, hopefully Attachment 149377 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/13103207
Created attachment 149387 [details] moar fixes
Created attachment 149388 [details] and now, with a ChangeLog!
Landed in http://trac.webkit.org/changeset/121215
(In reply to comment #10) > Landed in http://trac.webkit.org/changeset/121215 The new test introduced in it fails on 32 bit platforms. (GTK, Qt) I filed a new bug report for it: https://bugs.webkit.org/show_bug.cgi?id=89953