David Ahern <dsah...@gmail.com> writes: > On 9/19/14, 2:48 AM, Alexander Yarygin wrote: >> It did't work. Turned out that there is at least one event alive after >> finished_round(), usually I get more - ~20. Not sure why, maybe it's >> another problem which should be solved at first? > > hmm.... perf_evlist__mmap_consume is not at the event level, but at > the mmap level -- it assumes everything read has been processed which > is not true for this case. > > David
So, in general, we know when each event has been processed, but at that time there is no reference to appropriate mmap. To create that link we still need to allocate something per event. I'm confused by the applying perf_evlist__mmap_consume() for each perf_evlist__mmap_read, shouldn't it be for each perf_kvm__mmap_read_idx()? for (i = 0; i < kvm->evlist->nr_mmaps; i++) { n = perf_kvm__mmap_read_idx(kvm, i, &mmap_time); perf_evlist__mmap_consume(kvm->evlist, idx); /* <-- here? */ if (n < 0) return -1; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/