trace.hh (3619:b3dab7606e0e) trace.hh (3918:1f9a98d198e8)
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

181#define DCOUT(x) if (Trace::IsOn(Trace::x)) DebugOut()
182
183#define DDUMP(x, data, count) \
184do { \
185 if (Trace::IsOn(Trace::x)) \
186 Trace::dataDump(curTick, name(), data, count); \
187} while (0)
188
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

181#define DCOUT(x) if (Trace::IsOn(Trace::x)) DebugOut()
182
183#define DDUMP(x, data, count) \
184do { \
185 if (Trace::IsOn(Trace::x)) \
186 Trace::dataDump(curTick, name(), data, count); \
187} while (0)
188
189#define __dprintf(cycle, name, format, args...) \
190 Trace::dprintf(format, (*(new cp::ArgList), args), cycle, name)
189#define __dprintf(cycle, name, format, ...) \
190 Trace::dprintf(format, (*(new cp::ArgList), __VA_ARGS__), cycle, name)
191
191
192#define DPRINTF(x, args...) \
192#define DPRINTF(x, ...) \
193do { \
194 if (Trace::IsOn(Trace::x)) \
193do { \
194 if (Trace::IsOn(Trace::x)) \
195 __dprintf(curTick, name(), args, cp::ArgListNull()); \
195 __dprintf(curTick, name(), __VA_ARGS__, cp::ArgListNull()); \
196} while (0)
197
196} while (0)
197
198#define DPRINTFR(x, args...) \
198#define DPRINTFR(x, ...) \
199do { \
200 if (Trace::IsOn(Trace::x)) \
199do { \
200 if (Trace::IsOn(Trace::x)) \
201 __dprintf((Tick)-1, std::string(), args, cp::ArgListNull()); \
201 __dprintf((Tick)-1, std::string(), __VA_ARGS__, cp::ArgListNull()); \
202} while (0)
203
202} while (0)
203
204#define DPRINTFN(args...) \
204#define DPRINTFN(...) \
205do { \
205do { \
206 __dprintf(curTick, name(), args, cp::ArgListNull()); \
206 __dprintf(curTick, name(), __VA_ARGS__, cp::ArgListNull()); \
207} while (0)
208
207} while (0)
208
209#define DPRINTFNR(args...) \
209#define DPRINTFNR(...) \
210do { \
210do { \
211 __dprintf((Tick)-1, string(), args, cp::ArgListNull()); \
211 __dprintf((Tick)-1, string(), __VA_ARGS__, cp::ArgListNull()); \
212} while (0)
213
214#else // !TRACING_ON
215
216#define DTRACE(x) (false)
217#define DCOUT(x) if (0) DebugOut()
212} while (0)
213
214#else // !TRACING_ON
215
216#define DTRACE(x) (false)
217#define DCOUT(x) if (0) DebugOut()
218#define DPRINTF(x, args...) do {} while (0)
219#define DPRINTFR(args...) do {} while (0)
220#define DPRINTFN(args...) do {} while (0)
221#define DPRINTFNR(args...) do {} while (0)
218#define DPRINTF(x, ...) do {} while (0)
219#define DPRINTFR(...) do {} while (0)
220#define DPRINTFN(...) do {} while (0)
221#define DPRINTFNR(...) do {} while (0)
222#define DDUMP(x, data, count) do {} while (0)
223
224#endif // TRACING_ON
225
226#endif // __BASE_TRACE_HH__
222#define DDUMP(x, data, count) do {} while (0)
223
224#endif // TRACING_ON
225
226#endif // __BASE_TRACE_HH__