gem5 v24.0.0.0
|
Object used to maintain state of a PrintReq. More...
#include <packet.hh>
Classes | |
struct | LabelStackEntry |
An entry in the label stack. More... | |
Public Member Functions | |
PrintReqState (std::ostream &os, int verbosity=0) | |
~PrintReqState () | |
const std::string & | curPrefix () |
Returns the current line prefix. | |
void | pushLabel (const std::string &lbl, const std::string &prefix=" ") |
Push a label onto the label stack, and prepend the given prefix string onto the current prefix. | |
void | popLabel () |
Pop a label off the label stack. | |
void | printLabels () |
Print all of the pending unprinted labels on the stack. | |
void | printObj (Printable *obj) |
Print a Printable object to os, because it matched the address on a PrintReq. | |
Public Member Functions inherited from gem5::Packet::SenderState | |
SenderState () | |
virtual | ~SenderState () |
Public Attributes | |
std::ostream & | os |
const int | verbosity |
Public Attributes inherited from gem5::Packet::SenderState | |
SenderState * | predecessor |
Private Types | |
typedef std::list< LabelStackEntry > | LabelStack |
Private Attributes | |
LabelStack | labelStack |
std::string * | curPrefixPtr |
Object used to maintain state of a PrintReq.
The senderState field of a PrintReq should always be of this type.
|
private |
gem5::Packet::PrintReqState::PrintReqState | ( | std::ostream & | os, |
int | verbosity = 0 ) |
Definition at line 414 of file packet.cc.
References curPrefixPtr, and labelStack.
|
inline |
Returns the current line prefix.
Definition at line 508 of file packet.hh.
References curPrefixPtr.
Referenced by gem5::memory::AbstractMemory::functionalAccess(), and printObj().
void gem5::Packet::PrintReqState::popLabel | ( | ) |
Pop a label off the label stack.
Definition at line 444 of file packet.cc.
References curPrefixPtr, and labelStack.
void gem5::Packet::PrintReqState::printLabels | ( | ) |
Print all of the pending unprinted labels on the stack.
Called by printObj(), so normally not called by users unless bypassing printObj().
Definition at line 453 of file packet.cc.
References gem5::ccprintf(), gem5::ArmISA::i, labelStack, and os.
Referenced by gem5::memory::AbstractMemory::functionalAccess(), and printObj().
void gem5::Packet::PrintReqState::printObj | ( | Printable * | obj | ) |
Print a Printable object to os, because it matched the address on a PrintReq.
Definition at line 470 of file packet.cc.
References curPrefix(), os, gem5::Printable::print(), printLabels(), and verbosity.
void gem5::Packet::PrintReqState::pushLabel | ( | const std::string & | lbl, |
const std::string & | prefix = " " ) |
Push a label onto the label stack, and prepend the given prefix string onto the current prefix.
Labels will only be printed if an object within the label's scope is printed.
Definition at line 435 of file packet.cc.
References curPrefixPtr, and labelStack.
|
private |
Definition at line 496 of file packet.hh.
Referenced by curPrefix(), popLabel(), PrintReqState(), and pushLabel().
|
private |
Definition at line 494 of file packet.hh.
Referenced by popLabel(), printLabels(), PrintReqState(), and pushLabel().
std::ostream& gem5::Packet::PrintReqState::os |
Definition at line 499 of file packet.hh.
Referenced by gem5::memory::AbstractMemory::functionalAccess(), printLabels(), and printObj().
const int gem5::Packet::PrintReqState::verbosity |
Definition at line 500 of file packet.hh.
Referenced by printObj().