Go to the documentation of this file.
20 #ifndef LIBMESH_LIBMESH_LOGGING_H
21 #define LIBMESH_LIBMESH_LOGGING_H
25 #include "libmesh/libmesh_common.h"
27 #include "libmesh/perf_log.h"
31 #define TOKENPASTE(x, y) x ## y
32 #define TOKENPASTE2(x, y) TOKENPASTE(x, y)
102 #ifdef LIBMESH_ENABLE_PERFORMANCE_LOGGING
104 # define START_LOG(a,b) { libMesh::perflog.push(a,b); }
105 # define STOP_LOG(a,b) { libMesh::perflog.pop(a,b); }
106 #ifdef LIBMESH_ENABLE_DEPRECATED
107 # define PALIBMESH_USE_LOG(a,b) { libmesh_deprecated(); }
108 # define RESTART_LOG(a,b) { libmesh_deprecated(); }
110 # define LOG_SCOPE(a,b) libMesh::PerfItem TOKENPASTE2(perf_item_, __LINE__)(a,b);
111 # define LOG_SCOPE_IF(a,b,enabled) libMesh::PerfItem TOKENPASTE2(perf_item_, __LINE__)(a,b,enabled);
112 # define LOG_SCOPE_WITH(a,b,logger) libMesh::PerfItem TOKENPASTE2(perf_item_, __LINE__)(a,b,true,&logger);
116 # define START_LOG(a,b) {}
117 # define STOP_LOG(a,b) {}
118 # define PALIBMESH_USE_LOG(a,b) {}
119 # define RESTART_LOG(a,b) {}
120 # define LOG_SCOPE(a,b) {}
121 # define LOG_SCOPE_IF(a,b,enabled) {}
122 # define LOG_SCOPE_WITH(a,b,logger) {}
130 #endif // LIBMESH_LIBMESH_LOGGING_H
PerfItem(const char *label, const char *header, bool enabled=true, PerfLog *my_perflog=&perflog)
void fast_push(const char *label, const char *header="")
Push the event label onto the stack, pausing any active event.
The libMesh namespace provides an interface to certain functionality in the library.
Used for logging something that naturally lasts as long as some enclosing scope, such as the current ...
PerfLog perflog
A PerfLog object to log performance.
void fast_pop(const char *label, const char *header="")
Pop the event label off the stack, resuming any lower event.
The PerfLog class allows monitoring of specific events.