@@ -761,6 +762,12 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts)
attr->disabled = 0;
attr->enable_on_exec = 0;
}
+
+ if (opts->clockid >= 0) {
+ attr->use_clockid = 1;
+ attr->clockid = opts->clockid;
+ } else
+ attr->clockid = -1;
}
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index fb43215..164441a 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1098,6 +1098,8 @@ static void print_event_desc(struct perf_header *ph, int fd, FILE *fp)
}
fprintf(fp, " }");
}
+ fprintf(fp, ", clockid = %d", evsel->attr.clockid);
+