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

Commit 80ed0987 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

perf sched: Make idle thread and comm/pid names more consistent



Peter noticed that we have 3 ways of referring to the idle thread:

 [idle]:0
 swapper:0
 swapper-0

Standardize on 'swapper:0'.

Reported-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent c8a37751
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1204,13 +1204,13 @@ static void output_lat_thread(struct work_atoms *work_list)
	/*
	/*
	 * Ignore idle threads:
	 * Ignore idle threads:
	 */
	 */
	if (!work_list->thread->pid)
	if (!strcmp(work_list->thread->comm, "swapper"))
		return;
		return;


	all_runtime += work_list->total_runtime;
	all_runtime += work_list->total_runtime;
	all_count += work_list->nb_atoms;
	all_count += work_list->nb_atoms;


	ret = printf("  %s-%d ", work_list->thread->comm, work_list->thread->pid);
	ret = printf("  %s:%d ", work_list->thread->comm, work_list->thread->pid);


	for (i = 0; i < 24 - ret; i++)
	for (i = 0; i < 24 - ret; i++)
		printf(" ");
		printf(" ");
+1 −1
Original line number Original line Diff line number Diff line
@@ -85,7 +85,7 @@ register_idle_thread(struct rb_root *threads, struct thread **last_match)
{
{
	struct thread *thread = threads__findnew(0, threads, last_match);
	struct thread *thread = threads__findnew(0, threads, last_match);


	if (!thread || thread__set_comm(thread, "[init]")) {
	if (!thread || thread__set_comm(thread, "swapper")) {
		fprintf(stderr, "problem inserting idle task.\n");
		fprintf(stderr, "problem inserting idle task.\n");
		exit(-1);
		exit(-1);
	}
	}