Mozilla 2/Strings/Dynamic Analysis: Difference between revisions
(dynamic instrumentation) |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 18: | Line 18: | ||
Procedure: | Procedure: | ||
Instrument the number of calls to [http://mxr.mozilla.org/mozilla/source/xpcom/string/public/nsUTF8Utils.h#459 ConvertUTF8toUTF16] and [http://mxr.mozilla.org/mozilla/source/xpcom/string/public/nsUTF8Utils.h#611 | Instrument the number of calls to [http://mxr.mozilla.org/mozilla/source/xpcom/string/public/nsUTF8Utils.h#459 ConvertUTF8toUTF16] and [http://mxr.mozilla.org/mozilla/source/xpcom/string/public/nsUTF8Utils.h#611 ConvertUTF16toUTF8]. | ||
Bonus points: group and identify common callstacks | Bonus points: group and identify common callstacks | ||
| Line 26: | Line 26: | ||
* Dynamic analysis: autostring buffer-copy counts (are autostrings worthwhile)? | * Dynamic analysis: autostring buffer-copy counts (are autostrings worthwhile)? | ||
Procedure: todo | Procedure: todo [dmandelin] Does this mean (a) the fraction of nsAutoStrings that grow big enough to get moved to the heap, (b) the fraction of nsAutoStrings that end up being used to initialize a standard heap string, or both? | ||
Latest revision as of 01:03, 15 February 2008
<< back to Mozilla 2/Strings
The cost/benefit of UTF8
Question: If we moved from our current UCS2/UTF16 storage for nsAString to UTF8, what would the impact be on memory usage?
Procedure:
Instrument nsStringBuffer with a large linked-list (with locking and all that good stuff). Run the instrumented browser and collect data about all nsStringBuffers which hold PRUnichar data:
- What is the size of the buffer
- What would the size of the buffer be in UTF8?
- Is the buffer pure-ASCII?
Conversion counts
Question: how much do we currently convert between UTF8 and UTF16?
Procedure: Instrument the number of calls to ConvertUTF8toUTF16 and ConvertUTF16toUTF8.
Bonus points: group and identify common callstacks
Autostring value
- Dynamic analysis: autostring buffer-copy counts (are autostrings worthwhile)?
Procedure: todo [dmandelin] Does this mean (a) the fraction of nsAutoStrings that grow big enough to get moved to the heap, (b) the fraction of nsAutoStrings that end up being used to initialize a standard heap string, or both?