We are missing update of dso->symtab_type when we actualize
modules paths in map_groups__set_modules_path_dir.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/util/machine.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 1bca3a9f2b16..e750f829e84e 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -869,14 +869,17 @@ static int map_groups__set_modules_path_dir(struct 
map_groups *mg,
                             dso_name[PATH_MAX];
                        struct map *map;
                        char *long_name;
+                       bool compressed = false;
 
                        if (dot == NULL)
                                continue;
 
                        /* On some system, modules are compressed like .ko.gz */
                        if (is_supported_compression(dot + 1) &&
-                           is_kmodule_extension(dot - 2))
+                           is_kmodule_extension(dot - 2)) {
                                dot -= 3;
+                               compressed = true;
+                       }
 
                        snprintf(dso_name, sizeof(dso_name), "[%.*s]",
                                 (int)(dot - dent->d_name), dent->d_name);
@@ -894,6 +897,10 @@ static int map_groups__set_modules_path_dir(struct 
map_groups *mg,
                        }
                        dso__set_long_name(map->dso, long_name, true);
                        dso__kernel_module_get_build_id(map->dso, "");
+
+                       /* _KMODULE_COMP should be next to _KMODULE */
+                       if (compressed)
+                               map->dso->symtab_type++;
                }
        }
 
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to