From a4885cbaafd35fe9c60eb6cd95e41e2c86f54f66 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Mon, 9 Mar 2015 15:38:54 -0700 Subject: Add way to print JIT related info at shutdown Added a runtime option called -XX:DumpJITInfoOnShutdown with prints various interesting JIT statistics during the shutdown of the runtime if enabled. Example of running EvaluateAndApplyChanges with the option: I art : Code cache size=427KB data cache size=84KB num methods=1598 I art : Start Dumping histograms for 1598 iterations for JIT timings I art : Compiling: Sum: 727.850ms 99% C.I. 135us-4402us Avg: 455.475us Max: 15567us I art : Verifying: Sum: 191.074ms 99% C.I. 19us-1450.500us Avg: 119.570us Max: 5142us I art : TrimMaps: Sum: 62.053ms 99% C.I. 13us-199.374us Avg: 38.831us Max: 10058us I art : MakeExecutable: Sum: 11.153ms 99% C.I. 4us-47us Avg: 6.979us Max: 47us I art : Initializing: Sum: 7.991ms 99% C.I. 1us-49.781us Avg: 5us Max: 4852us I art : Done Dumping histograms Bug: 17950037 Change-Id: I23538b24f947e5f6934f55579b8baa9d806eb3d5 --- runtime/jit/jit_code_cache.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/jit/jit_code_cache.cc') diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc index 4ae4d570fc..4d367e01eb 100644 --- a/runtime/jit/jit_code_cache.cc +++ b/runtime/jit/jit_code_cache.cc @@ -77,6 +77,7 @@ uint8_t* JitCodeCache::ReserveCode(Thread* self, size_t size) { if (size > CodeCacheRemain()) { return nullptr; } + ++num_methods_; // TODO: This is hacky but works since each method has exactly one code region. code_cache_ptr_ += size; return code_cache_ptr_ - size; } -- cgit v1.2.3-59-g8ed1b