Fix uninitialized thread PGO counters (#6167)

This commit is contained in:
Bartłomiej Chmiel
2025-07-10 04:56:14 -04:00
committed by GitHub
parent d89df33fcd
commit 9ad0de1efd
3 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -218,7 +218,7 @@ class VlPgoProfiler final {
};
// Counters are stored packed, all together to reduce cache effects
std::array<uint64_t, N_Entries> m_counters; // Time spent on this record
std::array<uint64_t, N_Entries> m_counters{}; // Time spent on this record
std::vector<Record> m_records; // Record information
public:
@@ -28,6 +28,9 @@ test.execute(all_run_flags=[
test.file_grep(test.obj_dir + "/profile.vlt", r'profile_data -model "VTest"')
test.file_grep(test.obj_dir + "/profile.vlt", r'profile_data -model "V' + test.name + '"')
# Check for cost rollovers
test.file_grep_not(test.obj_dir + "/profile.vlt", r'.*cost 64\'d\d{18}.*')
# Differentiate benchmarksim results
test.name = test.name + "_optimized"
test.compile(
@@ -6,3 +6,5 @@
`verilator_config
hier_workers -module "Test" -workers 2
hier_block -module "Check"
hier_workers -module "Check" -workers 2