Misc: Remove the URL from warnings, fatals, panics, etc.
This commit is contained in:
parent
96138a79cd
commit
8dcbe8adb5
2 changed files with 0 additions and 27 deletions
|
@ -28,8 +28,6 @@
|
||||||
* Authors: Nathan Binkert
|
* Authors: Nathan Binkert
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <zlib.h>
|
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -71,19 +69,14 @@ __exit_message(const char *prefix, int code,
|
||||||
format += "\n";
|
format += "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t crc = crc32(0, (const Bytef*)fmt, strlen(fmt));
|
|
||||||
|
|
||||||
format += " @ cycle %d\n[%s:%s, line %d]\n";
|
format += " @ cycle %d\n[%s:%s, line %d]\n";
|
||||||
format += "Memory Usage: %ld KBytes\n";
|
format += "Memory Usage: %ld KBytes\n";
|
||||||
format += "For more information see: http://www.m5sim.org/%s/%x\n";
|
|
||||||
|
|
||||||
args.push_back(curTick());
|
args.push_back(curTick());
|
||||||
args.push_back(func);
|
args.push_back(func);
|
||||||
args.push_back(file);
|
args.push_back(file);
|
||||||
args.push_back(line);
|
args.push_back(line);
|
||||||
args.push_back(memUsage());
|
args.push_back(memUsage());
|
||||||
args.push_back(prefix);
|
|
||||||
args.push_back(crc);
|
|
||||||
|
|
||||||
ccprintf(cerr, format.c_str(), args);
|
ccprintf(cerr, format.c_str(), args);
|
||||||
|
|
||||||
|
@ -111,8 +104,6 @@ __base_message(std::ostream &stream, const char *prefix, bool verbose,
|
||||||
format += "\n";
|
format += "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t crc = crc32(0, (const Bytef*)fmt, strlen(fmt));
|
|
||||||
|
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
format += " @ cycle %d\n[%s:%s, line %d]\n";
|
format += " @ cycle %d\n[%s:%s, line %d]\n";
|
||||||
args.push_back(curTick());
|
args.push_back(curTick());
|
||||||
|
@ -121,11 +112,5 @@ __base_message(std::ostream &stream, const char *prefix, bool verbose,
|
||||||
args.push_back(line);
|
args.push_back(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(prefix, "warn") == 0) {
|
|
||||||
format += "For more information see: http://www.m5sim.org/%s/%x\n";
|
|
||||||
args.push_back(prefix);
|
|
||||||
args.push_back(crc);
|
|
||||||
}
|
|
||||||
|
|
||||||
ccprintf(stream, format.c_str(), args);
|
ccprintf(stream, format.c_str(), args);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,22 +42,11 @@ from smartdict import SmartDict
|
||||||
from sorteddict import SortedDict
|
from sorteddict import SortedDict
|
||||||
from region import neg_inf, pos_inf, Region, Regions
|
from region import neg_inf, pos_inf, Region, Regions
|
||||||
|
|
||||||
# define this here so we can use it right away if necessary
|
|
||||||
def errorURL(prefix, s):
|
|
||||||
try:
|
|
||||||
import zlib
|
|
||||||
hashstr = "%x" % zlib.crc32(s)
|
|
||||||
except:
|
|
||||||
hashstr = "UnableToHash"
|
|
||||||
return "For more information see: http://www.m5sim.org/%s/%s" % \
|
|
||||||
(prefix, hashstr)
|
|
||||||
|
|
||||||
# panic() should be called when something happens that should never
|
# panic() should be called when something happens that should never
|
||||||
# ever happen regardless of what the user does (i.e., an acutal m5
|
# ever happen regardless of what the user does (i.e., an acutal m5
|
||||||
# bug).
|
# bug).
|
||||||
def panic(fmt, *args):
|
def panic(fmt, *args):
|
||||||
print >>sys.stderr, 'panic:', fmt % args
|
print >>sys.stderr, 'panic:', fmt % args
|
||||||
print >>sys.stderr, errorURL('panic',fmt)
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# fatal() should be called when the simulation cannot continue due to
|
# fatal() should be called when the simulation cannot continue due to
|
||||||
|
@ -65,7 +54,6 @@ def panic(fmt, *args):
|
||||||
# arguments, etc.) and not a simulator bug.
|
# arguments, etc.) and not a simulator bug.
|
||||||
def fatal(fmt, *args):
|
def fatal(fmt, *args):
|
||||||
print >>sys.stderr, 'fatal:', fmt % args
|
print >>sys.stderr, 'fatal:', fmt % args
|
||||||
print >>sys.stderr, errorURL('fatal',fmt)
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
class Singleton(type):
|
class Singleton(type):
|
||||||
|
|
Loading…
Reference in a new issue