Commit d271f3e2 authored by Teng Qin's avatar Teng Qin

Fix lost count in perf_reader

parent 73b5401f
......@@ -243,7 +243,15 @@ void perf_reader_event_read(struct perf_reader *reader) {
}
if (e->type == PERF_RECORD_LOST) {
uint64_t lost = *(uint64_t *)(ptr + sizeof(*e));
/*
* struct {
* struct perf_event_header header;
* u64 id;
* u64 lost;
* struct sample_id sample_id;
* };
*/
uint64_t lost = *(uint64_t *)(ptr + sizeof(*e) + sizeof(uint64_t));
if (reader->lost_cb) {
reader->lost_cb(lost);
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment