namespace art {
+static constexpr size_t kArenaAllocatorMemoryReportThreshold = 8 * MB;
+
/**
* Used by the code generator, to allocate the code in a vector.
*/
pass_observer.DumpDisassembly();
}
- if (kArenaAllocatorCountAllocations) {
- if (arena->BytesAllocated() > 4 * MB) {
- MemStats mem_stats(arena->GetMemStats());
- LOG(INFO) << PrettyMethod(method_idx, dex_file) << " " << Dumpable<MemStats>(mem_stats);
- }
- }
-
return codegen.release();
}
if (codegen.get() != nullptr) {
MaybeRecordStat(MethodCompilationStat::kCompiled);
method = Emit(&arena, &code_allocator, codegen.get(), compiler_driver, code_item);
+
+ if (kArenaAllocatorCountAllocations) {
+ if (arena.BytesAllocated() > kArenaAllocatorMemoryReportThreshold) {
+ MemStats mem_stats(arena.GetMemStats());
+ LOG(INFO) << PrettyMethod(method_idx, dex_file) << " " << Dumpable<MemStats>(mem_stats);
+ }
+ }
}
} else {
if (compiler_driver->GetCompilerOptions().VerifyAtRuntime()) {
if (codegen.get() == nullptr) {
return false;
}
+
+ if (kArenaAllocatorCountAllocations) {
+ if (arena.BytesAllocated() > kArenaAllocatorMemoryReportThreshold) {
+ MemStats mem_stats(arena.GetMemStats());
+ LOG(INFO) << PrettyMethod(method_idx, *dex_file) << " " << Dumpable<MemStats>(mem_stats);
+ }
+ }
}
size_t stack_map_size = codegen->ComputeStackMapsSize();
// Type of allocation for memory tuning.
enum ArenaAllocKind {
kArenaAllocMisc,
- kArenaAllocBBList,
- kArenaAllocBBPredecessors,
- kArenaAllocDfsPreOrder,
- kArenaAllocDfsPostOrder,
- kArenaAllocDomPostOrder,
- kArenaAllocTopologicalSortOrder,
- kArenaAllocLoweringInfo,
- kArenaAllocLIR,
- kArenaAllocLIRResourceMask,
kArenaAllocSwitchTable,
- kArenaAllocFillArrayData,
kArenaAllocSlowPaths,
- kArenaAllocMIR,
- kArenaAllocDFInfo,
- kArenaAllocGrowableArray,
kArenaAllocGrowableBitMap,
- kArenaAllocSSAToDalvikMap,
- kArenaAllocDalvikToSSAMap,
- kArenaAllocDebugInfo,
- kArenaAllocRegAlloc,
- kArenaAllocData,
kArenaAllocSTL,
kArenaAllocGraphBuilder,
kArenaAllocGraph,
kArenaAllocMoveOperands,
kArenaAllocCodeBuffer,
kArenaAllocStackMaps,
- kArenaAllocBaselineMaps,
kArenaAllocOptimization,
kArenaAllocGvn,
kArenaAllocInductionVarAnalysis,
kArenaAllocSsaLiveness,
kArenaAllocSsaPhiElimination,
kArenaAllocReferenceTypePropagation,
- kArenaAllocPrimitiveTypePropagation,
kArenaAllocSideEffectsAnalysis,
kArenaAllocRegisterAllocator,
kArenaAllocRegisterAllocatorValidate,