perf tools: Add member to struct dso for an instruction cache
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 9 Apr 2015 15:53:55 +0000 (18:53 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 29 Apr 2015 13:37:56 +0000 (10:37 -0300)
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>
tools/perf/util/dso.c
tools/perf/util/dso.h

index fc0ddd5792a97f884e7ed142ad12fe87c2bfe408..13d9ae0bd15ca36cd5ed8ccb99ab96a725bf4289 100644 (file)
@@ -4,6 +4,7 @@
 #include "symbol.h"
 #include "dso.h"
 #include "machine.h"
+#include "auxtrace.h"
 #include "util.h"
 #include "debug.h"
 
@@ -961,6 +962,7 @@ void dso__delete(struct dso *dso)
        }
 
        dso__data_close(dso);
+       auxtrace_cache__free(dso->auxtrace_cache);
        dso_cache__free(&dso->data.cache);
        dso__free_a2l(dso);
        zfree(&dso->symsrc_filename);
index e0901b4ed8de0d08b1c6ad93f20ca371b9adef5f..3d79c749934c3a9567ddbd9391cdf67a53e6a69b 100644 (file)
@@ -126,6 +126,8 @@ struct dsos {
        struct rb_root   root;  /* rbtree root sorted by long name */
 };
 
+struct auxtrace_cache;
+
 struct dso {
        struct list_head node;
        struct rb_node   rb_node;       /* rbtree node sorted by long name */
@@ -156,6 +158,7 @@ struct dso {
        u16              long_name_len;
        u16              short_name_len;
        void            *dwfl;                  /* DWARF debug info */
+       struct auxtrace_cache *auxtrace_cache;
 
        /* dso data file */
        struct {