Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1326738
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf hists: Add 'hpp__equal' callback function |
| Date | Thu, 04 Feb 2016 13:40:03 +0100 |
| Message-ID | <qYrmz-da-29@gated-at.bofh.it> (permalink) |
| References | <qSein-73y-47@gated-at.bofh.it> |
| X-Original-To | linux-tip-commits@vger.kernel.org |
| Reply-To | hpa@zytor.com, tglx@linutronix.de, a.p.zijlstra@chello.nl, mingo@kernel.org, namhyung@kernel.org, linux-kernel@vger.kernel.org, acme@redhat.com, jolsa@kernel.org, dsahern@gmail.com |
| Git-Commit-ID | c0020efa079c5fc2388945ae7e856b362731442d |
| X-Mailer | tip-git-log-daemon |
| Robot-ID | <tip-bot.git.kernel.org> |
| Robot-Unsubscribe | Contact <mailto:hpa@kernel.org> 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 | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 70 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | mingo@kernel.org, namhyung@kernel.org, acme@redhat.com, linux-kernel@vger.kernel.org, dsahern@gmail.com, jolsa@kernel.org, hpa@zytor.com, tglx@linutronix.de, a.p.zijlstra@chello.nl |
| X-Original-Date | Thu, 4 Feb 2016 04:35:14 -0800 |
| X-Original-Message-ID | <tip-c0020efa079c5fc2388945ae7e856b362731442d@git.kernel.org> |
| X-Original-References | <1453109064-1026-7-git-send-email-jolsa@kernel.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1326738 |
Show key headers only | View raw
Commit-ID: c0020efa079c5fc2388945ae7e856b362731442d
Gitweb: http://git.kernel.org/tip/c0020efa079c5fc2388945ae7e856b362731442d
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 18 Jan 2016 10:24:04 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 3 Feb 2016 12:24:01 -0300
perf hists: Add 'hpp__equal' callback function
Adding 'hpp__equal' callback function to compare hpp output format
entries.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1453109064-1026-7-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/ui/hist.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index 71c8bb7..b543f4b 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -371,6 +371,19 @@ static int64_t hpp__nop_cmp(struct perf_hpp_fmt *fmt __maybe_unused,
return 0;
}
+static bool perf_hpp__is_hpp_entry(struct perf_hpp_fmt *a)
+{
+ return a->header == hpp__header_fn;
+}
+
+static bool hpp__equal(struct perf_hpp_fmt *a, struct perf_hpp_fmt *b)
+{
+ if (!perf_hpp__is_hpp_entry(a) || !perf_hpp__is_hpp_entry(b))
+ return false;
+
+ return a->idx == b->idx;
+}
+
#define HPP__COLOR_PRINT_FNS(_name, _fn, _idx) \
{ \
.name = _name, \
@@ -382,6 +395,7 @@ static int64_t hpp__nop_cmp(struct perf_hpp_fmt *fmt __maybe_unused,
.collapse = hpp__nop_cmp, \
.sort = hpp__sort_ ## _fn, \
.idx = PERF_HPP__ ## _idx, \
+ .equal = hpp__equal, \
}
#define HPP__COLOR_ACC_PRINT_FNS(_name, _fn, _idx) \
@@ -395,6 +409,7 @@ static int64_t hpp__nop_cmp(struct perf_hpp_fmt *fmt __maybe_unused,
.collapse = hpp__nop_cmp, \
.sort = hpp__sort_ ## _fn, \
.idx = PERF_HPP__ ## _idx, \
+ .equal = hpp__equal, \
}
#define HPP__PRINT_FNS(_name, _fn, _idx) \
@@ -407,6 +422,7 @@ static int64_t hpp__nop_cmp(struct perf_hpp_fmt *fmt __maybe_unused,
.collapse = hpp__nop_cmp, \
.sort = hpp__sort_ ## _fn, \
.idx = PERF_HPP__ ## _idx, \
+ .equal = hpp__equal, \
}
struct perf_hpp_fmt perf_hpp__format[] = {
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[tip:perf/core] perf hists: Add 'hpp__equal' callback function tip-bot for Jiri Olsa <tipbot@zytor.com> - 2016-02-04 13:40 +0100
csiph-web