perf dso: Export data_file_size() method there are no symbols
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 27 Nov 2018 08:46:34 +0000 (10:46 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 18 Dec 2018 15:21:44 +0000 (12:21 -0300)
Will be used outside dso.c in a followup patch, so rename it and make it
non-static.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20181127084634.12469-1-adrian.hunter@intel.com
[ split from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/dso.c
tools/perf/util/dso.h

index cee717a3794fe851fcc18f7351002a37258d6f72..62c8cf622607ce718a1101d6c5ac548d56a8a294 100644 (file)
@@ -894,7 +894,7 @@ static ssize_t cached_read(struct dso *dso, struct machine *machine,
        return r;
 }
 
-static int data_file_size(struct dso *dso, struct machine *machine)
+int dso__data_file_size(struct dso *dso, struct machine *machine)
 {
        int ret = 0;
        struct stat st;
@@ -943,7 +943,7 @@ out:
  */
 off_t dso__data_size(struct dso *dso, struct machine *machine)
 {
-       if (data_file_size(dso, machine))
+       if (dso__data_file_size(dso, machine))
                return -1;
 
        /* For now just estimate dso data size is close to file size */
@@ -953,7 +953,7 @@ off_t dso__data_size(struct dso *dso, struct machine *machine)
 static ssize_t data_read_offset(struct dso *dso, struct machine *machine,
                                u64 offset, u8 *data, ssize_t size)
 {
-       if (data_file_size(dso, machine))
+       if (dso__data_file_size(dso, machine))
                return -1;
 
        /* Check the offset sanity. */
index c5380500bed40b6afd03aa2721559bad8192b440..8c8a7abe809d94a706d17958edd113b68f6f20b9 100644 (file)
@@ -322,6 +322,7 @@ int dso__data_get_fd(struct dso *dso, struct machine *machine);
 void dso__data_put_fd(struct dso *dso);
 void dso__data_close(struct dso *dso);
 
+int dso__data_file_size(struct dso *dso, struct machine *machine);
 off_t dso__data_size(struct dso *dso, struct machine *machine);
 ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine,
                              u64 offset, u8 *data, ssize_t size);