Message ID | 1452520124-2073-50-git-send-email-wangnan0@huawei.com |
---|---|
State | New |
Headers | show |
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;