mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
perf thread: Make thread__find_map() return the map
It was returning the searched map just on the addr_location passed, with the function itself returning void. Make it return the map so that we can make the code more compact. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-tzlrrzdeoof4i6ktyqv1t6ks@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
cc5f02f2be
commit
71a84b5aed
11 changed files with 28 additions and 42 deletions
|
@ -440,9 +440,7 @@ static int perf_event__inject_buildid(struct perf_tool *tool,
|
|||
goto repipe;
|
||||
}
|
||||
|
||||
thread__find_map(thread, sample->cpumode, sample->ip, &al);
|
||||
|
||||
if (al.map != NULL) {
|
||||
if (thread__find_map(thread, sample->cpumode, sample->ip, &al)) {
|
||||
if (!al.map->dso->hit) {
|
||||
al.map->dso->hit = 1;
|
||||
if (map__load(al.map) >= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue