From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DB0CC433F5 for ; Wed, 23 Feb 2022 00:23:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233619AbiBWAYR (ORCPT ); Tue, 22 Feb 2022 19:24:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231765AbiBWAYQ (ORCPT ); Tue, 22 Feb 2022 19:24:16 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B99D634679; Tue, 22 Feb 2022 16:23:50 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 55324612C3; Wed, 23 Feb 2022 00:23:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8791FC340E8; Wed, 23 Feb 2022 00:23:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645575829; bh=5BdC/hk6mQx2wiONPIjO2S8J7pPFSbEQ9KnQQgIHc1w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ob1Y5bXJWrbpwDY2/YYzbvCgBABo7khCOAMXduz7XeChqJjAimg0UvcDf5fqcff9o 6kFj8OfcYmdUrD80sVhKLoMmUyt6xsdkiUscWwFlpyVutpT7uzL98JoW9PgXt/W7FF GafZn7Fg8x/OhH9lodzrd6iz/g9Vzzx3I7IHkeyLBK6aPzKdGfXl7JWlkWH0u3jhC7 XDNSx1tB7BtPDRLm0uNkhAauIck1kKHq0M880Oy5dsryPycyTm6x4fMNhWwvrtmd3B j9xgzvj13NL5T9YL8MMzJ+qq8ue8qgMQwmtSc6UZwW4Wy20HUB7CeA30T4kTxdG7Y+ RX9jBAGtTqBUA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 8CFA1400FE; Tue, 22 Feb 2022 21:23:47 -0300 (-03) Date: Tue, 22 Feb 2022 21:23:47 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Mahmoud Abumandour , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , 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 Message-ID: References: <20220220113952.138280-1-ma.mandourr@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org Em Mon, Feb 21, 2022 at 10:14:31PM +0100, Jiri Olsa escreveu: > On Sun, Feb 20, 2022 at 01:39:52PM +0200, Mahmoud Abumandour wrote: > > From: Mahmoud Mandour > > > > 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 > > Acked-by: Jiri Olsa Thanks, applied. - Arnaldo > 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 > > -- - Arnaldo