Bug 137596

Summary: Have the ProfileType node in the DFG convert to a structure check where it can
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ddkilzer
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
fpizlo: review+
patch none

Saam Barati
Reported 2014-10-09 23:14:34 PDT
Implementing this would require each TypeSet keeping track of which StructureIDs it has seen that have been garbage collected. Currently, when a GC happens, each TypeSet will clear its StructureID cache, this change would require a more sophisticated purging of the StructureIDs a TypeSet has seen to only remove the StructureIDs that are being GCed.
Attachments
patch (20.96 KB, patch)
2014-10-15 00:38 PDT, Saam Barati
fpizlo: review+
patch (20.79 KB, text/plain)
2014-10-16 12:13 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2014-10-15 00:38:49 PDT
Filip Pizlo
Comment 2 2014-10-16 11:29:56 PDT
Comment on attachment 239854 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=239854&action=review > Source/JavaScriptCore/runtime/TypeProfiler.h:117 > + std::unique_ptr<Bag<TypeLocation>> m_typeLocationInfo; Maybe you could just do Bag<TypeLocation>. A Bag is just a pointer-sized word if it's empty; > Source/JavaScriptCore/runtime/TypeSet.cpp:115 > + Vector<Structure*> willBeSwept; > + for (Structure* structure : m_structureSet) { > + if (!Heap::isMarked(structure)) > + willBeSwept.append(structure); > + } > + for (Structure* structure : willBeSwept) > + m_structureSet.remove(structure); Now that we have all of the C++, this could be written as: m_structureSet.genericFilter([] (Structure* structure) -> bool { return Heap::isMarked(sturcture); });
Saam Barati
Comment 3 2014-10-16 12:13:28 PDT
Created attachment 239956 [details] patch with suggested changes.
David Kilzer (:ddkilzer)
Comment 4 2014-10-16 14:28:07 PDT
Note You need to log in before you can comment on or make changes to this bug.