mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Bug 846215 - separate content and chrome word cache metrics. r=taras
This commit is contained in:
parent
c0b65e4a8f
commit
bdf8f19da2
@ -2449,13 +2449,19 @@ gfxFont::GetShapedWord(gfxContext *aContext,
|
||||
}
|
||||
gfxShapedWord *sw = entry->mShapedWord;
|
||||
|
||||
bool isContent = !mStyle.systemFont;
|
||||
|
||||
if (sw) {
|
||||
sw->ResetAge();
|
||||
Telemetry::Accumulate(Telemetry::WORD_CACHE_HITS, aLength);
|
||||
Telemetry::Accumulate((isContent ? Telemetry::WORD_CACHE_HITS_CONTENT :
|
||||
Telemetry::WORD_CACHE_HITS_CHROME),
|
||||
aLength);
|
||||
return sw;
|
||||
}
|
||||
|
||||
Telemetry::Accumulate(Telemetry::WORD_CACHE_MISSES, aLength);
|
||||
Telemetry::Accumulate((isContent ? Telemetry::WORD_CACHE_MISSES_CONTENT :
|
||||
Telemetry::WORD_CACHE_MISSES_CHROME),
|
||||
aLength);
|
||||
sw = entry->mShapedWord = gfxShapedWord::Create(aText, aLength,
|
||||
aRunScript,
|
||||
aAppUnitsPerDevUnit,
|
||||
|
@ -485,17 +485,29 @@
|
||||
"kind": "flag",
|
||||
"description": "Was the disk startup cache file detected as invalid"
|
||||
},
|
||||
"WORD_CACHE_HITS": {
|
||||
"WORD_CACHE_HITS_CONTENT": {
|
||||
"kind": "exponential",
|
||||
"high": "256",
|
||||
"n_buckets": 30,
|
||||
"description": "Word cache hits (chars)"
|
||||
"description": "Word cache hits, content text (chars)"
|
||||
},
|
||||
"WORD_CACHE_MISSES": {
|
||||
"WORD_CACHE_HITS_CHROME": {
|
||||
"kind": "exponential",
|
||||
"high": "256",
|
||||
"n_buckets": 30,
|
||||
"description": "Word cache misses (chars)"
|
||||
"description": "Word cache hits, chrome text (chars)"
|
||||
},
|
||||
"WORD_CACHE_MISSES_CONTENT": {
|
||||
"kind": "exponential",
|
||||
"high": "256",
|
||||
"n_buckets": 30,
|
||||
"description": "Word cache misses, content text (chars)"
|
||||
},
|
||||
"WORD_CACHE_MISSES_CHROME": {
|
||||
"kind": "exponential",
|
||||
"high": "256",
|
||||
"n_buckets": 30,
|
||||
"description": "Word cache misses, chrome text (chars)"
|
||||
},
|
||||
"FONT_CACHE_HIT": {
|
||||
"kind": "boolean",
|
||||
|
Loading…
Reference in New Issue
Block a user