Bug 151470

Summary: Web Inspector: Code hotness visualizer: introduce "isScope: true" property
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: ASSIGNED    
Severity: Normal CC: graouts, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 146115    

Nikita Vasilyev
Reported 2015-11-19 18:10:13 PST
TL;DR https://github.com/WebKit/webkit/blob/a7970c63ab35ad903f6060e2ba28eaf1bd562801/Source/JavaScriptCore/runtime/ControlFlowProfiler.cpp#L97 Instead emitting "executionCount: 1" for scopes, we should introduce a separate property. We could name it "parsed: true" instead of "executionCount: 1". I'm not sure if "parsed" is technically accurate, so bike-shedding is welcome. Longer explanation: var x = 1; function foo() { return 42; } Upon reading executing the JS code above, one of the ranges RuntimeAgent.getBasicBlocks would emit be: { startOffset: 0, endOffset: // end of the file hasExecuted: true, executionCount: 1 } This is a bit misleading, since function foo hasn't been executed. I suggest to instead emit: { startOffset: 0, endOffset: // end of the file hasExecuted: true, parsed: true } Having a different property would allow to style these ranges differently.
Attachments
Radar WebKit Bug Importer
Comment 1 2015-11-19 18:10:54 PST
Nikita Vasilyev
Comment 2 2015-12-07 19:37:20 PST
(In reply to comment #0) > TL;DR > https://github.com/WebKit/webkit/blob/ > a7970c63ab35ad903f6060e2ba28eaf1bd562801/Source/JavaScriptCore/runtime/ > ControlFlowProfiler.cpp#L97 > Instead emitting "executionCount: 1" for scopes, we should introduce a > separate property. We could name it "parsed: true" instead of > "executionCount: 1". I'm not sure if "parsed" is technically accurate, so > bike-shedding is welcome. I renamed it from "parsed" to "isScope".
Note You need to log in before you can comment on or make changes to this bug.