Messages in this thread | | | From | Alexander Yarygin <> | Subject | Re: [PATCH 1/2] perf session: Add option to copy events when queueing | Date | Fri, 19 Sep 2014 20:25:17 +0400 |
| |
David Ahern <dsahern@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;
| |