aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-11-21 16:33:28 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-11-23 08:44:04 -0500
commitb7ac4f9f3b2532b4e3dcd3d402c405c46a8ec811 (patch)
tree1140daa5685313c29bc35ad7a460080ab0e1de8d /tools
parente8c5fe101e55e4c45a2859cea2b4c374595f8867 (diff)
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 <jolsa@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Joe Mario <jmario@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1479764011-10732-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Documentation/perf-c2c.txt4
-rw-r--r--tools/perf/builtin-c2c.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/Documentation/perf-c2c.txt b/tools/perf/Documentation/perf-c2c.txt
index 21810d711f5f..5eda9336267e 100644
--- a/tools/perf/Documentation/perf-c2c.txt
+++ b/tools/perf/Documentation/perf-c2c.txt
@@ -100,6 +100,10 @@ REPORT OPTIONS
100--show-all:: 100--show-all::
101 Show all captured HITM lines, with no regard to HITM % 0.0005 limit. 101 Show all captured HITM lines, with no regard to HITM % 0.0005 limit.
102 102
103-f::
104--force::
105 Don't do ownership validation.
106
103C2C RECORD 107C2C RECORD
104---------- 108----------
105The perf c2c record command setup options related to HITM cacheline analysis 109The perf c2c record command setup options related to HITM cacheline analysis
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)
2523 OPT_STRING('d', "display", &display, NULL, "lcl,rmt"), 2523 OPT_STRING('d', "display", &display, NULL, "lcl,rmt"),
2524 OPT_STRING('c', "coalesce", &coalesce, "coalesce fields", 2524 OPT_STRING('c', "coalesce", &coalesce, "coalesce fields",
2525 "coalesce fields: pid,tid,iaddr,dso"), 2525 "coalesce fields: pid,tid,iaddr,dso"),
2526 OPT_BOOLEAN('f', "force", &symbol_conf.force, "don't complain, do it"),
2526 OPT_END() 2527 OPT_END()
2527 }; 2528 };
2528 int err = 0; 2529 int err = 0;
@@ -2538,7 +2539,8 @@ static int perf_c2c__report(int argc, const char **argv)
2538 if (!input_name || !strlen(input_name)) 2539 if (!input_name || !strlen(input_name))
2539 input_name = "perf.data"; 2540 input_name = "perf.data";
2540 2541
2541 file.path = input_name; 2542 file.path = input_name;
2543 file.force = symbol_conf.force;
2542 2544
2543 err = setup_display(display); 2545 err = setup_display(display);
2544 if (err) 2546 if (err)