Skip to contentSkip to conversation

perf machine: Use machine__find_kernel_function() instead of open coded version

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message May 2, 2018 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  128cde3379358d43c3cf2cb5ea00bac8bf9cf1cf
Gitweb:     https://git.kernel.org/tip/128cde3379358d43c3cf2cb5ea00bac8bf9cf1cf
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Wed, 25 Apr 2018 18:04:45 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 26 Apr 2018 13:47:16 -0300

perf machine: Use machine__find_kernel_function() instead of open coded version

We have that equivalent, shorter helper, use it.

---
 tools/perf/util/machine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/machine.c +1 -1
index 10364e829aba..a00e82b83e0a 100644
@@ -2367,7 +2367,7 @@ char *machine__resolve_kernel_addr(void *vmachine, unsigned long long *addrp, ch
 {
 	struct machine *machine = vmachine;
 	struct map *map;
-	struct symbol *sym = map_groups__find_symbol(&machine->kmaps, MAP__FUNCTION, *addrp, &map);
+	struct symbol *sym = machine__find_kernel_function(machine, *addrp, &map);
 
 	if (sym == NULL)
 		return NULL;