![]() |
Peano
|
Chrome Trace File Logger. More...
#include <ChromeTraceFileLogger.h>
Public Member Functions | |
~ChromeTraceFileLogger () | |
void | debug (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
void | info (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
void | warning (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
void | error (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
void | traceIn (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
void | traceOut (long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
void | indent (bool indent, const std::string &trace, const std::string &message) |
Tells the logger to increment/decrement the indent. | |
void | setOutputFile (const std::string &outputLogFileName) |
Is redundant, as you could use setLogFormat() instead. | |
void | setQuitOnError (bool value) |
void | close () |
Static Public Member Functions | |
static ChromeTraceFileLogger & | getInstance () |
Private Member Functions | |
void | nextEntry () |
ChromeTraceFileLogger & | operator= (const ChromeTraceFileLogger &) |
Declared private since assignment does not make sense for an output class (output information mismatch). | |
ChromeTraceFileLogger (const ChromeTraceFileLogger &) | |
Declared private since copying does not make sense for an output class (output information mismatch). | |
std::string | addSeparators (std::string message) const |
Ensures each column has same length. | |
std::string | constructMessageString (std::string messageType, long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
Construct message string for output to terminal. | |
std::string | constructEventEntryInTraceFile (std::string messageType, long int timestampMS, int rank, int threadId, const std::string &trace, const std::string &message) |
void | configureOutputStreams () |
Configures the output streams. | |
ChromeTraceFileLogger () | |
It's a singleton. | |
Private Attributes | |
tarch::multicore::BooleanSemaphore | _semaphore |
std::ostream * | _outputStream |
Test for the column separator of a string output. | |
bool | _quitOnError |
bool | _hasWrittenEntry |
Static Private Attributes | |
static Log | _log |
static ChromeTraceFileLogger | _singleton |
Chrome Trace File Logger.
To visualise the output files, either use Google's Chrome or the trace file viewer from The Chromium Projects. In Ubuntu, simply install the Chromium web browser. Once launched, type in chrome://tracing/ and press enter. After that, you can load the trace file.
Definition at line 34 of file ChromeTraceFileLogger.h.
|
private |
Declared private since copying does not make sense for an output class (output information mismatch).
Definition at line 64 of file ChromeTraceFileLogger.cpp.
|
private |
It's a singleton.
Definition at line 26 of file ChromeTraceFileLogger.cpp.
References configureOutputStreams().
tarch::logging::ChromeTraceFileLogger::~ChromeTraceFileLogger | ( | ) |
Definition at line 67 of file ChromeTraceFileLogger.cpp.
|
private |
Ensures each column has same length.
Definition at line 74 of file ChromeTraceFileLogger.cpp.
void tarch::logging::ChromeTraceFileLogger::close | ( | ) |
Definition at line 291 of file ChromeTraceFileLogger.cpp.
|
private |
Configures the output streams.
Definition at line 47 of file ChromeTraceFileLogger.cpp.
Referenced by ChromeTraceFileLogger().
|
private |
Definition at line 107 of file ChromeTraceFileLogger.cpp.
|
private |
Construct message string for output to terminal.
I pipe data to the terminal for error messages, warnings and infos.
Definition at line 87 of file ChromeTraceFileLogger.cpp.
void tarch::logging::ChromeTraceFileLogger::debug | ( | long int | timestampMS, |
int | rank, | ||
int | threadId, | ||
const std::string & | trace, | ||
const std::string & | message ) |
Definition at line 131 of file ChromeTraceFileLogger.cpp.
Referenced by kernel_impl.impl::alloc(), kernel_impl.impl::loop(), and kernel_impl.impl::stencil().
void tarch::logging::ChromeTraceFileLogger::error | ( | long int | timestampMS, |
int | rank, | ||
int | threadId, | ||
const std::string & | trace, | ||
const std::string & | message ) |
Definition at line 239 of file ChromeTraceFileLogger.cpp.
References tarch::mpi::Rank::abort().
|
static |
Definition at line 34 of file ChromeTraceFileLogger.cpp.
Referenced by main(), and main().
void tarch::logging::ChromeTraceFileLogger::indent | ( | bool | indent, |
const std::string & | trace, | ||
const std::string & | message ) |
Tells the logger to increment/decrement the indent.
Implemented for compatibility reasons
Definition at line 260 of file ChromeTraceFileLogger.cpp.
Referenced by printers.cpp_printer::alloc(), kernel_impl.impl::alloc(), printers.cpp_printer::loop(), kernel_impl.impl::loop(), and kernel_impl.impl::stencil().
void tarch::logging::ChromeTraceFileLogger::info | ( | long int | timestampMS, |
int | rank, | ||
int | threadId, | ||
const std::string & | trace, | ||
const std::string & | message ) |
Definition at line 153 of file ChromeTraceFileLogger.cpp.
|
private |
Definition at line 39 of file ChromeTraceFileLogger.cpp.
|
private |
Declared private since assignment does not make sense for an output class (output information mismatch).
Definition at line 59 of file ChromeTraceFileLogger.cpp.
void tarch::logging::ChromeTraceFileLogger::setOutputFile | ( | const std::string & | outputLogFileName | ) |
Is redundant, as you could use setLogFormat() instead.
However, it is tedious to specify all of these parameters if the only thing you want is to establish an output file.
Definition at line 262 of file ChromeTraceFileLogger.cpp.
References tarch::mpi::Rank::getInstance(), and tarch::mpi::Rank::getRank().
Referenced by main(), and main().
Definition at line 286 of file ChromeTraceFileLogger.cpp.
void tarch::logging::ChromeTraceFileLogger::traceIn | ( | long int | timestampMS, |
int | rank, | ||
int | threadId, | ||
const std::string & | trace, | ||
const std::string & | message ) |
Definition at line 195 of file ChromeTraceFileLogger.cpp.
void tarch::logging::ChromeTraceFileLogger::traceOut | ( | long int | timestampMS, |
int | rank, | ||
int | threadId, | ||
const std::string & | trace, | ||
const std::string & | message ) |
Definition at line 217 of file ChromeTraceFileLogger.cpp.
void tarch::logging::ChromeTraceFileLogger::warning | ( | long int | timestampMS, |
int | rank, | ||
int | threadId, | ||
const std::string & | trace, | ||
const std::string & | message ) |
Definition at line 174 of file ChromeTraceFileLogger.cpp.
|
private |
Definition at line 47 of file ChromeTraceFileLogger.h.
|
staticprivate |
Definition at line 36 of file ChromeTraceFileLogger.h.
|
private |
Test for the column separator of a string output.
Definition at line 45 of file ChromeTraceFileLogger.h.
|
private |
Definition at line 46 of file ChromeTraceFileLogger.h.
|
private |
Definition at line 40 of file ChromeTraceFileLogger.h.
|
staticprivate |
Definition at line 38 of file ChromeTraceFileLogger.h.