Skip to content

Commit

Permalink
remove locks
Browse files Browse the repository at this point in the history
  • Loading branch information
KayzzzZ committed Oct 14, 2024
1 parent 270968e commit c637478
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion core/ebpf/SelfMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ namespace ebpf {

void BaseBPFMonitor::HandleStatistic(nami::eBPFStatistics& stats) {
if (!stats.updated_) return;
std::lock_guard<std::mutex> lk(mStatsMtx);
UpdateInnerMetric(stats);
}

Expand Down
3 changes: 0 additions & 3 deletions core/ebpf/SelfMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::pair<ReentrantMetricsRecordRef, MetricLabels>> mRefAndLabels;

Expand Down Expand Up @@ -104,7 +102,6 @@ class NetworkSecuritySelfMonitor : public BaseBPFMonitor {

void HandleStatistic(nami::eBPFStatistics& stats) override {
if (!stats.updated_) return;
std::lock_guard<std::mutex> lk(mStatsMtx);
UpdateInnerMetric(stats);
}
};
Expand Down

0 comments on commit c637478

Please sign in to comment.