output: Make panic/fatal/warn more flexible so we can add some new ones.
The major thrust of this change is to limit the amount of code duplication surrounding the code for these functions. This code also adds two new message types called info and hack. Info is meant to be less harsh than warn so people don't get confused and start thinking that the simulator is broken. Hack is a way for people to add runtime messages indicating that the simulator just executed a code "hack" that should probably be fixed. The benefit of knowing about these code hacks is that it will let people know what sorts of inaccuracies or potential bugs might be entering their experiments. Finally, I've added some flags to turn on and off these message types so command line options can change them.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
%{
|
||||
#include "python/swig/pyobject.hh"
|
||||
|
||||
#include "base/misc.hh"
|
||||
#include "base/socket.hh"
|
||||
#include "sim/core.hh"
|
||||
#include "sim/host.hh"
|
||||
@@ -76,6 +77,10 @@ void unserializeAll(const std::string &cpt_dir);
|
||||
void initAll();
|
||||
void regAllStats();
|
||||
|
||||
bool want_warn, warn_verbose;
|
||||
bool want_info, info_verbose;
|
||||
bool want_hack, hack_verbose;
|
||||
|
||||
%wrapper %{
|
||||
// fix up module name to reflect the fact that it's inside the m5 package
|
||||
#undef SWIG_name
|
||||
|
||||
Reference in New Issue
Block a user