summaryrefslogtreecommitdiff
path: root/base
AgeCommit message (Collapse)Author
2004-01-20Set LIBELF_LINUX to 0 to build on zax. BuildsSteve Reinhardt
but did not test... however the only thing this affects in libelf is the header, so I don't expect any functional problems. base/loader/elf_object.cc: Set LIBELF_LINUX to 0 to build on zax. --HG-- extra : convert_revision : d024b33deff6fc8ea6f1d465f76dc8d9d63254ab
2004-01-15Make each stat take up one full line. This allows us to use grepNathan Binkert
to find and remove stats from the files so we can put less burden on the python interpreter. base/statistics.cc: Manually insert newlines into the python code so that we now have one stat per line. (Make it so we can use grep -v to remove stats) test/stattest.cc: update to reflect changes in how python is accessed --HG-- extra : convert_revision : 554edcf9c795b33d00d3d15554447c8accebebfa
2004-01-14Fixes and cleanup to elf loader code.Steve Reinhardt
base/loader/elf_object.cc: - Use program header instead of section headers for loading. The old code doesn't work for Alpha/Linux user binaries. - Deal properly with single-segment ELF executables (e.g. kernels)... haven't tested this but it looks like it matches the functionality of the patch the L4::Pistachio guys sent. - Factor load symbol code into one common function. - Some formatting to match style conventions. - Only include libelf stuff in .cc file, not .hh. base/loader/elf_object.hh: - Use program header instead of section headers for loading. The old code doesn't work for Alpha/Linux user binaries. - Factor load symbol code into one common function. - Only include libelf stuff in .cc file, not .hh. --HG-- extra : convert_revision : 782062d09d43083b01e65cd645c941f49c27640a
2004-01-11Merge zizzer.eecs.umich.edu:/bk/m5Nathan Binkert
into ziff.eecs.umich.edu:/z/binkertn/research/m5/latest --HG-- extra : convert_revision : bff2fb78e205f327ce8d04f3ae1b2352857ab824
2004-01-11Fix cprintf bug, plus minor cleanup & better error messages.Steve Reinhardt
base/cprintf.cc: Fix bug where a call with a format string with no specifiers but one or more arguments would crash. Old code tried to print extra args using last available format, but in this case there was no format, hence the problem. Now we just print "<extra arg>" for each extra arg. Also reorganized code a bit to make scope of fmt variable match the scope in which you can be confident it's meaningful. base/cprintf.hh: Print specific error message instead of calling format_invalid(). base/cprintf_formats.hh: Clear Format object in constructor. Use specific error messages instead of format_invalid() function. --HG-- extra : convert_revision : 87d5e902174e3eb2583131d056742af166540db0
2004-01-08Fixed another small libelf problem, everything should work now, on anyAli Saidi
machine. base/loader/elf_object.hh: put #defines for libelf that normally arn't defined so that -Wundef doesn't cause problems. --HG-- extra : convert_revision : fa2de6aa94c7ddbaa59990db4473402b0df7d93a
2004-01-08Merge zizzer.eecs.umich.edu:/bk/m5Nathan Binkert
into ziff.eecs.umich.edu:/z/binkertn/research/m5/latest --HG-- extra : convert_revision : b7411b25ae9e3a546996aec59e1a67cbe728da85
2004-01-07Changed elf_object.* to use libelf for reading elf files. The makefileAli Saidi
and setup filed had to be modified to build libelf. The ext repository MUST exist in the directory below m5! base/loader/elf_object.cc: base/loader/elf_object.hh: now uses libelf to read elf binaries --HG-- extra : convert_revision : b70511f5379edf35d639f3bb64b786cb0bd180af
2003-12-28Improve python output supportNathan Binkert
fix some bugs base/statistics.cc: - Move the python dump stream stuff into the statistics package because it needs more control over the file when there are multiple dumps - add a subname to the output - make all of the stats a list instead of variable arguments to get around the 255 argument limit - the description needs to be triple quoted - avoid errors for formulas that don't have any root element set up. base/statistics.hh: - get rid of mode_python and just separate python dumping from regular stats dumping - fix a huge bug that made a Formula use a VectorData instead of a FormulaData --HG-- extra : convert_revision : 7303cff3ccdcc3d306ab17375219fc7fecac7e5e
2003-12-24Add python output support to the statistics package!Nathan Binkert
base/statistics.cc: base/statistics.hh: - add python output support to the statistics package - each statistic type has a python() member function that takes a Python object to which the stat will output it's python representation - add getStatData hack so that the StatData pointer can be looked up by the proxies with their opaque pointer to the stat they're proxying for. This is necessary because the proxy really proxies for the bin and not the stat. Be nice to figure out how to get rid of it. The hack is used so that the str() function of a proxy can properly name itself. - To print formula stats, every stat has a str() function that converts that stat to a string that python can execute to get a value. test/Makefile: add python stuff test/stattest.cc: add more tests and test python support --HG-- extra : convert_revision : 513814ab0a125606897f2c57dccdf22879032ef9
2003-12-24initial basic hooks into the stats package to output python codeNathan Binkert
python dumping takes a name for the output data base/statistics.cc: base/statistics.hh: initial basic hooks into the stats package to output python code --HG-- extra : convert_revision : 37f52dc03df50aa90346dc9ca341f961e7e855e8
2003-12-24Random cleanupNathan Binkert
base/statistics.hh: - use a typedef to get at bin_t - clean up template declaration - public access to typedefs --HG-- extra : convert_revision : 0650c5a1cba51c7af04790498af0d354884be0ee
2003-12-24formatting for consistencyNathan Binkert
--HG-- extra : convert_revision : f859244880dcc2be9424edaac0c73adfd467221e
2003-12-24more readable formattingNathan Binkert
--HG-- extra : convert_revision : 99bd142099482dbd04645a0f44ac63d2467b883c
2003-12-24Random cleanup to make things work a bit betterNathan Binkert
base/statistics.cc: - give an internal name to statistics that aren't printable - speed up reset a tad - Make sure that the original value of the current bin is restored properly - check for the case where there are no subnames so we don't have an error - check to make sure that the formula's root is set before accessing it base/statistics.hh: - clean up includes a bit - deal with the case where there are no subnames - get rid of remnants of FS_MEASURE stuff --HG-- extra : convert_revision : 1e4338fc2b225647df47641b04c13b7046b2e114
2003-12-24never print the cdf or pdf or the overflow bucket if we're simplescalrNathan Binkert
--HG-- extra : convert_revision : 921ad80a5c671fee9eab3f389636dccc101d18f6
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