WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
97198
Web Inspector: extract HashSet instrumentation from core NMI code and put it into MemoryInstrumentationHashSet.h
https://bugs.webkit.org/show_bug.cgi?id=97198
Summary
Web Inspector: extract HashSet instrumentation from core NMI code and put it ...
Ilya Tikhonovsky
Reported
2012-09-20 04:50:11 PDT
Current implementation has overloads for HashSet. This prevents us from instrumenting complex cases like Vector<HashSet<...> >.
Attachments
patch for try bots. HashSet + Vector.
(52.98 KB, patch)
2012-09-21 01:28 PDT
,
Ilya Tikhonovsky
no flags
Details
Formatted Diff
Diff
Patch
(29.17 KB, patch)
2012-09-25 01:55 PDT
,
Ilya Tikhonovsky
no flags
Details
Formatted Diff
Diff
Patch
(32.41 KB, patch)
2012-09-25 05:21 PDT
,
Ilya Tikhonovsky
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Ilya Tikhonovsky
Comment 1
2012-09-21 01:28:55 PDT
Created
attachment 165077
[details]
patch for try bots. HashSet + Vector.
Yury Semikhatsky
Comment 2
2012-09-24 23:22:31 PDT
Comment on
attachment 165077
[details]
patch for try bots. HashSet + Vector. Clearing r?. Please remove changes to vector.
Ilya Tikhonovsky
Comment 3
2012-09-25 01:55:48 PDT
Created
attachment 165558
[details]
Patch
Yury Semikhatsky
Comment 4
2012-09-25 02:16:50 PDT
Comment on
attachment 165558
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=165558&action=review
> Source/WTF/wtf/MemoryInstrumentationHashSet.h:57 > +void reportMemoryUsage(const HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>* const& hashTable, MemoryObjectInfo* memoryObjectInfo)
Please put HashTable memory instrumentation into a separate file as it is going to be reused by HashMap and LinkedHashSet instrumentations.
Yury Semikhatsky
Comment 5
2012-09-25 02:20:26 PDT
Comment on
attachment 165558
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=165558&action=review
> Source/WebKit/chromium/tests/MemoryInstrumentationTest.cpp:446 > + VisitedObjects visitedObjects;
Please add a test for HashTable instrumentation and a test for HashSet owned by value.
Ilya Tikhonovsky
Comment 6
2012-09-25 05:21:23 PDT
Created
attachment 165587
[details]
Patch
Ilya Tikhonovsky
Comment 7
2012-09-25 05:28:09 PDT
(In reply to
comment #4
)
> (From update of
attachment 165558
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=165558&action=review
> > > Source/WTF/wtf/MemoryInstrumentationHashSet.h:57 > > +void reportMemoryUsage(const HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>* const& hashTable, MemoryObjectInfo* memoryObjectInfo) > > Please put HashTable memory instrumentation into a separate file as it is going to be reused by HashMap and LinkedHashSet instrumentations.
done.
> > Source/WebKit/chromium/tests/MemoryInstrumentationTest.cpp:446 > > + VisitedObjects visitedObjects; > > Please add a test for HashTable instrumentation and a test for HashSet owned by value.
HashTable is a wtf internal class which is used by HashSet, HashMap, etc and is never used directly in WebCore. Also it knows nothing about the internal structure of the values inside it. Thus it is not necessary to test its instrumentation directly.
Yury Semikhatsky
Comment 8
2012-09-25 22:39:53 PDT
(In reply to
comment #7
)
> > Please add a test for HashTable instrumentation and a test for HashSet owned by value. > > HashTable is a wtf internal class which is used by HashSet, HashMap, etc and is never used directly in WebCore. Also it knows nothing about the internal structure of the values inside it. Thus it is not necessary to test its instrumentation directly.
What about the second part of the commentary?
Ilya Tikhonovsky
Comment 9
2012-09-26 00:21:35 PDT
(In reply to
comment #8
)
> (In reply to
comment #7
) > > > Please add a test for HashTable instrumentation and a test for HashSet owned by value. > > > > HashTable is a wtf internal class which is used by HashSet, HashMap, etc and is never used directly in WebCore. Also it knows nothing about the internal structure of the values inside it. Thus it is not necessary to test its instrumentation directly. > > What about the second part of the commentary?
addMember function has its own mechanic for pointer vs reference instrumentation. And it is covered by ptrVsRef test.
Yury Semikhatsky
Comment 10
2012-09-26 05:31:40 PDT
Comment on
attachment 165587
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=165587&action=review
> Source/WTF/wtf/MemoryInstrumentation.h:193 > + template<typename I> void addMembers(I iterator, I end)
Can you change this to addCollectionElements(const T& collection) so that we don't need to .begin() and .end() in all call sites?
Ilya Tikhonovsky
Comment 11
2012-09-26 07:10:37 PDT
Committed
r129637
: <
http://trac.webkit.org/changeset/129637
>
Yury Semikhatsky
Comment 12
2012-09-27 08:08:07 PDT
Reopening to attach new patch.
Yury Semikhatsky
Comment 13
2012-09-27 08:09:00 PDT
(In reply to
comment #12
)
> Reopening to attach new patch.
Sorry, wrong bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug