summaryrefslogtreecommitdiff
path: root/tools/perf/tests
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2014-10-23 19:42:19 (GMT)
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-10-29 12:32:46 (GMT)
commitdd8c17a5fe80148aab8844e8774cf341212a4eb1 (patch)
treeb1695fdf3535710ac32240d044b9df7db167981a /tools/perf/tests
parentcc8b7c2bf553151a579a8009020875faa1d43e29 (diff)
downloadlinux-dd8c17a5fe80148aab8844e8774cf341212a4eb1.tar.xz
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.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c
index fc25e57..ab28cca 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)
}
__attribute__ ((noinline))
-static int unwind_thread(struct thread *thread, struct machine *machine)
+static int unwind_thread(struct thread *thread)
{
struct perf_sample sample;
unsigned long cnt = 0;
@@ -72,7 +72,7 @@ static int unwind_thread(struct thread *thread, struct machine *machine)
goto out;
}
- err = unwind__get_entries(unwind_entry, &cnt, machine, thread,
+ err = unwind__get_entries(unwind_entry, &cnt, thread,
&sample, MAX_STACK);
if (err)
pr_debug("unwind failed\n");
@@ -89,21 +89,21 @@ static int unwind_thread(struct thread *thread, struct machine *machine)
}
__attribute__ ((noinline))
-static int krava_3(struct thread *thread, struct machine *machine)
+static int krava_3(struct thread *thread)
{
- return unwind_thread(thread, machine);
+ return unwind_thread(thread);
}
__attribute__ ((noinline))
-static int krava_2(struct thread *thread, struct machine *machine)
+static int krava_2(struct thread *thread)
{
- return krava_3(thread, machine);
+ return krava_3(thread);
}
__attribute__ ((noinline))
-static int krava_1(struct thread *thread, struct machine *machine)
+static int krava_1(struct thread *thread)
{
- return krava_2(thread, machine);
+ return krava_2(thread);
}
int test__dwarf_unwind(void)
@@ -137,7 +137,7 @@ int test__dwarf_unwind(void)
goto out;
}
- err = krava_1(thread, machine);
+ err = krava_1(thread);
out:
machine__delete_threads(machine);