perf evsel: Export the event_format constructor
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Sep 2012 23:24:19 +0000 (20:24 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Sep 2012 23:24:19 +0000 (20:24 -0300)
It'll be needed in the next patches, where it'll be not associated
directly to an evsel.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-v9x3q9rv4caxtox7wtjpchq5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c
tools/perf/util/evsel.h

index e992b67e0f3a5f616ebdd8defc4673e473adbdc9..ffdd94e9c9c3fa0328ac6aa9734d6be6048afb00 100644 (file)
@@ -70,7 +70,7 @@ struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx)
        return evsel;
 }
 
-static struct event_format *event_format__new(const char *sys, const char *name)
+struct event_format *event_format__new(const char *sys, const char *name)
 {
        int fd, n;
        char *filename;
index 2c490502010588505e972b112a0f4d4e9b6b9295..3ead0d59c03d7d2cedc9b8cee73c6214d0004152 100644 (file)
@@ -83,6 +83,9 @@ struct perf_record_opts;
 
 struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr, int idx);
 struct perf_evsel *perf_evsel__newtp(const char *sys, const char *name, int idx);
+
+struct event_format *event_format__new(const char *sys, const char *name);
+
 void perf_evsel__init(struct perf_evsel *evsel,
                      struct perf_event_attr *attr, int idx);
 void perf_evsel__exit(struct perf_evsel *evsel);