imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,61 +1,61 @@
 static void perf_top__mmap_read_idx(struct perf_top *top, int idx) {
   struct record_opts *opts = &top->record_opts;
   struct perf_evlist *evlist = top->evlist;
   struct perf_sample sample;
   struct perf_evsel *evsel;
   struct perf_mmap *md;
   struct perf_session *session = top->session;
   union perf_event *event;
   struct machine *machine;
   u64 end, start;
   int ret;
   md = opts->overwrite ? &evlist->overwrite_mmap[idx] : &evlist->mmap[idx];
   if (perf_mmap__read_init(md, opts->overwrite, &start, &end) < 0) return;
   while ((event = perf_mmap__read_event(md, opts->overwrite, &start, end)) != NULL) {
     ret = perf_evlist__parse_sample(evlist, event, &sample);
     if (ret) {
       pr_err("Can't parse sample, err = %d\n", ret);
       goto next_event;
     }
     evsel = perf_evlist__id2evsel(session->evlist, sample.id);
     assert(evsel != NULL);
     if (event->header.type == PERF_RECORD_SAMPLE) ++top->samples;
     switch (sample.cpumode) {
     case PERF_RECORD_MISC_USER:
       ++top->us_samples;
       if (top->hide_user_symbols) goto next_event;
       machine = &session->machines.host;
       break;
     case PERF_RECORD_MISC_KERNEL:
       ++top->kernel_samples;
       if (top->hide_kernel_symbols) goto next_event;
       machine = &session->machines.host;
       break;
     case PERF_RECORD_MISC_GUEST_KERNEL:
       ++top->guest_kernel_samples;
       machine = perf_session__find_machine(session, sample.pid);
       break;
     case PERF_RECORD_MISC_GUEST_USER:
       ++top->guest_us_samples;
       /*
        * TODO: we don't process guest user from host side
        * except simple counting.
        */
       goto next_event;
     default:
       if (event->header.type == PERF_RECORD_SAMPLE) goto next_event;
       machine = &session->machines.host;
       break;
     }
     if (event->header.type == PERF_RECORD_SAMPLE) {
       perf_event__process_sample(&top->tool, event, evsel, &sample, machine);
     } else if (event->header.type < PERF_RECORD_MAX) {
       hists__inc_nr_events(evsel__hists(evsel), event->header.type);
       machine__process_event(machine, event, &sample);
     } else
       ++session->evlist->stats.nr_unknown_events;
   next_event:
-    perf_mmap__consume(md, opts->overwrite);
+    perf_mmap__consume(md);
   }
   perf_mmap__read_done(md);
 }<sep>@@
expression md,e;
@@
-               perf_mmap__consume(md, e);
+               perf_mmap__consume(md);
--- initial
+++ final
@@ -1,17 +1,17 @@
 static int process_events(struct machine *machine, struct perf_evlist *evlist, struct state *state) {
   union perf_event *event;
   struct perf_mmap *md;
   u64 end, start;
   int i, ret;
   for (i = 0; i < evlist->nr_mmaps; i++) {
     md = &evlist->mmap[i];
     if (perf_mmap__read_init(md, false, &start, &end) < 0) continue;
     while ((event = perf_mmap__read_event(md, false, &start, end)) != NULL) {
       ret = process_event(machine, evlist, event, state);
-      perf_mmap__consume(md, false);
+      perf_mmap__consume(md);
       if (ret < 0) return ret;
     }
     perf_mmap__read_done(md);
   }
   return 0;
 }<sep>@@
