gem5 v24.0.0.0
Loading...
Searching...
No Matches
logging.hh File Reference
#include <cassert>
#include <sstream>
#include <utility>
#include "base/compiler.hh"
#include "base/cprintf.hh"

Go to the source code of this file.

Classes

class  gem5::Logger
 
struct  gem5::Logger::Loc
 

Namespaces

namespace  gem5
 Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
 

Macros

#define base_message(logger, ...)
 
#define base_message_once(logger, ...)
 
#define exit_message(logger, ...)
 
#define panic(...)   exit_message(::gem5::Logger::getPanic(), __VA_ARGS__)
 This implements a cprintf based panic() function.
 
#define fatal(...)   exit_message(::gem5::Logger::getFatal(), __VA_ARGS__)
 This implements a cprintf based fatal() function.
 
#define panic_if(cond, ...)
 Conditional panic macro that checks the supplied condition and only panics if the condition is true and allows the programmer to specify diagnostic printout.
 
#define fatal_if(cond, ...)
 Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condition is true and allows the programmer to specify diagnostic printout.
 
#define NDEBUG_DEFINED   0
 
#define gem5_assert(cond, ...)
 The assert macro will function like a normal assert, but will use panic instead of straight abort().
 
#define chatty_assert(...)
 
#define warn(...)   base_message(::gem5::Logger::getWarn(), __VA_ARGS__)
 
#define inform(...)   base_message(::gem5::Logger::getInfo(), __VA_ARGS__)
 
#define hack(...)   base_message(::gem5::Logger::getHack(), __VA_ARGS__)
 
#define warn_once(...)    base_message_once(::gem5::Logger::getWarn(), __VA_ARGS__)
 
#define inform_once(...)    base_message_once(::gem5::Logger::getInfo(), __VA_ARGS__)
 
#define hack_once(...)    base_message_once(::gem5::Logger::getHack(), __VA_ARGS__)
 
#define warn_if(cond, ...)
 Conditional warning macro that checks the supplied condition and only prints a warning if the condition is true.
 
#define warn_if_once(cond, ...)
 

Macro Definition Documentation

◆ base_message

#define base_message ( logger,
... )
Value:
[&log = logger](const auto&... args) { \
log.print(::gem5::Logger::Loc(__FILE__, __LINE__), args...); \
}(__VA_ARGS__)

Definition at line 141 of file logging.hh.

Referenced by TEST_F().

◆ base_message_once

#define base_message_once ( logger,
... )
Value:
[&log = logger](const auto&... args) { \
static bool once{false}; \
if (GEM5_UNLIKELY(!once)) { \
once = true; \
base_message(log, args...); \
} \
}(__VA_ARGS__)

Definition at line 154 of file logging.hh.

Referenced by TEST_F().

◆ chatty_assert

#define chatty_assert ( ...)
Value:
( \
gem5_assert(args...), \
GEM5_DEPRECATED_MACRO(chatty_assert, {}, "Please use gem5_assert()") \
)
#define chatty_assert(...)
Definition logging.hh:332

Definition at line 332 of file logging.hh.

◆ exit_message

#define exit_message ( logger,
... )
Value:
( \
[&log = logger](const auto&... args) { \
base_message(log, args...); \
}(__VA_ARGS__), \
logger.exit_helper() \
)

Definition at line 170 of file logging.hh.

Referenced by TEST().

◆ hack

◆ inform

#define inform ( ...)    base_message(::gem5::Logger::getInfo(), __VA_ARGS__)

Definition at line 257 of file logging.hh.

