Bug 92650

Summary: Web Inspector: clang plugin for checking native memory instrumentation coverage
Product: WebKit Reporter: Ilya Tikhonovsky <loislo>
Component: Web Inspector (Deprecated)Assignee: Ilya Tikhonovsky <loislo>
Status: RESOLVED FIXED    
Severity: Normal CC: alph, apavlov, bweinstein, gyuyoung.kim, joepeck, keishi, loislo, pfeldman, pmuellr, rakuco, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 87262    
Attachments:
Description Flags
Patch yurys: review+

Description Ilya Tikhonovsky 2012-07-30 08:12:08 PDT
This is the clang plugin for checking native memory instrumentation coverage.

The idea: InspectorMemoryAgent traverses through instrumented objects and collects pointers and their sizes and types.
It is doing that with help of reportMemoryUsage function that needs to be implemented in each, significant
from native memory footprint point of view, WebCore class.

This plugin checks that the list of class members is matching with the list of members reported in reportMemoryUsage function.
Comment 1 Ilya Tikhonovsky 2012-07-30 08:18:15 PDT
Created attachment 155295 [details]
Patch
Comment 2 Ilya Tikhonovsky 2012-07-30 08:46:55 PDT
Comment on attachment 155295 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=155295&action=review

> Tools/clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp:136
> +    void CheckMembersCoverage(const CXXRecordDecl* instrumentedClass, const Strings& instrumentedMembers, SourceLocation location)

checkMembersCoverage
Comment 3 Yury Semikhatsky 2012-08-02 03:31:03 PDT
Comment on attachment 155295 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=155295&action=review

> Tools/clang/ReportMemoryUsagePlugin/Makefile:5
> +#   cp -R <this directory> third_party/llvm/tools/clang/tools/report-memory-usage-plugin

Please fix the comment. Also we probably need a more detailed description here on how to use the plugin.
Comment 4 Ilya Tikhonovsky 2012-08-03 01:05:07 PDT
Committed r124579: <http://trac.webkit.org/changeset/124579>