Changeset 286802 in webkit
- Timestamp:
- Dec 9, 2021, 1:49:45 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
b3/B3Procedure.cpp (modified) (2 diffs)
-
b3/B3Procedure.h (modified) (1 diff)
-
b3/air/AirCode.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r286790 r286802 1 2021-12-09 Saam Barati <sbarati@apple.com> 2 3 Procedure::setNeedsPCToOriginMap should call Code::forcePreservationOfB3Origins 4 https://bugs.webkit.org/show_bug.cgi?id=234093 5 6 Reviewed by Yusuke Suzuki. 7 8 We need to do this to ensure the sampling profiler works in FTL. 9 The reason this was sometimes working was Air::Code's constructor 10 was looking at Procedure's m_needsPCToOriginMap before it was initialized, 11 in its constructor. This is because Procedure was constructing Code 12 before all its fields were initialized. This patch fixes that bug to 13 construct Code after Procedure has all its fields initialized. 14 15 * b3/B3Procedure.cpp: 16 (JSC::B3::Procedure::Procedure): 17 (JSC::B3::Procedure::setNeedsPCToOriginMap): 18 * b3/B3Procedure.h: 19 (JSC::B3::Procedure::setNeedsPCToOriginMap): Deleted. 20 1 21 2021-12-09 Saam Barati <sbarati@apple.com> 2 22 -
trunk/Source/JavaScriptCore/b3/B3Procedure.cpp
r286790 r286802 49 49 , m_lastPhaseName("initial") 50 50 , m_byproducts(makeUnique<OpaqueByproducts>()) 51 , m_code(new Air::Code(*this)) 52 { 51 { 52 // Initialize all our fields before constructing Air::Code since 53 // it looks into our fields. 54 m_code = std::unique_ptr<Air::Code>(new Air::Code(*this)); 53 55 m_code->setNumEntrypoints(m_numEntrypoints); 54 56 } … … 487 489 } 488 490 491 void Procedure::setNeedsPCToOriginMap() 492 { 493 m_needsPCToOriginMap = true; 494 m_code->forcePreservationOfB3Origins(); 495 } 496 489 497 } } // namespace JSC::B3 490 498 -
trunk/Source/JavaScriptCore/b3/B3Procedure.h
r286790 r286802 276 276 JS_EXPORT_PRIVATE RegisterSet mutableFPRs(); 277 277 278 void setNeedsPCToOriginMap() { m_needsPCToOriginMap = true; }278 void setNeedsPCToOriginMap(); 279 279 bool needsPCToOriginMap() { return m_needsPCToOriginMap; } 280 280 -
trunk/Source/JavaScriptCore/b3/air/AirCode.cpp
r280650 r286802 57 57 : m_proc(proc) 58 58 , m_cfg(new CFG(*this)) 59 , m_preserveB3Origins( proc.needsPCToOriginMap() ||Options::dumpAirGraphAtEachPhase() || Options::dumpFTLDisassembly())59 , m_preserveB3Origins(Options::dumpAirGraphAtEachPhase() || Options::dumpFTLDisassembly()) 60 60 , m_lastPhaseName("initial") 61 61 , m_defaultPrologueGenerator(createSharedTask<PrologueGeneratorFunction>(&defaultPrologueGenerator))
Note:
See TracChangeset
for help on using the changeset viewer.