perf/urgent fixes:
Fixes for 'perf sched timehist': (Namhyung Kim) - Define a larger initial alignment value for the COMM column and make it be more consistently honoured, for instance in the header. - Fix invalid period calculation when using the --time option to select a time slice, when events outside that slice were being considered for the per cpu idle stats summary. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJYXHkzAAoJENZQFvNTUqpAlhcP/R6Uax/YkglJxcvbnvjtsQQx DKNCmoP3fPfxNry/Ly3D4nlOMsIif8hNGzbGHZRHWgCYafMWj8IBvBDhp+BPk/Vf dg0q1DVpvSNYyBiJ6kfT2w1kiWrdZ2HC0g59/jnfkhb/CmPjKOZVMDqUcv4AS8Iv Xo1rqN7FxJmpGMkuEWl4Hv2sJymEIT6j5OpAn2Il07kmUFIpS5OTeiY0+FO6Jmpm ZQlQ/EyFXgwKTA+S7HsSHdETpELRfgx43B6qKHoajteCVzJM2f+DJyRrizRIJ+m/ c9wxXFwZtX8Jges0YWUzQmQC8Vk8JFkoJG1Cz+95P6UNDOV16fVFh8QCyFpNtB7K TvtsCMFMNFZTqqcS0u+XJ6MyApxkZlvZ4uj186AhzHrjUXK1R/GtTckuXF92pRsn Lc+YcZrLenilZ+T28bSw2q4Zqq1BPndH0kNlWNYLzGTPR0sJiGJkquNnqzW//VTD zSoVVhk6kG+Y7fIvReKZBGKO1cKmhcJsRKewVslPkOsm/CJgzRH4EcLqCS1OjTV1 B4lXtt8bVaZa4JHbeIzsUzq5ODsRgifwaa5uBSGmHiUjZbzNPrkEMF3KkuQH3Zn6 sF8oNV1aApTCLqOyfSnXka7cfEBNjOglcJsqG6UoxkfaFVs4vJgY3IOOCuum/nzn fV31O8LoL+lLsfCc8oYV =3wdE -----END PGP SIGNATURE----- Merge tag 'perf-urgent-for-mingo-20161222' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: Fixes for 'perf sched timehist': (Namhyung Kim) - Define a larger initial alignment value for the COMM column and make it be more consistently honoured, for instance in the header. - Fix invalid period calculation when using the --time option to select a time slice, when events outside that slice were being considered for the per cpu idle stats summary. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
3705b97505
|
@ -1775,7 +1775,7 @@ static u64 perf_evsel__get_time(struct perf_evsel *evsel, u32 cpu)
|
|||
return r->last_time[cpu];
|
||||
}
|
||||
|
||||
static int comm_width = 20;
|
||||
static int comm_width = 30;
|
||||
|
||||
static char *timehist_get_commstr(struct thread *thread)
|
||||
{
|
||||
|
@ -1817,7 +1817,7 @@ static void timehist_header(struct perf_sched *sched)
|
|||
printf(" ");
|
||||
}
|
||||
|
||||
printf(" %-20s %9s %9s %9s",
|
||||
printf(" %-*s %9s %9s %9s", comm_width,
|
||||
"task name", "wait time", "sch delay", "run time");
|
||||
|
||||
printf("\n");
|
||||
|
@ -1830,7 +1830,8 @@ static void timehist_header(struct perf_sched *sched)
|
|||
if (sched->show_cpu_visual)
|
||||
printf(" %*s ", ncpus, "");
|
||||
|
||||
printf(" %-20s %9s %9s %9s\n", "[tid/pid]", "(msec)", "(msec)", "(msec)");
|
||||
printf(" %-*s %9s %9s %9s\n", comm_width,
|
||||
"[tid/pid]", "(msec)", "(msec)", "(msec)");
|
||||
|
||||
/*
|
||||
* separator
|
||||
|
@ -1840,7 +1841,7 @@ static void timehist_header(struct perf_sched *sched)
|
|||
if (sched->show_cpu_visual)
|
||||
printf(" %.*s ", ncpus, graph_dotted_line);
|
||||
|
||||
printf(" %.20s %.9s %.9s %.9s",
|
||||
printf(" %.*s %.9s %.9s %.9s", comm_width,
|
||||
graph_dotted_line, graph_dotted_line, graph_dotted_line,
|
||||
graph_dotted_line);
|
||||
|
||||
|
@ -2404,7 +2405,7 @@ static int timehist_sched_change_event(struct perf_tool *tool,
|
|||
if (ptime->start && ptime->start > t)
|
||||
goto out;
|
||||
|
||||
if (ptime->start > tprev)
|
||||
if (tprev && ptime->start > tprev)
|
||||
tprev = ptime->start;
|
||||
|
||||
/*
|
||||
|
@ -2626,9 +2627,6 @@ static void timehist_print_summary(struct perf_sched *sched,
|
|||
|
||||
memset(&totals, 0, sizeof(totals));
|
||||
|
||||
if (comm_width < 30)
|
||||
comm_width = 30;
|
||||
|
||||
if (sched->idle_hist) {
|
||||
printf("\nIdle-time summary\n");
|
||||
printf("%*s parent sched-out ", comm_width, "comm");
|
||||
|
|
Loading…
Reference in New Issue