Skip to content

Commit c5afdf5

Browse files
committed
added verbosity protection for 'Empty counter of Superpage FIFO' warnings
1 parent 05d3cb4 commit c5afdf5

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

include/ReadoutCard/Logger.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ constexpr auto endm = AliceO2::InfoLogger::InfoLogger::endm;
3030

3131
typedef AliceO2::InfoLogger::InfoLoggerContext ILContext;
3232
typedef AliceO2::InfoLogger::InfoLogger::InfoLoggerMessageOption ILMessageOption;
33+
typedef AliceO2::InfoLogger::InfoLogger::AutoMuteToken ILAutoMuteToken;
3334

3435
class Logger
3536
{

src/Cru/CruDmaChannel.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,11 +405,13 @@ bool CruDmaChannel::areSuperpageFifosHealthy()
405405

406406
bool ok = true;
407407

408+
static ILAutoMuteToken logToken(LogWarningDevel_(4257), 15, 60);
409+
408410
for (const auto& link : mLinks) {
409411
uint32_t emptyCounter = getBar()->getSuperpageFifoEmptyCounter(link.id);
410412
if (mEmptySPFifoCounters.count(link.id) && //only check after the counters map has been initialized
411413
mEmptySPFifoCounters[link.id] != emptyCounter) {
412-
log((format("Empty counter of Superpage FIFO of link %d increased from %x to %x") % link.id % mEmptySPFifoCounters[link.id] % emptyCounter).str(), LogWarningDevel_(4257));
414+
Logger::get().log(logToken, "%s", (mLoggerPrefix + (format("Empty counter of Superpage FIFO of link %d increased from %x to %x") % link.id % mEmptySPFifoCounters[link.id] % emptyCounter).str()).c_str());
413415
ok = false;
414416
}
415417
mEmptySPFifoCounters[link.id] = emptyCounter;

src/DmaChannelBase.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ class DmaChannelBase : public DmaChannelInterface
127127
/// Lock that guards against both inter- and intra-process ownership
128128
std::unique_ptr<Interprocess::Lock> mInterprocessLock;
129129

130+
protected:
130131
std::string mLoggerPrefix;
131132
};
132133

0 commit comments

Comments
 (0)