perf kmem: Show warning when trying to run stat without record
authorNamhyung Kim <namhyung@kernel.org>
Tue, 5 May 2015 14:52:52 +0000 (23:52 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 May 2015 21:13:08 +0000 (18:13 -0300)
commita923e2c4b14f99f70692f82ee7bd63717604b738
tree6fdc2108b0e5f881bc4f32ede0af474543593c67
parentb1019d5e6e605190d008003a382407f23e19f807
perf kmem: Show warning when trying to run stat without record

Sometimes one can mistakenly run 'perf kmem stat' without running 'perf
kmem record' before or with a different configuration like recording
--slab and stat --page.  Show a warning message like the one below to
inform the user:

  # perf kmem stat --page --caller
  No page allocation events found.  Have you run 'perf kmem record --page'?

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joonsoo Kim <js1304@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/1430837572-31395-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-kmem.c