diff --git a/core/ebpf/SelfMonitor.cpp b/core/ebpf/SelfMonitor.cpp index 8c66b3fbba..539fcf5241 100644 --- a/core/ebpf/SelfMonitor.cpp +++ b/core/ebpf/SelfMonitor.cpp @@ -20,7 +20,6 @@ namespace ebpf { void BaseBPFMonitor::HandleStatistic(nami::eBPFStatistics& stats) { if (!stats.updated_) return; - std::lock_guard lk(mStatsMtx); UpdateInnerMetric(stats); } diff --git a/core/ebpf/SelfMonitor.h b/core/ebpf/SelfMonitor.h index 755c67d318..d8ea11d6de 100644 --- a/core/ebpf/SelfMonitor.h +++ b/core/ebpf/SelfMonitor.h @@ -45,10 +45,8 @@ class BaseBPFMonitor { // attention: not thread safe!! void UpdateInnerMetric(nami::eBPFStatistics& currStat); - mutable ReadWriteLock mMonitorMtx; std::string mPipelineName; PluginMetricManagerPtr mPluginMetricMgr; - mutable std::mutex mStatsMtx; MetricsRecordRef& mRef; std::vector> mRefAndLabels; @@ -104,7 +102,6 @@ class NetworkSecuritySelfMonitor : public BaseBPFMonitor { void HandleStatistic(nami::eBPFStatistics& stats) override { if (!stats.updated_) return; - std::lock_guard lk(mStatsMtx); UpdateInnerMetric(stats); } };