mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 1245761 (part 2) - Measure JIT compartments. r=jandem.
--HG-- extra : rebase_source : cc6d1c57306405cdaada9ff876256b8eb2dad03f
This commit is contained in:
parent
e58e7cfd62
commit
3a94c4149a
@ -712,7 +712,8 @@ struct CompartmentStats
|
||||
macro(Other, MallocHeap, crossCompartmentWrappersTable) \
|
||||
macro(Other, MallocHeap, regexpCompartment) \
|
||||
macro(Other, MallocHeap, savedStacksSet) \
|
||||
macro(Other, MallocHeap, nonSyntacticLexicalScopesTable)
|
||||
macro(Other, MallocHeap, nonSyntacticLexicalScopesTable) \
|
||||
macro(Other, MallocHeap, jitCompartment)
|
||||
|
||||
CompartmentStats()
|
||||
: FOR_EACH_SIZE(ZERO_SIZE)
|
||||
|
@ -773,6 +773,15 @@ JitCompartment::toggleBarriers(bool enabled)
|
||||
}
|
||||
}
|
||||
|
||||
size_t
|
||||
JitCompartment::sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
size_t n = mallocSizeOf(this);
|
||||
if (stubCodes_)
|
||||
n += stubCodes_->sizeOfIncludingThis(mallocSizeOf);
|
||||
return n;
|
||||
}
|
||||
|
||||
JitCode*
|
||||
JitRuntime::getBailoutTable(const FrameSizeClass& frameClass) const
|
||||
{
|
||||
|
@ -525,6 +525,8 @@ class JitCompartment
|
||||
regExpTesterStub_ = generateRegExpTesterStub(cx);
|
||||
return regExpTesterStub_ != nullptr;
|
||||
}
|
||||
|
||||
size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
|
||||
};
|
||||
|
||||
// Called from JSCompartment::discardJitCode().
|
||||
|
@ -1113,7 +1113,8 @@ JSCompartment::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
|
||||
size_t* crossCompartmentWrappersArg,
|
||||
size_t* regexpCompartment,
|
||||
size_t* savedStacksSet,
|
||||
size_t* nonSyntacticLexicalScopesArg)
|
||||
size_t* nonSyntacticLexicalScopesArg,
|
||||
size_t* jitCompartment)
|
||||
{
|
||||
*compartmentObject += mallocSizeOf(this);
|
||||
objectGroups.addSizeOfExcludingThis(mallocSizeOf, tiAllocationSiteTables,
|
||||
@ -1131,6 +1132,8 @@ JSCompartment::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
|
||||
*savedStacksSet += savedStacks_.sizeOfExcludingThis(mallocSizeOf);
|
||||
if (nonSyntacticLexicalScopes_)
|
||||
*nonSyntacticLexicalScopesArg += nonSyntacticLexicalScopes_->sizeOfIncludingThis(mallocSizeOf);
|
||||
if (jitCompartment_)
|
||||
*jitCompartment += jitCompartment_->sizeOfIncludingThis(mallocSizeOf);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -411,7 +411,8 @@ struct JSCompartment
|
||||
size_t* crossCompartmentWrappers,
|
||||
size_t* regexpCompartment,
|
||||
size_t* savedStacksSet,
|
||||
size_t* nonSyntacticLexicalScopes);
|
||||
size_t* nonSyntacticLexicalScopes,
|
||||
size_t* jitCompartment);
|
||||
|
||||
/*
|
||||
* Shared scope property tree, and arena-pool for allocating its nodes.
|
||||
|
@ -343,7 +343,8 @@ StatsCompartmentCallback(JSRuntime* rt, void* data, JSCompartment* compartment)
|
||||
&cStats.crossCompartmentWrappersTable,
|
||||
&cStats.regexpCompartment,
|
||||
&cStats.savedStacksSet,
|
||||
&cStats.nonSyntacticLexicalScopesTable);
|
||||
&cStats.nonSyntacticLexicalScopesTable,
|
||||
&cStats.jitCompartment);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2374,6 +2374,10 @@ ReportCompartmentStats(const JS::CompartmentStats& cStats,
|
||||
cStats.nonSyntacticLexicalScopesTable,
|
||||
"The non-syntactic lexical scopes table.");
|
||||
|
||||
ZCREPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("jit-compartment"),
|
||||
cStats.jitCompartment,
|
||||
"The JIT compartment.");
|
||||
|
||||
if (sundriesGCHeap > 0) {
|
||||
// We deliberately don't use ZCREPORT_GC_BYTES here.
|
||||
REPORT_GC_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("sundries/gc-heap"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user