Skip to content

Commit

Permalink
s/scheduleable/schedulable/; make it clear print_queue_stats() verbos…
Browse files Browse the repository at this point in the history
…ity check should be in caller
  • Loading branch information
derekbruening committed Oct 3, 2024
1 parent 2acb4a3 commit 695db09
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clients/drcachesim/scheduler/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4244,7 +4244,7 @@ scheduler_tmpl_t<RecordType, ReaderType>::print_queue_stats()
int live = live_input_count_.load(std::memory_order_acquire);
// Make our multi-line output more atomic.
std::ostringstream ostr;
ostr << "Queue snapshot: inputs: " << live - unsched_size << " scheduleable, "
ostr << "Queue snapshot: inputs: " << live - unsched_size << " schedulable, "
<< unsched_size << " unscheduled, " << inputs_.size() - live << " eof\n";
for (unsigned int i = 0; i < outputs_.size(); ++i) {
auto lock = acquire_scoped_output_lock_if_necessary(i);
Expand All @@ -4269,7 +4269,7 @@ scheduler_tmpl_t<RecordType, ReaderType>::print_queue_stats()
for (input_info_t *add : readd)
outputs_[i].ready_queue.queue.push(add);
}
VPRINT(this, 1, "%s\n", ostr.str().c_str());
VPRINT(this, 0, "%s\n", ostr.str().c_str());
}

template <typename RecordType, typename ReaderType>
Expand Down
1 change: 1 addition & 0 deletions clients/drcachesim/scheduler/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,7 @@ template <typename RecordType, typename ReaderType> class scheduler_tmpl_t {
rebalance_queues(output_ordinal_t triggering_output,
std::vector<input_ordinal_t> inputs_to_add);

// Up to the caller to check verbosity before calling.
void
print_queue_stats();

Expand Down
2 changes: 1 addition & 1 deletion clients/drcachesim/tests/scheduler_unit_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5055,7 +5055,7 @@ test_unscheduled_initially()
std::unique_ptr<mock_reader_t>(new mock_reader_t()), TID_A);
readers.emplace_back(std::unique_ptr<mock_reader_t>(new mock_reader_t(refs_B)),
std::unique_ptr<mock_reader_t>(new mock_reader_t()), TID_B);
// We have a medium idle period before A becomes scheduleable.
// We have a medium idle period before A becomes schedulable.
static const char *const CORE0_SCHED_STRING =
"...B....._____.....A.__________________________________B....B.";

Expand Down

0 comments on commit 695db09

Please sign in to comment.