diff --git a/libredex/ConcurrentContainers.h b/libredex/ConcurrentContainers.h index dcd5128bb6..3dca00e1d2 100644 --- a/libredex/ConcurrentContainers.h +++ b/libredex/ConcurrentContainers.h @@ -31,10 +31,10 @@ template class ConcurrentContainerIterator; inline AccumulatingTimer s_destructor{}; -inline AccumulatingTimer s_move{}; +inline AccumulatingTimer s_reserving{}; inline double get_destructor_seconds() { return s_destructor.get_seconds(); } -inline double get_move_seconds() { return s_move.get_seconds(); } +inline double get_reserving_seconds() { return s_reserving.get_seconds(); } inline size_t s_concurrent_destruction_threshold{ std::numeric_limits::max()}; @@ -498,6 +498,7 @@ class ConcurrentHashtable final { if (storage->size >= capacity) { return true; } + auto timer_scope = s_reserving.scope(); auto new_capacity = get_prime_number_greater_or_equal_to(capacity); auto* ptrs = storage->ptrs; auto* new_storage = Storage::create(new_capacity, storage); diff --git a/libredex/PassManager.cpp b/libredex/PassManager.cpp index 1d0deb19bc..8d7718feff 100644 --- a/libredex/PassManager.cpp +++ b/libredex/PassManager.cpp @@ -1462,9 +1462,10 @@ void PassManager::run_passes(DexStoresVector& stores, ConfigFiles& conf) { method_profiles::MethodProfiles::get_process_unresolved_lines_seconds()); Timer::add_timer("compute_locations_closure_wto", get_compute_locations_closure_wto_seconds()); - Timer::add_timer("cc_impl::destructor_second", + Timer::add_timer("cc_impl::destructor_seconds", cc_impl::get_destructor_seconds()); - Timer::add_timer("cc_impl::move_second", cc_impl::get_move_seconds()); + Timer::add_timer("cc_impl::reserving_seconds", + cc_impl::get_reserving_seconds()); } PassManager::ActivatedPasses PassManager::compute_activated_passes(