Skip to content

Commit 447cea1

Browse files
agampemeta-codesync[bot]
authored andcommitted
Promote "Add manual-profile stats dump"
Summary: Promote {D89406058}. Reviewed By: xuhdev Differential Revision: D89578207 fbshipit-source-id: 6676eea08a86f15184a835bda87e3b8a9b7a18c6
1 parent 12b4ad5 commit 447cea1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

libredex/MethodProfiles.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,22 @@ void parse_manual_files(
464464
baseline_manual_interactions, manual_profile_interactions,
465465
method_stats, unresolved_manual_lines);
466466
}
467+
constexpr int DUMP_LEVEL = 1;
468+
if (traceEnabled(METH_PROF, DUMP_LEVEL)) {
469+
auto print_manual = [](const auto& map, const char* prefix) {
470+
auto num = [&map](const char* key) -> ssize_t {
471+
auto it = map.find(key);
472+
return it != map.end() ? it->second.size() : -1;
473+
};
474+
TRACE(METH_PROF, DUMP_LEVEL, "%s %zd/%zd/%zd/%zd", prefix, num("manual"),
475+
num("manual_hot"), num("manual_startup"),
476+
num("manual_post_startup"));
477+
};
478+
for (auto& [file, interactions] : manual_profile_interactions) {
479+
print_manual(interactions, file.c_str());
480+
}
481+
print_manual(method_stats, "MethodStats: ");
482+
}
467483
}
468484

469485
} // namespace manual_profile

0 commit comments

Comments
 (0)