Commit 2af52475 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

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: default avatarJiri 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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 4b838b0d
...@@ -417,8 +417,10 @@ void dso__set_module_info(struct dso *dso, struct kmod_path *m, ...@@ -417,8 +417,10 @@ void dso__set_module_info(struct dso *dso, struct kmod_path *m,
dso->symtab_type = DSO_BINARY_TYPE__GUEST_KMODULE; dso->symtab_type = DSO_BINARY_TYPE__GUEST_KMODULE;
/* _KMODULE_COMP should be next to _KMODULE */ /* _KMODULE_COMP should be next to _KMODULE */
if (m->kmod && m->comp) if (m->kmod && m->comp) {
dso->symtab_type++; dso->symtab_type++;
dso->comp = m->comp;
}
dso__set_short_name(dso, strdup(m->name), true); dso__set_short_name(dso, strdup(m->name), true);
} }
...@@ -1224,6 +1226,7 @@ struct dso *dso__new(const char *name) ...@@ -1224,6 +1226,7 @@ struct dso *dso__new(const char *name)
dso->a2l_fails = 1; dso->a2l_fails = 1;
dso->kernel = DSO_TYPE_USER; dso->kernel = DSO_TYPE_USER;
dso->needs_swap = DSO_SWAP__UNSET; dso->needs_swap = DSO_SWAP__UNSET;
dso->comp = COMP_ID__NONE;
RB_CLEAR_NODE(&dso->rb_node); RB_CLEAR_NODE(&dso->rb_node);
dso->root = NULL; dso->root = NULL;
INIT_LIST_HEAD(&dso->node); INIT_LIST_HEAD(&dso->node);
......
...@@ -175,6 +175,7 @@ struct dso { ...@@ -175,6 +175,7 @@ struct dso {
u16 short_name_len; u16 short_name_len;
void *dwfl; /* DWARF debug info */ void *dwfl; /* DWARF debug info */
struct auxtrace_cache *auxtrace_cache; struct auxtrace_cache *auxtrace_cache;
int comp;
/* dso data file */ /* dso data file */
struct { struct {
......
...@@ -1212,8 +1212,10 @@ static int map_groups__set_module_path(struct map_groups *mg, const char *path, ...@@ -1212,8 +1212,10 @@ static int map_groups__set_module_path(struct map_groups *mg, const char *path,
* Full name could reveal us kmod compression, so * Full name could reveal us kmod compression, so
* we need to update the symtab_type if needed. * we need to update the symtab_type if needed.
*/ */
if (m->comp && is_kmod_dso(map->dso)) if (m->comp && is_kmod_dso(map->dso)) {
map->dso->symtab_type++; map->dso->symtab_type++;
map->dso->comp = m->comp;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment