@@ -681,24 +681,6 @@ int machine__process_switch_event(struct
return 0;
}
-static void dso__adjust_kmod_long_name(struct dso *dso, const char *filename)
-{
- const char *dup_filename;
-
- if (!filename || !dso || !dso->long_name)
- return;
- if (dso->long_name[0] != '[')
- return;
- if (!strchr(filename, '/'))
- return;
-
- dup_filename = strdup(filename);
- if (!dup_filename)
- return;
-
- dso__set_long_name(dso, dup_filename, true);
-}
-
struct map *machine__findnew_module_map(struct machine *machine, u64 start,
const char *filename)
{
@@ -710,15 +692,8 @@ struct map *machine__findnew_module_map(
return NULL;
map = map_groups__find_by_name(&machine->kmaps, m.name);
- if (map) {
- /*
- * If the map's dso is an offline module, give dso__load()
- * a chance to find the file path of that module by fixing
- * long_name.
- */
- dso__adjust_kmod_long_name(map->dso, filename);
+ if (map)
goto out;
- }
dso = machine__findnew_module_dso(machine, &m, filename);
if (dso == NULL)