Commit graph

243 commits

Author SHA1 Message Date
Nathan Binkert 41988a86b5 Make the DDUMP tracing feature output the cycle number and
the object name on every line.
This makes grep a bit more effective.

kern/tru64/dump_mbuf.cc:
    use the new data dump format that trace.hh now provides

--HG--
extra : convert_revision : 179efa96aaff9da710baae13c9e981975d2abdc1
2004-07-30 10:18:04 -04:00
Nathan Binkert ac61adef91 Move the query function to the cc file and make trace stuff work
base/mysql.cc:
    Move the query function to the cc file
    make the trace stuff work
base/mysql.hh:
    Move the query function to the cc file

--HG--
extra : convert_revision : c47cb12afa47d3fe4a7a031b3563601adab62913
2004-07-26 13:03:27 -04:00
Nathan Binkert 095851dbb2 add a trace mechanism to trace sql stuff
base/mysql.hh:
    Trace sql queries
base/traceflags.py:
    Add a trace flag to trace sql queries

--HG--
extra : convert_revision : dc25abb474db7334529b791a7aa90f8178ea59ea
2004-07-23 15:52:28 -04:00
Nathan Binkert 1987dd82d1 Stats database fixes to avoid naming conflicts in the database
and to do proper dumping of non-binned stats.

base/stats/mysql.cc:
    have configure return whether or not the stat is a printable
    stat.  This avoids naming problems in the database.
    don't store non printable stats.
    dump non-binned stats into the special bin 0
base/stats/mysql.hh:
    have configure return whether or not the stat is a printable
    stat.  This avoids naming problems in the database.

--HG--
extra : convert_revision : e33b115d605226a838eee2e6489e03b8d77ffc02
2004-07-22 23:59:12 -04:00
Nathan Binkert 552b954180 more initial checking of stats
base/statistics.cc:
    add more checking to the stats stuff to make sure that
    things are set up correctly
base/stats/statdb.cc:
    Check that bins are only registered once.

--HG--
extra : convert_revision : b0eafe4f584a8587dc3bf48812c632531ca28cb6
2004-07-22 21:31:35 -04:00
Lisa Hsu 9dc9523a1c the changeset of partitioned caches. this changeset creates Split tagstore class that makes either an LRU/LRU cache or a LRU/LIFO cache, it is also able to make just a LIFO cache.
SConscript:
    add these files for partitioned caches
base/traceflags.py:
    add Split as a traceflag

--HG--
extra : convert_revision : 6aa8f7c389ee1145b33be006c820236f11f5397c
2004-07-10 21:57:59 -04:00
Nathan Binkert 6999918dd4 Clean up some mysql stuff to make things work again and
hopefully improve performance a tad.

base/stats/mysql.cc:
    - it's not called sample anymore, it's called tick
    - don't bother to cleanup deleted runs.  Doing this for each run
    is not necessary, it can be done all at once
    - don't query for a bin id every time, just do it once.
    - use locking in a few places to prevent two processes from
    stepping on eachother.
    - don't duplicate subdata ids.  use -1,y and x,-1
base/stats/mysql.hh:
    It's not called sample anymore, it's called tick

--HG--
extra : convert_revision : 95de8498b627c9175da28a66604ec7c719f7804c
2004-07-08 17:48:13 -04:00
Nathan Binkert a8a7ffce6b Tick is signed, so make Event start be large and positive,
not negative

--HG--
extra : convert_revision : 96be42a30fc0bd59eaff1d19161d881cab3895ae
2004-07-08 16:02:37 -04:00
Nathan Binkert 2fecc3c785 Make binning work with stuff other than FS_MEASURE
--HG--
extra : convert_revision : e3fa3cfbdf2f13dd3a8d2266dd64c2c335f998d6
2004-07-06 19:22:39 -04:00
Steve Reinhardt b13e28afbb Initial SCons-based build system. See www.scons.org.
'cd build; scons' will build ALPHA/m5.debug.
Use e.g. 'scons KERNEL/m5.opt' to build other binaries.
Read the comments in build/SConstruct for more details.

base/traceflags.py:
    Take basename of generated cc/hh files from command line instead
    of hardwiring them.  Lets us call the script from a different
    directory and still have the files end up in the right place
    (e.g. "base/traceflags.py base/traceflags").

--HG--
extra : convert_revision : ee4dbb59040cf07590929275f6c1c01e8d4e00b4
2004-07-02 21:16:38 -07:00
Nathan Binkert 16f53a7899 fix the -I flag stuff for CPP so it actually works right.
What was I smoking?

--HG--
extra : convert_revision : 24488707a35febe006ec50a1fa7c9fad4842eadc
2004-06-30 14:53:26 -04:00
Nathan Binkert 838273a196 fix up the recordEvent stuff to support ignoring events
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
2004-06-28 16:49:35 -04:00
Nathan Binkert efd119881a add support to add a string to indicate a particular sample of a run
name to make statistical sampling easier.

--HG--
extra : convert_revision : b24db4ef747b8ef00a0131db237e97de60c27dc3
2004-06-28 15:53:06 -04:00
Ali Saidi c75eadc2b2 allow the use of old console code and update elf_object not to rely on EM_ALPHA value.
base/loader/elf_object.cc:
    EM_ALPHA value isn't official, so perhaps we shouldn't use it
dev/alpha_console.cc:
dev/alpha_console.hh:
    this change allows the use of old console code

