From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938903AbcISNTj (ORCPT ); Mon, 19 Sep 2016 09:19:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55794 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938920AbcISNLp (ORCPT ); Mon, 19 Sep 2016 09:11:45 -0400 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Don Zickus , Joe Mario , Ingo Molnar , Peter Zijlstra , Namhyung Kim , David Ahern , Andi Kleen Subject: [PATCH 38/61] perf c2c report: Add symbol and dso sort keys Date: Mon, 19 Sep 2016 15:09:47 +0200 Message-Id: <1474290610-23241-39-git-send-email-jolsa@kernel.org> In-Reply-To: <1474290610-23241-1-git-send-email-jolsa@kernel.org> References: <1474290610-23241-1-git-send-email-jolsa@kernel.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 19 Sep 2016 13:11:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding symbol and dso dimension key wrappers. They are to be displayed in the single cacheline output: symbol, dso They are wrappers for global sort_sym and sort_dso sort entries with c2c specific headers. Link: http://lkml.kernel.org/n/tip-6742e6g0r7n63y5wc4rrgxx5@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/builtin-c2c.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 2966a388ce8b..b3dcd590e97a 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -1104,6 +1104,17 @@ static struct c2c_dimension dim_tid = { .se = &sort_thread, }; +static struct c2c_dimension dim_symbol = { + .name = "symbol", + .se = &sort_sym, +}; + +static struct c2c_dimension dim_dso = { + .header = HEADER_BOTH("Shared", "Object"), + .name = "dso", + .se = &sort_dso, +}; + #undef HEADER_LOW #undef HEADER_BOTH #undef HEADER_SPAN @@ -1140,6 +1151,8 @@ static struct c2c_dimension *dimensions[] = { &dim_dram_rmt, &dim_pid, &dim_tid, + &dim_symbol, + &dim_dso, NULL, }; @@ -1254,12 +1267,17 @@ static int c2c_hists__init_output(struct perf_hpp_list *hpp_list, char *name) static int c2c_hists__init_sort(struct perf_hpp_list *hpp_list, char *name) { struct c2c_fmt *c2c_fmt = get_format(name); + struct c2c_dimension *dim; if (!c2c_fmt) { reset_dimensions(); return sort_dimension__add(hpp_list, name, NULL, 0); } + dim = c2c_fmt->dim; + if (dim == &dim_dso) + hpp_list->dso = 1; + perf_hpp_list__register_sort_field(hpp_list, &c2c_fmt->fmt); return 0; } -- 2.7.4