diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-23 15:42:19 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-29 08:32:46 -0400 |
commit | dd8c17a5fe80148aab8844e8774cf341212a4eb1 (patch) | |
tree | b1695fdf3535710ac32240d044b9df7db167981a /tools/perf/tests | |
parent | cc8b7c2bf553151a579a8009020875faa1d43e29 (diff) |
perf callchains: Use thread->mg->machine
The unwind__get_entries() already receives the thread parameter, from where it can
obtain the matching machine structure, shorten the signature.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-isjc6bm8mv4612mhi6af64go@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests')
-rw-r--r-- | tools/perf/tests/dwarf-unwind.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c index fc25e57f4a5d..ab28cca2cb97 100644 --- a/tools/perf/tests/dwarf-unwind.c +++ b/tools/perf/tests/dwarf-unwind.c | |||
@@ -59,7 +59,7 @@ static int unwind_entry(struct unwind_entry *entry, void *arg) | |||
59 | } | 59 | } |
60 | 60 | ||
61 | __attribute__ ((noinline)) | 61 | __attribute__ ((noinline)) |
62 | static int unwind_thread(struct thread *thread, struct machine *machine) | 62 | static int unwind_thread(struct thread *thread) |
63 | { | 63 | { |
64 | struct perf_sample sample; | 64 | struct perf_sample sample; |
65 | unsigned long cnt = 0; | 65 | unsigned long cnt = 0; |
@@ -72,7 +72,7 @@ static int unwind_thread(struct thread *thread, struct machine *machine) | |||
72 | goto out; | 72 | goto out; |
73 | } | 73 | } |
74 | 74 | ||
75 | err = unwind__get_entries(unwind_entry, &cnt, machine, thread, | 75 | err = unwind__get_entries(unwind_entry, &cnt, thread, |
76 | &sample, MAX_STACK); | 76 | &sample, MAX_STACK); |
77 | if (err) | 77 | if (err) |
78 | pr_debug("unwind failed\n"); | 78 | pr_debug("unwind failed\n"); |
@@ -89,21 +89,21 @@ static int unwind_thread(struct thread *thread, struct machine *machine) | |||
89 | } | 89 | } |
90 | 90 | ||
91 | __attribute__ ((noinline)) | 91 | __attribute__ ((noinline)) |
92 | static int krava_3(struct thread *thread, struct machine *machine) | 92 | static int krava_3(struct thread *thread) |
93 | { | 93 | { |
94 | return unwind_thread(thread, machine); | 94 | return unwind_thread(thread); |
95 | } | 95 | } |
96 | 96 | ||
97 | __attribute__ ((noinline)) | 97 | __attribute__ ((noinline)) |
98 | static int krava_2(struct thread *thread, struct machine *machine) | 98 | static int krava_2(struct thread *thread) |
99 | { | 99 | { |
100 | return krava_3(thread, machine); | 100 | return krava_3(thread); |
101 | } | 101 | } |
102 | 102 | ||
103 | __attribute__ ((noinline)) | 103 | __attribute__ ((noinline)) |
104 | static int krava_1(struct thread *thread, struct machine *machine) | 104 | static int krava_1(struct thread *thread) |
105 | { | 105 | { |
106 | return krava_2(thread, machine); | 106 | return krava_2(thread); |
107 | } | 107 | } |
108 | 108 | ||
109 | int test__dwarf_unwind(void) | 109 | int test__dwarf_unwind(void) |
@@ -137,7 +137,7 @@ int test__dwarf_unwind(void) | |||
137 | goto out; | 137 | goto out; |
138 | } | 138 | } |
139 | 139 | ||
140 | err = krava_1(thread, machine); | 140 | err = krava_1(thread); |
141 | 141 | ||
142 | out: | 142 | out: |
143 | machine__delete_threads(machine); | 143 | machine__delete_threads(machine); |