--HG--
extra : convert_revision : cfacd64ae7fd2595158ca1a83ebcdb66ee7e119b
2004-06-27 14:33:55 -04:00
Ali Saidi 54b49f933a rewrote uart and renamed console.cc to simconsole to reduce confusion
base/traceflags.py:
    removed TsunamiUart/TlaserUart and added a plain Uart
dev/alpha_console.cc:
    updated for new simconsole
dev/platform.hh:
    added a uart member to platform
dev/simconsole.cc:
dev/simconsole.hh:
    removed lots of legacy code, it should all be ours now.
    converted tabs to 8 spaces
    added our copyright
dev/tsunami.cc:
    uses simconsole.hh rather than console.hh
dev/tsunami_cchip.cc:
dev/tsunami_io.cc:
    never needed console.hh
dev/tsunami_io.hh:
    this does need eventq.hh and it just happend to be working whenn console.hh was
    included everywhere
dev/tsunamireg.h:
    added a couple more 8250/16550 uart defines
dev/uart.cc:
    new uart code, rewritten to support both tlaser and tsunami (both a 8250 and 8530
    uart).
dev/uart.hh:
    updated for new uart, legacy code removed

--HG--
rename : dev/console.cc => dev/simconsole.cc
rename : dev/console.hh => dev/simconsole.hh
rename : dev/tsunami_uart.cc => dev/uart.cc
rename : dev/tsunami_uart.hh => dev/uart.hh
extra : convert_revision : e663352d49d4c2d3c95643030cf73c0e85ba2f08
2004-06-26 21:26:28 -04:00
Ali Saidi 4799a7b874 minor changes to endian code so that it runs on x86 linux
base/intmath.hh:
    only need FloorLog2(size_t) on a mac, so ifdefed for this
dev/alpha_console.cc:
    Actually allocate the alphaAccess struct.

--HG--
extra : convert_revision : 1f50b1a025c8ee728a9f3d2c603ea38347234f54
2004-06-23 18:39:11 -04:00
Ali Saidi 17bfb1540e Merge zizzer:/bk/linux into zeep.eecs.umich.edu:/z/saidi/work/m5-endian
--HG--
extra : convert_revision : d4938c6011173d3017f47fd592c4b5e4c8d543a3
2004-06-23 17:55:54 -04:00
Ali Saidi 556b2a9098 Merge zizzer:/bk/linux into zeep.eecs.umich.edu:/z/saidi/work/m5-linux
--HG--
extra : convert_revision : 448f6e7851c14dd2c9f6148122da873a19c20772
2004-06-22 17:20:34 -04:00
Ali Saidi 4deb819894 pull from head before pushing linux tree
--HG--
extra : convert_revision : 345f91c5c16c69db22035dc716e82fd77041380f
2004-06-22 13:48:49 -04:00
Steve Reinhardt c1e58b6bf6 Handle SIGABRT a little more nicely.
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
2004-06-21 22:42:16 -07:00
Lisa Hsu e05dbb5116 l
base/traceflags.py:
    added some more traceflags for ethernet to break it up better
dev/etherpkt.hh:
    since we are not network host order, must reverse bytes for these typechecks.

    also, overload isTcp/UdpPkt to take an argument so you don't have to reget the ip header if you've already got one.
dev/ns_gige.cc:
    1) add some functions that reverse Endianness so we can generate adn evaluate checksum adn dprintf data accurately/more understandably

    2) forget about the implementation of fifo fill/drain thresholds, it's not used by the driver much, nor does it matter with use sending/receiving in whole packets anyway.
    get rid of teh associated variables.

    3) get rid of txFifoCnt the variable, it's redundant and unnecessary, just use txFifoAvail.

    4) change io_enable to ioEnable, just to be picky.

    5) modify some DPRINTF's to be clearer, also added a lot, and spread them into better traceflag categories

    6) fix the device bug!  it's the intrTick = 0 at teh beginning of cpuInterrupt().

    7) clear some bools in regsReset() so they don't holdover wrong state

    8) fix pseudo header generation for Tcp checksumming to account for network order
dev/ns_gige.hh:
    change io_enable to ioEnable, get rid of fill/drain thresh related variables and txFifoCnt, which is redundant

--HG--
extra : convert_revision : c538b75731f3c9e04354f57e6df9a40aeca5096d
2004-06-21 17:25:18 -04:00
Ali Saidi 3f7b780af5 Merge saidi@zizzer.eecs.umich.edu:/bk/linux
into ali-saidis-computer.local:/research/linux

--HG--
extra : convert_revision : 446dc5fad11a6b29954dc5b1e974430853aa2969
2004-06-21 01:04:48 -04:00
Ali Saidi c27139c701 start towards getting m5 endian compliant
base/inifile.cc:
    Added mac os support and fixed a bug, on error we need to exit the
    child process not return
base/intmath.hh:
    gcc on macos wanted a seperate function for the size_t type
base/loader/elf_object.cc:
    I'm not sure why this works under linux because it seems to return
    the wrong value.
base/stats/text.cc:
    added define/include for mac os x
cpu/exec_context.hh:
cpu/simple_cpu/simple_cpu.cc:
    added endian conversion code
dev/alpha_console.cc:
    rather than accessing a charecter array of varying size depending on
    the access, lets actually do this properly.
dev/alpha_console.hh:
    get rid of now nolonger used consoleData
dev/disk_image.cc:
    We have to byte swap the data is some cases, added function to do that
dev/ethertap.cc:
    added preproc directive for mac os

--HG--
extra : convert_revision : 2b5685765cfa2844926d7397f363d2788e3d640a
2004-06-21 00:58:30 -04:00
Steve Reinhardt d53c6c168a Get software prefetching to work in full-system mode.
Mostly a matter of keeping prefetches to invalid addrs
from messing up VM IPRs.  Also discovered that wh64s were
not being treated as prefetches, when they really should be
(for the most part, anyway).

arch/alpha/alpha_memory.cc:
arch/alpha/alpha_memory.hh:
    - Get rid of intrlock flag for locking VM fault regs (a la EV5);
    instead, just don't update regs on VPTE loads (a la EV6).
    - Add NO_FAULT MemReq flag to indicate references that should not
    cause page faults (i.e., prefetches).
arch/alpha/ev5.cc:
    - Get rid of intrlock flag for locking VM fault regs (a la EV5);
    instead, just don't update regs on VPTE loads (a la EV6).
    - Add Fault trace flag.
arch/alpha/isa_desc:
    - Add NO_FAULT MemReq flag to indicate references that should not
    cause page faults (i.e., prefetches).
    - Mark wh64 as a "data prefetch" instruction so it gets controlled
    properly by the FullCPU data prefetch control switch.
    - Align wh64 EA in decoder so issue stage doesn't need to worry about it.
arch/alpha/isa_traits.hh:
    - Get rid of intrlock flag for locking VM fault regs (a la EV5);
    instead, just don't update regs on VPTE loads (a la EV6).
base/traceflags.py:
    - Add Fault trace flag.
cpu/simple_cpu/simple_cpu.hh:
    - Pass MemReq flags to writeHint() operation.
cpu/static_inst.hh:
    Update comment re: prefetches.

--HG--
extra : convert_revision : 62e466b0f4c0ff9961796270fa2e371ec24bcbb6
2004-06-15 10:48:08 -07:00
Ali Saidi 02f69b94c5 Fixes for detailed boot, made cttz and ctlz instructions more compact,
and started cleaning up config files.

arch/alpha/isa_desc:
    Made implementation of cttz and ctlz more compact
base/remote_gdb.cc:
    Added comment about PALcode debugger accesses
dev/baddev.cc:
dev/baddev.hh:
dev/ide_ctrl.cc:
dev/ide_ctrl.hh:
dev/pciconfigall.cc:
dev/pciconfigall.hh:
dev/tsunami_cchip.cc:
dev/tsunami_cchip.hh:
dev/tsunami_io.cc:
dev/tsunami_io.hh:
dev/tsunami_pchip.cc:
dev/tsunami_pchip.hh:
dev/tsunami_uart.cc:
dev/tsunami_uart.hh:
    Cleaned up includes and changed device from FunctionalMemory to
    PioDevice for detailed boot
dev/ns_gige.cc:
    The ethernet dev uses two BARs, and the first bars size was being set
    incorrectly.
dev/tsunamireg.h:
    I don't know why we were using the superpage as the PCI memory addr.
    Changed and works correctly with detailed boot.

