summaryrefslogtreecommitdiff
path: root/base
AgeCommit message (Collapse)Author
2003-12-23- change the FormatFlags into more general StatFlagsNathan Binkert
- make init and print StatFlags - default_mode -> DefaultMode - the display mode is no longer needed as part of the stat pass it into the display functions so the mode can be determined from dump to dump - get rid of old simplescalar bug and make the distribution min_val work correctly - get rid of the DisplayMode parameter to distribution updates since it is no longer needed --HG-- extra : convert_revision : 386f69f4d12fb91faf60690aaab08542e009e555
2003-12-23- Allow the stats package user to determine in which mode to dumpNathan Binkert
- Factor out the formatted output into a display function - Make the stats package support tracing - Clean up output of binned data base/statistics.cc: - Factor out the formatted output into a display function and pass in the mode - Make the stats package support tracing - Clean up output of binned data - Get rid of the list of binned stats and the map of bins since it is no longer needed for output base/statistics.hh: - Allow the stats package user to determine in which mode to dump --HG-- extra : convert_revision : a1d5fc728f4dc22a851d58ea89d44018a94a64c7
2003-12-20Merge zizzer:/bk/m5 into isabel.reinhardt.house:/z/stever/bk/m5Steve Reinhardt
--HG-- extra : convert_revision : 315f207185b418f41509210a35188be996c0eb0a
2003-12-20Fix a bunch of memory leak type bugs, and add some betterNathan Binkert
checking in places to make sure stuff is behaving properly. base/statistics.cc: separate the per stat check from the general stats check. We always want the general stuff to happen base/statistics.hh: - separate the per stat check from the general stats check. we always want the general stuff to happen - make every stat check that its bin is at least initialized - set the vector2d x and y coordinates in init to prevent an uninitialized memory access test/Makefile: don't need sim_time.o to test stats test/stattest.cc: don't make x and y the same on the 2d test so that we make sure that the two dimensions are correct --HG-- extra : convert_revision : 81320325056ac1c09f6842474fb6ee3bcc030a8e
2003-12-19Minor cleanup of trace/output stuff (leftover from EINTR bug fix).Steve Reinhardt
base/cprintf.cc: Get rid of unnecessary stream state check. Bug is fixed now, and I'm not sure this did much anyway. cpu/exetrace.cc: Get rid of unnecessary flush() call. --HG-- extra : convert_revision : 107dcdc578b2b0ad1652ee52ea0a33b0f3cd4e39
2003-12-19Make stuff build on openbsdNathan Binkert
arch/alpha/alpha_tru64_process.cc: So, I don't know why linux uses an off_t here. I'm also not sure why linux defines an off_t to be a long Let's just use long here since it works for linux, and that's what bsd does base/inifile.cc: correct #include for OpenBSD dev/disk_image.cc: the correct type for this is streampos --HG-- extra : convert_revision : f3ac3a3b8515d66e07ffb9780d8a9e387297b6a0
2003-12-17Miscellaneous minor fixes/improvements.Steve Reinhardt
Most notable is that the rundiff trace-output lossage is fixed! base/pollevent.cc: Use SA_RESTART to keep blocked write() calls from failing with EINTR when signals happen. base/trace.hh: Make TRACING_ON depend on NDEBUG not being set (instead of DEBUG being set) so m5.opt/m5.fast do what we want. util/rundiff: Print header lines showing file/cmd names. --HG-- extra : convert_revision : 4966814ad65aedb6d62a5a62a6ad3e3f326d61b8
2003-12-15Merge zizzer:/bk/m5 into isabel.reinhardt.house:/z/stever/bk/m5Steve Reinhardt
--HG-- extra : convert_revision : dd887635c7ce74324b3670744461ffdf92e1dedf
2003-12-15Another fix for gcc 3.3.x.Steve Reinhardt
base/statistics.hh: Make a couple of typedefs public rather than protected. g++ 3.3 complains otherwise. --HG-- extra : convert_revision : 6a8e4edb0c39474c0e0c7bc474ad0f22b9fb8505
2003-12-15Add #define parameter and corresponding build option toSteve Reinhardt
disable FastAlloc. Gcc 3.3.x appears to have a bug that breaks FastAlloc when compiled with optimization. base/fast_alloc.cc: base/fast_alloc.hh: #define NO_FAST_ALLOC makes FastAlloc a no-op. --HG-- extra : convert_revision : bf4bb8e963331c6782f2cfd475a811aa520e31b5
2003-12-15Add support for getting the hostnameNathan Binkert
--HG-- extra : convert_revision : 498a950e574059eac2e3b1969880ecc04cf53f31
2003-12-15Clean up time handling codeNathan Binkert
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
2003-12-11- Add a new target m5.fast (or just fast for short)Nathan Binkert
- make stuff compile with NDEBUG - remove the TRACE setup option since it isn't useful anymore base/statistics.cc: Compile with -DNDEBUG --HG-- extra : convert_revision : a75b3881be1513abb5915b6463c6cdc1f23a62e1
2003-12-10Rename RegResetCallback to registerResetCallback().Steve Reinhardt
Add reset callback for bus (to fix idle cycles computation). base/statistics.cc: base/statistics.hh: sim/sim_object.cc: Rename RegResetCallback to registerResetCallback(). --HG-- extra : convert_revision : c886c98143d4851f709ef95de3120b4494f8e4d2
2003-12-09Make the simulator compile on an Itanium.Nathan Binkert
base/hashmap.hh: Not all machines need these extra hash functions also make Counter int64_t since that's really what is needed --HG-- extra : convert_revision : b5b5d65db157d01d76adbf4de4882b1516c9f2e7
2003-12-09Sweeping change in the stats package....again...Nathan Binkert
base/statistics.cc: - Merge the m5 display and simplescalar compatible display functions. - Use functors for the stats printing instead of functions. This gets rid of the very long argument lists and improves clarity. - Fix a bug in binning that caused an invalid allocation to occur. base/statistics.hh: - Instead of using a compile time variable to choose whether to print in ss compat mode, we use a runtime variable. This is how we'll choose python output. - There are no more virtual functions in the statistics themselves. All virtual functions have been moved into a secondary helper class. Every stat has an associated helper class that knows how to access certain variables in that stat. There is a hash_map from the stat to it's helper class data. This was done because the helper data is only used during setup, stats reset, and printing. All of which happen rarely, and you want to avoid any performance hit that you can. - To provide the name(), desc(), etc functions to classes so that the user can set various parameters to the stats class, a single class containing all of those functions was created. An odd trick was done to actually make this class derive from the stat class because a base class with no data actually does end up taking up space. - The detail namespace was removed for now. I'll put it back when the package is not in so much flux. - Standard deviation, and mean were added to all distribution stats. - There are several bugfixes and changes that aren't mentioned test/Makefile: Don't test sim_stats foo. test/stattest.cc: Don't test sim_stats foo. Fix bin usage so that it corresponds to the current usage. --HG-- extra : convert_revision : ce8d9a8d485a84d55799f253d851e83650684170
2003-12-04remote_gdb.cc:Lisa Hsu
fix remote gdb base/remote_gdb.cc: fix remote gdb --HG-- extra : convert_revision : 886cad5037e2124e6087be03f2903f07aeed0679
2003-12-01Merge zizzer:/bk/m5 into isabel.reinhardt.house:/z/stever/bk/m5Steve Reinhardt
--HG-- extra : convert_revision : d66ebc598fdcfc9477ea5a1e455b21d7b9e56936
2003-12-01Restructuring of LiveProcess etc. to support multiple emulated OS syscallSteve Reinhardt
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
2003-11-23get rid of the errors from simple-test1 and test1-6Lisa Hsu
base/statistics.cc: fix how some stats are printed to get rid of some of those pesky regression errors. this does not fix all of them, just the unimportant ones. --HG-- extra : convert_revision : 247675fd5bbb47e29c8c077a8d2b2996be1b7072
2003-11-22Go Blue!!!!Nathan Binkert
base/statistics.hh: Simple formatting fixes --HG-- extra : convert_revision : 608fe1c37f58426d65cb5ec172764a6b610be6c8
2003-11-22We only need to choose that we do want binning, or we don't.Nathan Binkert
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
2003-11-12statistics.cc:Nathan Binkert
Only reactivate the original bin if it actually exists. base/statistics.cc: Only reactivate the original bin if it actually exists. --HG-- extra : convert_revision : e71ba0680d79ca439487a31d8f365429bff8c375
2003-11-12in the case where we don't have any bins, we don't want to panicNathan Binkert
--HG-- extra : convert_revision : e9056ca020d0f3db388b31a074b03e4d521f8705
2003-11-07It's important that there be white-space between each elementSteve Raasch
of a printed statistics line. base/statistics.cc: Add spaces between printed elements --HG-- extra : convert_revision : edcc9460fa178c39f7e3c15b3bad866ef9b263e4
2003-11-07save and restore the current bin during reset since weNathan Binkert
should continue in whatever bin we were in. --HG-- extra : convert_revision : 30a891ccb03afa0c1dd0c98942ab3ea5ba800660
2003-11-06Nat's fix for compile bugSteve Raasch
base/statistics.hh: Too many "const"'s --HG-- extra : convert_revision : b38303f2e6b415e6bcc520da80e89d99b6976d23
2003-11-06better binning of Average statsNathan Binkert
base/statistics.hh: Try to make binning of Average statistics work a little better. This solution is far from perfect though since we really need to call set(p.current, p) when the binning takes place. To fix the binning, we need to have the current value non-binned, to do that, we make make the current value part of the Params struct. This means that we can't pass around const Params structs Maybe we need a binswap callback :/ --HG-- extra : convert_revision : c2892387dbabe011bdcd6f0d99005c1c50653720
2003-11-06Little fixes to make more of the stats reset correctly.Nathan Binkert
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
2003-11-05Ok, actually call resetStats on all statsNathan Binkert
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
2003-11-05Fix stats resetNathan Binkert
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
2003-11-04Merge zizzer:/bk/m5 into zower.eecs.umich.edu:/z/hsul/bk/m5Lisa Hsu
--HG-- extra : convert_revision : 81a644bebf1b9fe11ac767c097c2d457c5698e73
2003-11-04Hack to enable perl totaling of standard deviation statistics.Lisa Hsu
statistics.hh: same statistics.cc: Hack to enable perl totaling. make FancyDisplay print a total parameter to enable totaling standard deviations for bins after a run is over with perl. currently a total hack. base/statistics.cc: Hack to enable perl totaling. make FancyDisplay print a total parameter to enable totaling standard deviations for bins after a run is over with perl. currently a total hack. base/statistics.hh: same --HG-- extra : convert_revision : c4087a138543e66acee4e395617ce7fd7e458a39
2003-11-04Merge zizzer.eecs.umich.edu:/bk/m5Nathan Binkert
into zans.eecs.umich.edu:/z/binkertn/research/m5/latest --HG-- extra : convert_revision : b4e94c075fdb58f6ac66aedf4f6a8f792988ed13
2003-11-04A little bit of code here and there to get more access toNathan Binkert
what the console output is. base/circlebuf.hh: base/circlebuf.cc: add stuff to spit to an ostream prepend _ in front of protected member variables formatting dev/console.hh: dev/console.cc: Add DPRINTF to spit out the lines of console data dev/console.cc: little hack to append name() to the file so that we can easily get multiple output files. dev/console.hh: TRACING_ON == 1 not defined(TRACING_ON) --HG-- extra : convert_revision : bbe80715fb97ee4c4ed6b484955ef71289f09fc9
2003-11-04Merge zizzer:/bk/m5 into zower.eecs.umich.edu:/z/hsul/bk/realcleanLisa Hsu
--HG-- extra : convert_revision : 32bbe481ee748785f0bcffb0a711017d51c987a0
2003-11-04statistics.cc:Lisa Hsu
on Database::reset(), reset all stats in every bin, not just current one. base/statistics.cc: on Database::reset(), reset all stats in every bin, not just current one. --HG-- extra : convert_revision : 0f3443b36ee00952810818a035c99267da8871d9
2003-11-04Merge zizzer:/bk/m5 into zower.eecs.umich.edu:/z/hsul/bk/cleanLisa Hsu
--HG-- extra : convert_revision : 0074df284e85bc2ebe6ccc2dbe765fabda9ab041
2003-11-04Add the ability to track stats in user defined sets of function calls. code ↵Lisa Hsu
can be generated via the base/instrum_codegen.pl script to easily change the functions being tracked. the only thing the user needs to do is add code in tru64System to change how the callerMap is populated. 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
2003-11-03AutomergeSteve Reinhardt
--HG-- extra : convert_revision : 2ca18ecbf04a1de72391073d0a5309fdbbdfefda
2003-11-02Print a warning rather than failing if we're unserializing and there's anSteve Reinhardt
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
2003-11-02Implement more m5 pseduo opcodes:Nathan Binkert
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
2003-11-01statistics.hh:Lisa Hsu
add enum to Bin::VectorBin base/statistics.hh: add enum to Bin::VectorBin --HG-- extra : convert_revision : a05aef30ca85bf5c0d1f5155e1dff3fb34fd7777
2003-11-01Make error messages more informative on a non-full-system fault.Steve Reinhardt
base/misc.cc: Add curTick to panic and warn messages. Reformat fatal message a bit for consistency. --HG-- extra : convert_revision : 171da2fe6ca5e25982058ee1af67473292659103
2003-10-31Merge zizzer.eecs.umich.edu:/m5/Bitkeeper/m5Nathan Binkert
into zizzer.eecs.umich.edu:/.automount/zans/z/binkertn/research/m5/latest --HG-- extra : convert_revision : 3134761fa4c572a672558dfb6f9252aaef7b7062
2003-10-31Make the to_number function work better.Nathan Binkert
base/str.cc: Make some fixes for the to_number function. Fix overflow calculation for maximum decimal value. (Note: minimum decimal value for signed numbers does not work correctly, e.g. it will overflow on -128 for a signed char though -127 will work) Fix overflow calculation for hex values being converted into signed types Fix up the debugging stuff a little to make sure the values are always printed as numbers. test/strnumtest.cc: using namespace std for g++ 3 --HG-- extra : convert_revision : b00bb1296c85c3d64d8864283c9374e1563bfa31
2003-10-31I forgot - also to typedef the default type of bin choice given to every ↵Lisa Hsu
visible stat type (NoBin or BinType). this way a little #define does it all for you. statistics.hh: add #includes needed for CeilPow2 statistics.cc: rm unneeded #includes for CeilPow2 base/statistics.cc: rm unneeded #includes for CeilPow2 base/statistics.hh: add #includes needed for CeilPow2 --HG-- extra : convert_revision : 818028b276e97735a8b8d21d6514f41a80350514
2003-10-30statistics.hh:Lisa Hsu
oops - remove a debug printf base/statistics.hh: oops - remove a debug printf --HG-- extra : convert_revision : a6ecab93f79ce0a5cb6ff129750d8f6a2de8d38c
2003-10-30Make some general changes to stats package where things either could have ↵Lisa Hsu
been better or were just plain wrong. statistics.hh: fix a bug in binning that made bins a fixed size no matter what. add GenBin class that is public but not templatized. statistics.cc: change map to statMap so others can use the map<> token without needing ::. also, add a level of GenBin that is public base class for StatBin<>. base/statistics.cc: change map to statMap so others can use the map<> token without needing ::. also, add a level of GenBin that is public base class for StatBin<>. base/statistics.hh: fix a bug in binning that made bins a fixed size no matter what. add GenBin class that is public but not templatized. --HG-- extra : convert_revision : 6976a891e414c9515cc5a613157f7cb86ef89008
2003-10-30Add support for serializationSteve Raasch
--HG-- extra : convert_revision : ff6c93ee2f4e6aeb5a824958c52f62d6c2a1cdfd