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>

+6 -8
+6 -8
tools/perf/builtin-sched.c
··· 1775 return r->last_time[cpu]; 1776 } 1777 1778 - static int comm_width = 20; 1779 1780 static char *timehist_get_commstr(struct thread *thread) 1781 { ··· 1817 printf(" "); 1818 } 1819 1820 - printf(" %-20s %9s %9s %9s", 1821 "task name", "wait time", "sch delay", "run time"); 1822 1823 printf("\n"); ··· 1830 if (sched->show_cpu_visual) 1831 printf(" %*s ", ncpus, ""); 1832 1833 - printf(" %-20s %9s %9s %9s\n", "[tid/pid]", "(msec)", "(msec)", "(msec)"); 1834 1835 /* 1836 * separator ··· 1841 if (sched->show_cpu_visual) 1842 printf(" %.*s ", ncpus, graph_dotted_line); 1843 1844 - printf(" %.20s %.9s %.9s %.9s", 1845 graph_dotted_line, graph_dotted_line, graph_dotted_line, 1846 graph_dotted_line); 1847 ··· 2405 if (ptime->start && ptime->start > t) 2406 goto out; 2407 2408 - if (ptime->start > tprev) 2409 tprev = ptime->start; 2410 2411 /* ··· 2626 int i; 2627 2628 memset(&totals, 0, sizeof(totals)); 2629 - 2630 - if (comm_width < 30) 2631 - comm_width = 30; 2632 2633 if (sched->idle_hist) { 2634 printf("\nIdle-time summary\n");
··· 1775 return r->last_time[cpu]; 1776 } 1777 1778 + static int comm_width = 30; 1779 1780 static char *timehist_get_commstr(struct thread *thread) 1781 { ··· 1817 printf(" "); 1818 } 1819 1820 + printf(" %-*s %9s %9s %9s", comm_width, 1821 "task name", "wait time", "sch delay", "run time"); 1822 1823 printf("\n"); ··· 1830 if (sched->show_cpu_visual) 1831 printf(" %*s ", ncpus, ""); 1832 1833 + printf(" %-*s %9s %9s %9s\n", comm_width, 1834 + "[tid/pid]", "(msec)", "(msec)", "(msec)"); 1835 1836 /* 1837 * separator ··· 1840 if (sched->show_cpu_visual) 1841 printf(" %.*s ", ncpus, graph_dotted_line); 1842 1843 + printf(" %.*s %.9s %.9s %.9s", comm_width, 1844 graph_dotted_line, graph_dotted_line, graph_dotted_line, 1845 graph_dotted_line); 1846 ··· 2404 if (ptime->start && ptime->start > t) 2405 goto out; 2406 2407 + if (tprev && ptime->start > tprev) 2408 tprev = ptime->start; 2409 2410 /* ··· 2625 int i; 2626 2627 memset(&totals, 0, sizeof(totals)); 2628 2629 if (sched->idle_hist) { 2630 printf("\nIdle-time summary\n");