Bug 91227 - Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
Summary: Web Inspector: native memory instrumentation: extract instrumentation methods...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ilya Tikhonovsky
URL:
Keywords:
Depends on: 91261
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-13 06:06 PDT by Ilya Tikhonovsky
Modified: 2012-07-16 04:48 PDT (History)
22 users (show)

See Also:


Attachments
Patch (26.17 KB, patch)
2012-07-13 06:10 PDT, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff
Patch (26.86 KB, patch)
2012-07-13 07:21 PDT, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff
Patch (26.86 KB, patch)
2012-07-13 07:34 PDT, Ilya Tikhonovsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Tikhonovsky 2012-07-13 06:06:00 PDT
The API is not strong enough.
I'd like to modify it. The ideal target at the moment is instrumentation code like this:


void Node::visit(MemoryObjectInfo* memoryObjectInfo) const
{
    MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);

    info.visitBaseClass<ScriptWrappable>(this);
    info.visitBaseClass<AnotherBaseClass>(this);

    info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
    info.addMember(m_notInstrumentedObject);  // automatically detects poniter/reference

    info.addInstrumentedMember(m_next);
    info.addInstrumentedMember(m_previous);

    info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash);                // NonClass value_type (report only size of internal template structures)
    info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
    info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet);    // instrumented value_type (call visit)

    // the same as for HashSet but for both template arguments
    info.addHashMap<MemoryInstrumentation::NonClass, MemoryInstrumentation::InstrumentedClass>(m_aHashSet);
    info.addHashMap<MemoryInstrumentation::ForwardDeclaredClass, MemoryInstrumentation::InstrumentedClass>(m_aHashSet);
}
Comment 1 Ilya Tikhonovsky 2012-07-13 06:10:47 PDT
Created attachment 152238 [details]
Patch
Comment 2 Gyuyoung Kim 2012-07-13 06:18:33 PDT
Comment on attachment 152238 [details]
Patch

Attachment 152238 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/13243063
Comment 3 Gustavo Noronha (kov) 2012-07-13 06:20:08 PDT
Comment on attachment 152238 [details]
Patch

Attachment 152238 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/13236118
Comment 4 Early Warning System Bot 2012-07-13 06:31:53 PDT
Comment on attachment 152238 [details]
Patch

Attachment 152238 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/13243066
Comment 5 Early Warning System Bot 2012-07-13 06:32:08 PDT
Comment on attachment 152238 [details]
Patch

Attachment 152238 [details] did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/13230202
Comment 6 Build Bot 2012-07-13 07:14:28 PDT
Comment on attachment 152238 [details]
Patch

Attachment 152238 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/13232235
Comment 7 Ilya Tikhonovsky 2012-07-13 07:21:35 PDT
Created attachment 152252 [details]
Patch
Comment 8 Gyuyoung Kim 2012-07-13 07:29:22 PDT
Comment on attachment 152252 [details]
Patch

Attachment 152252 [details] did not pass efl-ews (efl):
Output: http://queues.webkit.org/results/13232244
Comment 9 Gustavo Noronha (kov) 2012-07-13 07:30:39 PDT
Comment on attachment 152252 [details]
Patch

Attachment 152252 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/13237124
Comment 10 Ilya Tikhonovsky 2012-07-13 07:34:25 PDT
Created attachment 152258 [details]
Patch
Comment 11 Ilya Tikhonovsky 2012-07-13 08:09:28 PDT
Committed r122580: <http://trac.webkit.org/changeset/122580>
Comment 12 WebKit Review Bot 2012-07-13 10:11:12 PDT
Re-opened since this is blocked by 91261
Comment 13 Abhishek Arya 2012-07-13 10:24:57 PDT
The patch just needs to be rebaselined and recommitted.
Comment 14 Ilya Tikhonovsky 2012-07-16 04:48:31 PDT
Committed r122713: <http://trac.webkit.org/changeset/122713>