|
gem5 [DEVELOP-FOR-25.0]
|
The InputStream encapsulates a trace file and the internal buffers and populates TraceElements based on the input. More...
Public Member Functions | |
| InputStream (const std::string &filename) | |
| Create a trace input stream for a given file name. | |
| void | reset () |
| Reset the stream such that it can be played once again. | |
| void | init () |
| Check the trace header to make sure that it is of the right format. | |
| bool | read (TraceElement &element) |
| Attempt to read a trace element from the stream, and also notify the caller if the end of the file was reached. | |
Private Attributes | |
| ProtoInputStream | trace |
| Input file stream for the protobuf trace. | |
The InputStream encapsulates a trace file and the internal buffers and populates TraceElements based on the input.
Definition at line 109 of file trace_gen.hh.
| gem5::TraceGen::InputStream::InputStream | ( | const std::string & | filename | ) |
Create a trace input stream for a given file name.
| filename | Path to the file to read from |
Definition at line 51 of file trace_gen.cc.
| void gem5::TraceGen::InputStream::init | ( | ) |
Check the trace header to make sure that it is of the right format.
Definition at line 58 of file trace_gen.cc.
References gem5::sim_clock::Frequency, panic, and trace.
Referenced by InputStream().
| bool gem5::TraceGen::InputStream::read | ( | TraceElement & | element | ) |
Attempt to read a trace element from the stream, and also notify the caller if the end of the file was reached.
| element | Trace element to populate |
Definition at line 78 of file trace_gen.cc.
References gem5::TraceGen::TraceElement::addr, gem5::TraceGen::TraceElement::blocksize, gem5::MemCmd::cmd, gem5::TraceGen::TraceElement::cmd, gem5::TraceGen::TraceElement::flags, gem5::TraceGen::TraceElement::tick, and trace.
| void gem5::TraceGen::InputStream::reset | ( | ) |
Reset the stream such that it can be played once again.
Definition at line 71 of file trace_gen.cc.
References gem5::statistics::init, and trace.
|
private |
Input file stream for the protobuf trace.
Definition at line 115 of file trace_gen.hh.
Referenced by init(), InputStream(), read(), and reset().