From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756154AbcJVIhF (ORCPT ); Sat, 22 Oct 2016 04:37:05 -0400 Received: from terminus.zytor.com ([198.137.202.10]:56886 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753510AbcJVIhD (ORCPT ); Sat, 22 Oct 2016 04:37:03 -0400 Date: Sat, 22 Oct 2016 01:36:49 -0700 From: tip-bot for Jiri Olsa Message-ID: Cc: jolsa@kernel.org, mingo@kernel.org, andi@firstfloor.org, dzickus@redhat.com, linux-kernel@vger.kernel.org, dsahern@gmail.com, acme@redhat.com, hpa@zytor.com, namhyung@kernel.org, jmario@redhat.com, tglx@linutronix.de, a.p.zijlstra@chello.nl Reply-To: andi@firstfloor.org, jolsa@kernel.org, mingo@kernel.org, dzickus@redhat.com, linux-kernel@vger.kernel.org, dsahern@gmail.com, acme@redhat.com, namhyung@kernel.org, hpa@zytor.com, a.p.zijlstra@chello.nl, tglx@linutronix.de, jmario@redhat.com In-Reply-To: <1474558645-19956-20-git-send-email-jolsa@kernel.org> References: <1474558645-19956-20-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf c2c report: Add header macros Git-Commit-ID: 600a8cf45b797ff189c42175c1f165fb5cb9479a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 600a8cf45b797ff189c42175c1f165fb5cb9479a Gitweb: http://git.kernel.org/tip/600a8cf45b797ff189c42175c1f165fb5cb9479a Author: Jiri Olsa AuthorDate: Thu, 22 Sep 2016 17:36:47 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 19 Oct 2016 13:18:31 -0300 perf c2c report: Add header macros Adding helping macros to define header objects. It will be used in following patches, that add new dimensions. The c2c report will support 2 line headers, hence we only define line[0/1] in macros. Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Don Zickus Cc: Joe Mario Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1474558645-19956-20-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-c2c.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 43f18aa..78addc4 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -273,6 +273,41 @@ static int c2c_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, return scnprintf(hpp->buf, hpp->size, "%*s", width, text); } +#define HEADER_LOW(__h) \ + { \ + .line[1] = { \ + .text = __h, \ + }, \ + } + +#define HEADER_BOTH(__h0, __h1) \ + { \ + .line[0] = { \ + .text = __h0, \ + }, \ + .line[1] = { \ + .text = __h1, \ + }, \ + } + +#define HEADER_SPAN(__h0, __h1, __s) \ + { \ + .line[0] = { \ + .text = __h0, \ + .span = __s, \ + }, \ + .line[1] = { \ + .text = __h1, \ + }, \ + } + +#define HEADER_SPAN_LOW(__h) \ + { \ + .line[1] = { \ + .text = __h, \ + }, \ + } + static struct c2c_dimension *dimensions[] = { NULL, };