aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/symbol.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 48f87f065a2e..e161a51c9fef 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -71,6 +71,12 @@ static void kernel_maps__fixup_end(void)
71 curr = rb_entry(nd, struct map, rb_node); 71 curr = rb_entry(nd, struct map, rb_node);
72 prev->end = curr->start - 1; 72 prev->end = curr->start - 1;
73 } 73 }
74
75 /*
76 * We still haven't the actual symbols, so guess the
77 * last map final address.
78 */
79 curr->end = ~0UL;
74} 80}
75 81
76static struct symbol *symbol__new(u64 start, u64 len, const char *name) 82static struct symbol *symbol__new(u64 start, u64 len, const char *name)
@@ -1319,12 +1325,6 @@ static int kernel_maps__create_module_maps(void)
1319 free(line); 1325 free(line);
1320 fclose(file); 1326 fclose(file);
1321 1327
1322 /*
1323 * Now that we have all sorted out, just set the ->end of all
1324 * maps:
1325 */
1326 kernel_maps__fixup_end();
1327
1328 return dsos__set_modules_path(); 1328 return dsos__set_modules_path();
1329 1329
1330out_delete_line: 1330out_delete_line:
@@ -1493,7 +1493,10 @@ int kernel_maps__init(bool use_modules)
1493 if (use_modules && kernel_maps__create_module_maps() < 0) 1493 if (use_modules && kernel_maps__create_module_maps() < 0)
1494 pr_warning("Failed to load list of modules in use, " 1494 pr_warning("Failed to load list of modules in use, "
1495 "continuing...\n"); 1495 "continuing...\n");
1496 1496 /*
1497 * Now that we have all the maps created, just set the ->end of them:
1498 */
1499 kernel_maps__fixup_end();
1497 return 0; 1500 return 0;
1498} 1501}
1499 1502