Referenced by gem5::VncServer::accept(), gem5::TraceCPU::checkAndSchedExitEvent(), gem5::ProtocolTester::checkExit(), gem5::GenericISA::M5InformFaultBase< Base >::debugFunc(), gem5::VncServer::detach(), gem5::SparcISA::TLB::doMmuRegWrite(), gem5::ArmV8KvmCPU::dump(), gem5::BaseKvmCPU::dump(), gem5::X86KvmCPU::dumpDebugRegs(), gem5::dumpFpuCommon(), gem5::dumpFpuSpec(), gem5::dumpFpuSpec(), gem5::dumpKvm(), gem5::dumpKvm(), gem5::dumpKvm(), gem5::dumpKvm(), gem5::dumpKvm(), gem5::dumpKvm(), gem5::dumpKvm(), gem5::dumpKvm(), gem5::dumpKvm(), gem5::ArmKvmCPU::dumpKvmStateCoProc(), gem5::ArmKvmCPU::dumpKvmStateCore(), gem5::ArmKvmCPU::dumpKvmStateMisc(), gem5::ArmKvmCPU::dumpKvmStateVFP(), gem5::HDLcd::DmaEngine::dumpSettings(), gem5::HDLcd::PixelPump::dumpSettings(), gem5::X86KvmCPU::dumpXCRs(), gem5::X86KvmCPU::dumpXSave(), gem5::TCPIface::establishConnection(), gem5::MemState::fixupFault(), gem5::ruby::garnet::GarnetNetwork::GarnetNetwork(), gem5::BaseSemihosting::gatherHeapInfo(), gem5::DistIface::Sync::init(), gem5::TraceCPU::init(), gem5::ArmISA::FsFreebsd::initState(), gem5::ArmISA::FsLinux::initState(), gem5::ArmISA::FsWorkload::initState(), gem5::RiscvISA::FsLinux::initState(), gem5::RiscvISA::ISA::ISA(), gem5::KernelWorkload::KernelWorkload(), gem5::RiscvISA::BootloaderKernelWorkload::loadBootloader(), gem5::RiscvISA::BootloaderKernelWorkload::loadDtb(), gem5::RiscvISA::BootloaderKernelWorkload::loadKernel(), gem5::ArmISA::mcrMrc14TrapToHyp(), gem5::CowDiskImage::notifyFork(), gem5::DistIface::SyncEvent::process(), gem5::linux::PanicOrOopsEvent::process(), gem5::memory::SharedMemoryServer::ClientSocketEvent::process(), gem5::memory::SharedMemoryServer::ListenSocketEvent::process(), gem5::ArmISA::PMU::raiseInterrupt(), gem5::DistIface::readyToCkpt(), gem5::DistIface::readyToExit(), gem5::TCPIface::recvTCP(), gem5::o3::ElasticTrace::regEtraceListeners(), gem5::o3::ElasticTrace::regProbeListeners(), gem5::UFSHostDevice::requestHandler(), gem5::UFSHostDevice::UFSSCSIDevice::SCSICMDHandle(), gem5::SMMUv3DeviceInterface::sendRange(), gem5::ArmISA::PMU::setControlReg(), gem5::memory::SharedMemoryServer::SharedMemoryServer(), gem5::simulate(), gem5::DistIface::SyncEvent::start(), gem5::VirtIO9PDiod::startDiod(), gem5::BaseKvmCPU::startup(), gem5::Workload::startup(), gem5::UFSHostDevice::taskHandler(), gem5::TCPIface::TCPIface(), gem5::VirtIO9PDiod::terminateDiod(), TEST_F(), gem5::DistIface::toggleSync(), gem5::branch_prediction::TournamentBP::TournamentBP(), gem5::TraceCPU::updateNumOps(), and gem5::MC146818::writeData().

◆ inform_once

#define inform_once ( ...)     base_message_once(::gem5::Logger::getInfo(), __VA_ARGS__)

Definition at line 262 of file logging.hh.

Referenced by TEST_F().

◆ NDEBUG_DEFINED

#define NDEBUG_DEFINED   0

Definition at line 302 of file logging.hh.

◆ warn

#define warn ( ...)    base_message(::gem5::Logger::getWarn(), __VA_ARGS__)

Definition at line 256 of file logging.hh.

