linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Mahmoud Abumandour <ma.mandourr@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf data: don't mention --to-ctf if it's not supported
Date: Mon, 21 Feb 2022 22:14:31 +0100	[thread overview]
Message-ID: <YhQAt+iSkc2VcvEP@krava> (raw)
In-Reply-To: <20220220113952.138280-1-ma.mandourr@gmail.com>

On Sun, Feb 20, 2022 at 01:39:52PM +0200, Mahmoud Abumandour wrote:
> From: Mahmoud Mandour <ma.mandourr@gmail.com>
> 
> The option `--to-ctf` is only available when perf has libbabeltrace
> support. Hence, on error, we shouldn't state that user must include
> `--to-ctf` unless it's supported.
> 
> The only user-visible change for this commit is that when `perf` is not
> configured to support libbabeltrace, the user is only prompted to
> provide the `--to-json` option instead of bothe `--to-json` and
> `--to-ctf`.
> 
> Signed-off-by: Mahmoud Mandour <ma.mandourr@gmail.com>

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> ---
>  tools/perf/builtin-data.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c
> index b7f9dc85a407..c22d82d2a73c 100644
> --- a/tools/perf/builtin-data.c
> +++ b/tools/perf/builtin-data.c
> @@ -62,10 +62,17 @@ static int cmd_data_convert(int argc, const char **argv)
>  		pr_err("You cannot specify both --to-ctf and --to-json.\n");
>  		return -1;
>  	}
> +#ifdef HAVE_LIBBABELTRACE_SUPPORT
>  	if (!to_json && !to_ctf) {
>  		pr_err("You must specify one of --to-ctf or --to-json.\n");
>  		return -1;
>  	}
> +#else
> +	if (!to_json) {
> +		pr_err("You must specify --to-json.\n");
> +	return -1;
> +}
> +#endif
>  
>  	if (to_json)
>  		return bt_convert__perf2json(input_name, to_json, &opts);
> -- 
> 2.30.2
> 

  reply	other threads:[~2022-02-21 21:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-20 11:39 [PATCH] perf data: don't mention --to-ctf if it's not supported Mahmoud Abumandour
2022-02-21 21:14 ` Jiri Olsa [this message]
2022-02-23  0:23   ` 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=YhQAt+iSkc2VcvEP@krava \
    --to=olsajiri@gmail.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=ma.mandourr@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).