Title: [138530] trunk/Tools
Revision
138530
Author
[email protected]
Date
2012-12-28 01:49:25 -0800 (Fri, 28 Dec 2012)

Log Message

Web Inspector: Native Memory Instrumentation. Update clang plugin according to the current state of memory instrumentation code.
https://bugs.webkit.org/show_bug.cgi?id=105800

Reviewed by Yury Semikhatsky.

* clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp:
(clang::ReportMemoryUsageConsumer::ReportMemoryUsageConsumer):
(clang):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (138529 => 138530)


--- trunk/Tools/ChangeLog	2012-12-28 09:43:56 UTC (rev 138529)
+++ trunk/Tools/ChangeLog	2012-12-28 09:49:25 UTC (rev 138530)
@@ -1,3 +1,14 @@
+2012-12-27  Ilya Tikhonovsky  <[email protected]>
+
+        Web Inspector: Native Memory Instrumentation. Update clang plugin according to the current state of memory instrumentation code.
+        https://bugs.webkit.org/show_bug.cgi?id=105800
+
+        Reviewed by Yury Semikhatsky.
+
+        * clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp:
+        (clang::ReportMemoryUsageConsumer::ReportMemoryUsageConsumer):
+        (clang):
+
 2012-12-27  Zan Dobersek  <[email protected]>
 
         Create a GTK build system watchlist and add myself to it

Modified: trunk/Tools/clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp (138529 => 138530)


--- trunk/Tools/clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp	2012-12-28 09:43:56 UTC (rev 138529)
+++ trunk/Tools/clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp	2012-12-28 09:49:25 UTC (rev 138530)
@@ -156,18 +156,9 @@
         : m_visitor(instance, context)
     {
         instrumentationMethods.push_back("addMember");
-        instrumentationMethods.push_back("addInstrumentedMember");
-        instrumentationMethods.push_back("addVector");
-        instrumentationMethods.push_back("addVectorPtr");
-        instrumentationMethods.push_back("addInstrumentedVector");
-        instrumentationMethods.push_back("addInstrumentedVectorPtr");
-        instrumentationMethods.push_back("addHashSet");
-        instrumentationMethods.push_back("addInstrumentedHashSet");
-        instrumentationMethods.push_back("addHashMap");
-        instrumentationMethods.push_back("addInstrumentedHashMap");
-        instrumentationMethods.push_back("addListHashSet");
         instrumentationMethods.push_back("addRawBuffer");
-        instrumentationMethods.push_back("addString");
+        instrumentationMethods.push_back("addWeakPointer");
+        instrumentationMethods.push_back("ignoreMember");
     }
 
     virtual void HandleTranslationUnit(clang::ASTContext& context)
@@ -200,18 +191,24 @@
     "This plugin is checking native memory instrumentation code.\n"
     "The class is instrumented if it has reportMemoryUsage member function.\n"
     "Sample:\n"
-    "class InstrumentedClass {\n"
+    "class InstrumentedClass : public BaseInstrumentedClass {\n"
     "public:\n"
     "    void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const\n"
     "    {\n"
-    "        MemoryClassInfo<InstrumentedClass> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);\n"
-    "        info.addMember(m_notInstrumentedPtr);\n"
-    "        info.addInstrumentedMember(m_instrumentedObject);\n"
+    "        MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);\n"
+    "        BaseInstrumentedClass::reportMemoryUsage(memoryObjectInfo);\n"
+    "        info.addMember(m_notInstrumentedObject);\n"
+    "        info.addMember(m_instrumentedObject);\n"
+    "        info.addRawBuffer(m_pointer, m_length);\n"
+    "        info.ignoreMember(m_pointerToInternalField);\n"
     "    }\n"
     "\n"
     "private:\n"
     "    NotInstrumentedClass* m_notInstrumentedPtr;\n"
     "    InstrumentedClass m_instrumentedObject;\n"
+    "    long m_length;\n"
+    "    double* m_pointer;\n"
+    "    Data* m_pointerToInternalField;\n"
     "}\n";
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to