}
 }
 
-int metricgroup__parse_groups(const struct option *opt,
-                             const char *str,
-                             bool metric_no_group,
-                             bool metric_no_merge,
-                             struct rblist *metric_events)
+static int parse_groups(struct evlist *perf_evlist, const char *str,
+                       bool metric_no_group,
+                       bool metric_no_merge,
+                       struct rblist *metric_events)
 {
        struct parse_events_error parse_error;
-       struct evlist *perf_evlist = *(struct evlist **)opt->value;
        struct strbuf extra_events;
        LIST_HEAD(group_list);
        int ret;
        return ret;
 }
 
+int metricgroup__parse_groups(const struct option *opt,
+                             const char *str,
+                             bool metric_no_group,
+                             bool metric_no_merge,
+                             struct rblist *metric_events)
+{
+       struct evlist *perf_evlist = *(struct evlist **)opt->value;
+
+       return parse_groups(perf_evlist, str, metric_no_group,
+                           metric_no_merge, metric_events);
+}
+
 bool metricgroup__has_metric(const char *metric)
 {
        struct pmu_events_map *map = perf_pmu__find_map(NULL);