aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2015-04-09 11:53:55 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-04-29 09:37:56 -0400
commitcfe9174fcfe28f0f73dce422e3151991ee0d49bf (patch)
treec637c5d5ccd9d4cda0b0e8fc90b8e058207627be
parentc3278f0231e833c6030c3aeab510415fdbbfd353 (diff)
perf tools: Add member to struct dso for an instruction cache
Add a member to struct dso that can be used by Instruction Trace implementations to hold a cache for decoded instructions. 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: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1428594864-29309-16-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/dso.c2
-rw-r--r--tools/perf/util/dso.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index fc0ddd5792a9..13d9ae0bd15c 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -4,6 +4,7 @@
4#include "symbol.h" 4#include "symbol.h"
5#include "dso.h" 5#include "dso.h"
6#include "machine.h" 6#include "machine.h"
7#include "auxtrace.h"
7#include "util.h" 8#include "util.h"
8#include "debug.h" 9#include "debug.h"
9 10
@@ -961,6 +962,7 @@ void dso__delete(struct dso *dso)
961 } 962 }
962 963
963 dso__data_close(dso); 964 dso__data_close(dso);
965 auxtrace_cache__free(dso->auxtrace_cache);
964 dso_cache__free(&dso->data.cache); 966 dso_cache__free(&dso->data.cache);
965 dso__free_a2l(dso); 967 dso__free_a2l(dso);
966 zfree(&dso->symsrc_filename); 968 zfree(&dso->symsrc_filename);
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index e0901b4ed8de..3d79c749934c 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -126,6 +126,8 @@ struct dsos {
126 struct rb_root root; /* rbtree root sorted by long name */ 126 struct rb_root root; /* rbtree root sorted by long name */
127}; 127};
128 128
129struct auxtrace_cache;
130
129struct dso { 131struct dso {
130 struct list_head node; 132 struct list_head node;
131 struct rb_node rb_node; /* rbtree node sorted by long name */ 133 struct rb_node rb_node; /* rbtree node sorted by long name */
@@ -156,6 +158,7 @@ struct dso {
156 u16 long_name_len; 158 u16 long_name_len;
157 u16 short_name_len; 159 u16 short_name_len;
158 void *dwfl; /* DWARF debug info */ 160 void *dwfl; /* DWARF debug info */
161 struct auxtrace_cache *auxtrace_cache;
159 162
160 /* dso data file */ 163 /* dso data file */
161 struct { 164 struct {