expression md,e;
@@
-               perf_mmap__consume(md, e);
+               perf_mmap__consume(md);
--- initial
+++ final
@@ -1,17 +1,17 @@
 static int find_comm(struct perf_evlist *evlist, const char *comm) {
   union perf_event *event;
   struct perf_mmap *md;
   u64 end, start;
   int i, found;
   found = 0;
   for (i = 0; i < evlist->nr_mmaps; i++) {
     md = &evlist->mmap[i];
     if (perf_mmap__read_init(md, false, &start, &end) < 0) continue;
     while ((event = perf_mmap__read_event(md, false, &start, end)) != NULL) {
       if (event->header.type == PERF_RECORD_COMM && (pid_t)event->comm.pid == getpid() && (pid_t)event->comm.tid == getpid() && strcmp(event->comm.comm, comm) == 0) found += 1;
-      perf_mmap__consume(md, false);
+      perf_mmap__consume(md);
     }
     perf_mmap__read_done(md);
   }
   return found;
 }<sep>@@
expression md,e;
@@
-               perf_mmap__consume(md, e);
+               perf_mmap__consume(md);
--- initial
+++ final
@@ -1,31 +1,31 @@
 int perf_mmap__push(struct perf_mmap *md, void *to, int push(void *to, void *buf, size_t size)) {
   u64 head = perf_mmap__read_head(md);
   u64 end, start;
   unsigned char *data = md->base + page_size;
   unsigned long size;
   void *buf;
   int rc = 0;
   rc = perf_mmap__read_init(md, md->overwrite, &start, &end);
   if (rc < 0) return (rc == -EAGAIN) ? 0 : -1;
   size = md->end - md->start;
   if ((md->start & md->mask) + size != (md->end & md->mask)) {
     buf = &data[md->start & md->mask];
     size = md->mask + 1 - (md->start & md->mask);
     md->start += size;
     if (push(to, buf, size) < 0) {
       rc = -1;
       goto out;
     }
   }
   buf = &data[md->start & md->mask];
   size = md->end - md->start;
   md->start += size;
   if (push(to, buf, size) < 0) {
     rc = -1;
     goto out;
   }
   md->prev = head;
-  perf_mmap__consume(md, md->overwrite);
+  perf_mmap__consume(md);
 out:
   return rc;
 }<sep>@@
expression md,e;
@@
-               perf_mmap__consume(md, e);
+               perf_mmap__consume(md);
--- initial
+++ final
@@ -1,28 +1,28 @@
 int perf_mmap__read_init(struct perf_mmap *md, bool overwrite, u64 *startp, u64 *endp) {
   u64 head = perf_mmap__read_head(md);
   u64 old = md->prev;
   unsigned char *data = md->base + page_size;
   unsigned long size;
   *startp = overwrite ? head : old;
   *endp = overwrite ? old : head;
   md->start = md->overwrite ? head : old;
   md->end = md->overwrite ? old : head;
   if (md->start == md->end) return -EAGAIN;
   size = md->end - md->start;
   if (size > (unsigned long)(md->mask) + 1) {
     if (!md->overwrite) {
       WARN_ONCE(1, "failed to keep up with mmap data. (warn only once)\n");
       md->prev = head;
-      perf_mmap__consume(md, overwrite);
+      perf_mmap__consume(md);
       return -EAGAIN;
     }
     /*
      * Backward ring buffer is full. We still have a chance to read
      * most of data from it.
      */
     if (overwrite_rb_find_range(data, md->mask, head, &md->start, &md->end)) return -EINVAL;
     *startp = md->start;
     *endp = md->end;
   }
   return 0;
 }<sep>@@
