Dump startup and post startup methods for --dump-only
The format is:
hot methods: ...
startup methods: id0, id1, ...
post startup methods: id0, id1, ...
classes:
Also added test.
Test: mm test-art-host-gtest-profile_assistant_test -j32
Bug: 62040831
Change-Id: I2ffbe17e888d4adae348bb14e0b92c284ce1081c
diff --git a/runtime/jit/profile_compilation_info.cc b/runtime/jit/profile_compilation_info.cc
index 9c039e2..a292a6e 100644
--- a/runtime/jit/profile_compilation_info.cc
+++ b/runtime/jit/profile_compilation_info.cc
@@ -1375,7 +1375,7 @@
}
}
}
- os << "\n\tmethods: ";
+ os << "\n\thot methods: ";
for (const auto& method_it : dex_data->method_map) {
if (dex_file != nullptr) {
os << "\n\t\t" << dex_file->PrettyMethod(method_it.first, true);
@@ -1400,6 +1400,19 @@
}
os << "], ";
}
+ bool startup = true;
+ while (true) {
+ os << "\n\t" << (startup ? "startup methods: " : "post startup methods: ");
+ for (uint32_t method_idx = 0; method_idx < dex_data->num_method_ids; ++method_idx) {
+ if (dex_data->HasSampledMethod(startup, method_idx)) {
+ os << method_idx << ", ";
+ }
+ }
+ if (startup == false) {
+ break;
+ }
+ startup = false;
+ }
os << "\n\tclasses: ";
for (const auto class_it : dex_data->class_set) {
if (dex_file != nullptr) {