lkml.org 
[lkml]   [2013]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf stat: Do not show stats if workload fails

* David Ahern <dsahern@gmail.com> wrote:

> Currently perf-stat attempts to show counter stats even if the workload
> is bogus:
>
> $ perf stat -- foo
> foo: No such file or directory
>
> Performance counter stats for 'foo':
>
> <not counted> task-clock
> <not counted> context-switches
> <not counted> cpu-migrations
> <not counted> page-faults
> <not counted> cycles
> <not counted> stalled-cycles-frontend
> <not counted> stalled-cycles-backend
> <not counted> instructions
> <not counted> branches
> <not counted> branch-misses
>
> 0.009769943 seconds time elapsed
>
> It is impossible to differentiate all the failure modes, but it seems
> reasonable that if the workload handling fails, perf-stat should not try
> to print stats.
>
> With this change:
>
> $ perf stat -v -- foo
> Failed to start workload
>
> Signed-off-by: David Ahern <dsahern@gmail.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Stephane Eranian <eranian@google.com>

Nice!

Acked-by: Ingo Molnar <mingo@kernel.org>

Thanks,

Ingo


\
 
 \ /
  Last update: 2013-12-20 10:21    [W:0.058 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site