summaryrefslogtreecommitdiff
path: root/tools/perf/util/dso.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-07-22 13:17:18 (GMT)
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-07-23 14:22:35 (GMT)
commitc27697d6dee02ef2389b6701c792a075bc9873dc (patch)
treedd651ab086c5f25d5cee4a51b1b4f6928bad9645 /tools/perf/util/dso.h
parent578bea40058b68f83658827c2b68a596b08419fc (diff)
downloadlinux-c27697d6dee02ef2389b6701c792a075bc9873dc.tar.xz
perf tools: Record whether a dso has data
Add 'data.status' to record whether a dso has data (i.e. an object file). This is used to avoid repeatedly creating the file name and attempting to open a file that is not present. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> 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/r/1406035081-14301-10-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/dso.h')
-rw-r--r--tools/perf/util/dso.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index c239e86..aeb7bcb 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -40,6 +40,12 @@ enum dso_swap_type {
DSO_SWAP__YES,
};
+enum dso_data_status {
+ DSO_DATA_STATUS_ERROR = -1,
+ DSO_DATA_STATUS_UNKNOWN = 0,
+ DSO_DATA_STATUS_OK = 1,
+};
+
#define DSO__SWAP(dso, type, val) \
({ \
type ____r = val; \
@@ -104,6 +110,7 @@ struct dso {
struct {
struct rb_root cache;
int fd;
+ int status;
size_t file_size;
struct list_head open_entry;
} data;