Skip to content

Commit

Permalink
fix: Bad event type for offcpu profile
Browse files Browse the repository at this point in the history
  • Loading branch information
rvql authored and sharang committed Sep 7, 2024
1 parent dc307c3 commit fbe578e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion agent/src/ebpf_dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,11 @@ impl EbpfCollector {
profile.timestamp -= (-diff) as u64;
}
}
profile.event_type = metric::ProfileEventType::EbpfOnCpu.into();
profile.event_type = match data.profiler_type {
#[cfg(feature = "extended_profile")]
ebpf::PROFILER_TYPE_OFFCPU => metric::ProfileEventType::EbpfOffCpu.into(),
_ => metric::ProfileEventType::EbpfOnCpu.into(),
};
profile.stime = data.stime;
profile.pid = data.pid;
profile.tid = data.tid;
Expand Down

0 comments on commit fbe578e

Please sign in to comment.