diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-08-17 11:48:07 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-20 08:54:59 -0300 |
commit | 2af5247530e073f4146d74ecd96cf64c953c001c (patch) | |
tree | f20b283d29fcbdfe2a69ecdfae4e1885c5c12f02 /tools/perf/util/dso.c | |
parent | 4b838b0db4e9cb3892b181ea9adc13cefb90d210 (diff) | |
download | lwn-2af5247530e073f4146d74ecd96cf64c953c001c.tar.gz lwn-2af5247530e073f4146d74ecd96cf64c953c001c.zip |
perf tools: Store compression id into struct dso
Add comp to 'struct dso' to hold the compression index. It will be used
in the following patches.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180817094813.15086-8-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/dso.c')
-rw-r--r-- | tools/perf/util/dso.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index d34e47bb09d9..d875e6956a3e 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -417,8 +417,10 @@ void dso__set_module_info(struct dso *dso, struct kmod_path *m, dso->symtab_type = DSO_BINARY_TYPE__GUEST_KMODULE; /* _KMODULE_COMP should be next to _KMODULE */ - if (m->kmod && m->comp) + if (m->kmod && m->comp) { dso->symtab_type++; + dso->comp = m->comp; + } dso__set_short_name(dso, strdup(m->name), true); } @@ -1224,6 +1226,7 @@ struct dso *dso__new(const char *name) dso->a2l_fails = 1; dso->kernel = DSO_TYPE_USER; dso->needs_swap = DSO_SWAP__UNSET; + dso->comp = COMP_ID__NONE; RB_CLEAR_NODE(&dso->rb_node); dso->root = NULL; INIT_LIST_HEAD(&dso->node); |