RESOLVED FIXED 98138
Provide memory instrumentation for HashCountedSet
https://bugs.webkit.org/show_bug.cgi?id=98138
Summary Provide memory instrumentation for HashCountedSet
Yury Semikhatsky
Reported 2012-10-02 03:33:54 PDT
We need to be able to estimate memory footprint of any HashCountedSet.
Attachments
Patch (22.28 KB, patch)
2012-10-02 03:40 PDT, Yury Semikhatsky
pfeldman: review+
Yury Semikhatsky
Comment 1 2012-10-02 03:40:12 PDT
Ilya Tikhonovsky
Comment 2 2012-10-02 09:27:40 PDT
Comment on attachment 166655 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166655&action=review > Source/WTF/wtf/MemoryInstrumentationSequence.h:58 > + SequenceMemoryInstrumentationTraits<typename Conditional<IsConvertibleToInteger<ValueType>::value, int, ValueType>::Type>::reportMemoryUsage(begin, end, info); I don't understand what is the benefit of this check (IsConvertibleToInteger)? As I understand it doesn't matter that some type is convertible. We have to filter out POD types. I'd say we have to use IsInteger here or even IsArithmatic which includes floats.
Yury Semikhatsky
Comment 3 2012-10-02 10:53:40 PDT
Comment on attachment 166655 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166655&action=review >> Source/WTF/wtf/MemoryInstrumentationSequence.h:58 >> + SequenceMemoryInstrumentationTraits<typename Conditional<IsConvertibleToInteger<ValueType>::value, int, ValueType>::Type>::reportMemoryUsage(begin, end, info); > > I don't understand what is the benefit of this check (IsConvertibleToInteger)? > As I understand it doesn't matter that some type is convertible. We have to filter out POD types. > I'd say we have to use IsInteger here or even IsArithmatic which includes floats. As the comment says the check is added mainly because of iterators over enum values. Like integers they cannot have methods and would cause compilation errors. Neither IsInterger nor IsArithmetic would would return true for enum so they are not an option.
Ilya Tikhonovsky
Comment 4 2012-10-02 11:44:30 PDT
lgtm
Yury Semikhatsky
Comment 5 2012-10-02 23:15:24 PDT
Note You need to log in before you can comment on or make changes to this bug.