From fbe578ee038cde0d7f10225cedf94c7e578fcdc0 Mon Sep 17 00:00:00 2001 From: JIN Jie Date: Fri, 6 Sep 2024 19:22:01 +0800 Subject: [PATCH] fix: Bad event type for offcpu profile --- agent/src/ebpf_dispatcher.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/agent/src/ebpf_dispatcher.rs b/agent/src/ebpf_dispatcher.rs index 5c8b216d9f8..3cf6283f2c2 100644 --- a/agent/src/ebpf_dispatcher.rs +++ b/agent/src/ebpf_dispatcher.rs @@ -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;