From b7ac4f9f3b2532b4e3dcd3d402c405c46a8ec811 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Mon, 21 Nov 2016 22:33:28 +0100 Subject: perf c2c report: Add -f/--force option Adding -f/--force option to go through ownership validation: $ sudo perf c2c report File perf.data not owned by current user or root (use -f to override) $ $ sudo perf c2c report -f < c2c report output > $ Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1479764011-10732-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-c2c.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/perf/builtin-c2c.c') diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 15addb06d611..d873977b8fb6 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -2523,6 +2523,7 @@ static int perf_c2c__report(int argc, const char **argv) OPT_STRING('d', "display", &display, NULL, "lcl,rmt"), OPT_STRING('c', "coalesce", &coalesce, "coalesce fields", "coalesce fields: pid,tid,iaddr,dso"), + OPT_BOOLEAN('f', "force", &symbol_conf.force, "don't complain, do it"), OPT_END() }; int err = 0; @@ -2538,7 +2539,8 @@ static int perf_c2c__report(int argc, const char **argv) if (!input_name || !strlen(input_name)) input_name = "perf.data"; - file.path = input_name; + file.path = input_name; + file.force = symbol_conf.force; err = setup_display(display); if (err) -- cgit