WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
152193
Web Inspector: Separate Debugger enable state from the debugger breakpoints enabled state
https://bugs.webkit.org/show_bug.cgi?id=152193
Summary
Web Inspector: Separate Debugger enable state from the debugger breakpoints e...
Joseph Pecoraro
Reported
2015-12-11 15:42:17 PST
* SUMMARY Separate Debugger enable state from being attached. Currently JSC assumes if a JSC::Debugger is attached the debugger is enabled. We are using the JSC::Debugger to access more debugger properties and we may want a debugger to be attached but disabled.
Attachments
patch
(8.82 KB, patch)
2016-03-23 18:00 PDT
,
Saam Barati
joepeck
: review-
Details
Formatted Diff
Diff
patch
(12.43 KB, patch)
2016-03-24 14:03 PDT
,
Saam Barati
joepeck
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-12-11 15:42:34 PST
<
rdar://problem/23867520
>
Timothy Hatcher
Comment 2
2016-03-23 11:11:19 PDT
This might be less important after some recent changes Saam made to allow the page to inline and use the FTL JIT when the debugger is attached.
Saam Barati
Comment 3
2016-03-23 15:28:31 PDT
(In reply to
comment #2
)
> This might be less important after some recent changes Saam made to allow > the page to inline and use the FTL JIT when the debugger is attached.
I'm rolling out my inlining patch. I think this is still important. I'm going to start work on the JSC bits of this.
Saam Barati
Comment 4
2016-03-23 18:00:11 PDT
Created
attachment 274804
[details]
patch
Joseph Pecoraro
Comment 5
2016-03-23 18:08:15 PDT
Comment on
attachment 274804
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274804&action=review
Looks good to me from an inspector perspective.
> Source/JavaScriptCore/debugger/ScriptProfilingScope.h:58 > - if (!m_globalObject->hasDebugger()) > + if (!m_globalObject->hasInteractiveDebugger()) > return false;
This should just stay hasDebugger. The Sampling Profiler just needs globalObject->debugger(), it doesn't care if breakpoints are available or not.
> Source/JavaScriptCore/debugger/ScriptProfilingScope.h:77 > // Debugger may have been removed. > - if (!m_globalObject->hasDebugger()) > + if (!m_globalObject->hasInteractiveDebugger()) > return false;
Same here. I think as a result of doing this you can now remove the FIXMEs in LayoutTests/inspector/script-profiler tests. Namely things that look like: // FIXME: <
https://webkit.org/b/152193
> Web Inspector: Separate Debugger enable state from being attached // Debugger should not need to be enabled for profiling to work. InspectorProtocol.sendCommand("Debugger.enable", {});
Saam Barati
Comment 6
2016-03-23 20:49:49 PDT
Comment on
attachment 274804
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274804&action=review
>> Source/JavaScriptCore/debugger/ScriptProfilingScope.h:58 >> return false; > > This should just stay hasDebugger. The Sampling Profiler just needs globalObject->debugger(), it doesn't care if breakpoints are available or not.
Makes sense. I'll revert this.
Joseph Pecoraro
Comment 7
2016-03-23 22:56:55 PDT
Comment on
attachment 274804
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274804&action=review
>> Source/JavaScriptCore/debugger/ScriptProfilingScope.h:77 >> return false; > > Same here. > > I think as a result of doing this you can now remove the FIXMEs in LayoutTests/inspector/script-profiler tests. Namely things that look like: > > // FIXME: <
https://webkit.org/b/152193
> Web Inspector: Separate Debugger enable state from being attached > // Debugger should not need to be enabled for profiling to work. > InspectorProtocol.sendCommand("Debugger.enable", {});
r- to update these tests, because after all they reference this bugzilla bug! script-profiler/event-type-API.html 39: // FIXME: <
https://webkit.org/b/152193
> Web Inspector: Separate Debugger enable state from being attached script-profiler/event-type-Microtask.html 40: // FIXME: <
https://webkit.org/b/152193
> Web Inspector: Separate Debugger enable state from being attached script-profiler/event-type-Other.html 57: // FIXME: <
https://webkit.org/b/152193
> Web Inspector: Separate Debugger enable state from being attached
Saam Barati
Comment 8
2016-03-24 14:03:07 PDT
Created
attachment 274854
[details]
patch
Joseph Pecoraro
Comment 9
2016-03-24 14:21:51 PDT
Comment on
attachment 274854
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=274854&action=review
r=me
> Source/JavaScriptCore/debugger/Debugger.cpp:535 > void Debugger::setBreakpointsActivated(bool activated) > { > + bool stateChanged = activated != m_breakpointsActivated; > m_breakpointsActivated = activated; > + if (stateChanged) > + recompileAllJSFunctions(); > }
I think we would normally write this with an early return if the state is not changing: if (m_breakpointsActivated == activated) return; m_breakpointsActivated = activated; recompileAllJSFunctions();
Saam Barati
Comment 10
2016-03-24 15:43:27 PDT
landed in:
http://trac.webkit.org/changeset/198648
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