[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-d392711095f12942a61e2963f5ab0076ac651e73@git.kernel.org>
Date: Wed, 24 Feb 2016 21:42:21 -0800
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: a.p.zijlstra@...llo.nl, jolsa@...nel.org, tglx@...utronix.de,
acme@...hat.com, eranian@...gle.com, dsahern@...il.com,
hpa@...or.com, linux-kernel@...r.kernel.org, ak@...ux.intel.com,
mingo@...nel.org, namhyung@...nel.org
Subject: [tip:perf/core] perf tools: Introduce cl_offset function
Commit-ID: d392711095f12942a61e2963f5ab0076ac651e73
Gitweb: http://git.kernel.org/tip/d392711095f12942a61e2963f5ab0076ac651e73
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Mon, 15 Feb 2016 09:34:33 +0100
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 23 Feb 2016 12:09:22 -0300
perf tools: Introduce cl_offset function
It'll be used in following patches.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/r/1455525293-8671-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/sort.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 46f159f..5b9c624 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -168,6 +168,12 @@ static inline u64 cl_address(u64 address)
return (address & ~(cacheline_size - 1));
}
+static inline u64 cl_offset(u64 address)
+{
+ /* return the cacheline of the address */
+ return (address & (cacheline_size - 1));
+}
+
enum sort_mode {
SORT_MODE__NORMAL,
SORT_MODE__BRANCH,
Powered by blists - more mailing lists