--HG--
extra : convert_revision : b535e76612cb90b544305dc1aa8c5e0e774564bd
2004-06-10 13:30:58 -04:00
Ali Saidi 2f316082e4 Updated Copyright with information in bitkeeper changelogs
arch/alpha/alpha_linux_process.cc:
arch/alpha/alpha_linux_process.hh:
arch/alpha/alpha_memory.cc:
arch/alpha/alpha_memory.hh:
arch/alpha/alpha_tru64_process.cc:
arch/alpha/alpha_tru64_process.hh:
arch/alpha/aout_machdep.h:
arch/alpha/arguments.cc:
arch/alpha/arguments.hh:
arch/alpha/faults.cc:
arch/alpha/faults.hh:
arch/alpha/isa_traits.hh:
arch/alpha/osfpal.cc:
arch/alpha/osfpal.hh:
arch/alpha/pseudo_inst.cc:
arch/alpha/pseudo_inst.hh:
arch/alpha/vptr.hh:
arch/alpha/vtophys.cc:
arch/alpha/vtophys.hh:
base/bitfield.hh:
base/callback.hh:
base/circlebuf.cc:
base/circlebuf.hh:
base/compression/lzss_compression.cc:
base/compression/lzss_compression.hh:
base/compression/null_compression.hh:
base/cprintf.cc:
base/cprintf.hh:
base/cprintf_formats.hh:
base/date.cc:
base/dbl_list.hh:
base/endian.hh:
base/fast_alloc.cc:
base/fast_alloc.hh:
base/fifo_buffer.cc:
base/fifo_buffer.hh:
base/hashmap.hh:
base/hostinfo.cc:
base/hostinfo.hh:
base/hybrid_pred.cc:
base/hybrid_pred.hh:
base/inet.cc:
base/inet.hh:
base/inifile.cc:
base/inifile.hh:
base/intmath.cc:
base/intmath.hh:
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:
base/loader/symtab.cc:
base/loader/symtab.hh:
base/misc.cc:
base/misc.hh:
base/mod_num.hh:
base/mysql.cc:
base/mysql.hh:
base/pollevent.cc:
base/pollevent.hh:
base/predictor.hh:
base/random.cc:
base/random.hh:
base/range.cc:
base/range.hh:
base/refcnt.hh:
base/remote_gdb.cc:
base/remote_gdb.hh:
base/res_list.hh:
base/sat_counter.cc:
base/sat_counter.hh:
base/sched_list.hh:
base/socket.cc:
base/socket.hh:
base/statistics.cc:
base/statistics.hh:
base/stats/events.cc:
base/stats/events.hh:
base/stats/flags.hh:
base/stats/mysql.cc:
base/stats/mysql.hh:
base/stats/mysql_run.hh:
base/stats/output.hh:
base/stats/statdb.cc:
base/stats/statdb.hh:
base/stats/text.cc:
base/stats/text.hh:
base/stats/types.hh:
base/stats/visit.cc:
base/stats/visit.hh:
base/str.cc:
base/str.hh:
base/time.cc:
base/time.hh:
base/trace.cc:
base/trace.hh:
base/userinfo.cc:
base/userinfo.hh:
cpu/base_cpu.cc:
cpu/base_cpu.hh:
cpu/exec_context.cc:
cpu/exec_context.hh:
cpu/exetrace.cc:
cpu/exetrace.hh:
cpu/full_cpu/op_class.hh:
cpu/full_cpu/smt.hh:
cpu/inst_seq.hh:
cpu/intr_control.cc:
cpu/intr_control.hh:
cpu/memtest/memtest.cc:
cpu/memtest/memtest.hh:
cpu/pc_event.cc:
cpu/pc_event.hh:
cpu/simple_cpu/simple_cpu.cc:
cpu/simple_cpu/simple_cpu.hh:
cpu/static_inst.cc:
cpu/static_inst.hh:
dev/alpha_console.cc:
dev/alpha_console.hh:
dev/baddev.cc:
dev/baddev.hh:
dev/disk_image.cc:
dev/disk_image.hh:
dev/etherbus.cc:
dev/etherbus.hh:
dev/etherdump.cc:
dev/etherdump.hh:
dev/etherint.cc:
dev/etherint.hh:
dev/etherlink.cc:
dev/etherlink.hh:
dev/etherpkt.cc:
dev/etherpkt.hh:
dev/ethertap.cc:
dev/ethertap.hh:
dev/ide_ctrl.cc:
dev/ide_ctrl.hh:
dev/ide_disk.cc:
dev/ide_disk.hh:
dev/io_device.cc:
dev/io_device.hh:
dev/ns_gige.cc:
dev/ns_gige.hh:
dev/ns_gige_reg.h:
dev/pciconfigall.cc:
dev/pciconfigall.hh:
dev/pcidev.cc:
dev/pcidev.hh:
dev/pcireg.h:
dev/platform.cc:
dev/platform.hh:
dev/simple_disk.cc:
dev/simple_disk.hh:
dev/tsunami.cc:
dev/tsunami.hh:
dev/tsunami_cchip.cc:
dev/tsunami_cchip.hh:
dev/tsunami_io.cc:
dev/tsunami_io.hh:
dev/tsunami_pchip.cc:
dev/tsunami_pchip.hh:
dev/tsunami_uart.hh:
dev/tsunamireg.h:
docs/stl.hh:
kern/linux/linux.hh:
kern/linux/linux_syscalls.cc:
kern/linux/linux_syscalls.hh:
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
kern/system_events.cc:
kern/system_events.hh:
kern/tru64/dump_mbuf.cc:
kern/tru64/dump_mbuf.hh:
kern/tru64/mbuf.hh:
kern/tru64/printf.cc:
kern/tru64/printf.hh:
kern/tru64/tru64.hh:
kern/tru64/tru64_events.cc:
kern/tru64/tru64_events.hh:
kern/tru64/tru64_syscalls.cc:
kern/tru64/tru64_syscalls.hh:
kern/tru64/tru64_system.cc:
kern/tru64/tru64_system.hh:
sim/async.hh:
sim/builder.cc:
sim/builder.hh:
sim/debug.cc:
sim/debug.hh:
sim/eventq.cc:
sim/eventq.hh:
sim/host.hh:
sim/main.cc:
sim/param.cc:
sim/param.hh:
sim/process.cc:
sim/process.hh:
sim/serialize.cc:
sim/serialize.hh:
sim/sim_events.cc:
sim/sim_events.hh:
sim/sim_exit.hh:
sim/sim_object.cc:
sim/sim_object.hh:
sim/stat_control.cc:
sim/stat_control.hh:
sim/stats.hh:
sim/syscall_emul.cc:
sim/syscall_emul.hh:
sim/system.cc:
sim/system.hh:
sim/universe.cc:
test/bitvectest.cc:
test/circletest.cc:
test/cprintftest.cc:
test/initest.cc:
test/lru_test.cc:
test/nmtest.cc:
test/offtest.cc:
test/paramtest.cc:
test/rangetest.cc:
test/sized_test.cc:
test/stattest.cc:
test/strnumtest.cc:
test/symtest.cc:
test/tokentest.cc:
test/tracetest.cc:
util/m5/m5.c:
util/m5/m5op.h:
util/tap/tap.cc:
    Updated Copyright
dev/console.cc:
dev/console.hh:
    This code isn't ours, and shouldn't have our copyright

--HG--
extra : convert_revision : 598f2e5eab5d5d3de2c1e862b389086e3212f7c4
2004-06-08 13:37:27 -04:00
Ali Saidi 93983de0cf Merged head into linux tree
base/stats/mysql.hh:
    Rename of Statsistics namespace to stats... merge from head

--HG--
extra : convert_revision : a5a7f6268b35e75fba1b1800a74fcd6dbd09d974
2004-05-31 18:58:54 -04:00
Ali Saidi fffae72b45 Fixed serial support in 2.6 (too much work for...)
Removed bootloader and just wrote command line into linux kernel

base/inifile.cc:
    the forked process should not return, it should exit.
