diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-10-28 19:37:34 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-10-28 19:37:34 +0200 |
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, { struct perf_event_attr *attr = &evsel->attr; unsigned long secs; - unsigned long usecs; unsigned long long nsecs; if (PRINT_FIELD(COMM)) { @@ -471,11 +470,14 @@ static void print_sample_start(struct perf_sample *sample, nsecs = sample->time; secs = nsecs / NSEC_PER_SEC; nsecs -= secs * NSEC_PER_SEC; - usecs = nsecs / NSEC_PER_USEC; + if (nanosecs) printf("%5lu.%09llu: ", secs, nsecs); - else - printf("%5lu.%06lu: ", secs, usecs); + else { + char sample_time[32]; + timestamp__scnprintf_usec(sample->time, sample_time, sizeof(sample_time)); + printf("%12s: ", sample_time); + } } } |