Skip to contentSkip to conversation

perf symbols: skip duplicate check in dso__load by guest kmod origin

PATCH New David Ahern 1 participant 1 message Nov 21, 2010 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf symbols: skip duplicate check in dso__load by guest kmod origin

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

tools/perf/util/symbol.c +4 -4
index b39f499..d30136e 100644
@@ -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;
 
Signature · 1 line
1.7.2.3