Skip to content

Commit 822aec7

Browse files
committed
Remove warning for ending region with no active regions in energy profiler
1 parent a5b3dd7 commit 822aec7

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

profiling/energy-profiler/kp_energy_profiler.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,6 @@ void end_region_with_id(uint64_t expected_id) {
9696
auto& state = EnergyProfilerState::get_instance();
9797
std::lock_guard<std::mutex> lock(state.get_mutex());
9898
auto& active_regions = state.get_active_regions();
99-
if (active_regions.empty()) {
100-
std::cerr
101-
<< "EnergyProfiler ERROR: Warning: Attempting to end region with ID "
102-
<< std::to_string(expected_id) << " but no active regions found."
103-
<< std::endl;
104-
return;
105-
}
10699
auto it = std::find_if(active_regions.begin(), active_regions.end(),
107100
[expected_id](const TimingInfo& region) {
108101
return region.id == expected_id;

0 commit comments

Comments
 (0)