Em Tue, Sep 10, 2013 at 10:17:28AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Tue, Sep 10, 2013 at 03:05:03PM +0200, Stephane Eranian escreveu: > > On Tue, Sep 10, 2013 at 3:00 PM, Arnaldo Carvalho de Melo wrote: > > > Em Mon, Sep 09, 2013 at 04:48:44PM -0300, Arnaldo Carvalho de Melo escreveu: > > > +++ b/kernel/events/core.c > > > @@ -5039,6 +5039,7 @@ static void perf_event_mmap_output(struct perf_event *event, > > > mmap_event->event_id.header.size += sizeof(mmap_event->maj); > > > mmap_event->event_id.header.size += sizeof(mmap_event->min); > > > mmap_event->event_id.header.size += sizeof(mmap_event->ino); > > > + mmap_event->event_id.header.size += sizeof(mmap_event->ino_generation); > > > } > > > perf_event_header__init_id(&mmap_event->event_id.header, &sample, event); > > Arg, yes, this is missing. > > Do you want to submit the patch? > I will, in some jiffies, just rebooting with the patched kernel to > re-run tperf test. > > Thanks for tracking it down. > np :-) More fallout, this time the resulting tools fail to run on older kernels, i.e. any kernel that doesn't have perf_event_attr.mmap2, doesn't matter the event type: [acme@zoo linux]$ perf record usleep 1 Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cycles). /bin/dmesg may provide additional information. No CONFIG_PERF_EVENTS=y kernel support configured? usleep: Terminated [acme@zoo linux]$ perf record -e cpu-clock usleep 1 Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (cpu-clock). /bin/dmesg may provide additional information. No CONFIG_PERF_EVENTS=y kernel support configured? usleep: Terminated [acme@zoo linux]$ That is because kernel/events/core.c perf_copy_attr() has this test: if (attr->__reserved_1) return -EINVAL; So we must have the handling we have for other things that were added in the past, like .sample_id_all, .exclude_guest, etc, like is done in the attached patch, please ack. Ingo, since you haven't merged my latest perf/urgent pull req, do you want me to fold this into the patch that makes the tooling side use PERF_RECORD_MMAP2? - Arnaldo