Support loading in a symbol file.
arch/alpha/freebsd/system.cc:
arch/alpha/isa/decoder.isa:
arch/alpha/linux/system.cc:
arch/alpha/system.cc:
arch/alpha/tru64/system.cc:
Let symbol files be read in so that profiling can happen on the binaries as well.
python/m5/objects/System.py:
Add in symbol files.
sim/pseudo_inst.cc:
Load in a specified symbol file.
sim/pseudo_inst.hh:
Allow for symbols to be loaded.
sim/system.hh:
Support symbol file.
util/m5/m5.c:
util/m5/m5op.S:
Add support to m5 util for loading symbols (and readfile).
--HG--
extra : convert_revision : f10c1049bcd7b22b98c73052c0666b964aff222b
This commit is contained in:
@@ -111,6 +111,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
|
||||
|
||||
Param<string> boot_osflags;
|
||||
Param<string> readfile;
|
||||
Param<string> symbolfile;
|
||||
Param<unsigned int> init_param;
|
||||
|
||||
Param<uint64_t> system_type;
|
||||
@@ -133,6 +134,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
|
||||
INIT_PARAM_DFLT(boot_osflags, "flags to pass to the kernel during boot",
|
||||
"a"),
|
||||
INIT_PARAM_DFLT(readfile, "file to read startup script from", ""),
|
||||
INIT_PARAM_DFLT(symbolfile, "file to read symbols from", ""),
|
||||
INIT_PARAM_DFLT(init_param, "numerical value to pass into simulator", 0),
|
||||
INIT_PARAM_DFLT(system_type, "Type of system we are emulating", 34),
|
||||
INIT_PARAM_DFLT(system_rev, "Revision of system we are emulating", 1<<10),
|
||||
@@ -155,6 +157,7 @@ CREATE_SIM_OBJECT(FreebsdAlphaSystem)
|
||||
p->boot_osflags = boot_osflags;
|
||||
p->init_param = init_param;
|
||||
p->readfile = readfile;
|
||||
p->symbolfile = symbolfile;
|
||||
p->system_type = system_type;
|
||||
p->system_rev = system_rev;
|
||||
p->bin = bin;
|
||||
|
||||
@@ -785,6 +785,9 @@ decode OPCODE default Unknown::unknown() {
|
||||
AlphaPseudo::m5exit(xc->xcBase(), R16);
|
||||
}}, No_OpClass, IsNonSpeculative);
|
||||
0x30: initparam({{ Ra = xc->xcBase()->getCpuPtr()->system->init_param; }});
|
||||
0x31: loadsymbol({{
|
||||
AlphaPseudo::loadsymbol(xc->xcBase());
|
||||
}}, No_OpClass, IsNonSpeculative);
|
||||
0x40: resetstats({{
|
||||
AlphaPseudo::resetstats(xc->xcBase(), R16, R17);
|
||||
}}, IsNonSpeculative);
|
||||
|
||||
@@ -233,6 +233,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
|
||||
|
||||
Param<string> boot_osflags;
|
||||
Param<string> readfile;
|
||||
Param<string> symbolfile;
|
||||
Param<unsigned int> init_param;
|
||||
|
||||
Param<uint64_t> system_type;
|
||||
@@ -255,6 +256,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
|
||||
INIT_PARAM_DFLT(boot_osflags, "flags to pass to the kernel during boot",
|
||||
"a"),
|
||||
INIT_PARAM_DFLT(readfile, "file to read startup script from", ""),
|
||||
INIT_PARAM_DFLT(symbolfile, "file to read symbols from", ""),
|
||||
INIT_PARAM_DFLT(init_param, "numerical value to pass into simulator", 0),
|
||||
INIT_PARAM_DFLT(system_type, "Type of system we are emulating", 34),
|
||||
INIT_PARAM_DFLT(system_rev, "Revision of system we are emulating", 1<<10),
|
||||
@@ -277,6 +279,7 @@ CREATE_SIM_OBJECT(LinuxAlphaSystem)
|
||||
p->boot_osflags = boot_osflags;
|
||||
p->init_param = init_param;
|
||||
p->readfile = readfile;
|
||||
p->symbolfile = symbolfile;
|
||||
p->system_type = system_type;
|
||||
p->system_rev = system_rev;
|
||||
p->bin = bin;
|
||||
|
||||
@@ -242,6 +242,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(AlphaSystem)
|
||||
|
||||
Param<std::string> boot_osflags;
|
||||
Param<std::string> readfile;
|
||||
Param<std::string> symbolfile;
|
||||
Param<unsigned int> init_param;
|
||||
|
||||
Param<uint64_t> system_type;
|
||||
@@ -264,6 +265,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(AlphaSystem)
|
||||
INIT_PARAM_DFLT(boot_osflags, "flags to pass to the kernel during boot",
|
||||
"a"),
|
||||
INIT_PARAM_DFLT(readfile, "file to read startup script from", ""),
|
||||
INIT_PARAM_DFLT(symbolfile, "file to read symbols from", ""),
|
||||
INIT_PARAM_DFLT(init_param, "numerical value to pass into simulator", 0),
|
||||
INIT_PARAM_DFLT(system_type, "Type of system we are emulating", 34),
|
||||
INIT_PARAM_DFLT(system_rev, "Revision of system we are emulating", 1<<10),
|
||||
@@ -286,6 +288,7 @@ CREATE_SIM_OBJECT(AlphaSystem)
|
||||
p->boot_osflags = boot_osflags;
|
||||
p->init_param = init_param;
|
||||
p->readfile = readfile;
|
||||
p->symbolfile = symbolfile;
|
||||
p->system_type = system_type;
|
||||
p->system_rev = system_rev;
|
||||
p->bin = bin;
|
||||
|
||||
@@ -105,6 +105,7 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(Tru64AlphaSystem)
|
||||
|
||||
Param<string> boot_osflags;
|
||||
Param<string> readfile;
|
||||
Param<string> symbolfile;
|
||||
Param<unsigned int> init_param;
|
||||
|
||||
Param<uint64_t> system_type;
|
||||
@@ -126,6 +127,7 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(Tru64AlphaSystem)
|
||||
INIT_PARAM_DFLT(boot_osflags, "flags to pass to the kernel during boot",
|
||||
"a"),
|
||||
INIT_PARAM_DFLT(readfile, "file to read startup script from", ""),
|
||||
INIT_PARAM_DFLT(symbolfile, "file to read symbols from", ""),
|
||||
INIT_PARAM_DFLT(init_param, "numerical value to pass into simulator", 0),
|
||||
INIT_PARAM_DFLT(system_type, "Type of system we are emulating", 12),
|
||||
INIT_PARAM_DFLT(system_rev, "Revision of system we are emulating", 2<<1),
|
||||
@@ -147,6 +149,7 @@ CREATE_SIM_OBJECT(Tru64AlphaSystem)
|
||||
p->boot_osflags = boot_osflags;
|
||||
p->init_param = init_param;
|
||||
p->readfile = readfile;
|
||||
p->symbolfile = symbolfile;
|
||||
p->system_type = system_type;
|
||||
p->system_rev = system_rev;
|
||||
p->bin = bin;
|
||||
|
||||
Reference in New Issue
Block a user