ANDROID: sched: Add trace events for proxy execution
Add sched_[start, finish]_task_selection trace events to measure the latency of proxy execution patches in task selection. Moreover, introduce trace events for interesting events in proxy execution: 1. sched_pe_enqueue_sleeping_task: a task gets enqueued on wait queue of a sleeping task (mutex owner). 2. sched_pe_activate_blocked_entity: When owner is woken and we activate tasks enqueued on the owner' blocked entities list. 3. sched_pe_migration: dependency chain crosses remote CPU. 4. sched_pe_return_migration: returning a previously proxy-migrated task to it's originating cpu. 5. sched_pe_owner_is_migrating: mutex owner task is mid-migration. New trace events can be tested via this command: $ perf trace -e sched:sched_start_task_selection \ -e sched:sched_finish_task_selection \ -e sched:sched_pe_enqueue_sleeping_task \ -e sched:sched_pe_activate_blocked_entity \ -e sched:sched_pe_migration \ -e sched:sched_pe_return_migration \ -e sched:sched_pe_owner_is_migrating Note: These trace events are not intended to merge upstream. Instead, they are only for making PE tests easier and will be converted to trace points once Proxy Execution patches hit upstream. CC: John Stultz <jstultz@google.com> CC: Joel Fernandes <joelaf@google.com> Cc: Qais Yousef <qyousef@layalina.io> CC: Ingo Molnar <mingo@redhat.com> CC: Peter Zijlstra <peterz@infradead.org> CC: Juri Lelli <juri.lelli@redhat.com> CC: Vincent Guittot <vincent.guittot@linaro.org> CC: Dietmar Eggemann <dietmar.eggemann@arm.com> CC: Valentin Schneider <vschneid@redhat.com> CC: Steven Rostedt <rostedt@goodmis.org> CC: Masami Hiramatsu <mhiramat@kernel.org> CC: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> CC: Ben Segall <bsegall@google.com> CC: Zimuzo Ezeozue <zezeozue@google.com> CC: Mel Gorman <mgorman@suse.de> CC: Will Deacon <will@kernel.org> CC: Waiman Long <longman@redhat.com> CC: Boqun Feng <boqun.feng@gmail.com> CC: "Paul E. McKenney" <paulmck@kernel.org> CC: Xuewen Yan <xuewen.yan94@gmail.com> CC: K Prateek Nayak <kprateek.nayak@amd.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Daniel Lezcano <daniel.lezcano@linaro.org> CC: kernel-team@android.com CC: linux-trace-kernel@vger.kernel.org Change-Id: Iec008efa1f954c0f0d43714fdd32cf96fc0dd561 Signed-off-by:Metin Kaya <metin.kaya@arm.com> [jstultz: Add more details to the traceevents for validating proxy behavior] Signed-off-by:
John Stultz <jstultz@google.com> Bug: 306081722 --- v10: * Add more details to the traceevents (owner task for proxy migrations, and prev, selected and next for task selection) so its easier to understand the proxy behavior. v11: * Rename sched_pe_owner_is_migrating and include owner & waiter in the trace_event * Add trace-event for activation of blocked entities * Rename sched_pe_migration * Add sched_pe_return_migration to track return migration events v12: * Renaming of selected -> donor * Nit fixup suggested by Metin * Build fixup for !SCHED_PROXY_EXEC case
Loading
Please sign in to comment