expression md,e;
@@
-               perf_mmap__consume(md, e);
+               perf_mmap__consume(md);
--- initial
+++ final
@@ -1,94 +1,94 @@
 int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest __maybe_unused) {
   struct record_opts opts = {
       .target =
           {
               .uid = UINT_MAX,
               .uses_mmap = true,
           },
       .no_buffering = true,
       .freq = 1,
       .mmap_pages = 256,
       .raw_samples = true,
   };
   const char *filename = "/etc/passwd";
   int flags = O_RDONLY | O_DIRECTORY;
   struct perf_evlist *evlist = perf_evlist__new();
   struct perf_evsel *evsel;
   int err = -1, i, nr_events = 0, nr_polls = 0;
   char sbuf[STRERR_BUFSIZE];
   if (evlist == NULL) {
     pr_debug("%s: perf_evlist__new\n", __func__);
     goto out;
   }
   evsel = perf_evsel__newtp("syscalls", "sys_enter_openat");
   if (IS_ERR(evsel)) {
     pr_debug("%s: perf_evsel__newtp\n", __func__);
     goto out_delete_evlist;
   }
   perf_evlist__add(evlist, evsel);
   err = perf_evlist__create_maps(evlist, &opts.target);
   if (err < 0) {
     pr_debug("%s: perf_evlist__create_maps\n", __func__);
     goto out_delete_evlist;
   }
   perf_evsel__config(evsel, &opts, NULL);
   thread_map__set_pid(evlist->threads, 0, getpid());
   err = perf_evlist__open(evlist);
   if (err < 0) {
     pr_debug("perf_evlist__open: %s\n", str_error_r(errno, sbuf, sizeof(sbuf)));
     goto out_delete_evlist;
   }
   err = perf_evlist__mmap(evlist, UINT_MAX);
   if (err < 0) {
     pr_debug("perf_evlist__mmap: %s\n", str_error_r(errno, sbuf, sizeof(sbuf)));
     goto out_delete_evlist;
   }
   perf_evlist__enable(evlist);
   /*
    * Generate the event:
    */
   openat(AT_FDCWD, filename, flags);
   while (1) {
     int before = nr_events;
     for (i = 0; i < evlist->nr_mmaps; i++) {
       union perf_event *event;
       struct perf_mmap *md;
       u64 end, start;
       md = &evlist->mmap[i];
       if (perf_mmap__read_init(md, false, &start, &end) < 0) continue;
       while ((event = perf_mmap__read_event(md, false, &start, end)) != NULL) {
         const u32 type = event->header.type;
         int tp_flags;
         struct perf_sample sample;
         ++nr_events;
         if (type != PERF_RECORD_SAMPLE) {
-          perf_mmap__consume(md, false);
+          perf_mmap__consume(md);
           continue;
         }
         err = perf_evsel__parse_sample(evsel, event, &sample);
         if (err) {
           pr_debug("Can't parse sample, err = %d\n", err);
           goto out_delete_evlist;
         }
         tp_flags = perf_evsel__intval(evsel, &sample, "flags");
         if (flags != tp_flags) {
           pr_debug("%s: Expected flags=%#x, got %#x\n", __func__, flags, tp_flags);
           goto out_delete_evlist;
         }
         goto out_ok;
       }
       perf_mmap__read_done(md);
     }
     if (nr_events == before) perf_evlist__poll(evlist, 10);
     if (++nr_polls > 5) {
       pr_debug("%s: no events!\n", __func__);
       goto out_delete_evlist;
     }
   }
 out_ok:
   err = 0;
 out_delete_evlist:
   perf_evlist__delete(evlist);
 out:
   return err;
 }<sep>@@
expression md,e;
@@
-               perf_mmap__consume(md, e);
+               perf_mmap__consume(md);
--- initial
+++ final
@@ -1,30 +1,30 @@
 static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist, PyObject *args, PyObject *kwargs) {
   struct perf_evlist *evlist = &pevlist->evlist;
   union perf_event *event;
   int sample_id_all = 1, cpu;
   static char *kwlist[] = {"cpu", "sample_id_all", NULL};
   struct perf_mmap *md;
   u64 end, start;
   int err;
   if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|i", kwlist, &cpu, &sample_id_all)) return NULL;
   md = &evlist->mmap[cpu];
   if (perf_mmap__read_init(md, false, &start, &end) < 0) goto end;
   event = perf_mmap__read_event(md, false, &start, end);
   if (event != NULL) {
     PyObject *pyevent = pyrf_event__new(event);
     struct pyrf_event *pevent = (struct pyrf_event *)pyevent;
     struct perf_evsel *evsel;
     if (pyevent == NULL) return PyErr_NoMemory();
     evsel = perf_evlist__event2evsel(evlist, event);
     if (!evsel) return Py_None;
     pevent->evsel = evsel;
     err = perf_evsel__parse_sample(evsel, event, &pevent->sample);
     /* Consume the even only after we parsed it out. */
-    perf_mmap__consume(md, false);
+    perf_mmap__consume(md);
     if (err) return PyErr_Format(PyExc_OSError, "perf: can't parse sample, err=%d", err);
     return pyevent;
   }
 end:
   Py_INCREF(Py_None);
   return Py_None;
 }<sep>@@
