On Mon, Jul 12, 2021 at 05:32:11PM +0300, Adrian Hunter wrote:
[...]
--- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -1686,13 +1686,12 @@ static int __auxtrace_mmap__read(struct mmap *map, union perf_event ev; void *data1, *data2;
- head = auxtrace_mmap__read_head(mm);
- if (snapshot) {
if (auxtrace_record__find_snapshot(itr, mm->idx, mm, data, &head, &old))head = auxtrace_mmap__read_snapshot_head(mm);
That leaves a nested 'if' which is not kernel style i.e. could be
if (snapshot && auxtrace_record__find_snapshot(itr, mm->idx, mm, data, &head, &old))
Will refine in next spin, thanks for suggestion!
return -1;
- } else {
}head = auxtrace_mmap__read_head(mm);
if (old == head)