[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1452520124-2073-50-git-send-email-wangnan0@huawei.com>
Date: Mon, 11 Jan 2016 13:48:40 +0000
From: Wang Nan <wangnan0@...wei.com>
To: <acme@...nel.org>
CC: <linux-kernel@...r.kernel.org>, <pi3orama@....com>,
<lizefan@...wei.com>, <netdev@...r.kernel.org>,
<davem@...emloft.net>, Wang Nan <wangnan0@...wei.com>,
He Kuang <hekuang@...wei.com>,
"Arnaldo Carvalho de Melo" <acme@...hat.com>,
Jiri Olsa <jolsa@...nel.org>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Namhyung Kim <namhyung@...nel.org>
Subject: [PATCH 49/53] perf tools: Consider TAILSIZE bit when caclulate is_pos
evsel->is_pos indicates event id location in a event (count backward).
It is used to find id for tracking events (mmap, exit...). If TAILSIZE
is selected, this location should be changed accordingly.
Signed-off-by: Wang Nan <wangnan0@...wei.com>
Signed-off-by: He Kuang <hekuang@...wei.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Zefan Li <lizefan@...wei.com>
Cc: pi3orama@....com
---
tools/perf/util/evsel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 6932b8b..c59ea34 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -144,10 +144,10 @@ static int __perf_evsel__calc_id_pos(u64 sample_type)
*/
static int __perf_evsel__calc_is_pos(u64 sample_type)
{
- int idx = 1;
+ int idx = 1 + (sample_type & PERF_SAMPLE_TAILSIZE ? 1 : 0);
if (sample_type & PERF_SAMPLE_IDENTIFIER)
- return 1;
+ return idx;
if (!(sample_type & PERF_SAMPLE_ID))
return -1;
--
1.8.3.4
Powered by blists - more mailing lists