expression md,e;
@@
-               perf_mmap__consume(md, e);
+               perf_mmap__consume(md);
--- initial
+++ final
@@ -1,87 +1,87 @@
 static int __test__sw_clock_freq(enum perf_sw_ids clock_id) {
   int i, err = -1;
   volatile int tmp = 0;
   u64 total_periods = 0;
   int nr_samples = 0;
   char sbuf[STRERR_BUFSIZE];
   union perf_event *event;
   struct perf_evsel *evsel;
   struct perf_evlist *evlist;
   struct perf_event_attr attr = {
       .type = PERF_TYPE_SOFTWARE,
       .config = clock_id,
       .sample_type = PERF_SAMPLE_PERIOD,
       .exclude_kernel = 1,
       .disabled = 1,
       .freq = 1,
   };
   struct cpu_map *cpus;
   struct thread_map *threads;
   struct perf_mmap *md;
   u64 end, start;
   attr.sample_freq = 500;
   evlist = perf_evlist__new();
   if (evlist == NULL) {
     pr_debug("perf_evlist__new\n");
     return -1;
   }
   evsel = perf_evsel__new(&attr);
   if (evsel == NULL) {
     pr_debug("perf_evsel__new\n");
     goto out_delete_evlist;
   }
   perf_evlist__add(evlist, evsel);
   cpus = cpu_map__dummy_new();
   threads = thread_map__new_by_tid(getpid());
   if (!cpus || !threads) {
     err = -ENOMEM;
     pr_debug("Not enough memory to create thread/cpu maps\n");
     goto out_free_maps;
   }
   perf_evlist__set_maps(evlist, cpus, threads);
   cpus = NULL;
   threads = NULL;
   if (perf_evlist__open(evlist)) {
     const char *knob = "/proc/sys/kernel/perf_event_max_sample_rate";
     err = -errno;
     pr_debug("Couldn't open evlist: %s\nHint: check %s, using %" PRIu64 " in this test.\n", str_error_r(errno, sbuf, sizeof(sbuf)), knob, (u64)attr.sample_freq);
     goto out_delete_evlist;
   }
   err = perf_evlist__mmap(evlist, 128);
   if (err < 0) {
     pr_debug("failed to mmap event: %d (%s)\n", errno, str_error_r(errno, sbuf, sizeof(sbuf)));
     goto out_delete_evlist;
   }
   perf_evlist__enable(evlist);
   /* collect samples */
   for (i = 0; i < NR_LOOPS; i++)
     tmp++;
   perf_evlist__disable(evlist);
   md = &evlist->mmap[0];
   if (perf_mmap__read_init(md, false, &start, &end) < 0) goto out_init;
   while ((event = perf_mmap__read_event(md, false, &start, end)) != NULL) {
     struct perf_sample sample;
     if (event->header.type != PERF_RECORD_SAMPLE) goto next_event;
     err = perf_evlist__parse_sample(evlist, event, &sample);
     if (err < 0) {
       pr_debug("Error during parse sample\n");
       goto out_delete_evlist;
     }
     total_periods += sample.period;
     nr_samples++;
   next_event:
-    perf_mmap__consume(md, false);
+    perf_mmap__consume(md);
   }
   perf_mmap__read_done(md);
 out_init:
   if ((u64)nr_samples == total_periods) {
     pr_debug("All (%d) samples have period value of 1!\n", nr_samples);
     err = -1;
   }
 out_free_maps:
   cpu_map__put(cpus);
   thread_map__put(threads);
 out_delete_evlist:
   perf_evlist__delete(evlist);
   return err;
 }<sep>@@
