If machine is not set root_dir is set to "" which drops name to the
same lookup as DSO__ORIG_DSO.

Signed-off-by: David Ahern <[email protected]>

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index b39f499..d30136e 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1473,10 +1473,10 @@ int dso__load(struct dso *self, struct map *map, 
symbol_filter_t filter)
                        snprintf(name, size, "%s", self->long_name);
                        break;
                case DSO__ORIG_GUEST_KMODULE:
-                       if (map->groups && map->groups->machine)
-                               root_dir = map->groups->machine->root_dir;
-                       else
-                               root_dir = "";
+                       if (!map->groups || !map->groups->machine)
+                               continue;
+
+                       root_dir = map->groups->machine->root_dir;
                        snprintf(name, size, "%s%s", root_dir, self->long_name);
                        break;
 
-- 
1.7.2.3

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

Reply via email to