public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Yannick Brosseau <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, namhyung@kernel.org, acme@redhat.com,
	scientist@fb.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
	mbd@fb.com, tglx@linutronix.de
Subject: [tip:perf/core] perf script: Also allow forcing reading of non-root owned files by root
Date: Wed, 18 Jan 2017 01:21:30 -0800	[thread overview]
Message-ID: <tip-be3d466c7356e574a2aa4e19dd20b19b3a9cc4fc@git.kernel.org> (raw)
In-Reply-To: <20170113182527.18625-1-scientist@fb.com>

Commit-ID:  be3d466c7356e574a2aa4e19dd20b19b3a9cc4fc
Gitweb:     http://git.kernel.org/tip/be3d466c7356e574a2aa4e19dd20b19b3a9cc4fc
Author:     Yannick Brosseau <scientist@fb.com>
AuthorDate: Fri, 13 Jan 2017 13:25:27 -0500
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 16 Jan 2017 14:59:15 -0300

perf script: Also allow forcing reading of non-root owned files by root

In 2059fc7a5a9e ("perf symbols: Allow forcing reading of non-root owned
files by root") 'perf report' was added the option of forcing reading of
non-root owned symbol file.

This add the same behavior for perf script.

Reported-by: Mark Drayton <mbd@fb.com>
Signed-off-by: Yannick Brosseau <scientist@fb.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: kernel-team@fb.com
Link: http://lkml.kernel.org/r/20170113182527.18625-1-scientist@fb.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-script.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 2f3ff69..c0783b4 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -2180,7 +2180,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
 		    "Show the mmap events"),
 	OPT_BOOLEAN('\0', "show-switch-events", &script.show_switch_events,
 		    "Show context switch events (if recorded)"),
-	OPT_BOOLEAN('f', "force", &file.force, "don't complain, do it"),
+	OPT_BOOLEAN('f', "force", &symbol_conf.force, "don't complain, do it"),
 	OPT_BOOLEAN(0, "ns", &nanosecs,
 		    "Use 9 decimal places when displaying time"),
 	OPT_CALLBACK_OPTARG(0, "itrace", &itrace_synth_opts, NULL, "opts",
@@ -2212,6 +2212,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused)
 			     PARSE_OPT_STOP_AT_NON_OPTION);
 
 	file.path = input_name;
+	file.force = symbol_conf.force;
 
 	if (argc > 1 && !strncmp(argv[0], "rec", strlen("rec"))) {
 		rec_script_path = get_script_path(argv[1], RECORD_SUFFIX);

      parent reply	other threads:[~2017-01-18  9:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 18:25 [PATCH] perf script: Also allow forcing reading of non-root owned files by root Yannick Brosseau
2017-01-13 19:24 ` Arnaldo Carvalho de Melo
2017-01-18  9:21 ` tip-bot for Yannick Brosseau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-be3d466c7356e574a2aa4e19dd20b19b3a9cc4fc@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mbd@fb.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=scientist@fb.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox