Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7ac4f9f authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarJiri Olsa <jolsa@redhat.com>
Tested-by: default avatarArnaldo 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e8c5fe10
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -100,6 +100,10 @@ REPORT OPTIONS
--show-all::
	Show all captured HITM lines, with no regard to HITM % 0.0005 limit.

-f::
--force::
	Don't do ownership validation.

C2C RECORD
----------
The perf c2c record command setup options related to HITM cacheline analysis
+3 −1
Original line number Diff line number Diff line
@@ -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;
@@ -2539,6 +2540,7 @@ static int perf_c2c__report(int argc, const char **argv)
		input_name = "perf.data";

	file.path  = input_name;
	file.force = symbol_conf.force;

	err = setup_display(display);
	if (err)