mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-05 05:49:15 +00:00
Add timing stats for IdString garbage collection
This commit is contained in:
parent
cd47727c8b
commit
7371388e1d
5 changed files with 22 additions and 0 deletions
|
|
@ -243,8 +243,12 @@ struct IdStringCollector {
|
|||
std::unordered_set<int> live;
|
||||
};
|
||||
|
||||
int64_t RTLIL::OwningIdString::gc_ns;
|
||||
int RTLIL::OwningIdString::gc_count;
|
||||
|
||||
void RTLIL::OwningIdString::collect_garbage()
|
||||
{
|
||||
int64_t start = PerformanceTimer::query();
|
||||
#ifndef YOSYS_NO_IDS_REFCNT
|
||||
IdStringCollector collector;
|
||||
for (auto &[idx, design] : *RTLIL::Design::get_all_designs()) {
|
||||
|
|
@ -288,6 +292,10 @@ void RTLIL::OwningIdString::collect_garbage()
|
|||
it = global_autoidx_id_prefix_storage_.erase(it);
|
||||
}
|
||||
#endif
|
||||
int64_t time_ns = PerformanceTimer::query() - start;
|
||||
Pass::subtract_from_current_runtime_ns(time_ns);
|
||||
gc_ns += time_ns;
|
||||
++gc_count;
|
||||
}
|
||||
|
||||
dict<std::string, std::string> RTLIL::constpad;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue