Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+9 -10
+2 -2
tools/perf/util/dso.c
··· 827 827 return map; 828 828 } 829 829 830 - struct dso *dso__kernel_findnew(struct machine *machine, const char *name, 831 - const char *short_name, int dso_type) 830 + struct dso *machine__findnew_kernel(struct machine *machine, const char *name, 831 + const char *short_name, int dso_type) 832 832 { 833 833 /* 834 834 * The kernel dso could be created by build_id processing.
+2 -2
tools/perf/util/dso.h
··· 294 294 bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by); 295 295 296 296 struct map *dso__new_map(const char *name); 297 - struct dso *dso__kernel_findnew(struct machine *machine, const char *name, 298 - const char *short_name, int dso_type); 297 + struct dso *machine__findnew_kernel(struct machine *machine, const char *name, 298 + const char *short_name, int dso_type); 299 299 300 300 void dsos__add(struct dsos *dsos, struct dso *dso); 301 301 struct dso *dsos__addnew(struct dsos *dsos, const char *name);
+5 -6
tools/perf/util/machine.c
··· 640 640 if (!vmlinux_name) 641 641 vmlinux_name = "[kernel.kallsyms]"; 642 642 643 - kernel = dso__kernel_findnew(machine, vmlinux_name, 644 - "[kernel]", 645 - DSO_TYPE_KERNEL); 643 + kernel = machine__findnew_kernel(machine, vmlinux_name, 644 + "[kernel]", DSO_TYPE_KERNEL); 646 645 } else { 647 646 char bf[PATH_MAX]; 648 647 ··· 651 652 vmlinux_name = machine__mmap_name(machine, bf, 652 653 sizeof(bf)); 653 654 654 - kernel = dso__kernel_findnew(machine, vmlinux_name, 655 - "[guest.kernel]", 656 - DSO_TYPE_GUEST_KERNEL); 655 + kernel = machine__findnew_kernel(machine, vmlinux_name, 656 + "[guest.kernel]", 657 + DSO_TYPE_GUEST_KERNEL); 657 658 } 658 659 659 660 if (kernel != NULL && (!kernel->has_build_id))