perf thread: Remove addr_type arg from thread__find_cpumode_addr_location()
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 25 Apr 2018 20:58:03 +0000 (17:58 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 26 Apr 2018 16:47:16 +0000 (13:47 -0300)
All callers are for MAP__FUNCTION, so just ditch it and use
thread__find_symbol(), that already ditched MAP__FUNCTION, i.e.
internally uses it till we ditch it for good.

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-i0ocxs00b4a0tlrx31lyh2cs@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/machine.c
tools/perf/util/thread.c
tools/perf/util/thread.h

index 0017c4a1fb97109e088f5594fbf6330219faf38f..10364e829ababe1f4f8abb60b4df706489e9fa4a 100644 (file)
@@ -1660,7 +1660,7 @@ static void ip__resolve_ams(struct thread *thread,
         * Thus, we have to try consecutively until we find a match
         * or else, the symbol is unknown
         */
-       thread__find_cpumode_addr_location(thread, MAP__FUNCTION, ip, &al);
+       thread__find_cpumode_addr_location(thread, ip, &al);
 
        ams->addr = ip;
        ams->al_addr = al.addr;
@@ -1754,8 +1754,7 @@ static int add_callchain_ip(struct thread *thread,
        al.filtered = 0;
        al.sym = NULL;
        if (!cpumode) {
-               thread__find_cpumode_addr_location(thread, MAP__FUNCTION,
-                                                  ip, &al);
+               thread__find_cpumode_addr_location(thread, ip, &al);
        } else {
                if (ip >= PERF_CONTEXT_MAX) {
                        switch (ip) {
index 2a3fb7c6b39dfcfbd746e5e9347c97c03e1ed9d0..ddbf0470b048c7e2ab3ad8c06aa0e00b233504c1 100644 (file)
@@ -371,8 +371,7 @@ int thread__fork(struct thread *thread, struct thread *parent, u64 timestamp)
        return thread__clone_map_groups(thread, parent);
 }
 
-void thread__find_cpumode_addr_location(struct thread *thread,
-                                       enum map_type type, u64 addr,
+void thread__find_cpumode_addr_location(struct thread *thread, u64 addr,
                                        struct addr_location *al)
 {
        size_t i;
@@ -384,7 +383,7 @@ void thread__find_cpumode_addr_location(struct thread *thread,
        };
 
        for (i = 0; i < ARRAY_SIZE(cpumodes); i++) {
-               __thread__find_symbol(thread, cpumodes[i], type, addr, al);
+               thread__find_symbol(thread, cpumodes[i], addr, al);
                if (al->map)
                        break;
        }
index 1b130b0a4a48187e92b0992b947fae3fd485587b..d6209c73f32de3f23346d69bc8aedde61d2e8448 100644 (file)
@@ -110,8 +110,7 @@ static inline struct symbol *thread__find_symbol(struct thread *thread, u8 cpumo
        return __thread__find_symbol(thread, cpumode, MAP__FUNCTION, addr, al);
 }
 
-void thread__find_cpumode_addr_location(struct thread *thread,
-                                       enum map_type type, u64 addr,
+void thread__find_cpumode_addr_location(struct thread *thread, u64 addr,
                                        struct addr_location *al);
 
 static inline void *thread__priv(struct thread *thread)