diff options
author | 2019-05-07 12:30:10 -0700 | |
---|---|---|
committer | 2019-05-09 15:08:17 +0000 | |
commit | efdd1b0c818b9040b506c023d739e7ccd0714f47 (patch) | |
tree | 57842a878081a92be4e08a00ecfa1f6e25028b61 | |
parent | d6d878ef7f452335e6642265605de10220f7809f (diff) |
ART: Add throughput to verifier duration message
Add the throughput in bytecodes per second to the duration logging.
Bug: 110852609
Test: m
Test: manual (-Xverifier-logging-threshold=0)
Change-Id: I426aefd295e2a1ac190e66d0f12035e894f22080
-rw-r--r-- | runtime/verifier/method_verifier.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc index 79b3178efc..73ae8e85f3 100644 --- a/runtime/verifier/method_verifier.cc +++ b/runtime/verifier/method_verifier.cc @@ -5310,9 +5310,12 @@ MethodVerifier::FailureData MethodVerifier::VerifyMethod(Thread* self, if (kTimeVerifyMethod) { uint64_t duration_ns = NanoTime() - start_ns; if (duration_ns > MsToNs(Runtime::Current()->GetVerifierLoggingThresholdMs())) { + double bytecodes_per_second = + verifier.code_item_accessor_.InsnsSizeInCodeUnits() / (duration_ns * 1e-9); LOG(WARNING) << "Verification of " << dex_file->PrettyMethod(method_idx) << " took " << PrettyDuration(duration_ns) - << (impl::IsLargeMethod(verifier.CodeItem()) ? " (large method)" : ""); + << (impl::IsLargeMethod(verifier.CodeItem()) ? " (large method)" : "") + << " (" << StringPrintf("%.2f", bytecodes_per_second) << " bytecodes/s)"; } } result.types = verifier.encountered_failure_types_; |