haikuwebkit/LayoutTests/inspector/heap/gc-expected.txt

9 lines
208 B
Plaintext
Raw Permalink Normal View History

Web Inspector: Include Garbage Collection Event in Timeline https://bugs.webkit.org/show_bug.cgi?id=142510 Reviewed by Geoffrey Garen and Brian Burg. Source/JavaScriptCore: * CMakeLists.txt: * DerivedSources.make: * JavaScriptCore.xcodeproj/project.pbxproj: Include new files in the build. * heap/HeapObserver.h: (JSC::HeapObserver::~HeapObserver): * heap/Heap.cpp: (JSC::Heap::willStartCollection): (JSC::Heap::didFinishCollection): * heap/Heap.h: (JSC::Heap::addObserver): (JSC::Heap::removeObserver): Allow observers on heap to add hooks for starting / ending garbage collection. * inspector/InspectorEnvironment.h: * inspector/JSGlobalObjectInspectorController.cpp: (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController): (Inspector::JSGlobalObjectInspectorController::vm): * inspector/JSGlobalObjectInspectorController.h: Access the VM through the InspectorEnvironment as it won't change. * inspector/agents/InspectorHeapAgent.cpp: Added. (Inspector::InspectorHeapAgent::InspectorHeapAgent): (Inspector::InspectorHeapAgent::~InspectorHeapAgent): (Inspector::InspectorHeapAgent::didCreateFrontendAndBackend): (Inspector::InspectorHeapAgent::willDestroyFrontendAndBackend): (Inspector::InspectorHeapAgent::enable): (Inspector::InspectorHeapAgent::disable): (Inspector::InspectorHeapAgent::gc): (Inspector::protocolTypeForHeapOperation): (Inspector::InspectorHeapAgent::willGarbageCollect): (Inspector::InspectorHeapAgent::didGarbageCollect): * inspector/agents/InspectorHeapAgent.h: Added. * inspector/protocol/Heap.json: Added. New domain and agent to handle tasks related to the JavaScriptCore heap. Source/WebCore: Tests: inspector/heap/garbageCollected.html inspector/heap/gc.html * ForwardingHeaders/heap/HeapObserver.h: Added. * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Added. * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: Forwarding headers. * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::vm): * inspector/InspectorController.h: * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::vm): * inspector/WorkerInspectorController.h: Implement InspectorEnvironment::vm and create a Heap agent for the Page inspector controller. Source/WebInspectorUI: * UserInterface/Base/Utilities.js: (Array.prototype.partition): Helper to partition an Array into two arrays. * Localizations/en.lproj/localizedStrings.js: * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Test.html: * UserInterface/Test/Test.js: (WebInspector.loaded): * UserInterface/Protocol/HeapObserver.js: Added. (WebInspector.HeapObserver.prototype.garbageCollected): (WebInspector.HeapObserver): Create the new observer and manager. * UserInterface/Models/GarbageCollection.js: Added. (WebInspector.GarbageCollection): (WebInspector.GarbageCollection.fromPayload): (WebInspector.GarbageCollection.prototype.get type): (WebInspector.GarbageCollection.prototype.get startTime): (WebInspector.GarbageCollection.prototype.get endTime): (WebInspector.GarbageCollection.prototype.get duration): Model object for Heap.GarbageCollection. * UserInterface/Controllers/HeapManager.js: Added. (WebInspector.HeapManager): (WebInspector.HeapManager.prototype.garbageCollected): Dispatch events with the GC object. * UserInterface/Controllers/TimelineManager.js: (WebInspector.TimelineManager): (WebInspector.TimelineManager.prototype._garbageCollected): Include new GC Timeline Events as Script events. * UserInterface/Views/ScriptTimelineOverviewGraph.js: (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout): For the Script overview, make two sets of bars, one for Scripts and one for GCs. The GCs bar will be overlaid on top of the the Scripts bar. This is particularly useful since a GC can happen during script execution. * UserInterface/Images/TimelineRecordGarbageCollection.svg: Added. * UserInterface/Main.html: * UserInterface/Models/ScriptTimelineRecord.js: (WebInspector.ScriptTimelineRecord.prototype.isGarbageCollection): (WebInspector.ScriptTimelineRecord.EventType.displayName): * UserInterface/Views/ScriptTimelineDataGridNode.js: (WebInspector.ScriptTimelineDataGridNode.prototype.get data): (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): (WebInspector.ScriptTimelineDataGridNode): * UserInterface/Views/ScriptTimelineView.js: (WebInspector.ScriptTimelineView.prototype._processPendingRecords): * UserInterface/Views/SourceCodeTimelineTreeElement.js: (WebInspector.SourceCodeTimelineTreeElement): * UserInterface/Views/TimelineIcons.css: (.garbage-collection-profile-record .icon): * UserInterface/Views/TimelineRecordBar.css: (.timeline-record-bar.timeline-record-type-script.script-timeline-record-garbage-collected > .segment): UI for GC events. * UserInterface/Views/TimelineRecordBar.js: (WebInspector.TimelineRecordBar.createCombinedBars): Simplify by storing start time into a variable. * UserInterface/Views/TimelineRecordTreeElement.js: (WebInspector.TimelineRecordTreeElement): Icon for GC events. LayoutTests: * inspector/heap/garbageCollected-expected.txt: Added. * inspector/heap/garbageCollected.html: Added. * inspector/heap/gc-expected.txt: Added. * inspector/heap/gc.html: Added. Canonical link: https://commits.webkit.org/168341@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-10-16 02:15:56 +00:00
Test for the Heap.gc command.
== Running test suite: Heap.gc
-- Running test case: TriggerGCShouldCreateGCEvent
PASS: Event should have GarbageCollection data.
PASS: GarbageCollection type should be Full.