Skip to content

Commit

Permalink
i#5843 scheduler: Enable logging in release build
Browse files Browse the repository at this point in the history
We make logging available in release build to help diagnosing issues
and understanding scheduler behavior.  We assume the extra branches do
not add undue overhead.

Issue: #5843
  • Loading branch information
derekbruening committed Aug 15, 2024
1 parent 3ae837e commit a51fb00
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions clients/drcachesim/scheduler/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,21 @@
#include "utils.h"

#undef VPRINT
#ifdef DEBUG
# define VPRINT(obj, level, ...) \
do { \
if ((obj)->verbosity_ >= (level)) { \
fprintf(stderr, "%s ", (obj)->output_prefix_); \
fprintf(stderr, __VA_ARGS__); \
} \
} while (0)
# define VDO(obj, level, statement) \
do { \
if ((obj)->verbosity_ >= (level)) \
statement \
} while (0)
#else
# define VPRINT(reader, level, ...) /* Nothing. */
# define VDO(obj, level, statementx) /* Nothing. */
#endif
// We make logging available in release build to help in diagnosing issues
// and understanding scheduler behavior.
// We assume the extra branches do not add undue overhead.
#define VPRINT(obj, level, ...) \
do { \
if ((obj)->verbosity_ >= (level)) { \
fprintf(stderr, "%s ", (obj)->output_prefix_); \
fprintf(stderr, __VA_ARGS__); \
} \
} while (0)
#define VDO(obj, level, statement) \
do { \
if ((obj)->verbosity_ >= (level)) \
statement \
} while (0)

namespace dynamorio {
namespace drmemtrace {
Expand Down

0 comments on commit a51fb00

Please sign in to comment.