Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf dso: Export data_file_size() method there are no symbols

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>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
b5c2161c ca46afdb

+4 -3
+3 -3
tools/perf/util/dso.c
··· 894 894 return r; 895 895 } 896 896 897 - static int data_file_size(struct dso *dso, struct machine *machine) 897 + int dso__data_file_size(struct dso *dso, struct machine *machine) 898 898 { 899 899 int ret = 0; 900 900 struct stat st; ··· 943 943 */ 944 944 off_t dso__data_size(struct dso *dso, struct machine *machine) 945 945 { 946 - if (data_file_size(dso, machine)) 946 + if (dso__data_file_size(dso, machine)) 947 947 return -1; 948 948 949 949 /* For now just estimate dso data size is close to file size */ ··· 953 953 static ssize_t data_read_offset(struct dso *dso, struct machine *machine, 954 954 u64 offset, u8 *data, ssize_t size) 955 955 { 956 - if (data_file_size(dso, machine)) 956 + if (dso__data_file_size(dso, machine)) 957 957 return -1; 958 958 959 959 /* Check the offset sanity. */
+1
tools/perf/util/dso.h
··· 322 322 void dso__data_put_fd(struct dso *dso); 323 323 void dso__data_close(struct dso *dso); 324 324 325 + int dso__data_file_size(struct dso *dso, struct machine *machine); 325 326 off_t dso__data_size(struct dso *dso, struct machine *machine); 326 327 ssize_t dso__data_read_offset(struct dso *dso, struct machine *machine, 327 328 u64 offset, u8 *data, ssize_t size);