WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
155741
We should not disable inlining when the debugger is enabled
https://bugs.webkit.org/show_bug.cgi?id=155741
Summary
We should not disable inlining when the debugger is enabled
Saam Barati
Reported
2016-03-21 18:02:50 PDT
...
Attachments
WIP
(6.20 KB, patch)
2016-03-22 12:20 PDT
,
Saam Barati
no flags
Details
Formatted Diff
Diff
patch
(14.55 KB, patch)
2016-03-22 19:40 PDT
,
Saam Barati
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2016-03-22 12:20:50 PDT
Created
attachment 274674
[details]
WIP We probably need to do something similar for stepping mode.
Saam Barati
Comment 2
2016-03-22 12:40:14 PDT
(In reply to
comment #1
)
> Created
attachment 274674
[details]
> WIP > > We probably need to do something similar for stepping mode.
Actually I don't think we do. Setting the SteppingMode seems to target all code blocks and jettison all optimized code blocks.
Saam Barati
Comment 3
2016-03-22 19:40:48 PDT
Created
attachment 274723
[details]
patch
WebKit Commit Bot
Comment 4
2016-03-23 02:15:45 PDT
Comment on
attachment 274723
[details]
patch Clearing flags on attachment: 274723 Committed
r198582
: <
http://trac.webkit.org/changeset/198582
>
WebKit Commit Bot
Comment 5
2016-03-23 02:15:49 PDT
All reviewed patches have been landed. Closing bug.
Geoffrey Garen
Comment 6
2016-03-23 10:29:41 PDT
Comment on
attachment 274723
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274723&action=review
> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:-451 > - else if (m_hasDebuggerEnabled && operand == m_codeBlock->scopeRegister()) > - flush(operand);
I think we still need to flush the scope register. If A calls B, and both A and B are DFG-compiled, and B is not inlined, and I break in B, the debugger allows me to walk the stack and inspect A's local variables. But if the scope register is not flushed, I might crash when I try to inspect A, reading a garbage scope pointer from the stack.
Joseph Pecoraro
Comment 7
2016-03-23 10:55:07 PDT
Comment on
attachment 274723
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274723&action=review
> Source/JavaScriptCore/debugger/Debugger.cpp:268 > + line += 1; > + column = column ? column + 1 : Breakpoint::unspecifiedColumn;
Would be nice to comment why these +1. It used to have a comment.
> Source/JavaScriptCore/debugger/Debugger.cpp:-266 > - // Inspector breakpoint line and column values are zero-based but the executable > - // and CodeBlock line and column values are one-based.
This was the comment it used ot have.
Saam Barati
Comment 8
2016-03-23 13:02:01 PDT
(In reply to
comment #6
)
> Comment on
attachment 274723
[details]
> patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=274723&action=review
> > > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:-451 > > - else if (m_hasDebuggerEnabled && operand == m_codeBlock->scopeRegister()) > > - flush(operand); > > I think we still need to flush the scope register. > > If A calls B, and both A and B are DFG-compiled, and B is not inlined, and I > break in B, the debugger allows me to walk the stack and inspect A's local > variables. But if the scope register is not flushed, I might crash when I > try to inspect A, reading a garbage scope pointer from the stack.
Good call. I will bring these changes back.
Saam Barati
Comment 9
2016-03-23 13:05:45 PDT
(In reply to
comment #7
)
> Comment on
attachment 274723
[details]
> patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=274723&action=review
> > > Source/JavaScriptCore/debugger/Debugger.cpp:268 > > + line += 1; > > + column = column ? column + 1 : Breakpoint::unspecifiedColumn; > > Would be nice to comment why these +1. It used to have a comment. > > > Source/JavaScriptCore/debugger/Debugger.cpp:-266 > > - // Inspector breakpoint line and column values are zero-based but the executable > > - // and CodeBlock line and column values are one-based. > > This was the comment it used ot have.
Nice catch. I'll add those back.
WebKit Commit Bot
Comment 10
2016-03-23 15:29:03 PDT
Re-opened since this is blocked by
bug 155812
Saam Barati
Comment 11
2016-03-23 16:23:22 PDT
Lets start by having a high fidelity profiling mode first. Then we can revisit this again.
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