expression md,e;
@@
-               perf_mmap__consume(md, e);
+               perf_mmap__consume(md);
--- initial
+++ final
@@ -1,40 +1,40 @@
 static int process_events(struct perf_evlist *evlist, struct switch_tracking *switch_tracking) {
   union perf_event *event;
   unsigned pos, cnt = 0;
   LIST_HEAD(events);
   struct event_node *events_array, *node;
   struct perf_mmap *md;
   u64 end, start;
   int i, ret;
   for (i = 0; i < evlist->nr_mmaps; i++) {
     md = &evlist->mmap[i];
     if (perf_mmap__read_init(md, false, &start, &end) < 0) continue;
     while ((event = perf_mmap__read_event(md, false, &start, end)) != NULL) {
       cnt += 1;
       ret = add_event(evlist, &events, event);
-      perf_mmap__consume(md, false);
+      perf_mmap__consume(md);
       if (ret < 0) goto out_free_nodes;
     }
     perf_mmap__read_done(md);
   }
   events_array = calloc(cnt, sizeof(struct event_node));
   if (!events_array) {
     pr_debug("calloc failed\n");
     ret = -1;
     goto out_free_nodes;
   }
   pos = 0;
   list_for_each_entry(node, &events, list) events_array[pos++] = *node;
   qsort(events_array, cnt, sizeof(struct event_node), compar);
   for (pos = 0; pos < cnt; pos++) {
     ret = process_event(evlist, events_array[pos].event, switch_tracking);
     if (ret < 0) goto out_free;
   }
   ret = 0;
 out_free:
   pr_debug("%u events recorded\n", cnt);
   free(events_array);
 out_free_nodes:
   free_event_nodes(&events);
   return ret;
 }<sep>@@
expression md,e;
@@
-               perf_mmap__consume(md, e);
+               perf_mmap__consume(md);
--- initial
+++ final
@@ -1,87 +1,87 @@
 int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused) {
   int err = -1;
   union perf_event *event;
   struct perf_evsel *evsel;
   struct perf_evlist *evlist;
   struct target target = {
       .uid = UINT_MAX,
       .uses_mmap = true,
   };
   const char *argv[] = {"true", NULL};
   char sbuf[STRERR_BUFSIZE];
   struct cpu_map *cpus;
   struct thread_map *threads;
   struct perf_mmap *md;
   u64 end, start;
   signal(SIGCHLD, sig_handler);
   evlist = perf_evlist__new_default();
   if (evlist == NULL) {
     pr_debug("perf_evlist__new_default\n");
     return -1;
   }
   /*
    * Create maps of threads and cpus to monitor. In this case
    * we start with all threads and cpus (-1, -1) but then in
    * perf_evlist__prepare_workload we'll fill in the only thread
    * we're monitoring, the one forked there.
    */
   cpus = cpu_map__dummy_new();
   threads = thread_map__new_by_tid(-1);
   if (!cpus || !threads) {
     err = -ENOMEM;
     pr_debug("Not enough memory to create thread/cpu maps\n");
     goto out_free_maps;
   }
   perf_evlist__set_maps(evlist, cpus, threads);
   cpus = NULL;
   threads = NULL;
   err = perf_evlist__prepare_workload(evlist, &target, argv, false, workload_exec_failed_signal);
   if (err < 0) {
     pr_debug("Couldn't run the workload!\n");
     goto out_delete_evlist;
   }
   evsel = perf_evlist__first(evlist);
   evsel->attr.task = 1;
 #ifdef __s390x__
   evsel->attr.sample_freq = 1000000;
 #else
   evsel->attr.sample_freq = 1;
 #endif
   evsel->attr.inherit = 0;
   evsel->attr.watermark = 0;
   evsel->attr.wakeup_events = 1;
   evsel->attr.exclude_kernel = 1;
   err = perf_evlist__open(evlist);
   if (err < 0) {
     pr_debug("Couldn't open the evlist: %s\n", str_error_r(-err, sbuf, sizeof(sbuf)));
     goto out_delete_evlist;
   }
   if (perf_evlist__mmap(evlist, 128) < 0) {
     pr_debug("failed to mmap events: %d (%s)\n", errno, str_error_r(errno, sbuf, sizeof(sbuf)));
     goto out_delete_evlist;
   }
   perf_evlist__start_workload(evlist);
 retry:
   md = &evlist->mmap[0];
   if (perf_mmap__read_init(md, false, &start, &end) < 0) goto out_init;
   while ((event = perf_mmap__read_event(md, false, &start, end)) != NULL) {
     if (event->header.type == PERF_RECORD_EXIT) nr_exit++;
-    perf_mmap__consume(md, false);
+    perf_mmap__consume(md);
   }
   perf_mmap__read_done(md);
 out_init:
   if (!exited || !nr_exit) {
     perf_evlist__poll(evlist, -1);
     goto retry;
   }
   if (nr_exit != 1) {
     pr_debug("received %d EXIT records\n", nr_exit);
     err = -1;
   }
 out_free_maps:
   cpu_map__put(cpus);
   thread_map__put(threads);
 out_delete_evlist:
   perf_evlist__delete(evlist);
   return err;
 }<sep>@@