Referenced by gem5::MemChecker::WriteCluster::abortWrite(), gem5::TCPIface::accept(), gem5::VncServer::accept(), gem5::loader::DtbFile::addBootData(), gem5::trace::TarmacParserRecord::advanceTrace(), gem5::Process::allocateMem(), gem5::ArmSystem::ArmSystem(), gem5::BaseSemihosting::callSystem(), gem5::TesterThread::checkDeadlock(), gem5::Episode::checkDRF(), gem5::VncServer::checkProtocolVersion(), gem5::VncServer::checkSecurity(), gem5::checkSeg(), gem5::Iris::ThreadContext::clearArchRegs(), gem5::DVFSHandler::clkPeriodAtPerfLevel(), gem5::BaseRemoteGDB::cmdVKill(), gem5::MemChecker::ByteTracker::completeRead(), gem5::MemChecker::WriteCluster::completeWrite(), gem5::TCPIface::connect(), gem5::GenericTimerMem::counterCtrlRead(), gem5::GenericTimerMem::counterCtrlWrite(), gem5::GenericTimerMem::counterStatusRead(), gem5::GenericTimerMem::counterStatusWrite(), gem5::RiscvISA::PMP::createAddrfault(), gem5::HDLcd::createDmaEngine(), gem5::createImgWriter(), gem5::KvmVM::createIRQChip(), gem5::VncServer::data(), gem5::statistics::DataWrap< Derived, InfoProxyType >::DataWrap(), gem5::ArmISA::PMU::CounterState::debugCounter(), gem5::GenericISA::M5WarnFaultBase< Base >::debugFunc(), gem5::ArmKvmCPU::decodeCoProcReg(), gem5::ArmISA::decodeCP14Reg(), gem5::PM4PacketProcessor::decodeHeader(), gem5::SDMAEngine::decodeHeader(), gem5::PerfKvmCounter::detach(), gem5::loader::ElfObject::determineArch(), gem5::NSGigE::devIntrPost(), sc_core::sc_mempool::display_statistics(), gem5::DistEtherLink::DistEtherLink(), gem5::Pl111::dmaDone(), gem5::loader::doGzipLoad(), gem5::BaseKvmCPU::doMMIOAccess(), gem5::memory::DRAMInterface::DRAMInterface(), gem5::CheckerCPU::dumpAndExit(), gem5::linux::dumpDmesg(), gem5::Checker< DynInstPtr >::dumpInsts(), gem5::Workload::event(), gem5::X86ISA::EmuLinux::event(), gem5::minor::Execute::Execute(), gem5::WarnUnimplemented::execute(), gem5::TraceGen::exit(), gem5::ruby::FaultModel::fault_prob(), gem5::ruby::FaultModel::fault_vector(), gem5::fcntl64Func(), gem5::fcntlFunc(), gem5::o3::Fetch::finishTranslation(), gem5::ArmISA::ISA::flattenMiscIndex(), gem5::SparcISA::SEWorkload::flushWindows(), gem5::ruby::RubySystem::functionalRead(), gem5::ruby::RubyRequest::functionalWrite(), gem5::futexFunc(), gem5::BaseSemihosting::gatherHeapInfo(), gem5::Iob::generateIpi(), gem5::ArmISA::PMU::getEvent(), gem5::X86KvmCPU::getMsrIntersection(), gem5::getrlimitFunc(), gem5::getrusageFunc(), gem5::PowerModel::getStaticPower(), gem5::MipsISA::haltThread(), gem5::MC146818::handleEvent(), gem5::BaseKvmCPU::handleKvmExitIRQWindowOpen(), gem5::loader::ElfObject::handleLoadableSegment(), gem5::RiscvISA::ISA::handleLockedWrite(), gem5::scmi::BaseProtocol::handleMessage(), gem5::SparcISA::EmuLinux::handleTrap(), gem5::SparcISA::SEWorkload::handleTrap(), gem5::ArmSystem::haveEL(), gem5::Gicv3CPUInterface::haveEL(), gem5::ignoreFunc(), gem5::ignoreWarnOnceFunc(), gem5::BaseRemoteGDB::incomingConnection(), gem5::BaseRemoteGDB::incomingData(), gem5::CoherentXBar::init(), gem5::X86KvmCPU::init(), gem5::initSignals(), gem5::ArmISA::FsLinux::initState(), gem5::memory::AbstractMemory::initState(), gem5::RiscvISA::FsLinux::initState(), gem5::loader::SymbolTable::insert(), gem5::minor::LSQ::StoreBuffer::insert(), gem5::PowerISA::TLB::insertAt(), gem5::VegaISA::Inst_MUBUF__BUFFER_LOAD_SHORT_D16::Inst_MUBUF__BUFFER_LOAD_SHORT_D16(), gem5::VegaISA::Inst_MUBUF__BUFFER_LOAD_SHORT_D16_HI::Inst_MUBUF__BUFFER_LOAD_SHORT_D16_HI(), gem5::RiscvISA::Reset::invoke(), gem5::GPUComputeDriver::ioctl(), gem5::ioctlFunc(), gem5::AddressManager::AtomicStruct::isExpectedValue(), gem5::ps2::keySymToPs2(), gem5::ArmISA::lockedWriteHandler(), gem5::MaltaCChip::MaltaCChip(), gem5::mremapFunc(), gem5::VegaTLBCoalescer::mustStallCUPort(), gem5::BaseKvmCPU::notifyFork(), gem5::KvmVM::notifyFork(), gem5::VirtIOBlock::RequestQueue::onNotifyDescriptor(), gem5::BaseSemihosting::File::openImpl(), gem5::Linux::openSpecialFile(), gem5::OperatingSystem::openSpecialFile(), gem5::TrafficGen::parseConfig(), gem5::DVFSHandler::perfLevel(), gem5::memory::PhysicalMemory::PhysicalMemory(), gem5::prlimitFunc(), gem5::linux::PanicOrOopsEvent::process(), gem5::memory::SharedMemoryServer::ClientSocketEvent::process(), gem5::SMMUv3::processCommand(), gem5::BaseRemoteGDB::processCommands(), gem5::ProtocolTester::ProtocolTester(), gem5::pseudo_inst::pseudoInstWork(), gem5::EtherSwitch::Interface::PortFifo::push(), gem5::minor::Queue< ElemType, ReportTraits, BubbleTraits >::push(), gem5::HDLcd::pxlFrameDone(), gem5::DistIface::rankParam(), gem5::FVPBasePwrCtrl::read(), gem5::Gicv3Distributor::read(), gem5::IsaFake::read(), gem5::MmioVirtIO::read(), gem5::Pl011::read(), gem5::Pl050::read(), gem5::qemu::FwCfgIo::read(), gem5::qemu::FwCfgMmio::read(), gem5::RealViewCtrl::read(), gem5::RealViewTemperatureSensor::read(), gem5::RiscvISA::MmioVirtIO::read(), gem5::Sp805::read(), gem5::VirtIOBlock::read(), gem5::Plic::readClaim(), gem5::AMDGPUDevice::readConfig(), gem5::SMMUv3::readControl(), gem5::memory::CfiMemory::readDeviceID(), gem5::CheckerCPU::readMem(), gem5::ArmISA::DummyISADevice::readMiscReg(), gem5::ArmISA::ISA::readMiscReg(), gem5::GenericTimer::readMiscReg(), gem5::RiscvISA::ISA::readMiscReg(), gem5::ArmISA::PMU::readMiscRegInt(), gem5::X86ISA::I82094AA::readReg(), gem5::BaseSemihosting::readString(), gem5::ruby::CacheMemory::recordRequestType(), gem5::ps2::PS2Mouse::recv(), gem5::MemCheckerMonitor::recvTimingResp(), gem5::Cache::recvTimingSnoopReq(), gem5::BasePixelPump::renderPixels(), gem5::DistIface::SyncNode::requestCkpt(), gem5::DistIface::SyncNode::requestExit(), gem5::X86ISA::I8259::requestInterrupt(), gem5::minor::Queue< ElemType, ReportTraits, BubbleTraits >::reserve(), gem5::Gicv3::reserved(), gem5::FDArray::restoreFileOffsets(), gem5::MipsISA::restoreThread(), gem5::Process::revokeThreadContext(), gem5::schedBreak(), gem5::qemu::FwCfg::select(), gem5::Sp805::sendInt(), gem5::BaseCache::serialize(), gem5::BaseTrafficGen::serialize(), gem5::Process::serialize(), gem5::VirtIO9PProxy::serialize(), gem5::PowerState::set(), gem5::trace::setDebugLogger(), gem5::VncServer::setEncodings(), gem5::ArmISA::DummyISADevice::setMiscReg(), gem5::ArmISA::ISA::setMiscReg(), gem5::ArmISA::PMU::setMiscReg(), gem5::GenericTimer::setMiscReg(), gem5::RiscvISA::ISA::setMiscReg(), gem5::VncServer::setPixelFormat(), gem5::X86ISA::Interrupts::setReg(), gem5::fastmodel::FastmodelRemoteGDB::AArch64GdbRegCache::setRegs(), gem5::X86ISA::RemoteGDB::AMD64GdbRegCache::setRegs(), gem5::X86ISA::RemoteGDB::X86GdbRegCache::setRegs(), gem5::SystemCounter::setValue(), gem5::DistIface::sizeParam(), gem5::o3::Rename::skidInsert(), gem5::ArmISA::FsLinux::startup(), gem5::EnergyCtrl::startup(), gem5::VoltageDomain::startup(), gem5::GPUCommandProcessor::submitVendorPkt(), gem5::ItsCommand::sync(), gem5::VirtIO9PDiod::terminateDiod(), TEST_F(), gem5::GenericTimerMem::timerCtrlRead(), gem5::GenericTimerMem::timerCtrlWrite(), gem5::GenericTimerFrame::timerRead(), gem5::GenericTimerFrame::timerWrite(), gem5::ArmISA::TlbEntry::TlbEntry(), gem5::MipsISA::TlbEntry::TlbEntry(), gem5::PowerISA::TlbEntry::TlbEntry(), gem5::AMDGPUVM::GARTTranslationGen::translate(), gem5::Iris::ThreadContext::translateAddress(), gem5::memory::SharedMemoryServer::BaseShmPollEvent::tryReadAll(), gem5::Packet::trySatisfyFunctional(), gem5::BaseSemihosting::unrecognizedCall(), gem5::HWScheduler::unregisterQueue(), gem5::SDMAEngine::unregisterRLCQueue(), gem5::ArmISA::ISA::unserialize(), gem5::BaseTrafficGen::unserialize(), gem5::DVFSHandler::unserialize(), gem5::EtherLink::Link::unserialize(), gem5::GenericTimer::unserialize(), gem5::Globals::unserialize(), gem5::Process::unserialize(), gem5::RegisterBank< BankByteOrder >::RegisterLBuf< BufBytes >::unserialize(), gem5::VirtIO9PProxy::unserialize(), gem5::BaseTrafficGen::update(), gem5::ArmISA::PMU::updateCounter(), gem5::ArmKvmCPU::updateKvmStateCoProc(), gem5::ArmKvmCPU::updateKvmStateMisc(), gem5::ArmKvmCPU::updateKvmStateVFP(), gem5::ArmKvmCPU::updateTCStateCoProc(), gem5::ArmKvmCPU::updateTCStateMisc(), gem5::ArmKvmCPU::updateTCStateVFP(), gem5::TesterThread::validateAtomicResp(), gem5::Checker< class >::validateInst(), gem5::TesterThread::validateLoadResp(), gem5::DVFSHandler::validDomainID(), gem5::Checker< class >::verify(), gem5::DVFSHandler::voltageAtPerfLevel(), gem5::pseudo_inst::wakeCPU(), gem5::ruby::GPUCoalescer::wakeup(), gem5::warnUnsupportedOS(), gem5::partitioning_policy::WayPartitioningPolicy::WayPartitioningPolicy(), gem5::A9SCU::write(), gem5::FVPBasePwrCtrl::write(), gem5::Gicv3Distributor::write(), gem5::IGbE::write(), gem5::IsaFake::write(), gem5::MmioVirtIO::write(), gem5::PciVirtIO::write(), gem5::Pl011::write(), gem5::Pl050::write(), gem5::PngWriter::write(), gem5::qemu::FwCfgIo::write(), gem5::qemu::FwCfgMmio::write(), gem5::RealViewCtrl::write(), gem5::RiscvISA::MmioVirtIO::write(), gem5::Sp805::write(), gem5::VirtIOBlock::write(), gem5::X86ISA::I8042::write(), gem5::X86ISA::Speaker::write(), gem5::SMMUv3::writeControl(), gem5::GicV2::writeCpu(), gem5::GicV2::writeDistributor(), gem5::AMDGPUDevice::writeDoorbell(), gem5::CheckerCPU::writeMem(), gem5::writeOutString(), gem5::X86ISA::I82094AA::writeReg(), and gem5::MipsISA::yieldThread().

