mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 711130 (part 2) - Merge "arena/unused" and "arena/padding" into "arena-admin". r=terrence.
--HG-- extra : rebase_source : 1c9d318e86eb27c2e40f2ef95554afefb8a6c653
This commit is contained in:
parent
cd23690fd5
commit
28934b1f94
@ -79,8 +79,7 @@ struct CompartmentStats
|
||||
}
|
||||
|
||||
void *extra;
|
||||
size_t gcHeapArenaHeaders;
|
||||
size_t gcHeapArenaPadding;
|
||||
size_t gcHeapArenaAdmin;
|
||||
size_t gcHeapArenaUnused;
|
||||
|
||||
size_t gcHeapObjectsNonFunction;
|
||||
|
@ -58,10 +58,12 @@ StatsArenaCallback(JSRuntime *rt, void *data, gc::Arena *arena,
|
||||
{
|
||||
RuntimeStats *rtStats = static_cast<RuntimeStats *>(data);
|
||||
|
||||
rtStats->currCompartmentStats->gcHeapArenaHeaders += sizeof(gc::ArenaHeader);
|
||||
// The admin space includes (a) the header and (b) the padding between the
|
||||
// end of the header and the start of the first GC thing.
|
||||
size_t allocationSpace = arena->thingsSpan(thingSize);
|
||||
rtStats->currCompartmentStats->gcHeapArenaPadding +=
|
||||
gc::ArenaSize - allocationSpace - sizeof(gc::ArenaHeader);
|
||||
rtStats->currCompartmentStats->gcHeapArenaAdmin +=
|
||||
gc::ArenaSize - allocationSpace;
|
||||
|
||||
// We don't call the callback on unused things. So we compute the
|
||||
// unused space like this: arenaUnused = maxArenaUnused - arenaUsed.
|
||||
// We do this by setting arenaUnused to maxArenaUnused here, and then
|
||||
@ -183,8 +185,7 @@ CollectRuntimeStats(JSRuntime *rt, RuntimeStats *rtStats)
|
||||
index++) {
|
||||
CompartmentStats &cStats = rtStats->compartmentStatsVector[index];
|
||||
|
||||
size_t used = cStats.gcHeapArenaHeaders +
|
||||
cStats.gcHeapArenaPadding +
|
||||
size_t used = cStats.gcHeapArenaAdmin +
|
||||
cStats.gcHeapArenaUnused +
|
||||
cStats.gcHeapObjectsNonFunction +
|
||||
cStats.gcHeapObjectsFunction +
|
||||
|
@ -1297,18 +1297,12 @@ ReportCompartmentStats(const JS::CompartmentStats &cStats,
|
||||
{
|
||||
size_t gcTotal = 0, gcHeapSundries = 0, otherSundries = 0;
|
||||
|
||||
CREPORT_GC_BYTES(MakePath(pathPrefix, cStats, "gc-heap/arena/headers"),
|
||||
cStats.gcHeapArenaHeaders,
|
||||
CREPORT_GC_BYTES(MakePath(pathPrefix, cStats, "gc-heap/arena-admin"),
|
||||
cStats.gcHeapArenaAdmin,
|
||||
"Memory on the compartment's garbage-collected JavaScript "
|
||||
"heap, within arenas, that is used to hold internal "
|
||||
"bookkeeping information.");
|
||||
|
||||
CREPORT_GC_BYTES(MakePath(pathPrefix, cStats, "gc-heap/arena/padding"),
|
||||
cStats.gcHeapArenaPadding,
|
||||
"Memory on the compartment's garbage-collected JavaScript "
|
||||
"heap, within arenas, that is unused and present only so "
|
||||
"that other data is aligned. This constitutes internal "
|
||||
"fragmentation.");
|
||||
"heap, within arenas, that is used (a) to hold internal "
|
||||
"bookkeeping information, and (b) to provide padding to "
|
||||
"align GC things.");
|
||||
|
||||
CREPORT_GC_BYTES(MakePath(pathPrefix, cStats, "gc-heap/arena/unused"),
|
||||
cStats.gcHeapArenaUnused,
|
||||
|
Loading…
Reference in New Issue
Block a user