dev/tsunami_uart.cc:
dev/tsunami_uart.hh:
    The serial port in reality has some delay and linux expects it. This
    schedules an interrupt 300 cycles after the transmit instead of
    immediately
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
    removed boot loader and stuck boot command line in the kernel manually

--HG--
extra : convert_revision : 68aa54f8ca4e8391789f7a4c1ae227e6f8b94e13
2004-05-26 18:48:11 -04:00
Nathan Binkert 3a0dfc43d1 make the interaction of the stats event stuff with the
database work better.

base/stats/events.cc:
    properly connect to the database
base/stats/mysql.cc:
    cleanup the event stuff too

--HG--
extra : convert_revision : f05fd6456decc9c4f95beff5c12497439e45f886
2004-05-23 12:53:34 -04:00
Nathan Binkert fee1e1ec0a Add support for event tracking. Esentially this puts a sequence
of events into the database for a given run.

base/stats/mysql.cc:
base/stats/mysql.hh:
    reorganize mysql stat stuff so that other stuff can use
    the same database connection
base/traceflags.py:
    Trace flag to print out events

--HG--
extra : convert_revision : 4d502532ed0ba40b42baefee46b2c99defcc620c
2004-05-21 13:57:44 -04:00
Nathan Binkert 62d756f253 rename namespace Statistics to Stats
--HG--
extra : convert_revision : 28f1703f8d7d8cf33fb952ae450f66bdba860fb7
2004-05-21 13:39:20 -04:00
Nathan Binkert b4405682d9 Change the namespace Statistics to Stats
--HG--
extra : convert_revision : 3084b292bbe2e8a392af8e99a31763ca0b0a9467
2004-05-21 13:03:17 -04:00
Lisa Hsu a0ccdf8aba merge m5 with linux for the event and binning lifting
--HG--
extra : convert_revision : 09d3678746c2e9a93a9982dc75d5e1ac309cb2fa
2004-05-18 01:40:03 -04:00
Lisa Hsu 73501ea38f push the new system_events file that i was prevented from pushing way back when cable died. :(. also, fix the printing of binned stats, it was printing hex values instead of bin names.
base/stats/text.cc:
    fix the printing of binned stats.

--HG--
extra : convert_revision : 3a04d004f5ea1d90536f7102fce946fd6dd34613
2004-05-17 13:22:19 -04:00
Nathan Binkert a4d7bb113a Make a new stat type of Value which is a scalar stat that
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
2004-05-12 15:49:01 -04:00
Lisa Hsu 16800971d0 successful merge, linux still builds and runs as far it used to, network device still transmit ARP packet.
arch/alpha/alpha_memory.cc:
    change to the main m5 tree convention for naming
base/traceflags.py:
    add ide and pciconfigall traceflags
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
    kill some old binning styled stuff

--HG--
extra : convert_revision : 0558878906817975a714b1c7c08f9ee405468535
2004-05-11 22:42:45 -04:00
Lisa Hsu a5f90eba3b first pass at merging m5 with linux
--HG--
extra : convert_revision : dfe23349b80ae3b34d3cb95c5734e01ef62f700e
2004-05-11 01:15:18 -04:00
Andrew Schultz 4a5dcc37bf Whole mess'o'changes.. see individual files
arch/alpha/vtophys.cc:
    Removed buggy code that tries to fix PAL addresses (may cause problems
    while trying to debug in PAL code, but that should do this fix outside
    of vtophys)
base/loader/symtab.cc:
base/loader/symtab.hh:
cpu/exetrace.cc:
    Changed InstExec traces to always print a symbol name
dev/ide_ctrl.cc:
dev/ide_disk.cc:
    Tabs
dev/ide_disk.hh:
    Change buffer size
dev/tsunami_pchip.cc:
    Fix translatePciToDma to support scatter gather mapping
kern/linux/linux_system.cc:
    Force simulator to wait until remote debugger attaches (should be removed
    or turned on/off with a flag)

--HG--
extra : convert_revision : 1d08aebe3f448c87a963dd613de3e2e0cff0d48d
2004-05-06 15:21:07 -04:00
Nathan Binkert 24715f50ac add support for sticking generated files in the build directory
instead of with the source code.  This will hopefully be especially
useful when we're generating dozens of files when we flesh out the
object description stuff.
remove generated files from the source tree.  python is required
to build now.

base/trace.hh:
    no need for the underscore in the name
base/traceflags.py:
    clean up code

--HG--
extra : convert_revision : f68af8c3460eb7e73a1defaea3081a02ad7db33c
2004-05-06 12:09:54 -04:00
Nathan Binkert 25a358983a Major stats package cleanup
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
2004-05-04 17:01:00 -04:00
Nathan Binkert 3a12b6d7ce Function for getting username
--HG--
extra : convert_revision : 50c0bf7b083e780071e85fabdcd6f91a96f4b2e3
2004-05-04 12:23:57 -04:00
Lisa Hsu bf8de77465 This is where I'm at for Linux Ethernet before I head to Mexico.
base/range.hh:
    andrew thought this might be a bug.
dev/etherpkt.cc:
    don't need std:: since there is a using directive
dev/ns_gige.cc:
    update to new PIO and PCI system
dev/ns_gige.hh:
    update to deal with new PIO and PCI setup
dev/ns_gige_reg.h:
    Add some new #defines that I ended up needing
dev/pcidev.cc:
    some changes to the debugging printfs of pci device

--HG--
extra : convert_revision : 955ba8e8e1c418cfe1c6549dc3451ea091541556
2004-04-21 18:23:41 -04:00
Steve Reinhardt aeb8e8ccb7 Minor cleanup from building & diffing behavior
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
2004-03-24 23:29:10 -08:00
Nathan Binkert 2ae06f42b3 Merge zizzer.eecs.umich.edu:/bk/m5
into ziff.eecs.umich.edu:/z/binkertn/research/m5/latest

--HG--
extra : convert_revision : b0af82ea6028d1f7f6756edf266945732c25ad52
2004-03-24 05:16:13 -05:00
Nathan Binkert 8b0f69166e Hacks to make the libelf stuff work in openbsd.
base/loader/elf_object.cc:
    The symbol versioning stuff screws up OpenBSD.  We don't need it anyway

--HG--
extra : convert_revision : 736d5c1baaf7f5727665f84cc08e3781e193b389
2004-03-24 05:13:49 -05:00
Erik Hallnor 6cb02394c0 Merge ehallnor@zizzer:/bk/m5 into zazzer.eecs.umich.edu:/z/ehallnor/m5
--HG--
extra : convert_revision : d950120ed0f96421bb953a96db94fb4aecf2241d
2004-03-24 04:41:27 -05:00
Erik Hallnor 81882c0d10 A few memory system performance enhancements.
base/compression/lzss_compression.cc:
base/compression/lzss_compression.hh:
    Rework for better performance

--HG--
extra : convert_revision : b13d706e0e23cbe7122b611258354c66cf5f3c70
2004-03-24 04:41:19 -05:00
Nathan Binkert 2484aeaee7 Minor changes to Time
base/time.cc:
base/time.hh:
    Don't set the current time in the constructor.  Use a flag and
    make the default to not set the time.
    Change reset() to set().  Dunno.  Just seems right.

--HG--
extra : convert_revision : 5a3b09ed30376d4863b45b2bae551ba1c3aff8e1
2004-03-24 04:35:48 -05:00
Lisa Hsu 3bc8cffc75 merge with m5 head
--HG--
extra : convert_revision : c90339248d1ee74df1c6b90a77ec9ea41f646311
2004-03-11 18:52:29 -05:00
Lisa Hsu f3861d0cc7 Overall gist of this is to 'dynamicize' the tracking of functions so you can choose them at the .ini stage rather than at compile time.
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
2004-03-04 21:57:09 -05:00
Nathan Binkert 0a3948bcfd Merge zizzer.eecs.umich.edu:/m5/Bitkeeper/m5
into zizzer.eecs.umich.edu:/.automount/ziff/z/binkertn/research/m5/latest

--HG--
extra : convert_revision : b3fd8bcfbaf1e9d09bac8c1403944df36dde671e
2004-02-29 20:25:52 -05:00
Nathan Binkert ee96799519 Initial cleanup pass of lisa's function call tracking
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
2004-02-29 20:22:32 -05:00
Nathan Binkert 45f377bcd8 more debugging support
base/trace.cc:
    code to set/clear/print trace flags from the debugger.

--HG--
extra : convert_revision : f2a549e9af05c4a177186b9f1792a0493ce15c95
2004-02-29 19:29:30 -05:00
Nathan Binkert b678152277 Fix stats debugging and always compile it in for the
debug target

--HG--
extra : convert_revision : aa16e6256a056e6df9affec6fd973e62e812e23c
2004-02-25 16:12:48 -05:00
Andrew Schultz c82113d022 Load local kernel symbols, and set aic7xxx_no_reset to prevent an initial
(very painful) bus reset from occuring

base/loader/elf_object.cc:
    Fixed to allow proper loading of local symbols

--HG--
extra : convert_revision : 5c9a1f4d7b5748a1c8cabdfd67763c21f988f8fd
2004-02-21 20:31:08 -05:00
Nathan Binkert a51cec6669 Make it so dump takes a void *
base/trace.cc:
base/trace.hh:
    take a void * for the raw data

--HG--
extra : convert_revision : fc336dc82b4d533c3a0f319977074f26342445ea
2004-02-20 15:19:55 -05:00
Andrew Schultz d4637757f8 Remote an old hack that is now unnecessary
base/cprintf_formats.hh:
    Add additional format modifiers

--HG--
extra : convert_revision : f9ec0a664eeb96db7dacacd6b7636e3cb47555e7
2004-02-19 16:32:13 -05:00
Andrew Schultz 092ec1978d Fix to remote debugger while in PAL
arch/alpha/vtophys.cc:
base/remote_gdb.cc:
    Fix to remote debugger while in PAL code
dev/pcidev.cc:
    Remove extra debug printf

--HG--
extra : convert_revision : e64988846ad05cd3ddf47034d72d99dae3501591
2004-02-13 18:15:04 -05:00
Andrew Schultz eac2d6a668 Merge linux tree with head
arch/alpha/alpha_memory.cc:
dev/alpha_console.cc:
dev/alpha_console.hh:
    Merge

--HG--
extra : convert_revision : 3233648f204338ab3f102ff117754dce955dcc37
2004-02-09 17:50:47 -05:00
Nathan Binkert da8a702212 - Whack unused code
-  Make the MemoryController use address ranges (via Range) instead
of an address and a mask

base/remote_gdb.cc:
    reflect name change
dev/alpha_access.h:
    better include
dev/alpha_console.cc:
    -  FunctionalMemory no longer takes care of mapping my address into
    the proper address space.  It must be done locally.
    -  the memory controller no longer uses a mask, but a size, and the
    size is determined by the device, not the .ini file
    -  fix up address calculations to reflect the removal of a mask
    -  PhysicalMemory::getSize() -> PhysicalMemory::size()
dev/alpha_console.hh:
    -  FunctionalMemory no longer takes care of mapping my address into
    the proper address space.  It must be done locally.
    -  the memory controller no longer uses a mask, but a size, and the
    size is determined by the device, not the .ini file
    -  fix up address calculations to reflect the removal of a mask
    -  get rid of MmapDevice and inherit from FunctionalMemory

--HG--
extra : convert_revision : e3a65c9debf6f899632d62c70781cbdc2826616b
2004-02-09 10:49:48 -05:00
Nathan Binkert 087334bfe5 Merge zizzer.eecs.umich.edu:/m5/Bitkeeper/m5
into zizzer.eecs.umich.edu:/.automount/ziff/z/binkertn/research/m5/memory

--HG--
extra : convert_revision : 9f385ee5b6958373a9a1bc600eb3e5e8b7987f38
2004-02-09 10:36:32 -05:00
Nathan Binkert 6ece3a7e59 random fixes
base/range.hh:
    Add a constructor that takes the beginning and end as arguments
    size returns T not a bool
    quick make_range() function that is a shortcut for making a range
    kinda like make_pair()

    quick formatting fix

--HG--
extra : convert_revision : 94b1d462710e6fb55e72e1da2ad8c46993af1ef7
2004-02-09 09:04:52 -05:00
Erik Hallnor 88c5bd695f Merge ehallnor@zizzer:/bk/m5 into zazzer.eecs.umich.edu:/z/ehallnor/m5
--HG--
extra : convert_revision : b24970f5bbf817d6ef581114178e27f2ab7c3459
2004-02-08 17:27:08 -05:00
Erik Hallnor 9c7bec74b1 Separate template definitions and instantiations into *_impl.hh and *.cc. Eventually the *.cc fils should be generate by our super-duper python script.
base/compression/null_compression.hh:
    Need some includes.

--HG--
extra : convert_revision : caf52320f6f6ff255e8a93817419ad13ad44224f
2004-02-08 17:26:27 -05:00
Nathan Binkert de285ff2a0 Totally rework the Range class. Now the range is from [start, end)
to be consistent with the way that the stl works.  It also makes
lots of other stuff easier.  (Maybe those guys were smart?)
Overload the various comparison operators so that you can test
for overlapping of ranges, etc.

base/range.hh:
    Totally rework the Range class.  Now the range is from [start, end)
    to be consistent with the way that the stl works.  It also makes
    lots of other stuff easier.  (Maybe those guys were smart?)
    Overload the various comparison operators so that you can test
    for overlapping of ranges, etc.

    make parse function private and offer operator= instead
    isValid -> valid
    and for you erik, I add comments
test/Makefile:
    add range.o
test/rangetest.cc:
    better tests

--HG--
extra : convert_revision : dd58720aa3d02f20b03e933f2eaa3320c82bb27a
2004-02-07 01:16:50 -05:00
Nathan Binkert 4bbe8c1058 Merge zizzer.eecs.umich.edu:/bk/m5
into ziff.eecs.umich.edu:/z/binkertn/research/m5/kernel

--HG--
extra : convert_revision : 9ee9b8550b5761fa400df83caf268bd1c8ddc7ed
2004-02-05 02:53:03 -05:00
Steve Reinhardt 98948b2e57 More reformatting of reference parameter declarations.
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
2004-02-04 11:16:30 -08:00
Nathan Binkert 85bc028185 merge
--HG--
extra : convert_revision : 47425264e672f727cbb13aa7b9bb2a67790b25e8
2004-02-03 11:24:03 -05:00
Nathan Binkert b1221a3395 Remote debugging cleanup and internal debugging support
base/kgdb.h:
    Remove flags that aren't used
base/remote_gdb.cc:
    Better debugging:
    - Give each class a name() function so that the trace infrastructure
    knows the correct object name.
    - Make the remote debugger capable of detach.
    - Split out the RGDB trace flag into a bunch of specific flags.
    Remove dead code
    Add a new trap type
base/remote_gdb.hh:
    Add a name() to the various objects for the trace system
base/trace.hh:
    don't need a using directive
    add DPRINTFNR: debug printf, no flag, raw output
kern/tru64/tru64_system.cc:
    use the INT trap type instead of IF

--HG--
extra : convert_revision : 25e610216c6f43d5d328651bba915f71bade059e
2004-02-03 10:50:04 -05:00
Steve Reinhardt 548b4a1cb0 Change "Foo& foo" declarations to "Foo &foo".
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
2004-02-02 15:55:35 -08:00
Steve Reinhardt 956aff1291 More conversions of ref-counted parameters to references:
Statistics::NodePtr, StaticInstPtr, ethernet PacketPtr.

base/statistics.hh:
    Change NodePtr parameters to Nodeptr &.
cpu/exetrace.hh:
    Change StaticInstPtr parameters to StaticInstPtr &.
dev/etherbus.cc:
dev/etherbus.hh:
dev/etherdump.cc:
dev/etherdump.hh:
dev/etherint.hh:
dev/etherlink.cc:
dev/etherlink.hh:
dev/ethertap.cc:
dev/ethertap.hh:
    change PacketPtr parameters to PacketPtr &.

--HG--
extra : convert_revision : a778efdca33b0ec5beb76cf47db0e9e4728897ee
2004-02-02 15:45:22 -08:00
Nathan Binkert 4ae64216c3 Merge
--HG--
extra : convert_revision : 8690e31b64235874d74ea4a1123a408610fb115b
2004-01-30 16:01:26 -05:00
Nathan Binkert cb35f819c5 delete the data in the arglist when the list is destroyed,
not while printing out the data.  This allows the data
to be dumped more than once.

base/cprintf.hh:
    need a destructor

--HG--
extra : convert_revision : 235e9fe24488ac4c0ae1b562ef9fa6e0bd1e899c
2004-01-29 17:44:08 -05:00
Nathan Binkert 2db1b6ea1b 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.
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
2004-01-29 00:38:18 -05:00
Nathan Binkert dc70ce3a60 cleanup on aisle 5
base/statistics.cc:
    dead code

--HG--
extra : convert_revision : 8f3fd638acdf7a704475ea90b607a3225a3c174d
2004-01-29 00:36:22 -05:00
Nathan Binkert 801c46d250 a bunch of warning fixes
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
2004-01-27 17:56:23 -05:00
Steve Reinhardt 946b481831 Set LIBELF_LINUX to 0 to build on zax. Builds
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-20 13:53:18 -05:00
Nathan Binkert c9f2aa8c18 Make each stat take up one full line. This allows us to use grep
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-15 16:33:58 -05:00
Ali Saidi f013df643a mereged changes to elf_object.cc
base/loader/elf_object.cc:
    merged changes to elf_object.cc

--HG--
extra : convert_revision : 2b7a6083d45f0221646e2ebe5b91ee45ec8c6b7c
2004-01-15 13:22:55 -05:00
Steve Reinhardt 9f2aae4e28 Fixes and cleanup to elf loader code.
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-14 22:30:16 -08:00
Ali Saidi 54782bfb30 Elf loader now conforms to coding style and config files for linux
use /m5/system/linux for their binaries

base/loader/elf_object.cc:
    Elf loader now conforms to coding style

--HG--
extra : convert_revision : 558e587e969535f31987f2810ee17ec72006de0a
2004-01-14 16:12:00 -05:00
Ali Saidi c9d88aa089 Minor fixes to loader and an additional header file in alpha_access.h
when we are compiling the console.

base/loader/elf_object.cc:
    added code to verify that the .bss section is 0;
    added code to only load function and label types
dev/alpha_access.h:
    include inittypes if we are compiling the console code

--HG--
extra : convert_revision : b88fb36500b1c1003d44ed95cefdd2a30b7466b8
2004-01-14 04:18:20 -05:00
Nathan Binkert b4301c652c Merge zizzer.eecs.umich.edu:/bk/m5
into ziff.eecs.umich.edu:/z/binkertn/research/m5/latest

--HG--
extra : convert_revision : bff2fb78e205f327ce8d04f3ae1b2352857ab824
2004-01-11 21:22:33 -05:00
Steve Reinhardt 7e07aa9300 Fix cprintf bug, plus minor cleanup & better error messages.
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-11 15:09:27 -08:00
Ali Saidi 98613950a3 Fixed another small libelf problem, everything should work now, on any
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-08 16:35:47 -05:00
Nathan Binkert a3691fe09e Merge zizzer.eecs.umich.edu:/bk/m5
into ziff.eecs.umich.edu:/z/binkertn/research/m5/latest

--HG--
extra : convert_revision : b7411b25ae9e3a546996aec59e1a67cbe728da85
2004-01-08 12:25:49 -05:00
Ali Saidi 14b4119aaf Changed elf_object.* to use libelf for reading elf files. The makefile
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
2004-01-07 19:46:45 -05:00
Nathan Binkert 9dcfdce732 Improve python output support
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-28 12:48:13 -05:00
Nathan Binkert 55d94ba2e8 Add python output support to the statistics package!
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-24 03:25:36 -05:00
Nathan Binkert 3f5ca9e5e8 initial basic hooks into the stats package to output python code
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-24 02:35:33 -05:00
Nathan Binkert 4bdf46c819 Random cleanup
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-24 02:25:26 -05:00
Nathan Binkert 2b2c8388a2 formatting for consistency
--HG--
extra : convert_revision : f859244880dcc2be9424edaac0c73adfd467221e
2003-12-24 02:22:43 -05:00
Nathan Binkert 263886bc83 more readable formatting
--HG--
extra : convert_revision : 99bd142099482dbd04645a0f44ac63d2467b883c
2003-12-24 02:17:20 -05:00
Nathan Binkert fad8b13add Random cleanup to make things work a bit better
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-24 01:45:56 -05:00
Nathan Binkert 9908987f15 never print the cdf or pdf or the overflow bucket if we're simplescalr
--HG--
extra : convert_revision : 921ad80a5c671fee9eab3f389636dccc101d18f6
2003-12-24 00:22:02 -05:00
Nathan Binkert a95d8e95cb - change the FormatFlags into more general StatFlags
-  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 23:53:43 -05:00
Nathan Binkert 8f912297ab - Allow the stats package user to determine in which mode to dump
-  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-23 21:45:48 -05:00
Steve Reinhardt 126d810d13 Merge zizzer:/bk/m5 into isabel.reinhardt.house:/z/stever/bk/m5
--HG--
extra : convert_revision : 315f207185b418f41509210a35188be996c0eb0a
2003-12-20 19:56:31 -08:00
Nathan Binkert 520442b01a Fix a bunch of memory leak type bugs, and add some better
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-20 16:25:48 -05:00
Steve Reinhardt 4f8acd2709 Minor cleanup of trace/output stuff (leftover from EINTR bug fix).
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-19 08:04:40 -08:00