◆ warn_if

#define warn_if ( cond,
... )

◆ warn_once

#define warn_once ( ...)     base_message_once(::gem5::Logger::getWarn(), __VA_ARGS__)

Definition at line 260 of file logging.hh.

Referenced by gem5::ArmISA::ISA::addressTranslation(), gem5::ArmISA::ISA::addressTranslation64(), gem5::ruby::CacheMemory::allocate(), gem5::Pc::clearConsoleInt(), gem5::RealView::clearConsoleInt(), gem5::T1000::clearConsoleInt(), gem5::ArmISA::PMU::clearInterrupt(), gem5::Pc::clearPciInt(), gem5::ArmISA::ArmStaticInst::cpsrWriteByInstr(), gem5::Intel8254Timer::Counter::currentCount(), gem5::statistics::DataWrap< Derived, InfoProxyType >::DataWrap(), gem5::ArmISA::Decoder::Decoder(), gem5::ArmKvmCPU::decodeVFPCtrlReg(), gem5::VegaISA::Inst_SOPK__S_SETREG_B32::execute(), gem5::VegaISA::Inst_SOPK__S_SETREG_IMM32_B32::execute(), gem5::VegaISA::Inst_SOPP__S_SETPRIO::execute(), gem5::ruby::FaultModel::fault_prob(), gem5::ruby::FaultModel::fault_vector(), gem5::linux::ThreadInfo::get_data(), gem5::AMDGPUVM::getFrameAperture(), gem5::ruby::Sequencer::hitCallback(), gem5::BaseCache::invalidateVisitor(), gem5::Kvm::Kvm(), gem5::BaseRemoteGDB::listen(), gem5::Terminal::listen(), gem5::VncServer::listen(), gem5::ArmISA::FsLinux::mapPid(), gem5::ruby::RubySystem::memWriteback(), gem5::GPUComputeDriver::mmap(), gem5::GPURenderDriver::mmap(), gem5::mmapFunc(), gem5::SDMAEngine::pollRegMem(), gem5::RealView::postConsoleInt(), gem5::T1000::postConsoleInt(), gem5::DistIface::SyncEvent::process(), gem5::ArmISA::TableWalker::processWalkAArch64(), gem5::ArmISA::PMU::raiseInterrupt(), gem5::A9SCU::read(), gem5::EnergyCtrl::read(), gem5::PciDevice::readConfig(), gem5::VGic::readCtrl(), gem5::readlinkatFunc(), gem5::ArmISA::ISA::readMiscReg(), gem5::ArmISA::readMPIDR(), gem5::ruby::RubyPort::MemResponsePort::recvTimingReq(), gem5::PowerState::set(), gem5::ArmISA::PMU::setCounterTypeRegister(), gem5::ArmISA::PMU::setCounterValue(), gem5::ArmISA::ISA::setMiscReg(), gem5::SkewedAssociative::SkewedAssociative(), sc_gem5::spawnWork(), gem5::System::System(), TEST_F(), gem5::X86ISA::GpuTLB::translate(), gem5::X86ISA::TLB::translate(), gem5::NSGigE::txKick(), gem5::loader::SymbolTable::unserialize(), gem5::X86KvmCPU::updateKvmStateFPULegacy(), gem5::X86KvmCPU::updateKvmStateFPUXSave(), gem5::ArmKvmCPU::updateTCStateCoProc(), gem5::statistics::Hdf5::visit(), gem5::statistics::Hdf5::visit(), gem5::statistics::Hdf5::visit(), gem5::EnergyCtrl::write(), gem5::MmioVirtIO::write(), gem5::Pl111::write(), gem5::RealViewCtrl::write(), gem5::RiscvISA::MmioVirtIO::write(), gem5::PciDevice::writeConfig(), and gem5::VGic::writeCtrl().


Generated on Tue Jun 18 2024 16:24:08 for gem5 by doxygen 1.11.0