}
}
+static int record__auxtrace_init(struct record *rec)
+{
+ int err;
+
+ if (!rec->itr) {
+ rec->itr = auxtrace_record__init(rec->evlist, &err);
+ if (err)
+ return err;
+ }
+
+ err = auxtrace_parse_snapshot_options(rec->itr, &rec->opts,
+ rec->opts.auxtrace_snapshot_opts);
+ if (err)
+ return err;
+
+ return auxtrace_parse_filters(rec->evlist);
+}
+
#else
static inline
return 0;
}
+static int record__auxtrace_init(struct record *rec __maybe_unused)
+{
+ return 0;
+}
+
#endif
static int record__mmap_evlist(struct record *rec,
alarm(rec->switch_output.time);
}
- if (!rec->itr) {
- rec->itr = auxtrace_record__init(rec->evlist, &err);
- if (err)
- goto out;
- }
-
- err = auxtrace_parse_snapshot_options(rec->itr, &rec->opts,
- rec->opts.auxtrace_snapshot_opts);
- if (err)
- goto out;
-
/*
* Allow aliases to facilitate the lookup of symbols for address
* filters. Refer to auxtrace_parse_filters().
symbol__init(NULL);
- err = auxtrace_parse_filters(rec->evlist);
+ err = record__auxtrace_init(rec);
if (err)
goto out;