You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passive materialization in C2 Partial Escape Analysis
Passive materialization in C2 Partial Escape Analysis
Problem Statement
Besides escaping points, C2 Partial Escape Analysis(PEA) can optionally materialize the object at the convergence block when any of its predecessors has already materialized it. It is referred to as passive materialization. It is optional because C2 currently skips it and programs are still correct. Here is an example. Object pt is escaped at line 6.
C2 is a speculative compiler. When it encounters a conditional branch and profiling data suggest that the control is highly likely to take one path, parser intends to prune the other path and leave a runtime stub uncommon_trap. We refer to it as “unstable_if trap” because the reason of this stub is unstable_if. If the rare case does happen, the trap triggers deoptimization. HotSpot realizes that current profiling data do not hold up and destroys this compilation. The execution returns to interpreter. Presumably, the upcoming compilation of this method will correct itself with updated profiling data.
Bci(byte code index) in JVM is analogous to the PC(program counter) of a physical processor. It points to the current bytecode in interpreter. Because an uncommon_trap stub punts to interpreter, it must restore the interpreter state in JVM. Restoring the interpreter state means that all variables live at the current bci must have cor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ WebKit git:(main) ./WebKitBuild/Debug/jsc
dyld[8692]: Symbol not found: __ZN3JSC27retrieveTypeImportAttributeEPNS_14JSGlobalObjectERKN3WTF7HashMapINS2_6RefPtrINS2_17UniquedStringImplENS2_12RawPtrTraitsIS5_EENS2_21DefaultRefDerefTraitsIS5_EEEENS2_6StringENS2_11DefaultHashISA_EENS2_10HashTraitsISA_EENSE_ISB_EENS2_15HashTableTraitsEEE
Referenced from: <BD3D10DA-F74B-3755-8B54-29D1F10163E5> /Users/xxinliu/Devel/WebKit/WebKitBuild/Debug/jsc (built for macOS 14.0 which is newer than running OS)
Expected in: <957522FA-9B44-3C8F-9BD4-A209C728B133> /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore
[1] 8692 abort ./WebKitBuild/Debug/jsc
The problem here is JSC depends on WTF(who would name its library that? it seems the acronym of webkit's template framework). Dynamic loader has difficulty to resolve this symbol in WTF. we need to teach dynamic laoder to get from what you built
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C2 inliner rejects a callee because of under-profiled subprocedure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters