Skip to content

Commit

Permalink
Add metric for class names hashes
Browse files Browse the repository at this point in the history
Summary: This new metric will let us spot quickly if the InterDexPass made any changes, across two builds, in which classes got put into what dexes in what order, in the most important root store.

Reviewed By: itang00

Differential Revision: D67541817

fbshipit-source-id: 83c13452b80dadeca4fc069f47e06b7dbed3061d
  • Loading branch information
Nikolai Tillmann authored and facebook-github-bot committed Dec 21, 2024
1 parent 89aa89e commit a916069
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions opt/interdex/InterDexPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ void InterDexPass::run_pass(
mgr.set_metric(key_prefix + "scroll", info.scroll);
mgr.set_metric(key_prefix + "background", info.background);
mgr.set_metric(key_prefix + "betamap_ordered", info.betamap_ordered);
size_t hash{0};
for (auto* cls : dexen[i]) {
boost::hash_combine(hash, cls->get_name()->str());
}
mgr.set_metric(key_prefix + "class_names_hash", hash);
}

auto final_scope = build_class_scope(stores);
Expand Down

0 comments on commit a916069

Please sign in to comment.