Title: [131461] trunk/Tools
Revision
131461
Author
[email protected]
Date
2012-10-16 09:10:22 -0700 (Tue, 16 Oct 2012)

Log Message

[chromium] Provide used JSHeap size in chromium's DRT for pageloadtest memory measurements
https://bugs.webkit.org/show_bug.cgi?id=99288

Reviewed by Ryosuke Niwa.

Provide used JSHeap size as we did it for the Apple port.

* DumpRenderTree/chromium/TestEventPrinter.cpp:
(TestEventPrinter::handleDumpMemoryHeader): Add new function to print the JSHeap memory result.
* DumpRenderTree/chromium/TestEventPrinter.h:
(TestEventPrinter): handleDumpMemoryHeader declaration.
* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::dump): Dump JSHeap value.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (131460 => 131461)


--- trunk/Tools/ChangeLog	2012-10-16 16:08:00 UTC (rev 131460)
+++ trunk/Tools/ChangeLog	2012-10-16 16:10:22 UTC (rev 131461)
@@ -1,3 +1,19 @@
+2012-10-16  Zoltan Horvath  <[email protected]>
+
+        [chromium] Provide used JSHeap size in chromium's DRT for pageloadtest memory measurements
+        https://bugs.webkit.org/show_bug.cgi?id=99288
+
+        Reviewed by Ryosuke Niwa.
+
+        Provide used JSHeap size as we did it for the Apple port.
+
+        * DumpRenderTree/chromium/TestEventPrinter.cpp:
+        (TestEventPrinter::handleDumpMemoryHeader): Add new function to print the JSHeap memory result.
+        * DumpRenderTree/chromium/TestEventPrinter.h:
+        (TestEventPrinter): handleDumpMemoryHeader declaration.
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::dump): Dump JSHeap value.
+
 2012-10-16  Simon Hausmann  <[email protected]>
 
         [Qt] Fix nmake wipeclean on Windows

Modified: trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp (131460 => 131461)


--- trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp	2012-10-16 16:08:00 UTC (rev 131460)
+++ trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp	2012-10-16 16:10:22 UTC (rev 131461)
@@ -30,6 +30,7 @@
 
 #include "config.h"
 #include "TestEventPrinter.h"
+#include "v8.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -57,6 +58,12 @@
     fprintf(stdout, "FAIL: Timed out waiting for notifyDone to be called\n");
 }
 
+void TestEventPrinter::handleDumpMemoryHeader() const
+{
+    v8::HeapStatistics heapStatistics;
+    printf("DumpJSHeap: %zu\n", heapStatistics.used_heap_size());
+}
+
 void TestEventPrinter::handleTextHeader() const
 {
     printf("Content-Type: text/plain\n");

Modified: trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.h (131460 => 131461)


--- trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.h	2012-10-16 16:08:00 UTC (rev 131460)
+++ trunk/Tools/DumpRenderTree/chromium/TestEventPrinter.h	2012-10-16 16:10:22 UTC (rev 131461)
@@ -39,6 +39,7 @@
     ~TestEventPrinter();
     void handleTestHeader(const char* url) const;
     void handleTimedOut() const;
+    void handleDumpMemoryHeader() const;
     void handleTextHeader() const;
     void handleTextFooter() const;
     void handleAudio(const void* audioData, size_t audioSize) const;

Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (131460 => 131461)


--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-10-16 16:08:00 UTC (rev 131460)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-10-16 16:10:22 UTC (rev 131461)
@@ -575,6 +575,7 @@
     if (m_params.dumpTree) {
         dumpedAnything = true;
         m_printer.handleTextHeader();
+        m_printer.handleDumpMemoryHeader();
         // Text output: the test page can request different types of output
         // which we handle here.
         if (!shouldDumpAsText) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to