perf evlist: Add perf_evlist__parse_sample_timestamp function
Add perf_evlist__parse_sample_timestamp to retrieve the timestamp of the sample. The idea is to use this function instead of the full sample parsing before we queue the sample. At that time only the timestamp is needed and we parse the sample once again later on delivery. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-o7syqo8lipj4or7renpu8e8y@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
3ad31d8a0d
commit
014681208e
@@ -1582,6 +1582,17 @@ int perf_evlist__parse_sample(struct perf_evlist *evlist, union perf_event *even
|
||||
return perf_evsel__parse_sample(evsel, event, sample);
|
||||
}
|
||||
|
||||
int perf_evlist__parse_sample_timestamp(struct perf_evlist *evlist,
|
||||
union perf_event *event,
|
||||
u64 *timestamp)
|
||||
{
|
||||
struct perf_evsel *evsel = perf_evlist__event2evsel(evlist, event);
|
||||
|
||||
if (!evsel)
|
||||
return -EFAULT;
|
||||
return perf_evsel__parse_sample_timestamp(evsel, event, timestamp);
|
||||
}
|
||||
|
||||
size_t perf_evlist__fprintf(struct perf_evlist *evlist, FILE *fp)
|
||||
{
|
||||
struct perf_evsel *evsel;
|
||||
|
Reference in New Issue
Block a user