trace.hh (10475:5744891a444b) trace.hh (11153:20bbfe5b2b86)
1/*
2 * Copyright (c) 2014 ARM Limited
3 * All rights reserved
4 *
5 * Copyright (c) 2001-2006 The Regents of The University of Michigan
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 102 unchanged lines hidden (view full) ---

111Logger *getDebugLogger();
112
113/** Get the ostream from the current global logger */
114std::ostream &output();
115
116/** Delete the current global logger and assign a new one */
117void setDebugLogger(Logger *logger);
118
1/*
2 * Copyright (c) 2014 ARM Limited
3 * All rights reserved
4 *
5 * Copyright (c) 2001-2006 The Regents of The University of Michigan
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 102 unchanged lines hidden (view full) ---

111Logger *getDebugLogger();
112
113/** Get the ostream from the current global logger */
114std::ostream &output();
115
116/** Delete the current global logger and assign a new one */
117void setDebugLogger(Logger *logger);
118
119/** Enable debug logging */
120extern bool enabled;
119/** Enable/disable debug logging */
120void enable();
121void disable();
121
122} // namespace Trace
123
124// This silly little class allows us to wrap a string in a functor
125// object so that we can give a name() that DPRINTF will like
126struct StringWrap
127{
128 std::string str;

--- 26 unchanged lines hidden (view full) ---

155// std::string & in the current scope.
156//
157// If you desire that the automatic printing not occur, use DPRINTFR
158// (R for raw)
159//
160
161#if TRACING_ON
162
122
123} // namespace Trace
124
125// This silly little class allows us to wrap a string in a functor
126// object so that we can give a name() that DPRINTF will like
127struct StringWrap
128{
129 std::string str;

--- 26 unchanged lines hidden (view full) ---

156// std::string & in the current scope.
157//
158// If you desire that the automatic printing not occur, use DPRINTFR
159// (R for raw)
160//
161
162#if TRACING_ON
163
163#define DTRACE(x) ((Debug::x) && Trace::enabled)
164#define DTRACE(x) (Debug::x)
164
165#define DDUMP(x, data, count) do { \
166 using namespace Debug; \
167 if (DTRACE(x)) \
168 Trace::getDebugLogger()->dump(curTick(), name(), data, count); \
169} while (0)
170
171#define DPRINTF(x, ...) do { \

--- 49 unchanged lines hidden ---
165
166#define DDUMP(x, data, count) do { \
167 using namespace Debug; \
168 if (DTRACE(x)) \
169 Trace::getDebugLogger()->dump(curTick(), name(), data, count); \
170} while (0)
171
172#define DPRINTF(x, ...) do { \

--- 49 unchanged lines hidden ---