Bug 1412729 (part 4) - Attempt to reduce the size of GCMajor markers r=sfink

--HG--
extra : rebase_source : b1076c58337d3153bfdb27783719ef304ca75590
This commit is contained in:
Paul Bone 2017-11-10 23:19:04 +11:00
Родитель f97c230bc8
Коммит d9f3623f07
4 изменённых файлов: 28 добавлений и 11 удалений

Просмотреть файл

@ -593,19 +593,28 @@ Statistics::renderJsonMessage(uint64_t timestamp, bool includeSlices) const
void
Statistics::formatJsonDescription(uint64_t timestamp, JSONPrinter& json) const
{
// If you change JSON properties here, please update:
// Telemetry ping code: toolkit/components/telemetry/GCTelemetry.jsm
// Telemetry documentation: toolkit/components/telemetry/docs/data/main-ping.rst
// Telemetry tests: toolkit/components/telemetry/tests/browser/browser_TelemetryGC.js
// Perf.html: https://github.com/devtools-html/perf.html
json.property("timestamp", timestamp);
TimeDuration total, longest;
gcDuration(&total, &longest);
json.property("max_pause", longest, JSONPrinter::MILLISECONDS);
json.property("total_time", total, JSONPrinter::MILLISECONDS);
// We might be able to omit reason if perf.html was able to retrive it
// from the first slice. But it doesn't do this yet.
json.property("reason", ExplainReason(slices_[0].reason));
json.property("zones_collected", zoneStats.collectedZoneCount);
json.property("total_zones", zoneStats.zoneCount);
json.property("total_compartments", zoneStats.compartmentCount);
json.property("minor_gcs", counts[STAT_MINOR_GC]);
json.property("store_buffer_overflows", counts[STAT_STOREBUFFER_OVERFLOW]);
json.property("minor_gcs", getCount(STAT_MINOR_GC));
uint32_t storebufferOverflows = getCount(STAT_STOREBUFFER_OVERFLOW);
if (storebufferOverflows)
json.property("store_buffer_overflows", storebufferOverflows);
json.property("slices", slices_.length());
const double mmu20 = computeMMU(TimeDuration::FromMilliseconds(20));
@ -618,11 +627,15 @@ Statistics::formatJsonDescription(uint64_t timestamp, JSONPrinter& json) const
json.property("scc_sweep_total", sccTotal, JSONPrinter::MILLISECONDS);
json.property("scc_sweep_max_pause", sccLongest, JSONPrinter::MILLISECONDS);
json.property("nonincremental_reason", ExplainAbortReason(nonincrementalReason_));
json.property("allocated", uint64_t(preBytes)/1024/1024);
if (nonincrementalReason_ != AbortReason::None)
json.property("nonincremental_reason", ExplainAbortReason(nonincrementalReason_));
json.property("allocated_bytes", preBytes);
json.property("added_chunks", getCount(STAT_NEW_CHUNK));
json.property("removed_chunks", getCount(STAT_DESTROY_CHUNK));
uint32_t addedChunks = getCount(STAT_NEW_CHUNK);
if (addedChunks)
json.property("added_chunks", addedChunks);
uint32_t removedChunks = getCount(STAT_DESTROY_CHUNK);
if (removedChunks)
json.property("removed_chunks", removedChunks);
json.property("major_gc_number", startingMajorGCNumber);
json.property("minor_gc_number", startingMinorGCNumber);
json.property("slice_number", startingSliceNumber);

Просмотреть файл

@ -110,7 +110,7 @@ class GCData {
// make sure to update the JSON schema at:
// https://github.com/mozilla-services/mozilla-pipeline-schemas/blob/master/telemetry/main.schema.json
// You should also adjust browser_TelemetryGC.js.
const MAX_GC_KEYS = 30;
const MAX_GC_KEYS = 24;
const MAX_SLICES = 4;
const MAX_SLICE_KEYS = 12;
const MAX_PHASES = 65;

Просмотреть файл

@ -481,6 +481,7 @@ Structure:
"total_zones": 9,
"total_compartments": 309,
"minor_gcs": 44,
// Present if non-zero.
"store_buffer_overflows": 19,
"mmu_20ms": 0,
"mmu_50ms": 0,
@ -488,11 +489,14 @@ Structure:
// "AbortRequested", "KeepAtomsSet", "IncrementalDisabled",
// "ModeChange", "MallocBytesTrigger", "GCBytesTrigger",
// "ZoneChange", "CompartmentRevived".
"nonincremental_reason": "None",
"allocated": 37, // In megabytes.
// Present for non-incremental GCs only.
"nonincremental_reason": "GCBytesTrigger",
"allocated_bytes": 38853696 // in bytes
// Present if non-zero.
"added_chunks": 54,
"removed_chunks": 12,
// Total number of slices (some of which may not appear
// in the "slices" array).
"slices": 15,

Просмотреть файл

@ -41,7 +41,7 @@ function check(entries) {
foundGCs++;
ok(Object.keys(gc).length <= 30, "number of keys in GC is not too large");
ok(Object.keys(gc).length <= 24, "number of keys in GC is not too large");
// Sanity check the GC data.
ok("status" in gc, "status field present");