WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
123629
OSR exit profiling should be robust against all code being cleared
https://bugs.webkit.org/show_bug.cgi?id=123629
Summary
OSR exit profiling should be robust against all code being cleared
Filip Pizlo
Reported
2013-11-01 12:44:23 PDT
Patch forthcoming. <
rdar://problem/15365476
>
Attachments
the patch
(9.23 KB, patch)
2013-11-01 12:47 PDT
,
Filip Pizlo
msaboff
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2013-11-01 12:47:14 PDT
Created
attachment 215750
[details]
the patch
Nadav Rotem
Comment 2
2013-11-01 13:10:32 PDT
What do these functions do ? CodeBlock* baselineAlternative(); CodeBlock* baselineVersion();
Filip Pizlo
Comment 3
2013-11-01 13:24:12 PDT
(In reply to
comment #2
)
> What do these functions do ? >
CodeBlock is an object that represents one compilation of a piece of code. Each piece of code that we load is represented by a ScriptExecutable, and that may have zero or more CodeBlocks. Zero CodeBlocks if the code hasn't even been parsed yet (we parse everything lazily - as late as at the time of first invocation for functions), one CodeBlock if we're just running baseline code (interpreting or baseline JIT), two CodeBlocks in the DFG case or in the FTL case but without OSR entry, or three Codeblocks in the FTL case if we have: 1) the FTL CodeBlock 2) the baseline Codeblock that we would exit to 3) the special FTL-for-OSR-entry CodeBlock for entering through some loop pre-header
> CodeBlock* baselineAlternative();
Given a CodeBlock, this returns the baseline version of the CodeBlock. In the FTL example above, each of the three CodeBlocks will return (2).
> > CodeBlock* baselineVersion();
Short version: we need to remove this but I don't want to do it in this patch. Long version: This is basically CodeBlock::replacement()->baselineAlternative(). replacement() returns the CodeBlock that the owning ScriptExecutable claims should be used for entry on future function calls to that code. This will return the same thing as baselineAlternative() except if we have deleted all code (this happens under memory pressure, for example - or when enabling the debugger), in which case baselineVersion() may return a newer CodeBlock. For example you may have A->baselineVersion() where A is from before when we deleted all code, in which case this may return a newer CodeBlock B, which is from after when we deleted all code.
Nadav Rotem
Comment 4
2013-11-01 14:52:36 PDT
Okay. I will add a comment after this patch goes it.
Filip Pizlo
Comment 5
2013-11-01 15:09:21 PDT
Landed in
http://trac.webkit.org/changeset/158459
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug