Removes some functions that are not used anywhere: dso__data_size() dso__data_status_seen()
This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqv...@spectrumdigital.se> --- tools/perf/util/dso.c | 34 ---------------------------------- tools/perf/util/dso.h | 3 --- 2 files changed, 37 deletions(-) diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index 0247acf..8f0b6a3 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -359,18 +359,6 @@ out: return dso->data.fd; } -bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by) -{ - u32 flag = 1 << by; - - if (dso->data.status_seen & flag) - return true; - - dso->data.status_seen |= flag; - - return false; -} - static void dso_cache__free(struct rb_root *root) { @@ -546,28 +534,6 @@ static int data_file_size(struct dso *dso) return 0; } -/** - * dso__data_size - Return dso data size - * @dso: dso object - * @machine: machine object - * - * Return: dso data size - */ -off_t dso__data_size(struct dso *dso, struct machine *machine) -{ - int fd; - - fd = dso__data_fd(dso, machine); - if (fd < 0) - return fd; - - if (data_file_size(dso)) - return -1; - - /* For now just estimate dso data size is close to file size */ - return dso->data.file_size; -} - static ssize_t data_read_offset(struct dso *dso, u64 offset, u8 *data, ssize_t size) { diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h index acb651a..bd99f25 100644 --- a/tools/perf/util/dso.h +++ b/tools/perf/util/dso.h @@ -184,7 +184,6 @@ int dso__read_binary_type_filename(const struct dso *dso, enum dso_binary_type t * The dso__data_* external interface provides following functions: * dso__data_fd * dso__data_close - * dso__data_size * dso__data_read_offset * dso__data_read_addr * @@ -222,13 +221,11 @@ int dso__read_binary_type_filename(const struct dso *dso, enum dso_binary_type t int dso__data_fd(struct dso *dso, struct machine *machine); void dso__data_close(struct dso *dso); -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); ssize_t dso__data_read_addr(struct dso *dso, struct map *map, struct machine *machine, u64 addr, u8 *data, ssize_t size); -bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by); struct map *dso__new_map(const char *name); struct dso *dso__kernel_findnew(struct machine *machine, const char *name, -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/