Bug 135305 - CodeCache should not cache when the WebInspector is open
Summary: CodeCache should not cache when the WebInspector is open
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-25 14:41 PDT by Saam Barati
Modified: 2014-07-25 18:43 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2014-07-25 14:41:23 PDT
The WebInspector often uses source code IDs to identify unique scripts. If CodeCache is turned on, it may determine two scripts are the same because their text contents are the same, when indeed the two scripts come from discreet websites, and when the cache returns a CodeBlock, it doesn't change it's originating source ID. This has an especially perverse effect when high fidelity type profiling is enabled because the type profiler uses source code IDs in JavaScriptCore to correlate the unique identity of scripts with the WebInspector. This also has another perverse effect that when type profiling is enabled then disabled: JavaScriptCore recompiles all scripts because type profiling is only enabled in the LLInt. If type profiling is enabled then disabled, and the CodeCache successfully caches a script that had this profiling enabled, but type profiling is currently disabled, it will try to tier up a CodeBlock to the baseline JIT that contains the opcodes for type profiling, and this tier up causes a runtime exception.
Comment 1 Saam Barati 2014-07-25 18:43:40 PDT
(In reply to comment #0)
> The WebInspector often uses source code IDs to identify unique scripts. If CodeCache is turned on, it may determine two scripts are the same because their text contents are the same, when indeed the two scripts come from discreet websites, and when the cache returns a CodeBlock, it doesn't change it's originating source ID. This has an especially perverse effect when high fidelity type profiling is enabled because the type profiler uses source code IDs in JavaScriptCore to correlate the unique identity of scripts with the WebInspector. This also has another perverse effect that when type profiling is enabled then disabled: JavaScriptCore recompiles all scripts because type profiling is only enabled in the LLInt. If type profiling is enabled then disabled, and the CodeCache successfully caches a script that had this profiling enabled, but type profiling is currently disabled, it will try to tier up a CodeBlock to the baseline JIT that contains the opcodes for type profiling, and this tier up causes a runtime exception.


This is false. CodeCache does respect the files that the inspector is viewing. My problem is that I compiled code based on a global VM flag, but the CodeCache respects caching on a GlobalObject basis.