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

Commit 08f69e6c authored by mingo's avatar mingo Committed by Ingo Molnar
Browse files

perf sched: Print PIDs too



Often it's useful to know the PID of the task as well - print it
out too.

( While at it, reformat the output to be a bit more
  paste-into-commit-logs friendly. )

Cc: Peter 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 d1153389
Loading
Loading
Loading
Loading
+8 −8
Original line number Original line Diff line number Diff line
@@ -1144,9 +1144,9 @@ static void output_lat_thread(struct task_atoms *atom_list)
	all_runtime += atom_list->total_runtime;
	all_runtime += atom_list->total_runtime;
	all_count += atom_list->nb_atoms;
	all_count += atom_list->nb_atoms;


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


	for (i = 0; i < 19 - ret; i++)
	for (i = 0; i < 24 - ret; i++)
		printf(" ");
		printf(" ");


	avg = atom_list->total_lat / atom_list->nb_atoms;
	avg = atom_list->total_lat / atom_list->nb_atoms;
@@ -1296,9 +1296,9 @@ static void __cmd_lat(void)
	read_events();
	read_events();
	sort_lat();
	sort_lat();


	printf("-----------------------------------------------------------------------------------\n");
	printf("\n ---------------------------------------------------------------------------------------\n");
	printf("  Task                  |  Runtime ms | Switches | Average delay ms | Maximum delay ms |\n");
	printf("  Task                  |  Runtime ms | Switches | Average delay ms | Maximum delay ms |\n");
	printf("-----------------------------------------------------------------------------------\n");
	printf(" ---------------------------------------------------------------------------------------\n");


	next = rb_first(&sorted_atom_root);
	next = rb_first(&sorted_atom_root);


@@ -1310,7 +1310,7 @@ static void __cmd_lat(void)
		next = rb_next(next);
		next = rb_next(next);
	}
	}


	printf("-----------------------------------------------------------------------------------\n");
	printf(" ---------------------------------------------------------------------------------------\n");
	printf("  TOTAL:                |%9.3f ms |%9Ld |",
	printf("  TOTAL:                |%9.3f ms |%9Ld |",
		(double)all_runtime/1e6, all_count);
		(double)all_runtime/1e6, all_count);


@@ -1321,7 +1321,7 @@ static void __cmd_lat(void)
		printf("\n");
		printf("\n");
	}
	}


	printf("---------------------------------------------\n");
	printf(" -------------------------------------------------\n\n");
}
}


static struct trace_sched_handler *trace_handler;
static struct trace_sched_handler *trace_handler;