public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Andi Kleen <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, acme@redhat.com, ak@linux.intel.com,
	mingo@kernel.org, tglx@linutronix.de,
	linux-kernel@vger.kernel.org, jolsa@kernel.org
Subject: [tip:perf/core] perf list: Avoid extra : for --raw metrics
Date: Wed, 3 Jul 2019 07:42:27 -0700	[thread overview]
Message-ID: <tip-9c344d15f5783260f57c711f3fce72dd744bebe2@git.kernel.org> (raw)
In-Reply-To: <20190628220737.13259-2-andi@firstfloor.org>

Commit-ID:  9c344d15f5783260f57c711f3fce72dd744bebe2
Gitweb:     https://git.kernel.org/tip/9c344d15f5783260f57c711f3fce72dd744bebe2
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Fri, 28 Jun 2019 15:07:36 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 2 Jul 2019 16:08:16 -0300

perf list: Avoid extra : for --raw metrics

When printing the metrics raw, don't print : after the metricgroups.
This helps the command line completion to complete those too.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20190628220737.13259-2-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/metricgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index bc25995255ab..7d36435fa84c 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -375,7 +375,7 @@ void metricgroup__print(bool metrics, bool metricgroups, char *filter,
 		struct mep *me = container_of(node, struct mep, nd);
 
 		if (metricgroups)
-			printf("%s%s%s", me->name, metrics ? ":" : "", raw ? " " : "\n");
+			printf("%s%s%s", me->name, metrics && !raw ? ":" : "", raw ? " " : "\n");
 		if (metrics)
 			metricgroup__print_strlist(me->metrics, raw);
 		next = rb_next(node);

  reply	other threads:[~2019-07-03 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 22:07 [PATCH 1/3] perf vendor events intel: Metric fixes for SKX/CLX Andi Kleen
2019-06-28 22:07 ` [PATCH 2/3] perf list: Avoid extra : for --raw metrics Andi Kleen
2019-07-03 14:42   ` tip-bot for Andi Kleen [this message]
2019-06-28 22:07 ` [PATCH 3/3] perf tools metric: Don't include duration_time in group Andi Kleen
2019-07-03 14:43   ` [tip:perf/core] " tip-bot for Andi Kleen
2019-07-02 15:58 ` [PATCH 1/3] perf vendor events intel: Metric fixes for SKX/CLX Arnaldo Carvalho de Melo
2019-07-03 14:41 ` [tip:perf/core] " tip-bot for Andi Kleen

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-9c344d15f5783260f57c711f3fce72dd744bebe2@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --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