Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#6938 migrate: Include sched stats in query and fix related assert #7060

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions clients/drcachesim/tools/schedule_stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,9 @@ schedule_stats_t::aggregate_results(counters_t &total)
// Our observed_migrations are counted on the destination core, while
// the scheduler reports migrations away from a source core: so we only
// check the aggregate. For non-dynamic schedules the scheduler-reported
// will be 0; otherwise, the scheduler may see more migrations due to inputs
// not yet executed moving among runqueues.
assert(total.migrations == 0. || total.migrations >= total.observed_migrations);
// will be 0; for mock streams in tests it will be < 0; otherwise, the scheduler
// may see more migrations due to inputs not yet executed moving among runqueues.
assert(total.migrations <= 0. || total.migrations >= total.observed_migrations);
}

bool
Expand All @@ -531,9 +531,7 @@ schedule_stats_t::counters_t
schedule_stats_t::get_total_counts()
{
counters_t total;
for (const auto &shard : shard_map_) {
total += shard.second->counters;
}
aggregate_results(total);
return total;
}

Expand Down
Loading