summaryrefslogtreecommitdiff
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2020-08-08 14:21:54 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-08-13 09:53:21 -0300
commit1c695c88a1092b4013e3fffbe0ca685149165403 (patch)
tree64fc5aa09528efb523b9fbd78efe09986bd5e8dc /tools/perf/util/header.c
parentceafdd664cae27ffd2d0a4e4e9eef7896c304046 (diff)
perf tools: Rename 'enum dso_kernel_type' to 'enum dso_space_type'
Rename enum dso_kernel_type to enum dso_space_type, which seems like better fit. Committer notes: This is used with 'struct dso'->kernel, which once was a boolean, so DSO_SPACE__USER is zero, !zero means some sort of kernel space, be it the host kernel space or a guest kernel space. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.c')
-rw-r--r--tools/perf/util/header.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 251faa9a5789..e1db72c73e89 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2056,7 +2056,7 @@ static int __event_process_build_id(struct perf_record_header_build_id *bev,
struct machine *machine;
u16 cpumode;
struct dso *dso;
- enum dso_kernel_type dso_type;
+ enum dso_space_type dso_space;
machine = perf_session__findnew_machine(session, bev->pid);
if (!machine)
@@ -2066,14 +2066,14 @@ static int __event_process_build_id(struct perf_record_header_build_id *bev,
switch (cpumode) {
case PERF_RECORD_MISC_KERNEL:
- dso_type = DSO_TYPE_KERNEL;
+ dso_space = DSO_SPACE__KERNEL;
break;
case PERF_RECORD_MISC_GUEST_KERNEL:
- dso_type = DSO_TYPE_GUEST_KERNEL;
+ dso_space = DSO_SPACE__KERNEL_GUEST;
break;
case PERF_RECORD_MISC_USER:
case PERF_RECORD_MISC_GUEST_USER:
- dso_type = DSO_TYPE_USER;
+ dso_space = DSO_SPACE__USER;
break;
default:
goto out;
@@ -2085,13 +2085,13 @@ static int __event_process_build_id(struct perf_record_header_build_id *bev,
dso__set_build_id(dso, &bev->build_id);
- if (dso_type != DSO_TYPE_USER) {
+ if (dso_space != DSO_SPACE__USER) {
struct kmod_path m = { .name = NULL, };
if (!kmod_path__parse_name(&m, filename) && m.kmod)
dso__set_module_info(dso, &m, machine);
else
- dso->kernel = dso_type;
+ dso->kernel = dso_space;
free(m.name);
}