No more non-intuitive behavior shifts depending on whether
outputDirectory is set (at the expense of backwards compatibility).
outputDirectory is now always valid, defaults to ".".
dev/etherdump.cc:
Use makeOutputStream() to create output file.
New behavior: actually complain if dump file can't
be opened, instead of quietly ignoring the problem.
dev/etherdump.hh:
dev/simconsole.cc:
dev/simconsole.hh:
Use makeOutputStream() to create output file.
sim/builder.cc:
sim/builder.hh:
sim/main.cc:
builderStream() is now *configStream.
sim/serialize.cc:
outputDirectory is now always valid, no need to check.
sim/universe.cc:
Clean up/standardize handling of various output files.
No more non-intuitive behavior shifts depending on whether
outputDirectory is set (at the expense of backwards compatibility).
outputDirectory is now always valid, defaults to ".".
New function makeOutputStream() does "the right thing" to
associate a stream with a filename.
--HG--
extra : convert_revision : a03c58c547221b3906e0d6f55e4a569843f2d646
arch/alpha/vtophys.cc:
PGOFSET -> ALPHA_PGOFSET to avoid include file problems
base/callback.hh:
Added a class to create a callback from a function
base/intmath.hh:
make FloorLog2 inlined
dev/pcidev.cc:
more work in getting pciconfig space happy with different endiannesses
dev/uart.cc:
used an incorrect size for write uint64_t instead of uint8_t
sim/system.cc:
when writing things into system data structures we need to pay
attention to endianness
--HG--
extra : convert_revision : 52f441b5789c45db30ef2f6fd4975cbc7323a381
code
arch/alpha/alpha_memory.cc:
Fixed unaligned trap faults
arch/alpha/ev5.cc:
little more verbose faulting information
kern/linux/linux_system.cc:
more descriptive errors, and the correct offsets from symbols
sim/system.cc:
load local pal symbols
--HG--
extra : convert_revision : 0c81badf77321d5e1a060dcae2d42204e5a1fc84
arch/alpha/ev5.cc:
set the mode explictly rather than having a bool user/notuser
cpu/simple_cpu/simple_cpu.hh:
there is no class Kernel
kern/kernel_stats.cc:
use cpu_mode_num
kern/kernel_stats.hh:
add interrupt mode and use cpu_mode_num rather than constant
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
kern/system_events.cc:
kern/system_events.hh:
add events to change the mode to/from interrupt
sim/system.cc:
sim/system.hh:
add a pal symbol table
--HG--
extra : convert_revision : 9d30e826b72122062a5ea12d094f94760e75c66a
dev/tsunami_cchip.cc:
updates to ipi handling chipset code
sim/system.cc:
debugSymbolTable, now has symbols from pal, console, and linux
--HG--
extra : convert_revision : c981d857f7e3d75f4c46172809e6d14e5f0a1238
single place so it's easier to work with.
- Add support for binning kernel/user/idle time separately from
lisa's binning stuff, but make the two compatible.
- KernelStats used to directly implement the pImpl idiom, but
it makes more sense to just remove the level of indirection and
make the exec context have a pointer to the stats.
- Factor common code out of LinuxSystem and Tru64System and put
it into the System base class. While doing that, make all
constructors take a pointer to a parameter struct instead of
naming the parameters individually to make it much easier to add
parameters to these classes.
SConscript:
Move the function tracking and binning stuff around.
arch/alpha/ev5.cc:
kernelStats is now a pointer
arch/alpha/pseudo_inst.cc:
kernelStats is now a pointer
the parameters to the system have been moved into their own
struct
base/trace.hh:
provide a little functor class for wrapping a string that
can allow you to define name() in any scope very simply
for use with DPRINTF
cpu/base_cpu.cc:
New order of arguments for consistency.
cpu/exec_context.cc:
kernelStats no longer has the level of indirection in it,
execContext has the indirection now. so, kernelStats is a pointer.
We also need a pointer to the kernelBinning stuff from the system
and we need to figure out if we want to do binning or not.
Move a whole bunch of code into kern_binning.cc so it's all
in the same place.
cpu/exec_context.hh:
We want pointers to the kernel binning/stats stuff and we'll
have the exec_context and system have the level of indirection
instead of having the extra layer in the kernel stats class.
cpu/simple_cpu/simple_cpu.cc:
call through the exec context to do the special binning
stuff.
kern/kernel_stats.cc:
kern/kernel_stats.hh:
Re-organize the stats stuff and remove the level of indirection
(that was there to simplify building) and move the binning stuff
into its own class/file.
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
kern/tru64/tru64_system.cc:
kern/tru64/tru64_system.hh:
sim/system.cc:
sim/system.hh:
move lots of common system code into the base system class so
that it can be shared between linux, tru64, and whatever else
we decide to support in the future.
Make the constructor take a pointer to a parameter struct so that
it is easier to pass parameters to the parent.
kern/system_events.cc:
move the majority of the binning code into the Kernel::Binning class
in the kern_binning file
kern/system_events.hh:
FnEvents only need to know the bin
create the Idle start event to find the PCBB of the idle
process when it starts.
kern/tru64/tru64_events.cc:
memCtrl -> memctrl
sim/process.cc:
sim/process.hh:
re-order args for consistency
--HG--
extra : convert_revision : 86cb39738c41fcd680f2aad125c9dde000227b2b
in at least on entry in a VectorParam even if the string was
empty.
sim/param.cc:
if there are no parameters, leave the vector empty.
--HG--
extra : convert_revision : d0d41baa8c77651a27ac6a4d02cc388711f47dbe
SConscript:
Add pyconfig/{pyconfig,code}.cc
Add list of object description (.od) files.
Include pyconfig/SConscript.
base/inifile.cc:
Get rid of CPP_PIPE... it never really worked anyway.
base/inifile.hh:
Make load(ifstream&) method public so pyconfig
code can call it.
sim/main.cc:
Handle Python config scripts (end in '.py' instead of '.ini').
sim/pyconfig/m5configbase.py:
Add license.
Fix minor __setattr__ problem (2.3 related?)
--HG--
rename : util/config/m5configbase.py => sim/pyconfig/m5configbase.py
extra : convert_revision : 5e004922f950bfdefced333285584b80ad7ffb83
be more easily re-used. This currently uses some cooked up matching
function that I wrote a while ago, but should probably be changed
to use regular expressions in the future.
add doDebugBreak to control breakpoints on a per SimObject basis
SConscript:
add match
base/stats/events.cc:
base/trace.cc:
Move the object matching code into a separate file so it can be
more easily shared
base/trace.hh:
the object matching code was wrapped up and moved. adapt.
sim/sim_object.cc:
add the doDebugBreak flag that can be set on a per-SimObject
basis. This will be used in the future to control whether or
not debug_break() will actually break for a given object.
provide a function interface that can be called from the debugger.
sim/sim_object.hh:
add the doDebugBreak flag that can be set on a per-SimObject
basis. This will be used in the future to control whether or
not debug_break() will actually break for a given object.
--HG--
extra : convert_revision : 6bf7924de63d41f5ba6b80d579efdf26ba265a8f
kern/linux/linux_system.cc:
Formatting
sim/host.hh:
When we say ULL and UL we really just want a 64-bit value, not
necessarily a long long, so cast the integer to (u)int64_t
this fixes a problem with byte swapping.
--HG--
extra : convert_revision : ad25ace5a7b92a7c928f2d52e531193c91f3f8c8
a realworld file.
arch/alpha/isa_desc:
arch/alpha/pseudo_inst.hh:
implement the readfile pseudo instruction that will read a
chunk of a realworld file.
arch/alpha/pseudo_inst.cc:
implement the readfile pseudo instruction that will read a
chunk of a realworld file. The filename is a per system
parameter and comes from the system itself.
kern/linux/linux_system.cc:
sim/system.hh:
Create a per-system readfile parameter for use by the readfile
pseudo instruction. That way each system can get its own file.
--HG--
extra : convert_revision : 941b3a3e20702a6252b219ca66a6d90da2944c50
arch/alpha/ev5.cc:
cpu/simple_cpu/simple_cpu.cc:
update for new event interface
base/stats/events.cc:
implement the ignore event function which matches sim objects from which
to ignore events.
Make insert event like insert data and make it able to insert many
events in a single transaction with the database.
base/stats/events.hh:
Make it possible to ignore events
sim/sim_object.cc:
make recordEvent a member function of SimObject to implement
the ignore function easily
sim/sim_object.hh:
implement the ignore event stuff in the sim object. This is a
bit of a hack, but an easy place to put it.
--HG--
extra : convert_revision : ba3f25a14ad03662c53fb35514860d69be8cd4f0
base/misc.cc:
Don't dump trace in panic(), SIGABRT handler will do it now.
sim/main.cc:
Add SIGABRT handler that prints curTick and dumps buffered trace (if any).
This doesn't work as well as I would like since the buffered trace records
often contain stale references to stack-resident temporary std::string objects.
Someday we'll have to put in a fix for that.
--HG--
extra : convert_revision : 67576efbf5c10e63e255fc9a9ec520326fd3567b
dev/ide_disk.cc:
Fix to PIO writes and also add command needed for shutdown
dev/pcidev.cc:
Change the panic on write to read-only registers to a debug print. The
kernel tries to write back over all of the PCI registers to restore
the saved SRM state, so we need to let it do this without panicing.
sim/system.cc:
Add back increment of number of running systems to allow trap of halt
work correctly.
--HG--
extra : convert_revision : 84aba4effbec14545f3610c19a8e321d7e7f7cf2
kern/tru64/tru64_system.cc:
make binned_fns a parameter for System in addition to Tru64System. Do all the fnEvents setting at the System level, since that is system-independent.
kern/tru64/tru64_system.hh:
deal with FnEvents in the System, and move some fns over to System.
sim/system.cc:
sim/system.hh:
lift binning stuff into System out of Tru64System
--HG--
extra : convert_revision : 591dee6f2013f5c43037726c529a00682b5cf82e
proxies for a real C/C++ scalar value or scalar functor.
This replaces the scalar() and functor() terms that were
previously used in formulas. This helps when dumping
statistics because the formulas are not supposed to change.
cpu/base_cpu.cc:
Add a number of cycles stat to the cpu object that tracks the
number of cycles that the cpu has executed. This starts to pave
the way for cpu cycles being different from event ticks.
cpu/base_cpu.hh:
provide a functor for calculating all simulated instructions
of all CPUs and a virtual function for determining that number.
To deal with the change from functor() to Value::functor()
cpu/simple_cpu/simple_cpu.cc:
simTicks -> numCycles
numInsts is now a real Scalar stat, not a Formula
cpu/simple_cpu/simple_cpu.hh:
numInsts is now a real Scalar stat, not a Formula
count all instructions
sim/stat_control.cc:
simInsts, simTicks, hostMemory, and hostSeconds are no
longer Statistics::Formula but rather Statistics::Value
add new stat for tick frequency
sim/stats.hh:
don't need everything to be extern.
test/Makefile:
Make stuff work a tad bit better
test/stattest.cc:
test out Statistics::Value
--HG--
extra : convert_revision : c812e8baa2b17c08abf3a68ed1e1125dc6f2cfb4
Add support for generic visitors for stats and use them
to implement independent output functions.
Support for mysql output and some initial code for hacking
on mysql output with python
arch/alpha/pseudo_inst.cc:
base/hybrid_pred.cc:
base/hybrid_pred.hh:
base/sat_counter.cc:
base/sat_counter.hh:
cpu/simple_cpu/simple_cpu.cc:
kern/tru64/tru64_events.cc:
sim/main.cc:
sim/process.cc:
sim/process.hh:
sim/sim_events.cc:
sim/sim_object.cc:
sim/system.hh:
update for changes in stats package
base/statistics.cc:
move the python output code to base/stats/puthon.(cc|hh)
and reimplement it as a visitor.
move the text output code to base/stats/text.(cc|hh) and
reimplement it as a visitor.
move the database stuff into base/stats/statdb.(cc|hh) and
get rid of the class. Put everything as globals in the
Statistics::Database namespace.
allocate unique ids for all stats.
directly implement the check routine and get rid of the
various dumping routines since they're now in separate files.
make sure that no two stats have the same name
clean up some loops
base/statistics.hh:
major changes to the statistics package again
lots of code was factored out of statistics.hh into several
separate files in base/stats/ (this will continue)
There are now two Stat package types Result and Counter that
are specified to allow the user to keep the counted type
separate from the result type. They are currently both doubles
but that's an experiment. There is no more per stat ability to
set the type. Statistics::Counter is not the same as Counter!
Implement a visitor for statistics output so that new output
types can be implemented independently from the stats package
itself.
Add a unique id to each stat so that it can be used to keep
track of stats more simply. This number can also be used in
debugging problems with stats.
Tweak the bucket size stuff a bit to make it work better.
fixed VectorDist size bug
cpu/memtest/memtest.cc:
Fix up for changes in stats package
Don't use value() since it doesn't work with binning. If you
want a number as a stat, and to use it in the program itself,
you really want two separate variables, one that's a stat,
and one that's not.
cpu/memtest/memtest.hh:
Fix up for changes in stats package
test/Makefile:
Try to build stuff now that directories matter
test/stattest.cc:
test all new output types
choose which one with command line options
--HG--
extra : convert_revision : e3a3f5f0828c67c0e2de415d936ad240adaddc89
and 'type') to be specified via instance name and not just
config class. Old code only did instance-name lookup for
SimObject parameters. This feature makes life easier for
transitioning to the Python script-based config.
sim/builder.cc:
Use ConfigNode::find to look for "type" parameter so it can
be found if set under instance name (not config class).
sim/param.cc:
Make Param<bool> accept "1" for true and "0" for false.
--HG--
extra : convert_revision : f40d0878d0f03b2e216f0506c05d0e52db608cca
configuration unnecessarily awkward. Biggest changes are:
- External and internal object names now match in all cases. The
macros still allow them to be different; the only reason I didn't
get rid of that is that the macros themselves should be going away
soon. In the few conflicting cases, I sometimes renamed the C++ object
and sometimes renamed the config object. The latter sets of substitions
are:
s/BaseBus/Bus/;
s/MemoryObject/FunctionalMemory/;
s/MemoryControl/MemoryController/;
s/FUPool/FuncUnitPool/;
- SamplingCPU is temporarily broken... we need to change the model
of how this works in the .ini file. Having it as a CPU proxy is
really awkward.
arch/alpha/alpha_memory.cc:
arch/alpha/alpha_memory.hh:
cpu/simple_cpu/simple_cpu.cc:
sim/process.cc:
Rename objects to match config name.
cpu/base_cpu.cc:
Uncomment SimObject define since SamplingCPU no longer
does this for us.
dev/ethertap.cc:
Use unsigned instead of uint16_t for params.
kern/tru64/tru64_system.cc:
Use unsigned instead of uint64_t for init_param param.
test/paramtest.cc:
Fix old SimObjectParam.
--HG--
extra : convert_revision : 378ebbc6a71ad0694501d09979a44d111a59e8dc
on various platforms.
base/hashmap.hh:
gcc on Alpha doesn't always define __LP64__,
even though it arguably should.
cpu/exec_context.cc:
Clear register file on non-full-system too (even though
it typically gets overwritten by the initial regs from
the Process object).
sim/process.cc:
Clear initial register copy in Process object.
Not all regs get initialized when the executable is loaded.
--HG--
extra : convert_revision : f1fe4734a5ea81331d70994cb5284b1e9db0dceb
sim object(depends on which platform tsunami/tlaser is being used)
dev/alpha_console.cc:
Use dynamice casting once during build to get at the proper device to calculate the frequency.
It is either a tsunami_IO or a tlaser_clock depending on platform (tsunami/tlaser).
If the simobject is not of either of those types then panic
dev/alpha_console.hh:
Pass in a SimObject * that is to either a tlaser_clock or a tsunami_IO
sim/sim_object.cc:
Make it so that you can have a SimObjectParam of type SimObject:
example:
SimObjectParam<SimObject *> so;
--HG--
extra : convert_revision : 08239ef23762b8ea11311630b73fe885d939402e
cpu/exec_context.cc:
you can't delete an element of an array that you newed. oops.
kern/tru64/tru64_events.cc:
changes to reflect .ini changes, and also b/c es_intr and ipintr can happen at ANY point, even within a current calling path being tracked.
sim/system.cc:
can't delete an element of a newed array. must new them separately.
--HG--
extra : convert_revision : 21573327b7b7f20bf9a3fcfb5854526433e17e17
cpu/exec_context.cc:
nother little bug...forgot to pop off stack as i read off it
sim/system.cc:
forgot to pop off stack as i read off it
--HG--
extra : convert_revision : d1f691c0a9f0fa22281c717ee465d8a5f1e45c13
to do it:
in .ini file set binned_fns=foo null bar foo
what this says is, track foo when it is called by null (i.e. anything). bin bar only when it is called by foo.
essentially, if you have a path of functions to track, the 0th, 2nd, 4th fn listed are the fns to track, and the 1st, 3rd, 5th are their respective callers.
base/statistics.hh:
turn it back to FS_MEASURE since we already have a build in place
kern/tru64/tru64_events.cc:
remove FS_MEASURE #defs. add more DPRINTF's. manage an anomaly that happens when tracking idle_thread.
kern/tru64/tru64_events.hh:
remove FS_MEASURE #defs
kern/tru64/tru64_system.cc:
make DumpState print all the time, but only with DPRINTF. add a new parameter to tru64System a vector<string> binned_fns, to read in from .ini file. now all this binning stuff is dynamically generated.
kern/tru64/tru64_system.hh:
remove all static binning stuff, add support for dynamic
sim/system.cc:
change nonPath bin name to Kernel, remove FS_MEASURE
sim/system.hh:
change nonPath to Kernel
--HG--
extra : convert_revision : 9ee813c0a64273bab4125815b7bc8145c5897ec1
code.
base/statistics.hh:
We're getting rid of FS_MEASURE, but for now, we're going
to still use a compile time flag to turn on and off binning
of statistics. (The flag is STATS_BINNING)
cpu/exec_context.cc:
cpu/exec_context.hh:
kern/tru64/tru64_system.cc:
get rid of FS_MEASURE
cpu/simple_cpu/simple_cpu.cc:
yank the function call tracking code out of the cpu and move
it into the software context class itself.
kern/tru64/tru64_system.hh:
get rid of FS_MEASURE
move all of the tacking stuff to the same place.
sim/system.hh:
cleanup
--HG--
extra : convert_revision : 73d3843afe1b3ba0d5445421c39c1148d3f4e7c0
sim/sim_object.cc:
serialize objects in the reverse order of their creation.
This causes a SimObject that is dependent on another
to be serialized first. For example, the ethernet device
writes back some data to physical memory while serializing,
so this will cause the physical memory to be serialized
after that, preserving the data written back.
--HG--
extra : convert_revision : f9a37b63ce777df1cfecefa80f94f8fc69e42448
dev/tsunami.cc:
Changed so Tsunami has a pointer to the System to which it belongs.
Now it is derived from generic base class Platform so platform stuff
can be accessed based on the system
dev/tsunami_io.cc:
dev/tsunami_io.hh:
Cleanup and added copyright
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
Added event to skip the "calibrate_delay" function, now calculate
loops_per_jiffy based on frequency, interrupt frequency, and constant
sim/system.hh:
Added pointer to generic Platform base class
--HG--
extra : convert_revision : 5bd925eec220a2ca48eb6164d2ecfdec96922c2c
benchmarks for alpha-linux.
arch/alpha/alpha_linux_process.cc:
Added some more ioctl commands to ignore.
Set unlink and rename to the new functions.
Ignore setrlimit, times and rt_sigaction.
Should eventually provide a function for times.
arch/alpha/alpha_tru64_process.cc:
Added some more ioctl commands to ignore.
Set unlink and rename to the new functions.
Ignore setrlimit.
sim/syscall_emul.cc:
Added implementations for unlink and rename.
sim/syscall_emul.hh:
Added unlink and rename functions.
Added a couple more ioctl requests to ignore.
Print out the PC of any ioctl commands that fail.
--HG--
extra : convert_revision : 8af21c7fa7d0645d3f9324c9ce70ad33590c3c8e
execution pipeline (Alpha trapb & excb).
Add support for write memory barriers (mostly impacts
store buffer).
Add StaticInst flag to indicate memory barriers, though
this is not modeled in the pipeline yet.
arch/alpha/isa_desc:
Implement trapb, excb, mb, and wmb as insts with
no execution effect (empty execute() function) but
with flags that indicate their side effects.
Also make sure every instruction that needs to go to
the execute stage has a real opClass value, since we
are now using No_OpClass to signal insts that can get
dropped at dispatch.
StaticInst::branchTarget() is now a const method.
cpu/static_inst.hh:
Add flags to indicate serializing insts (trapb, excb) and
memory and write barriers.
Also declare some StaticInst methods as const methods.
dev/etherlink.hh:
sim/eventq.hh:
sim/serialize.cc:
sim/serialize.hh:
sim/sim_object.hh:
Make name() return value const.
--HG--
extra : convert_revision : 39520e71469fa20e0a7446b2e06b494eec17a02c
The last change only caught the ones with types that
started with capitals. This pass catches the rest
(mostly STL and uint*_t types).
base/cprintf_formats.hh:
cpu/simple_cpu/simple_cpu.cc:
sim/serialize.cc:
sim/serialize.hh:
Change "foo_t& foo" to "foo_t &foo".
--HG--
extra : convert_revision : fc7f7425db2aef33e490f952b5ce74c8c36d0d41
This primarily to be internally consistent (sometimes we used one,
sometimes the other, even within the same line of code!).
I picked the latter to be symmetric with "Foo *foo".
base/cprintf_formats.hh:
base/range.hh:
base/refcnt.hh:
base/res_list.hh:
base/statistics.hh:
base/str.hh:
cpu/exec_context.hh:
cpu/simple_cpu/simple_cpu.cc:
cpu/simple_cpu/simple_cpu.hh:
sim/serialize.cc:
sim/serialize.hh:
sim/syscall_emul.hh:
Change "Foo& foo" declarations to "Foo &foo".
--HG--
extra : convert_revision : ca1b0e85a578b539214bda3b8d61ac23792f2e87
statStream catchall that we had before)
Also provide an optional output directory that multiple simulator output
files can be written to.
Make most output files use the output directory
base/misc.cc:
send warnings to the outputStream as well
base/trace.cc:
dprintf_stream defaults to cerr
dev/console.cc:
use the output directory for the console output if it exists
dev/etherdump.cc:
dump to the output directory if it exists
sim/builder.cc:
sim/builder.hh:
move constructor and destructor to .cc file
use a function to get the stream that the builder dumps its
output to, and create a separate file in the output directory
if able
sim/main.cc:
statStream -> outputStream
sim/serialize.cc:
dump checkpoints to the output directory if specified
sim/universe.cc:
provide an output stream for simulator output. (This takes place of the
statStream catchall that we had before)
Also provide an optional output directory that multiple simulator output
files can be written to.
--HG--
extra : convert_revision : 03abce20edbbf7ec19c9ddd8d69ec8485c383532
arch/alpha/isa_desc:
don't say warn: Warning:
base/misc.cc:
avoid printing two newlines in a row
sim/main.cc:
print out a message just before we enter the event queue
--HG--
extra : convert_revision : 2a824d4b67661903fc739a0fb0759aa91d72382c
Move global checkpoint-related functions and vars into Checkpoint class (as statics).
arch/alpha/pseudo_inst.cc:
dev/disk_image.cc:
Move global checkpoint-related functions and vars
into Checkpoint class (as statics).
sim/serialize.cc:
Move global checkpoint-related functions and vars
into Checkpoint class (as statics).
Checkpoint constructor now takes checkpoint directory name instead
of file name.
Make serialize:dir parameter actually set checkpoint directory name
instead of directory in which checkpoint directory is created. If
the value contains a '%', the curTick value is sprintf'd into the
format to create the directory name. The default is backwards compatible
with the old fixed name ("m5.%012d").
sim/serialize.hh:
Move global checkpoint-related functions and vars
into Checkpoint class (as statics).
Checkpoint constructor now takes checkpoint directory name instead
of file name.
--HG--
extra : convert_revision : d0aa87b62911f405a4f5811271b9e6351fdd9fe4
base/str.hh:
this should really be inline
base/time.cc:
base/time.hh:
clean up how the time class works. Export only one, and let
people calculate their own elapsed times, etc.
sim/main.cc:
sim/sim_time.X -> base/time.X
--HG--
rename : sim/sim_time.cc => base/time.cc
rename : sim/sim_time.hh => base/time.hh
extra : convert_revision : f3888fe3a1fdd1022084c282b58407c631a6d9a0
This lets us centralize priorities so we can see what's going on.
- Shift serialize & cpu-switch events to happen before CPU ticks (to be
consistent with starting new CPU on same cycle instead of next cycle).
- Get rid of unnecessary bus stats reset callback.
cpu/simple_cpu/simple_cpu.cc:
sim/debug.cc:
sim/eventq.hh:
sim/serialize.cc:
sim/sim_events.cc:
sim/sim_events.hh:
Switch events to use a priority enum instead of integers.
This lets us centralize priorities so we can see what's going on.
--HG--
extra : convert_revision : 510d79b43c0a1c97a10eb65916f7335b1de8b956
a checkpoint now gives identical results to running from scratch
and doing at switchover at the same cycle!
- CPUs start at cycle 0 again, not cycle 1.
- curTick is now serialized & unserialized.
- Stats get reset in main (before event loop). Since this is done
after curTick is unserialized, simTicks gets set correctly for
running from a checkpoint.
- Simplify serialization to happen in a single pass.
- s/Serializeable/Serializable/
arch/alpha/isa_traits.hh:
dev/etherlink.hh:
sim/eventq.cc:
sim/eventq.hh:
s/Serializeable/Serializable/
kern/tru64/tru64_system.cc:
sim/process.cc:
Make initial CPU activation on cycle 0 again (not 1).
sim/main.cc:
Reset stats before getting started.
Make error message on falling out of event loop
more meaningful.
sim/serialize.cc:
sim/serialize.hh:
Get rid of now-useless initial pass; serialization is
done in a single pass now.
Serialize & unserialize curTick.
Wrap curTick and mainEventQueue in a "globals" Serializable object.
s/Serializeable/Serializable/
sim/sim_object.cc:
Add static function to serialize all SimObjects.
sim/sim_object.hh:
Add static function to serialize all SimObjects.
s/Serializeable/Serializable/
--HG--
extra : convert_revision : 9dcc411d0009b54b8eb61c3a509680b81b9f6f68
and SimpleCPU::setStatus() into separate functions. For example,
setStatus(Active) is now activate().
--HG--
extra : convert_revision : 4392e07caf6c918db0b535f613175109681686fe
on test5 because of a wrong exit code; fixed that.
sim/main.cc:
No need to ignore SIGPIPE, as far as I know.
sim/sim_events.cc:
A CountedExitEvent is a normal termination, so
should have an exit code of 0.
--HG--
extra : convert_revision : 8b5072aca54f3ca08b2815b73ac01c00e4da49b6
I noticed that checkpoints dumped from m5.debug and m5.opt had
differences, which is no longer the case (other than addresses
encoded in names).
cpu/full_cpu/smt.hh:
Get rid of unused SMT_MAX_CPUS.
sim/debug.cc:
Use AutoDelete for DebugBreakEvent.
sim/serialize.cc:
sim/serialize.hh:
Move constructor & destructor to header so they can be inlined.
--HG--
extra : convert_revision : bc68c2c9b053b1de0d655ed555734419fafd0b83
interfaces, and specific support for Alpha Linux. Split syscall emulation
functions into several groups, based on whether they depend on the specific
OS and/or architecture (and all combinations of above), including the use of
template functions to support syscalls with slightly different constants
or interface structs.
arch/alpha/alpha_tru64_process.cc:
Incorporate full Tru64 object definition here, including structure and constant definitions.
This way we can wrap all of the functions inside the object, and not worry about namespace
conflicts because no one outside this file will ever see it.
base/loader/aout_object.cc:
base/loader/aout_object.hh:
base/loader/ecoff_object.cc:
base/loader/ecoff_object.hh:
base/loader/elf_object.cc:
base/loader/elf_object.hh:
base/loader/object_file.cc:
base/loader/object_file.hh:
Add enums to ObjectFile to indicate the object's architecture and operating system.
cpu/exec_context.cc:
prog.hh is now process.hh
cpu/exec_context.hh:
prog.hh is now process.hh
move architecture-specific syscall arg accessors into ExecContext
cpu/simple_cpu/simple_cpu.cc:
No need to include prog.hh (which has been renamed)
sim/process.cc:
sim/process.hh:
LiveProcess is now effectively an abstract base class.
New LiveProcess::create() function takes an object file and dynamically picks the
appropriate subclass of LiveProcess to handle the syscall interface that file expects
(currently Tru64 or Linux).
--HG--
rename : arch/alpha/fake_syscall.cc => arch/alpha/alpha_tru64_process.cc
rename : sim/prog.cc => sim/process.cc
rename : sim/prog.hh => sim/process.hh
extra : convert_revision : 4a03ca7d94a34177cb672931f8aae83a6bad179a
no need for multiple bin classes. If multiple bins are needed, we
can always do it with ini type config instead.
kern/tru64/tru64_events.hh:
sim/system.cc:
sim/system.hh:
No more GenBin always use MainBin
--HG--
extra : convert_revision : 8c466f302324c33b59d47d0da04583b2517fc72c
there aren't so many files littering your directory
dev/disk_image.cc:
Checkpoints now in a directory
sim/serialize.hh:
Make it so that we create a directory for each checkpoint so that
there aren't so many files littering your directory.
Remove unused variable
--HG--
extra : convert_revision : 261824eee62f7b68f6ae6e3dbd49ad5128ced148
base/statistics.cc:
formatting
cpu/simple_cpu/simple_cpu.cc:
cpu/simple_cpu/simple_cpu.hh:
Make numInsts reset by adding a resetStats function
sim/sim_object.cc:
Register the reset callback in a slightly cleaner way to avoid
potential static member constructor ordering issues
--HG--
extra : convert_revision : 408073b4b0397fbf9dfd9c548a313f1c8c3fc031
minor gratuitous cleanup in printAllExtraOutput.
(only create one end iterator)
Fix average stats reset
base/statistics.hh:
Shouldn't reset average stats this way. The current stat value
should stay the same.
sim/sim_object.cc:
Ok, actually call resetStats on all stats
minor gratuitous cleanup in printAllExtraOutput.
(only create one end iterator)
--HG--
extra : convert_revision : 13090ebe490a93757b8eb7d7c6a9697983095e41
from that will get called any time stats are reset.
sim/sim_object.cc:
sim/sim_object.hh:
add a virtual function resetStats that any simObject can reset
when a statistics reset is initiated
--HG--
extra : convert_revision : fdad673142f6ff811f84c246d80e5d41e3c9d4d1
make SIGUSR2 dump and reset stats
Make resetting time work
base/statistics.cc:
Fix statistics reset so that it works again, and correctly
reset bins as well. (The old code wouldn't reset if you didn't
have any bins, and then would actually only reset the first
bin)
cpu/simple_cpu/simple_cpu.cc:
cpu/simple_cpu/simple_cpu.hh:
convert idleCycles/idleFraction into a single Average stat
to make reset work more simply
sim/main.cc:
handle SIGUSR2 to dump and reset stats
(SIGUSR1 only dumps them)
sim/sim_time.cc:
sim/sim_time.hh:
Add support for resetting the time
--HG--
extra : convert_revision : ea43e03c50c0a4bb826dc0842a8c4fa1a9289e0a
command line:
m5.* <config file> <args> --server.system:bin=true to track function calls in the server
m5.* <config file> <args> --client.system:bin=true to track function calls in the client
base/statistics.cc:
make an adjustment to the way stats are printed for FS_MEASURE
base/statistics.hh:
add a name() virtual function to GenBin. add a debug printf for activate().
add amake MainBin the default bin when FS_MEASURE.
cpu/exec_context.cc:
initialize swCtx to null upon creation of an xc
cpu/exec_context.hh:
add a SWContext pointer to every execution context.
cpu/simple_cpu/simple_cpu.cc:
process calls and returns for FS_MEASURE
cpu/simple_cpu/simple_cpu.hh:
add this so idleCycles will not be accessed before all stats are constructed
kern/tru64/tru64_events.cc:
add a FnEvent that fires whenever a function we're tracking is called. implement the process() virtual function for it.
kern/tru64/tru64_events.hh:
add FnEvent
kern/tru64/tru64_system.cc:
send bin parameter to System constructor. add bin parameter to Tru64System object. initialize all the FnEvent and MainBin members of Tru64system. also, populate the calling map that indicates whether a function call is on the path we're tracking.
kern/tru64/tru64_system.hh:
modify the Tru64System class to support FS_MEASURE
sim/system.cc:
add a bin parameter to System class. initialize a MainBin to hold the stats for nonPath.
sim/system.hh:
add a map of to match bins to function names. add a swCtx map to map pcb addresses to SWContext *s. Add some supporting functions.
--HG--
extra : convert_revision : af3eadd798cb2d2aed9b54e1059dcedf244dd526
object in the config that was not in the checkpointed config.
This code compiles, but I haven't tested it... I'm committing it so Ron
can have it. Should not effect anything that currently works.
base/inifile.cc:
base/inifile.hh:
Add sectionExists() method so you can query whether a section exists
without knowing any of the entry names that would be in it.
sim/serialize.cc:
sim/serialize.hh:
Add Checkpoint::sectionExists() (pass through to IniFile).
--HG--
extra : convert_revision : 905db122afdfe55946ab8493ccac0b1e715bc7c6
arch/alpha/isa_desc:
Move the pseudo instructions out of the isa_desc, into their own
file and call out to them when they're to be accessed
sim/sim_events.cc:
sim/sim_events.hh:
sim/sim_exit.hh:
move SimExit to sim_exit.cc
--HG--
extra : convert_revision : 1c393adb1c18bd0fef065057d7f4e9cf60ac4197
resetstats
dumpstats
dumpresetstats
m5checkpoint
Lots of cleanup of serialization and stats dumping/resetting to
work with these new instructions
arch/alpha/isa_desc:
Implement more m5 pseduo opcodes:
resetstats
dumpstats
dumpresetstats
m5checkpoint
All of these functions take two optional parameters, the first is a delay,
and the second is a period. The delay tells the simulator to wait the
specified number of nanoseconds before triggering the event, the period
tells the simulator to repeat the event with a specified frequency
base/statistics.cc:
base/statistics.hh:
regReset RegResetCallback
dev/disk_image.cc:
serializeFilename -> CheckpointFile()
sim/debug.cc:
Move this debugging statement to sim_stats.cc
sim/eventq.cc:
Don't AutoDelete an event if it is scheduled since the process()
function could potentially schedule the event again.
sim/main.cc:
DumpStatsEvent is now Statistics::SetupEvent(Dump, curTick)
sim/serialize.cc:
Change the serialize event so that it's possible to cause the
event to repeat. Also make the priority such that the event
happens just before the simulator would exit if both events
were scheduled for the same cycle.
get rid of the serializeFilename variable and provide a CheckpointFile()
function. This function takes a basename that is set in the
configuration, and appends the current cycle to the name so that
multiple checkpoints can be dumped from the same simulation.
Also, don't exit the simulation when a checkpoint file is dumped.
sim/serialize.hh:
serializeFilename -> CheckpointFile()
SetupCheckpoint function to tell the simulator to prepare
to checkpoint at a certain time with a certain period
sim/sim_events.cc:
DumpStatsEvent stuff gets move to sim_stats.(cc|hh)
The context stuff gets moved into the already existing
stats context in stat_context.cc
sim/sim_events.hh:
DumpStatsEvent stuff gets move to sim_stats.(cc|hh)
sim/universe.cc:
Provide some simple functions for converting times into
ticks. These use floating point math to get as close as
possible to the real values. Multipliers are set up ahead
of time
--HG--
extra : convert_revision : d06ef26a9237529a1e5060cb1ac2dcc04d4ec252
Implement a new m5exit instruction with an optional delay
arch/alpha/isa_desc:
move m5exit to m5exit old. The old version of the
instruction is now deprecated
Implement the new exit instruction with the optional delay
sim/sim_events.cc:
sim/sim_events.hh:
Make SimExit take a cycle
sim/universe.cc:
provide ticksPerMS, ticksPerUS, and ticksPerNS so we don't
have to do math during the cycle
--HG--
extra : convert_revision : e2ed47a2e5cfcd57c82086c6fcb4a28bf801c214
Cleaned up serialization
sim/eventq.hh:
sim/eventq.cc:
Cleaned up serialization
--HG--
extra : convert_revision : b75696d75f1aee16ebca2076fdd3cd4913593762
objName as a member, instead it has the pure virtual function name(). SimObject
now has a objName member, and all classes derived directly from Serializeable
have to implement a name() function (which now makes them unique by pointer value)
cpu/simple_cpu/simple_cpu.cc:
Change initialization of Event to get rid of Serializeable naming
dev/etherlink.cc:
dev/etherlink.hh:
Seralizeable derived naming changes
sim/eventq.cc:
Serializeable derived naming changes, also changed serialization process so it
doesn't need to use nameChildren
sim/eventq.hh:
Serializeable derived naming changes, remove constructor for specifying event name
sim/serialize.cc:
Serializeable derived naming changes, remove setName function and the child naming
pass for serialization
sim/serialize.hh:
Serializeable derived naming changes, removed nameChildren, setName
sim/sim_object.cc:
sim/sim_object.hh:
Serializeable derived naming changes
--HG--
extra : convert_revision : 67bcc275b6c210f7049f98a1ad0d22e8f5596a63
base/predictor.hh:
base/sat_counter.hh:
sim/param.hh:
Get rid of spurious references to stat_sdb_t.
--HG--
extra : convert_revision : 0018a940c69b6e31b85fd85354b9d5ce2fd0aa6f
Can now serialize & unserialize DmaRequestEvents and DmaTransferEvents.
Also support serialize/unserialize of pointers to SimObjects and
other Serializable objects.
arch/alpha/alpha_memory.cc:
arch/alpha/alpha_memory.hh:
arch/alpha/isa_traits.hh:
cpu/exec_context.cc:
cpu/exec_context.hh:
cpu/simple_cpu/simple_cpu.hh:
dev/alpha_access.h:
dev/alpha_console.cc:
dev/alpha_console.hh:
dev/console.cc:
dev/console.hh:
unserialize() now takes a Checkpoint* instead of an IniFile*.
cpu/simple_cpu/simple_cpu.cc:
unserialize() now takes a Checkpoint* instead of an IniFile*.
Put ExecContext in its own section so its _status fields doesn't conflict.
sim/eventq.cc:
sim/eventq.hh:
unserialize() now takes a Checkpoint* instead of an IniFile*.
Events get serialized by the event queue only if they're marked
as AutoSerialize... others are assumed to be serialized by something
else (e.g. an owning SimObject) or to not matter.
sim/param.cc:
Shift 'const' in case T is a ptr type.
sim/serialize.cc:
sim/serialize.hh:
Define Checkpoint object to encapsulate everything you need to know
about a checkpoint. Use it to allow lookups of named Serializable
objects (and SimObjects) during unserialization.
unserialize() now takes a Checkpoint* instead of an IniFile*.
--HG--
extra : convert_revision : 8e6baab32405f8f548bb67a097b2f713296537a5
arch/alpha/alpha_memory.cc:
arch/alpha/alpha_memory.hh:
Serialize TLB contents.
cpu/simple_cpu/simple_cpu.cc:
cpu/simple_cpu/simple_cpu.hh:
Complete serialization of SimpleCPU (including owned events).
sim/eventq.cc:
sim/eventq.hh:
Basic serialization for events.
Still need to handle dynamic events (not owned by a SimObject).
sim/serialize.cc:
sim/serialize.hh:
Export serialization filename so PhysicalMemory can
derive its filename from that.
--HG--
extra : convert_revision : 4db851c5880f73f576ca092d5e5ad4256048eb51
Add support for serializing enums.
arch/alpha/isa_traits.hh:
Add serialize/unserialize functions for RegFile
(defined in new isa_traits.cc).
cpu/exec_context.cc:
Flesh out serialize/unserialize.
sim/serialize.hh:
Add {UN}SERIALIZE_ENUM().
--HG--
extra : convert_revision : 9e30c7e7b3b290dc8ea0888ba3636fc93ee89052
though most objects don't actually serialize any data.
arch/alpha/alpha_memory.cc:
arch/alpha/alpha_memory.hh:
arch/alpha/isa_traits.hh:
cpu/exec_context.cc:
cpu/exec_context.hh:
cpu/simple_cpu/simple_cpu.hh:
dev/alpha_access.h:
dev/alpha_console.cc:
dev/alpha_console.hh:
dev/console.cc:
dev/console.hh:
Change unserialize param from IniFile& to const IniFile*.
cpu/simple_cpu/simple_cpu.cc:
Change unserialize param from IniFile& to const IniFile*.
Make unserialize call ExecContext::unserialize.
sim/eventq.cc:
Rename MainEventQueue (no spaces) for easier parsing in checkpoints.
Disable event serialization for now, so we can focus on the easy stuff.
sim/serialize.cc:
Change paramIn and arrayParamIn param from IniFile& to const IniFile*.
sim/serialize.hh:
Change unserialize, paramIn, and arrayParamIn params from IniFile& to const IniFile*.
--HG--
extra : convert_revision : 6e8853ed375eddec0e140c95a01dd51bd225f7b9
Fix handling of chars (uint8_ts) in serialization.
Minor cleanup.
sim/param.cc:
Add specialization of showParam for char: output as ints, not as characters.
Clean up comments a bit.
--HG--
extra : convert_revision : 96349382447d892679dda9f83c028eec64252dc0
sim/param.cc:
Convert parseParam() and showParam() to templates,
andd explicitly instantiate them for common types.
sim/param.hh:
Add declarations for parseParam() and showParam() function templates,
so serialize.cc can use them.
sim/serialize.cc:
Don't need declarations for parseParam() and showParam() since
we put them in param.hh.
Also instantiate paramOut() etc. for bool.
--HG--
extra : convert_revision : 1d84d0fbec64481996cbfa8b84c67c13c6244385
in the process make m5_exit more generic
arch/alpha/ev5.cc:
arch/alpha/ev5.hh:
There's no reason that this needs to be in an arch specific file
arch/alpha/isa_desc:
m5_exit -> SimExit
Emulate callpal halt and cause the simulator to exit
while we're at it, sort #includes
sim/sim_events.cc:
sim/sim_events.hh:
move the m5_exit function here, renaming it to SimExit.
Also Allow the caller to pass in the termination message.
--HG--
extra : convert_revision : 54b43b17a412ab387b8672c27ef0b04fce10ee15
cpu/simple_cpu/simple_cpu.cc:
Serialize FP regs as integers (so we get exact bit representation).
sim/serialize.cc:
Don't panic on object rename... events come up named "event"
and need to get renamed. Also fix some DPRINTFs.
--HG--
extra : convert_revision : 62ad527a7aaf78ae623b70febc1331cf91cbad05
This fixes detailed-mpboot, which was broken as of my last change.
Also clean up some of the ExecContext status initialization.
cpu/base_cpu.hh:
CPU::execCtxStatusChg() now takes thread_num as an arg so the CPU knows
which execContext had the status change.
BaseCPU::registerExecContexts() no longer needs to be virtual.
cpu/exec_context.cc:
Initialize _status directly... don't use setStatus() as this will notify the CPU
of the change before it is ready.
CPU::execCtxStatusChg() now takes thread_num as an arg so the CPU knows
which execContext had the status change.
cpu/exec_context.hh:
Don't need initStatus() any more.
cpu/simple_cpu/simple_cpu.cc:
Move execCtxStatusChg() from header to .cc file.
No longer need specialized version of registerExecContexts to schedule TickEvent.
cpu/simple_cpu/simple_cpu.hh:
Move execCtxStatusChg() from header to .cc file.
CPU::execCtxStatusChg() now takes thread_num as arg (must be 0 for SimpleCPU).
No longer need specialized version of registerExecContexts to schedule TickEvent.
kern/tru64/tru64_system.cc:
Don't need initRegs; the PC etc. get initialized in the CPU constructor.
ExecContexts start out as Unallocated, so no need to set them to Unallocated here.
kern/tru64/tru64_system.hh:
Don't need initRegs; the PC etc. get initialized in the CPU constructor.
sim/prog.cc:
ExecContexts start out as Unallocated, so no need to set them to Unallocated here.
--HG--
extra : convert_revision : e960ebbeb845960344633798e251b6c8bf1c0378