diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 698da1da51686a99097531d1e6e5089bec166ea1..2ed61f59d415ec65c050ec63802e2819d4e06a2a 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -111,7 +111,7 @@ void machine__exit(struct machine *machine) { map_groups__exit(&machine->kmaps); dsos__delete(&machine->dsos); - vdso__exit(machine); + machine__exit_vdso(machine); zfree(&machine->root_dir); zfree(&machine->current_tid); pthread_rwlock_destroy(&machine->threads_lock); diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index d15e1e9dd2ae878a1e64819c0f6f90842fc24885..365011c233a68864a909c6480d4c5a6b99258f85 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -178,7 +178,7 @@ struct map *map__new(struct machine *machine, u64 start, u64 len, if (vdso) { pgoff = 0; - dso = vdso__dso_findnew(machine, thread); + dso = machine__findnew_vdso(machine, thread); } else dso = machine__findnew_dso(machine, filename); diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c index d3651b43e9454242ecd552ad3ea5bfcf403d702a..2e8f6886ca72d216c1698c75c22b5271d3043bf6 100644 --- a/tools/perf/util/vdso.c +++ b/tools/perf/util/vdso.c @@ -101,7 +101,7 @@ static char *get_file(struct vdso_file *vdso_file) return vdso; } -void vdso__exit(struct machine *machine) +void machine__exit_vdso(struct machine *machine) { struct vdso_info *vdso_info = machine->vdso_info; @@ -120,8 +120,8 @@ void vdso__exit(struct machine *machine) zfree(&machine->vdso_info); } -static struct dso *vdso__new(struct machine *machine, const char *short_name, - const char *long_name) +static struct dso *machine__addnew_vdso(struct machine *machine, const char *short_name, + const char *long_name) { struct dso *dso; @@ -244,10 +244,10 @@ static struct dso *vdso__findnew_compat(struct machine *machine, if (!file_name) return NULL; - return vdso__new(machine, vdso_file->dso_name, file_name); + return machine__addnew_vdso(machine, vdso_file->dso_name, file_name); } -static int vdso__dso_findnew_compat(struct machine *machine, +static int machine__findnew_vdso_compat(struct machine *machine, struct thread *thread, struct vdso_info *vdso_info, struct dso **dso) @@ -281,8 +281,8 @@ static int vdso__dso_findnew_compat(struct machine *machine, #endif -struct dso *vdso__dso_findnew(struct machine *machine, - struct thread *thread __maybe_unused) +struct dso *machine__findnew_vdso(struct machine *machine, + struct thread *thread __maybe_unused) { struct vdso_info *vdso_info; struct dso *dso; @@ -295,7 +295,7 @@ struct dso *vdso__dso_findnew(struct machine *machine, return NULL; #if BITS_PER_LONG == 64 - if (vdso__dso_findnew_compat(machine, thread, vdso_info, &dso)) + if (machine__findnew_vdso_compat(machine, thread, vdso_info, &dso)) return dso; #endif @@ -307,7 +307,7 @@ struct dso *vdso__dso_findnew(struct machine *machine, if (!file) return NULL; - dso = vdso__new(machine, DSO__NAME_VDSO, file); + dso = machine__addnew_vdso(machine, DSO__NAME_VDSO, file); } return dso; diff --git a/tools/perf/util/vdso.h b/tools/perf/util/vdso.h index d97da1616f0c5b658d8c1846b0285835b3a3478c..cdc4fabfc2124efa9c2c497dc35a5f6b77840a85 100644 --- a/tools/perf/util/vdso.h +++ b/tools/perf/util/vdso.h @@ -23,7 +23,7 @@ bool dso__is_vdso(struct dso *dso); struct machine; struct thread; -struct dso *vdso__dso_findnew(struct machine *machine, struct thread *thread); -void vdso__exit(struct machine *machine); +struct dso *machine__findnew_vdso(struct machine *machine, struct thread *thread); +void machine__exit_vdso(struct machine *machine); #endif /* __PERF_VDSO__ */