expression md,e;
@@
-               perf_mmap__consume(md, e);
+               perf_mmap__consume(md);
--- initial
+++ final
@@ -1,19 +1,19 @@
 static int count_samples(struct perf_evlist *evlist, int *sample_count, int *comm_count) {
   int i;
   for (i = 0; i < evlist->nr_mmaps; i++) {
     struct perf_mmap *map = &evlist->overwrite_mmap[i];
     union perf_event *event;
     u64 start, end;
     perf_mmap__read_init(map, true, &start, &end);
-    while ((event = perf_mmap__read_event(map, true, &start, end)) != NULL) {
+    while ((event = perf_mmap__read_event(map)) != NULL) {
       const u32 type = event->header.type;
       switch (type) {
       case PERF_RECORD_SAMPLE: (*sample_count)++; break;
       case PERF_RECORD_COMM: (*comm_count)++; break;
       default: pr_err("Unexpected record of type %d\n", type); return TEST_FAIL;
       }
     }
     perf_mmap__read_done(map);
   }
   return TEST_OK;
 }<sep>@@
expression md,e1,e2,e3;
@@
- perf_mmap__read_event(md,e1,e2,e3)
+ perf_mmap__read_event(md)
--- initial
+++ final
@@ -1,77 +1,77 @@
 static int do_test(struct bpf_object *obj, int (*func)(void), int expect) {
   struct record_opts opts = {
       .target =
           {
               .uid = UINT_MAX,
               .uses_mmap = true,
           },
       .freq = 0,
       .mmap_pages = 256,
       .default_interval = 1,
   };
   char pid[16];
   char sbuf[STRERR_BUFSIZE];
   struct perf_evlist *evlist;
   int i, ret = TEST_FAIL, err = 0, count = 0;
   struct parse_events_state parse_state;
   struct parse_events_error parse_error;
   bzero(&parse_error, sizeof(parse_error));
   bzero(&parse_state, sizeof(parse_state));
   parse_state.error = &parse_error;
   INIT_LIST_HEAD(&parse_state.list);
   err = parse_events_load_bpf_obj(&parse_state, &parse_state.list, obj, NULL);
   if (err || list_empty(&parse_state.list)) {
     pr_debug("Failed to add events selected by BPF\n");
     return TEST_FAIL;
   }
   snprintf(pid, sizeof(pid), "%d", getpid());
   pid[sizeof(pid) - 1] = '\0';
   opts.target.tid = opts.target.pid = pid;
   /* Instead of perf_evlist__new_default, don't add default events */
   evlist = perf_evlist__new();
   if (!evlist) {
     pr_debug("Not enough memory to create evlist\n");
     return TEST_FAIL;
   }
   err = perf_evlist__create_maps(evlist, &opts.target);
   if (err < 0) {
     pr_debug("Not enough memory to create thread/cpu maps\n");
     goto out_delete_evlist;
   }
   perf_evlist__splice_list_tail(evlist, &parse_state.list);
   evlist->nr_groups = parse_state.nr_groups;
   perf_evlist__config(evlist, &opts, NULL);
   err = perf_evlist__open(evlist);
   if (err < 0) {
     pr_debug("perf_evlist__open: %s\n", str_error_r(errno, sbuf, sizeof(sbuf)));
     goto out_delete_evlist;
   }
   err = perf_evlist__mmap(evlist, opts.mmap_pages);
   if (err < 0) {
     pr_debug("perf_evlist__mmap: %s\n", str_error_r(errno, sbuf, sizeof(sbuf)));
     goto out_delete_evlist;
   }
   perf_evlist__enable(evlist);
   (*func)();
   perf_evlist__disable(evlist);
   for (i = 0; i < evlist->nr_mmaps; i++) {
     union perf_event *event;
     struct perf_mmap *md;
     u64 end, start;
     md = &evlist->mmap[i];
     if (perf_mmap__read_init(md, false, &start, &end) < 0) continue;
-    while ((event = perf_mmap__read_event(md, false, &start, end)) != NULL) {
+    while ((event = perf_mmap__read_event(md)) != NULL) {
       const u32 type = event->header.type;
       if (type == PERF_RECORD_SAMPLE) count++;
     }
     perf_mmap__read_done(md);
   }
   if (count != expect) {
     pr_debug("BPF filter result incorrect, expected %d, got %d samples\n", expect, count);
     goto out_delete_evlist;
   }
   ret = TEST_OK;
 out_delete_evlist:
   perf_evlist__delete(evlist);
   return ret;
 }<sep>@@
expression md,e1,e2,e3;
@@
- perf_mmap__read_event(md,e1,e2,e3)
+ perf_mmap__read_event(md)
--- initial
+++ final
@@ -1,38 +1,38 @@
 static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx, u64 *mmap_time) {
   struct perf_evlist *evlist = kvm->evlist;
   union perf_event *event;
   struct perf_mmap *md;
   u64 end, start;
   u64 timestamp;
   s64 n = 0;
   int err;
   *mmap_time = ULLONG_MAX;
   md = &evlist->mmap[idx];
   err = perf_mmap__read_init(md, false, &start, &end);
   if (err < 0) return (err == -EAGAIN) ? 0 : -1;
-  while ((event = perf_mmap__read_event(md, false, &start, end)) != NULL) {
+  while ((event = perf_mmap__read_event(md)) != NULL) {
     err = perf_evlist__parse_sample_timestamp(evlist, event, &timestamp);
     if (err) {
       perf_mmap__consume(md);
       pr_err("Failed to parse sample\n");
       return -1;
     }
     err = perf_session__queue_event(kvm->session, event, timestamp, 0);
     /*
      * FIXME: Here we can't consume the event, as perf_session__queue_event will
      *        point to it, and it'll get possibly overwritten by the kernel.
      */
     perf_mmap__consume(md);
     if (err) {
       pr_err("Failed to enqueue sample: %d\n", err);
       return -1;
     }
     /* save time stamp of our first sample for this mmap */
     if (n == 0) *mmap_time = timestamp;
     /* limit events per mmap handled all at once */
     n++;
     if (n == PERF_KVM__MAX_EVENTS_PER_MMAP) break;
   }
   perf_mmap__read_done(md);
   return n;
 }<sep>@@
expression md,e1,e2,e3;
@@
- perf_mmap__read_event(md,e1,e2,e3)
+ perf_mmap__read_event(md)