perf build-id: Rename dsos__write_buildid_table()
authorNamhyung Kim <namhyung@kernel.org>
Tue, 4 Nov 2014 01:14:29 +0000 (10:14 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 5 Nov 2014 13:14:07 +0000 (10:14 -0300)
The dsos__write_buildid_table() is not use struct dso and it mostly
uses perf_session struct.

So rename it to perf_session__write_buildid_ table() so that it
corresponds to other related functions such as
perf_session__read_build_ids() and perf_session__cache_build_ids().

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1415063674-17206-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c

index 0ecf4a304cbcb9f126cd3351b5a8075aabcd2751..be8d02eb97e91b34ef9875e5f227b8a0d6fb546e 100644 (file)
@@ -297,10 +297,8 @@ static int machine__write_buildid_table(struct machine *machine, int fd)
        return err;
 }
 
-static int dsos__write_buildid_table(struct perf_header *header, int fd)
+static int perf_session__write_buildid_table(struct perf_session *session, int fd)
 {
-       struct perf_session *session = container_of(header,
-                       struct perf_session, header);
        struct rb_node *nd;
        int err = machine__write_buildid_table(&session->machines.host, fd);
 
@@ -523,7 +521,7 @@ static int write_build_id(int fd, struct perf_header *h,
        if (!perf_session__read_build_ids(session, true))
                return -1;
 
-       err = dsos__write_buildid_table(h, fd);
+       err = perf_session__write_buildid_table(session, fd);
        if (err < 0) {
                pr_debug("failed to write buildid table\n");
                return err;