|
1 | 1 | /* ********************************************************** |
2 | | - * Copyright (c) 2017-2024 Google, Inc. All rights reserved. |
| 2 | + * Copyright (c) 2017-2025 Google, Inc. All rights reserved. |
3 | 3 | * **********************************************************/ |
4 | 4 |
|
5 | 5 | /* |
@@ -166,6 +166,9 @@ schedule_stats_t::get_scheduler_stats(memtrace_stream_t *stream, counters_t &cou |
166 | 166 | memtrace_stream_t::SCHED_STAT_RUNQUEUE_REBALANCES)); |
167 | 167 | counters.at_output_limit = static_cast<int64_t>( |
168 | 168 | stream->get_schedule_statistic(memtrace_stream_t::SCHED_STAT_HIT_OUTPUT_LIMIT)); |
| 169 | + counters.switch_sequence_injections = |
| 170 | + static_cast<int64_t>(stream->get_schedule_statistic( |
| 171 | + memtrace_stream_t::SCHED_STAT_SWITCH_SEQUENCE_INJECTIONS)); |
169 | 172 |
|
170 | 173 | // XXX: Currently, schedule_stats is measuring swap-ins to a real input. If we |
171 | 174 | // want to match what "perf" targeting this app would record, which is swap-outs, |
@@ -420,6 +423,8 @@ schedule_stats_t::print_counters(const counters_t &counters) |
420 | 423 | << counters.voluntary_switches << " voluntary context switches\n"; |
421 | 424 | std::cerr << std::setw(12) << counters.direct_switches |
422 | 425 | << " direct context switches\n"; |
| 426 | + std::cerr << std::setw(12) << counters.switch_sequence_injections |
| 427 | + << " context switch sequence injections\n"; |
423 | 428 | print_percentage(static_cast<double>(counters.voluntary_switches), |
424 | 429 | static_cast<double>(counters.total_switches), |
425 | 430 | "% voluntary switches\n"); |
|
0 commit comments