Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9ed39dd authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched/tracing: Print task status in sched_migrate_task



A task can migrate either while it is waking or while it
is running via load balancer. Print the task status
i.e running or not in sched_migrate_task. This helps in
counting the different types of migrations without relying
on other trace events.

Change-Id: Ib473f9ccdc78003bb1f5d2dc24354f2db7a684f5
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 24ed5bd0
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ TRACE_EVENT(sched_migrate_task,
		__field(	int,	prio			)
		__field(	int,	orig_cpu		)
		__field(	int,	dest_cpu		)
		__field(	int,	running			)
	),

	TP_fast_assign(
@@ -253,11 +254,13 @@ TRACE_EVENT(sched_migrate_task,
		__entry->prio		= p->prio; /* XXX SCHED_DEADLINE */
		__entry->orig_cpu	= task_cpu(p);
		__entry->dest_cpu	= dest_cpu;
		__entry->running	= (p->state == TASK_RUNNING);
	),

	TP_printk("comm=%s pid=%d prio=%d orig_cpu=%d dest_cpu=%d",
	TP_printk("comm=%s pid=%d prio=%d orig_cpu=%d dest_cpu=%d running=%d",
		  __entry->comm, __entry->pid, __entry->prio,
		  __entry->orig_cpu, __entry->dest_cpu)
		  __entry->orig_cpu, __entry->dest_cpu,
		  __entry->running)
);

/*