Skip to content

Commit

Permalink
Merge pull request #44939 from smorovic/thread-limit-mss
Browse files Browse the repository at this point in the history
[DAQ] range check for microstate (140X) [backport]
  • Loading branch information
cmsbuild authored May 10, 2024
2 parents 8581266 + 4bb1cc6 commit e789fa3
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions EventFilter/Utilities/src/FastMonitoringService.cc
Original file line number Diff line number Diff line change
Expand Up @@ -651,14 +651,20 @@ namespace evf {
microstate_[getSID(sid)] = getmInput();
if (!tbbMonitoringMode_)
return;
tmicrostate_[getTID()] = getmInput();
auto tid = getTID();
if (tid >= nThreads_)
return;
tmicrostate_[tid] = getmInput();
}

void FastMonitoringService::postSourceEvent(edm::StreamID sid) {
microstate_[getSID(sid)] = getmFwkOvhSrc();
if (!tbbMonitoringMode_)
return;
tmicrostate_[getTID()] = getmIdle();
auto tid = getTID();
if (tid >= nThreads_)
return;
tmicrostate_[tid] = getmIdle();
}

void FastMonitoringService::preModuleEventAcquire(edm::StreamContext const& sc,
Expand All @@ -667,8 +673,11 @@ namespace evf {
microstateAcqFlag_[getSID(sc)] = 1;
if (!tbbMonitoringMode_)
return;
tmicrostate_[getTID()] = (void*)(mcc.moduleDescription());
tmicrostateAcqFlag_[getTID()] = 1;
auto tid = getTID();
if (tid >= nThreads_)
return;
tmicrostate_[tid] = (void*)(mcc.moduleDescription());
tmicrostateAcqFlag_[tid] = 1;
}

void FastMonitoringService::postModuleEventAcquire(edm::StreamContext const& sc,
Expand All @@ -677,22 +686,31 @@ namespace evf {
microstateAcqFlag_[getSID(sc)] = 0;
if (!tbbMonitoringMode_)
return;
tmicrostate_[getTID()] = getmIdle();
tmicrostateAcqFlag_[getTID()] = 0;
auto tid = getTID();
if (tid >= nThreads_)
return;
tmicrostate_[tid] = getmIdle();
tmicrostateAcqFlag_[tid] = 0;
}

void FastMonitoringService::preModuleEvent(edm::StreamContext const& sc, edm::ModuleCallingContext const& mcc) {
microstate_[getSID(sc)] = (void*)(mcc.moduleDescription());
if (!tbbMonitoringMode_)
return;
tmicrostate_[getTID()] = (void*)(mcc.moduleDescription());
auto tid = getTID();
if (tid >= nThreads_)
return;
tmicrostate_[tid] = (void*)(mcc.moduleDescription());
}

void FastMonitoringService::postModuleEvent(edm::StreamContext const& sc, edm::ModuleCallingContext const& mcc) {
microstate_[getSID(sc)] = getmFwkOvhMod();
if (!tbbMonitoringMode_)
return;
tmicrostate_[getTID()] = getmIdle();
auto tid = getTID();
if (tid >= nThreads_)
return;
tmicrostate_[tid] = getmIdle();
}

//from source
Expand Down

0 comments on commit e789fa3

Please sign in to comment.