mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-08 02:19:51 +01:00
perf machine: Use map as success in ip__resolve_ams
When trying to map a bunch of instruction addresses to their respective threads, I kept getting a lot of bogus entries [I forget the exact reason as I patched my code months ago]. Looking through ip__resolve_ams, I noticed the check for if (al.sym) and realized, most times I have an al.map definition but sometimes an al.sym is undefined. In the cases where al.sym is undefined, the loop keeps going even though a valid al.map exists. Modify this check to use the more reliable al.map. This fixed my bogus entries. Signed-off-by: Don Zickus <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
1 parent
155b3a13a6
commit
fdf57dd052
1 file changed
+1
-1
@@ -1213,7 +1213,7 @@ static void ip__resolve_ams(struct machine *machine, struct thread *thread,
|
||||
*/
|
||||
thread__find_addr_location(thread, machine, m, MAP__FUNCTION,
|
||||
ip, &al);
|
||||
if (al.sym)
|
||||
if (al.map)
|
||||
goto found;
|
||||
}
|
||||
found:
|
||||
|
||||
Reference in new issue
Block a user