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, ...) \ 190 Trace::dprintf(format, (*(new cp::ArgList), __VA_ARGS__), cycle, name) |
191 |
192#define DPRINTF(x, ...) \ |
193do { \ 194 if (Trace::IsOn(Trace::x)) \ |
195 __dprintf(curTick, name(), __VA_ARGS__, cp::ArgListNull()); \ |
196} while (0) 197 |
198#define DPRINTFR(x, ...) \ |
199do { \ 200 if (Trace::IsOn(Trace::x)) \ |
201 __dprintf((Tick)-1, std::string(), __VA_ARGS__, cp::ArgListNull()); \ |
202} while (0) 203 |
204#define DPRINTFN(...) \ |
205do { \ |
206 __dprintf(curTick, name(), __VA_ARGS__, cp::ArgListNull()); \ |
207} while (0) 208 |
209#define DPRINTFNR(...) \ |
210do { \ |
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() |
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__ |