All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users <linux-perf-users@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Riccardo Mancini <rickyman7@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH] perf: Move debug initialization earlier
Date: Thu, 27 May 2021 08:51:41 -0700	[thread overview]
Message-ID: <CAP-5=fWRAbkd8MVAxdGf0YGE1oFPT40rZC3eb3OKjqWmBVq_BA@mail.gmail.com> (raw)
In-Reply-To: <20210519164447.2672030-1-irogers@google.com>

On Wed, May 19, 2021 at 9:44 AM Ian Rogers <irogers@google.com> wrote:
>
> This avoids segfaults during option handlers that use pr_err. For
> example, "perf --debug nopager list" segfaults before this change.
>
> Fixes: 8abceacff87d (perf debug: Add debug_set_file function)
> Signed-off-by: Ian Rogers <irogers@google.com>

Ping.

Thanks!
Ian

> ---
>  tools/perf/perf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/perf.c b/tools/perf/perf.c
> index 20cb91ef06ff..2f6b67189b42 100644
> --- a/tools/perf/perf.c
> +++ b/tools/perf/perf.c
> @@ -443,6 +443,8 @@ int main(int argc, const char **argv)
>         const char *cmd;
>         char sbuf[STRERR_BUFSIZE];
>
> +       perf_debug_setup();
> +
>         /* libsubcmd init */
>         exec_cmd_init("perf", PREFIX, PERF_EXEC_PATH, EXEC_PATH_ENVIRONMENT);
>         pager_init(PERF_PAGER_ENVIRONMENT);
> @@ -531,8 +533,6 @@ int main(int argc, const char **argv)
>          */
>         pthread__block_sigwinch();
>
> -       perf_debug_setup();
> -
>         while (1) {
>                 static int done_help;
>
> --
> 2.31.1.751.gd2f1c929bd-goog
>

  reply	other threads:[~2021-05-27 15:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 16:44 [PATCH] perf: Move debug initialization earlier Ian Rogers
2021-05-27 15:51 ` Ian Rogers [this message]
2021-05-27 16:25   ` Arnaldo Carvalho de Melo

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='CAP-5=fWRAbkd8MVAxdGf0YGE1oFPT40rZC3eb3OKjqWmBVq_BA@mail.gmail.com' \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rickyman7@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.