Skip to content

Commit 459ce51

Browse files
committed
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 <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: David Ahern <[email protected]> Cc: Don Zickus <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent cec8393 commit 459ce51

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

tools/perf/util/dso.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,8 +827,8 @@ struct map *dso__new_map(const char *name)
827827
return map;
828828
}
829829

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)
832832
{
833833
/*
834834
* The kernel dso could be created by build_id processing.

tools/perf/util/dso.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ ssize_t dso__data_read_addr(struct dso *dso, struct map *map,
294294
bool dso__data_status_seen(struct dso *dso, enum dso_data_status_seen by);
295295

296296
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);
299299

300300
void dsos__add(struct dsos *dsos, struct dso *dso);
301301
struct dso *dsos__addnew(struct dsos *dsos, const char *name);

tools/perf/util/machine.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,8 @@ static struct dso *machine__get_kernel(struct machine *machine)
640640
if (!vmlinux_name)
641641
vmlinux_name = "[kernel.kallsyms]";
642642

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);
646645
} else {
647646
char bf[PATH_MAX];
648647

@@ -652,9 +651,9 @@ static struct dso *machine__get_kernel(struct machine *machine)
652651
vmlinux_name = machine__mmap_name(machine, bf,
653652
sizeof(bf));
654653

655-
kernel = dso__kernel_findnew(machine, vmlinux_name,
656-
"[guest.kernel]",
657-
DSO_TYPE_GUEST_KERNEL);
654+
kernel = machine__findnew_kernel(machine, vmlinux_name,
655+
"[guest.kernel]",
656+
DSO_TYPE_GUEST_KERNEL);
658657
}
659658

660659
if (kernel != NULL && (!kernel->has_build_id))

0 commit comments

Comments
 (0)