diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-10-28 13:37:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-10-28 13:37:34 -0400 |
commit | 91a79e5fa696fa626bfbd47f827eaf3eb7d76dc5 (patch) | |
tree | 4a9c4582fa25b2d59d0b8a67516d28b0f8da1776 /tools/perf/builtin-script.c | |
parent | 76e2d2617d767c445498c4c4b1162eb2201cdd77 (diff) | |
parent | 46cb25b1a0ee74bf4a79cfb3081ae3567b2f7135 (diff) |
Merge tag 'perf-core-for-mingo-20161028' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
perf/core improvements and fixes from Arnaldo Carvalho de Melo:
New features:
- Support matching by topic in 'perf list' (Andi Kleen)
User visible:
- Apply cpu color only when there was activity in 'perf sched map' (Namhyung Kim)
- Always show the task's COMM in 'perf sched map -v' (Namhyung Kim)
- Fix hierarchy column counts in the perf hist browser (top, report), avoiding
showing nothing after pressing the RIGHT key a number of times (Namhyung Kim)
Infrastructure:
- Support cascading options in libsubcmd and use it to share common options in
'perf sched' subcommands (Namhyung Kim)
- Avoid worker cacheline bouncing in 'perf bench futex' (Davidlohr Bueso)
- Sanitize numeric parameters in 'perf bench futex' (Davidlohr Bueso)
- Update copies of kernel files (Arnaldo Carvalho de Melo)
- Fix scripting (perl, python) setup to avoid leaks (Arnaldo Carvalho de Melo)
- Add missing object file to the python binding linkage list (Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 412fb6e65ac0..e1daff36d070 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -441,7 +441,6 @@ static void print_sample_start(struct perf_sample *sample, | |||
441 | { | 441 | { |
442 | struct perf_event_attr *attr = &evsel->attr; | 442 | struct perf_event_attr *attr = &evsel->attr; |
443 | unsigned long secs; | 443 | unsigned long secs; |
444 | unsigned long usecs; | ||
445 | unsigned long long nsecs; | 444 | unsigned long long nsecs; |
446 | 445 | ||
447 | if (PRINT_FIELD(COMM)) { | 446 | if (PRINT_FIELD(COMM)) { |
@@ -471,11 +470,14 @@ static void print_sample_start(struct perf_sample *sample, | |||
471 | nsecs = sample->time; | 470 | nsecs = sample->time; |
472 | secs = nsecs / NSEC_PER_SEC; | 471 | secs = nsecs / NSEC_PER_SEC; |
473 | nsecs -= secs * NSEC_PER_SEC; | 472 | nsecs -= secs * NSEC_PER_SEC; |
474 | usecs = nsecs / NSEC_PER_USEC; | 473 | |
475 | if (nanosecs) | 474 | if (nanosecs) |
476 | printf("%5lu.%09llu: ", secs, nsecs); | 475 | printf("%5lu.%09llu: ", secs, nsecs); |
477 | else | 476 | else { |
478 | printf("%5lu.%06lu: ", secs, usecs); | 477 | char sample_time[32]; |
478 | timestamp__scnprintf_usec(sample->time, sample_time, sizeof(sample_time)); | ||
479 | printf("%12s: ", sample_time); | ||
480 | } | ||
479 | } | 481 | } |
480 | } | 482 | } |
481 | 483 | ||