StuBS
|
Debug macros enabling debug output on a separate window for each core. More...
Macros | |
#define | DBG_VERBOSE nullstream |
An output stream, which is only displayed in the debug window in verbose mode. More... | |
#define | DBG dout[Core::getID()] |
An output stream, which is displayed in the debug window of the core it was executed on. More... | |
Constants | |
TextStream | dout [Core::MAX] |
Debug window. More... | |
Debug macros enabling debug output on a separate window for each core.
#define DBG_VERBOSE nullstream |
An output stream, which is only displayed in the debug window in verbose mode.
#define DBG dout[Core::getID()] |
An output stream, which is displayed in the debug window of the core it was executed on.
In single core (OOStuBS) this is just an alias to the debug window object dout
. However, on a multi core system a debug window for each core is required, therefore dout
has to be an TextStream object array with the core ID as array index – the selection is done via Core::getID()
|
extern |
Debug window.
Debug output using DBG like DBG << "var = " << var << endl
should be displayed in window dedicated to the core it is executed on.
While this is quite easy on single core systems like OOStuBS – they only require a single TextStream object called dout
– multi core systems like MPStuBS need an object array with one window per core. In the latter case direct list initialization can be used:
The debug windows in should be located right below the normal output window without any overlap and should be able to display at least 3 lines. In MPStuBS, two windows can be placed side-by-side, having 40 columns each.
As an optional extension, the distribution of the windows can be done automatically in MPStuBS (according to the actual numbers of cores) with TextStream::arrange() – in this case the standard constructor (without parameters) is sufficient.