Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#6822 unscheduled: Add unscheduled-input drmemtrace support (#6826)
Augments the drmemtrace scheduler with a new notion of an "unscheduled" input which, if it has no timeout, is not runnable indefinitely until another input explicitly wakes it up. Adds 3 new markers: + TRACE_MARKER_TYPE_SYSCALL_UNSCHEDULE, which makes the caller "unscheduled". + TRACE_MARKER_TYPE_SYSCALL_SCHEDULE, which makes a target no longer "unscheduled". + TRACE_MARKER_TYPE_SYSCALL_ARG_TIMEOUT which adds a timeout parameter to TRACE_MARKER_TYPE_SYSCALL_UNSCHEDULE and TRACE_MARKER_TYPE_DIRECT_THREAD_SWITCH Adds handling for the new marker types. Changes TRACE_MARKER_TYPE_DIRECT_THREAD_SWITCH to make the source input unscheduled, unless a timeout is passed which is honored (previously it was ignored and the syscall latency was used as the block time if it was over the thresholds). Adds a fallback in case a state is reached with no schedulable inputs yet some number of unscheduled inputs who would otherwise hang forever. Adds unit tests. Also tested on a large trace with many real-world cases of these direct switches and unschedulable threads. Issue: #6822
- Loading branch information