aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2015-05-28 11:40:55 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-05-29 11:43:43 -0400
commit459ce518d9b563a99faa73aa340b764e0b3fb143 (patch)
treeb88eec8104fc7e100d85adcdc20c492e4172a8fd
parentcec83938707a7055c1f9decd81f2741420518e64 (diff)
perf machine: Adopt findnew_kernel method
It never was a 'struct dso' method, so fix that by rename dso__kernel_findnew() to machine__findnew_kernel(). At some point I'll move it all to the machine.[ch] files, for now lets ease patch review by not moving too much stuff. 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: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-zrxmblgsg5vx0iv4rhvq2f6l@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/dso.c4
-rw-r--r--tools/perf/util/dso.h4
-rw-r--r--tools/perf/util/machine.c11
3 files changed, 9 insertions, 10 deletions
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 7e11a700303f..fe5236833164 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -827,8 +827,8 @@ struct map *dso__new_map(const char *name)
827 return map; 827 return map;
828} 828}
829 829
830struct dso *dso__kernel_findnew(struct machine *machine, const char *name, 830struct dso *machine__findnew_kernel(struct machine *machine, const char *name,
831 const char *short_name, int dso_type) 831 const char *short_name, int dso_type)
832{ 832{
833 /* 833 /*
834 * The kernel dso could be created by build_id processing. 834 * The kernel dso could be created by build_id processing.
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index bcec06ad73a2..24a507a54147 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -294,8 +294,8 @@ ssize_t dso__data_read_addr(struct dso *dso, struct map *map,
294bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by); 294bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by);
295 295
296struct map *dso__new_map(const char *name); 296struct map *dso__new_map(const char *name);
297struct dso *dso__kernel_findnew(struct machine *machine, const char *name, 297struct dso *machine__findnew_kernel(struct machine *machine, const char *name,
298 const char *short_name, int dso_type); 298 const char *short_name, int dso_type);
299 299
300void dsos__add(struct dsos *dsos, struct dso *dso); 300void dsos__add(struct dsos *dsos, struct dso *dso);
301struct dso *dsos__addnew(struct dsos *dsos, const char *name); 301struct dso *dsos__addnew(struct dsos *dsos, const char *name);
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 0c0e61cce577..8934dc4345fe 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -640,9 +640,8 @@ static struct dso *machine__get_kernel(struct machine *machine)
640 if (!vmlinux_name) 640 if (!vmlinux_name)
641 vmlinux_name = "[kernel.kallsyms]"; 641 vmlinux_name = "[kernel.kallsyms]";
642 642
643 kernel = dso__kernel_findnew(machine, vmlinux_name, 643 kernel = machine__findnew_kernel(machine, vmlinux_name,
644 "[kernel]", 644 "[kernel]", DSO_TYPE_KERNEL);
645 DSO_TYPE_KERNEL);
646 } else { 645 } else {
647 char bf[PATH_MAX]; 646 char bf[PATH_MAX];
648 647
@@ -652,9 +651,9 @@ static struct dso *machine__get_kernel(struct machine *machine)
652 vmlinux_name = machine__mmap_name(machine, bf, 651 vmlinux_name = machine__mmap_name(machine, bf,
653 sizeof(bf)); 652 sizeof(bf));
654 653
655 kernel = dso__kernel_findnew(machine, vmlinux_name, 654 kernel = machine__findnew_kernel(machine, vmlinux_name,
656 "[guest.kernel]", 655 "[guest.kernel]",
657 DSO_TYPE_GUEST_KERNEL); 656 DSO_TYPE_GUEST_KERNEL);
658 } 657 }
659 658
660 if (kernel != NULL && (!kernel->has_build_id)) 659 if (kernel != NULL && (!kernel->has_build_id))