Commit graph

318 commits

Author SHA1 Message Date
Kevin Lim 42f3b4ffb3 Merge changes.
base/traceflags.py:
    Merge extra new CPU flags
cpu/static_inst.hh:
    Include all the execute functions in static_inst_impl.hh

--HG--
extra : convert_revision : 78eb753bf709d37400e7c2418bb35d842d7c3f63
2005-01-11 19:00:16 -05:00
Kevin Lim 90d4436351 Slight fixes, add in commit trace flag.
base/traceflags.py:
    Add new commit rate trace flag.
build/SConstruct:
    Add extra option for efence.
cpu/beta_cpu/alpha_full_cpu_impl.hh:
    Use function calls instead of direct indexing (avoids confusion).
cpu/beta_cpu/commit_impl.hh:
    Add commit rate trace output (might not be worthwhile in the future).
cpu/beta_cpu/decode_impl.hh:
    Remove some older hacks.  Fix it so that the isntruction properly sets its next
    PC to the one calculated by the branch.
cpu/beta_cpu/fetch_impl.hh:
    Remove old commented code.
cpu/beta_cpu/iew_impl.hh:
    Add extra check to ensure that the instruction is valid.
cpu/beta_cpu/regfile.hh:
    Include trace file.

--HG--
extra : convert_revision : 4ee1dc88f8a5ed9b65486c6c111a3718a8040e42
2005-01-11 18:52:29 -05:00
Nathan Binkert d0bff50bba Fix up the random number stuff.
SConscript:
    compile the random number generator stuff into m5
base/random.cc:
    we need to define our destructor
base/random.hh:
    Since there's no state, just makes all of these get functions static

--HG--
extra : convert_revision : 9d4b8abd57367391a8ecda3914b1d912d9c64185
2004-12-13 12:55:13 -05:00
Ali Saidi 34260bbf0d Add support for Tsunami with 64 processors
base/socket.cc:
    Make panic print a more worthwhile message
dev/tsunami.hh:
    Change max number of tsunami cpus to be 64
dev/tsunamireg.h:
    Add new registers and register blocks for 64 cpu tsunami

--HG--
extra : convert_revision : 3ceaaa998518ded8613bc64edc04cb9120fd3d15
2004-12-06 12:06:16 -05:00
Steve Reinhardt 7bac427874 Minor fixes.
base/loader/ecoff_object.cc:
    Only warn (not die) if we can't load symbols from an ecoff object.
sim/debug.cc:
    Compile in functioning debug_break unless NDEBUG,
    not only if DEBUG.  Print warning if we hit breakpoint
    when compiled with NDEBUG.
sim/debug.hh:
    Compile in functioning debug_break unless NDEBUG,
    not only if DEBUG.

--HG--
extra : convert_revision : baef2caac4a9c88e1389660823eaa7c42b1d19c8
2004-11-18 10:52:56 -05:00
Steve Reinhardt b1816cb837 Minor cleanup of symtab code/includes.
base/loader/symtab.cc:
base/loader/symtab.hh:
    Get rid of old unused calls.
cpu/simple_cpu/simple_cpu.hh:
    No need to include base/loader/symtab.hh
kern/linux/linux_system.cc:
kern/tru64/tru64_system.cc:
    Include base/loader/symtab.hh (since it's no longer included in system.hh)
sim/system.hh:
    Replace include of base/loader/symtab.hh with forward class decl.

--HG--
extra : convert_revision : 3a778c2f409ec94e3b00eaa9b3859943cb39918c
2004-11-15 20:30:51 -05:00
Nathan Binkert f7323aebe8 fix udp checksums
base/inet.hh:
    tcp/udp/ip checksums are calculated/manipulated in NBO always,
    so there's no need to convert to host endian.

--HG--
extra : convert_revision : 13d6aff025a6c072d9d829c2e9fad4f13399b1f7
2004-11-15 15:40:35 -05:00
Steve Reinhardt fed64a3b36 Add support for sampled PC profiling to FullCPU.
Simple text list of symbol (or address) and count
will be dumped to m5prof.<cpu-name> if the cpu's
pc_sample_interval param is set.

SConscript:
    Add cpu/full_cpu/pc_sample_profile.cc
base/callback.hh:
    Add a comment about MakeCallback.
    Fix type in another comment.
base/loader/symtab.cc:
    Revamp findNearestSymbol() to provide addresses of both
    nearest symbols (preceding and following) as well as
    string for former.

    Move global definition of debugSymbolTable here too.
base/loader/symtab.hh:
    Revamp findNearestSymbol() to provide addresses of both
    nearest symbols (preceding and following) as well as
    string for former.

    Move global declaration of debugSymbolTable here too.
cpu/exetrace.cc:
    Use new findNearestSymbol() interface for trace symbols.
kern/linux/linux_system.cc:
sim/system.cc:
    Remove extern of debugSymbolTable (now in symtab.hh)
sim/process.cc:
    Initialize debugSymbolTable if binary has a symbol table.

--HG--
extra : convert_revision : 0b5393dc39c40ac88c953684708f1125da550671
2004-11-15 01:56:40 -05:00
Nathan Binkert 425dda00df Macros are nasty, so let's get rid of them. Convert all
all macros in ev5.hh to inline functions or constant typed
variables and make them follow our style while we're at it.

All of the stuff in this file actually belongs in the ISA
traits code, but this is a first step at getting things done
in the right manner.

arch/alpha/alpha_memory.cc:
arch/alpha/alpha_memory.hh:
arch/alpha/ev5.cc:
arch/alpha/isa_desc:
dev/ns_gige.cc:
kern/tru64/tru64_events.cc:
    deal with changes in ev5.hh
arch/alpha/ev5.hh:
    Macros are nasty, so let's get rid of them.  Convert all
    all macros to inline functions or constant typed variables.
    Make them follow our style while we're at it.

    All of the stuff in this file actually belongs in the ISA
    traits code, but this is a first step at getting things done
    in the right manner.
arch/alpha/isa_traits.hh:
    move some of the ev5 specific code into the isa
arch/alpha/vtophys.cc:
base/remote_gdb.cc:
    deal with isa addition
cpu/exec_context.hh:
    be less isa specific and use the isa traits to figure out
    what we can.
dev/alpha_console.cc:
dev/pciconfigall.cc:
dev/tsunami_cchip.cc:
dev/tsunami_io.cc:
dev/tsunami_pchip.cc:
dev/uart.cc:
    deal with changes in ev5.hh
    I don't believe this masking is actually necessary.  We should
    look at removing it later.
dev/ide_ctrl.cc:
    sort #includes
    deal with changes in ev5.hh

--HG--
extra : convert_revision : c8a3adf0a4b1d198aefe38fc38b295abf289b08a
2004-11-13 14:01:38 -05:00
Nathan Binkert b64619d575 Make it so we can cast an EthAddr to a 64-bit integer
--HG--
extra : convert_revision : 2f470d122997fbc375f04e9c2682b6528adef50c
2004-11-10 18:49:55 -05:00
Nathan Binkert a7fd7729ab flesh out the TCP/IP/Ethernet support
base/refcnt.hh:
    reorganize the RefCountingPtr a little bit to make it easier
    to derive from
dev/etherpkt.hh:
    this doesn't belong here. use the inet.hh stuff
dev/ns_gige.cc:
dev/ns_gige.hh:
    use newer features in the tcp/ip/ethernet stuff

--HG--
extra : convert_revision : 32c1953c95655c1f4c70e0d8adedfd94beead624
2004-10-23 16:18:44 -04:00
Nathan Binkert 656031b073 make stuff compile on openbsd again
clean up a few other things while we're here.

base/bitfield.hh:
base/compression/null_compression.hh:
    dont #include <inttypes.hh> use "sim/host.hh"
    fix #include guard
base/stats/types.hh:
    dont #include <inttypes.hh> use "sim/host.hh"
kern/linux/aligned.hh:
    dont #include <stdint.hh> use "sim/host.hh"
    fix #include guard
kern/linux/hwrpb.hh:
    fix #include guard

--HG--
extra : convert_revision : 288c687a59a1e770bbb834879173e1a2ea371bce
2004-10-23 12:31:24 -04:00
Nathan Binkert 224acc2abc get rid of pmap.h and make things variables and inline
functions instead of preprocessor macros.

arch/alpha/vtophys.cc:
    use new constants, functions and structs to clean up the
    vtophys code.
arch/alpha/vtophys.hh:
    Clean up a little bit and make the protypes match new changes.
base/remote_gdb.cc:
dev/ide_disk.cc:
kern/tru64/tru64_events.cc:
    use new constants from isa_traits.hh instead of ones from
    old pmap.h

--HG--
extra : convert_revision : 5dce34e3b0c84ba72cefca34e5999b99898edcef
2004-10-23 10:41:35 -04:00
Nathan Binkert b881408ed7 Clean up the Range class and associated usages. The code was
never clear about whether the end of the range was inclusive
or exclusive.  Make it inclusive, but also provide a RangeSize()
function that will generate a Range based on a start and a size.
This, in combination with using the comparison operators, makes
almost all usages of the range not care how it is stored.

base/range.cc:
    Make the end of the range inclusive.

    start/end -> first/last
    (end seems too much like end() in stl)
base/range.hh:
    Make the end of the range inclusive.

    Fix all comparison operators so that they work correctly with
    an inclusive range.  Also, when comparing one range to another
    with <, <=, >, >=, we only look at the beginning of the range
    beacuse x <= y should be the same as x < y || x == y.  (This wasn't
    the case before.)

    Add a few functions for making a range:
    RangeSize is start and size
    RangeEx is start and end where end is exclusive
    RangeIn is start and end where end is inclusive

    start/end -> first/last
    (end seems too much like end() in stl)
dev/alpha_console.cc:
dev/baddev.cc:
dev/ide_ctrl.cc:
dev/ns_gige.cc:
dev/pciconfigall.cc:
dev/pcidev.cc:
dev/tsunami_cchip.cc:
dev/tsunami_io.cc:
dev/tsunami_pchip.cc:
dev/uart.cc:
    Use the RangeSize function to create a range.

--HG--
extra : convert_revision : 29a7eb7fce745680f1c77fefff456c2144bc3994
2004-10-22 01:34:40 -04:00
Ali Saidi 3ef950abba Fixes for bigendian platforms
arch/alpha/vtophys.cc:
    PGOFSET -> ALPHA_PGOFSET to avoid include file problems
base/callback.hh:
    Added  a class to create a callback from a function
base/intmath.hh:
    make FloorLog2 inlined
dev/pcidev.cc:
    more work in getting pciconfig space happy with different endiannesses
dev/uart.cc:
    used an incorrect size for write uint64_t instead of uint8_t
sim/system.cc:
    when writing things into system data structures we need to pay
    attention to endianness

--HG--
extra : convert_revision : 52f441b5789c45db30ef2f6fd4975cbc7323a381
2004-10-16 19:10:51 -05:00
Nathan Binkert eaf66f4658 fix some bugs in the headers and fix checksumming.
base/inet.cc:
    we can't use a uint16_t for the intermediate checksum values
    since there may be some bits that carry.
    the length that is added in the pseudo header is the length of
    the tcp portion only.
base/inet.hh:
    silly me, the ip_hlen field is in terms of 4-byte words.
    when caclulating checksum, we're dealing with network byte order,
    so don't bother doing any byteswapping.

--HG--
extra : convert_revision : 993e3413e9febea0ba2fb6ba8bf04c053cca15ed
2004-10-01 19:48:33 -04:00
Kevin Lim e3fb9afa79 Update to make multiple instruction issue and different latencies work.
Also change to ref counted DynInst.

SConscript:
    Add branch predictor, BTB, load store queue, and storesets.
arch/isa_parser.py:
    Specify the template parameter for AlphaDynInst
base/traceflags.py:
    Add load store queue, store set, and mem dependence unit to the
    list of trace flags.
cpu/base_dyn_inst.cc:
    Change formating, add in debug statement.
cpu/base_dyn_inst.hh:
    Change DynInst to be RefCounted, add flag to clear whether or not this
    instruction can commit.  This is likely to be removed in the future.
cpu/beta_cpu/alpha_dyn_inst.cc:
    AlphaDynInst has been changed to be templated, so now this CC file
    is just used to force instantiations of AlphaDynInst.
cpu/beta_cpu/alpha_dyn_inst.hh:
    Changed AlphaDynInst to be templated on Impl.  Removed some unnecessary
    functions.
cpu/beta_cpu/alpha_full_cpu.cc:
    AlphaFullCPU has been changed to be templated, so this CC file is now
    just used to force instantation of AlphaFullCPU.
cpu/beta_cpu/alpha_full_cpu.hh:
    Change AlphaFullCPU to be templated on Impl.
cpu/beta_cpu/alpha_impl.hh:
    Update it to reflect AlphaDynInst and AlphaFullCPU being templated
    on Impl.  Also removed time buffers from here, as they are really
    a part of the CPU and are thus in the CPU policy now.
cpu/beta_cpu/alpha_params.hh:
    Make AlphaSimpleParams inherit from the BaseFullCPU so that it doesn't
    need to specifically declare any parameters that are already in the
    BaseFullCPU.
cpu/beta_cpu/comm.hh:
    Changed the structure of the time buffer communication structs.  Now
    they include the size of the packet of instructions it is sending.
    Added some parameters to the backwards communication struct, mainly
    for squashing.
cpu/beta_cpu/commit.hh:
    Update typenames to reflect change in location of time buffer structs.
    Update DynInst to DynInstPtr (it is refcounted now).
cpu/beta_cpu/commit_impl.hh:
    Formatting changes mainly.  Also sends back proper information
    on branch mispredicts so that the bpred unit can update itself.
    Updated behavior for non-speculative instructions (stores, any
    other non-spec instructions): once they reach the head of the ROB,
    the ROB signals back to the IQ that it can go ahead and issue the
    non-speculative instruction.  The instruction itself is updated so that
    commit won't try to commit it again until it is done executing.
cpu/beta_cpu/cpu_policy.hh:
    Added branch prediction unit, mem dependence prediction unit, load
    store queue.  Moved time buffer structs from AlphaSimpleImpl to here.
cpu/beta_cpu/decode.hh:
    Changed typedefs to reflect change in location of time buffer structs
    and also the change from DynInst to ref counted DynInstPtr.
cpu/beta_cpu/decode_impl.hh:
    Continues to buffer instructions even while unblocking now.  Changed
    how it loops through groups of instructions so it can properly block
    during the middle of a group of instructions.
cpu/beta_cpu/fetch.hh:
    Changed typedefs to reflect change in location of time buffer structs
    and the change to ref counted DynInsts.  Also added in branch
    brediction unit.
cpu/beta_cpu/fetch_impl.hh:
    Add in branch prediction.  Changed how fetch checks inputs and its
    current state to make for easier logic.
cpu/beta_cpu/free_list.cc:
    Changed int regs and float regs to logically use one flat namespace.
    Future change will be moving them to a single scoreboard to conserve
    space.
cpu/beta_cpu/free_list.hh:
    Mostly debugging statements.  Might be removed for performance in future.
cpu/beta_cpu/full_cpu.cc:
    Added in some debugging statements.  Updated BaseFullCPU to take
    a params object.
cpu/beta_cpu/full_cpu.hh:
    Added params class within BaseCPU that other param classes will be
    able to inherit from.  Updated typedefs to reflect change in location
    of time buffer structs and ref counted DynInst.
cpu/beta_cpu/iew.hh:
    Updated typedefs to reflect change in location of time buffer structs
    and use of ref counted DynInsts.
cpu/beta_cpu/iew_impl.hh:
    Added in load store queue, updated iew to be able to execute non-
    speculative instructions, instead of having them execute in commit.
cpu/beta_cpu/inst_queue.hh:
    Updated change to ref counted DynInsts.  Changed inst queue to hold
    non-speculative instructions as well, which are issued only when
    commit signals backwards that a nonspeculative instruction is at
    the head of the ROB.
cpu/beta_cpu/inst_queue_impl.hh:
    Updated to allow for non-speculative instructions to be in the inst
    queue.  Also added some debug functions.
cpu/beta_cpu/regfile.hh:
    Added debugging statements, changed formatting.
cpu/beta_cpu/rename.hh:
    Updated typedefs, added some functions to clean up code.
cpu/beta_cpu/rename_impl.hh:
    Moved some code into functions to make it easier to read.
cpu/beta_cpu/rename_map.cc:
    Changed int and float reg behavior to use a single flat namespace.  In
    the future, the rename maps can be combined to a single rename map to
    save space.
cpu/beta_cpu/rename_map.hh:
    Added destructor.
cpu/beta_cpu/rob.hh:
    Updated it with change from DynInst to ref counted DynInst.
cpu/beta_cpu/rob_impl.hh:
    Formatting, updated to use ref counted DynInst.
cpu/static_inst.hh:
    Updated forward declaration for AlphaDynInst now that it is templated.

--HG--
extra : convert_revision : 1045f240ee9b6a4bd368e1806aca029ebbdc6dd3
2004-09-23 14:06:03 -04:00
Nathan Binkert 1d02345a24 a bit more cleaning of the network header wrappers.
base/inet.hh:
    add functions to the various headers to grab the most common
    encapsulated protocols.  This could easily get out of hand, but
    we're just worrying about tcp, udp, and ip for now.

    add common functions size(), bytes(), and payload() to all wrappers.
    size() gets the header size
    bytes() returns a uint8_t * to the beginning of the header
    payload() returns a uint8_t * to the beginning of the payload.
dev/etherpkt.cc:
dev/etherpkt.hh:
    don't cache pointers to headers.  It's probably not worth the
    hassle.

--HG--
extra : convert_revision : ba9df85ac019b8a48233042dde79fb9da9546410
2004-09-21 01:41:55 -04:00
Nathan Binkert a58b834c8e Clean up network header stuff and make it more generic. Use
libdnet when we can instead of our own home grown stuff.

SConscript:
    separate the crc code into its own file
base/inet.cc:
    move the crc stuff to crc.cc
    add generic code for calculating ip/tcp/udp checksums
base/inet.hh:
    -  move crc stuff to crc.hh
    -  #include all of the libdnet stuff.  (this makes base/inet.hh the
    only file you need to include if you want to use this kind of stuff.)
    -  Wrap some of the libdnet structs to get easier access to structure
    members.  These wrappers will automatically deal with masking/shifting/
    byte-swapping.
base/refcnt.hh:
    If one derives from RefCountingPtr, they should have access to
    the internal data pointer.
build/SConstruct:
    make #include of dnet stuff work
dev/etherlink.cc:
dev/ethertap.cc:
dev/ethertap.hh:
    EtherPacket -> PacketData
dev/etherpkt.cc:
    EtherPacket -> PacketData
    add a function for populating extra info about a packet.
    Basically just gives pointers to ethernet/ip/tcp/udp headers
    if they exist.
dev/etherpkt.hh:
    EtherPacket -> PacketData
    remove most of the packet header stuff from teh PacketData
    class and just add a few generic functions for grabbing various
    headers that may exist in the packet.  The old functionality is
    contained in the headers.
dev/ns_gige.cc:
    -  IP -> Ip, UDP -> Udp, TCP ->Tcp when used in variable names
    -  get rid of our own byte swapping functions.
    -  whack checksum code and use libdnet version.
    -  Get pointers to the various packet headers and grab info from
    those headers.  (The byte swapping in the headers now.)
    -  Add stats for Udp Checksums
dev/ns_gige.hh:
    use libdnet for checksum code.
    IP -> Ip, TCP -> Tcp in variable names
    add stats for UDP checksums

--HG--
extra : convert_revision : 96c4160e1967b7c0090acd456df4a76e1f3aab53
2004-09-20 10:43:53 -04:00
Kevin Lim 04745696b6 Check in of new CPU. This checkin works under non-Fullsystem mode, with no caches.
SConscript:
    Added new CPU files to build.
arch/alpha/isa_desc:
    Changed rduniq and wruniq to be nonspeculative because the uniq register is not renamed.
arch/isa_parser.py:
    Added new CPU exec method.
base/statistics.hh:
    Minor change for namespace conflict.  Probably can change back one the new CPU files are cleaned up.
base/traceflags.py:
    Added new CPU trace flags.
cpu/static_inst.hh:
    Changed static inst to use a file that defines the execute functions.

--HG--
extra : convert_revision : bd4ce34361308280168324817fc1258dd253e519
2004-08-20 14:54:07 -04:00
Nathan Binkert 9023f5c96d - Clean up and factor out all of the binning code into a
single place so it's easier to work with.
-  Add support for binning kernel/user/idle time separately from
lisa's binning stuff, but make the two compatible.
-  KernelStats used to directly implement the pImpl idiom, but
it makes more sense to just remove the level of indirection and
make the exec context have a pointer to the stats.
-  Factor common code out of LinuxSystem and Tru64System and put
it into the System base class.  While doing that, make all
constructors take a pointer to a parameter struct instead of
naming the parameters individually to make it much easier to add
parameters to these classes.

SConscript:
    Move the function tracking and binning stuff around.
arch/alpha/ev5.cc:
    kernelStats is now a pointer
arch/alpha/pseudo_inst.cc:
    kernelStats is now a pointer
    the parameters to the system have been moved into their own
    struct
base/trace.hh:
    provide a little functor class for wrapping a string that
    can allow you to define name() in any scope very simply
    for use with DPRINTF
cpu/base_cpu.cc:
    New order of arguments for consistency.
cpu/exec_context.cc:
    kernelStats no longer has the level of indirection in it,
    execContext has the indirection now.  so, kernelStats is a pointer.
    We also need a pointer to the kernelBinning stuff from the system
    and we need to figure out if we want to do binning or not.
    Move a whole bunch of code into kern_binning.cc so it's all
    in the same place.
cpu/exec_context.hh:
    We want pointers to the kernel binning/stats stuff and we'll
    have the exec_context and system have the level of indirection
    instead of having the extra layer in the kernel stats class.
cpu/simple_cpu/simple_cpu.cc:
    call through the exec context to do the special binning
    stuff.
kern/kernel_stats.cc:
kern/kernel_stats.hh:
    Re-organize the stats stuff and remove the level of indirection
    (that was there to simplify building) and move the binning stuff
    into its own class/file.
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
kern/tru64/tru64_system.cc:
kern/tru64/tru64_system.hh:
sim/system.cc:
sim/system.hh:
    move lots of common system code into the base system class so
    that it can be shared between linux, tru64, and whatever else
    we decide to support in the future.

    Make the constructor take a pointer to a parameter struct so that
    it is easier to pass parameters to the parent.
kern/system_events.cc:
    move the majority of the binning code into the Kernel::Binning class
    in the kern_binning file
kern/system_events.hh:
    FnEvents only need to know the bin
    create the Idle start event to find the PCBB of the idle
    process when it starts.
kern/tru64/tru64_events.cc:
    memCtrl -> memctrl
sim/process.cc:
sim/process.hh:
    re-order args for consistency

--HG--
extra : convert_revision : 86cb39738c41fcd680f2aad125c9dde000227b2b
2004-08-20 11:35:31 -04:00
Ali Saidi 9d4ee7acaa Added code using VPtr to be able to extract info from linux thread
structures.
Added event to print out currently running task

base/traceflags.py:
    Added Thread trace flag
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
    Added event to print out currently running task

--HG--
extra : convert_revision : 94347dbaf90f39eb40467b2a43b4628a3deafc6c
2004-08-18 23:06:51 -04:00
Steve Reinhardt d7dfe51fae Integrate Python configuration script parsing into m5 itself.
SConscript:
    Add pyconfig/{pyconfig,code}.cc
    Add list of object description (.od) files.
    Include pyconfig/SConscript.
base/inifile.cc:
    Get rid of CPP_PIPE... it never really worked anyway.
base/inifile.hh:
    Make load(ifstream&) method public so pyconfig
    code can call it.
sim/main.cc:
    Handle Python config scripts (end in '.py' instead of '.ini').
sim/pyconfig/m5configbase.py:
    Add license.
    Fix minor __setattr__ problem (2.3 related?)

--HG--
rename : util/config/m5configbase.py => sim/pyconfig/m5configbase.py
extra : convert_revision : 5e004922f950bfdefced333285584b80ad7ffb83
2004-08-05 02:03:47 -07:00
Nathan Binkert e79dee27ce fix compile
base/stats/events.cc:
    Make this compile with MYSQL stuff

--HG--
extra : convert_revision : e4e8f9b078447f5e7f535b2678a2ed7d44fa8644
2004-08-02 15:42:25 -04:00
Nathan Binkert 3711ea7347 Move all of the object matching code to a shared file so it can
be more easily re-used.  This currently uses some cooked up matching
function that I wrote a while ago, but should probably be changed
to use regular expressions in the future.
add doDebugBreak to control breakpoints on a per SimObject basis

SConscript:
    add match
base/stats/events.cc:
base/trace.cc:
    Move the object matching code into a separate file so it can be
    more easily shared
base/trace.hh:
    the object matching code was wrapped up and moved.  adapt.
sim/sim_object.cc:
    add the doDebugBreak flag that can be set on a per-SimObject
    basis.  This will be used in the future to control whether or
    not debug_break() will actually break for a given object.

    provide a function interface that can be called from the debugger.
sim/sim_object.hh:
    add the doDebugBreak flag that can be set on a per-SimObject
    basis.  This will be used in the future to control whether or
    not debug_break() will actually break for a given object.

--HG--
extra : convert_revision : 6bf7924de63d41f5ba6b80d579efdf26ba265a8f
2004-07-30 10:47:53 -04:00
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
Nathan Binkert 255ac8372d Make stuff build on openbsd
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-19 00:02:20 -05:00
Steve Reinhardt d5a187dd5a Miscellaneous minor fixes/improvements.
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-17 09:43:03 -08:00
Steve Reinhardt f47dcadfd8 Merge zizzer:/bk/m5 into isabel.reinhardt.house:/z/stever/bk/m5
--HG--
extra : convert_revision : dd887635c7ce74324b3670744461ffdf92e1dedf
2003-12-15 21:07:04 -08:00
Steve Reinhardt eb1cfea1aa Another fix for gcc 3.3.x.
base/statistics.hh:
    Make a couple of typedefs public rather than protected.
    g++ 3.3 complains otherwise.

--HG--
extra : convert_revision : 6a8e4edb0c39474c0e0c7bc474ad0f22b9fb8505
2003-12-15 20:56:47 -08:00
Steve Reinhardt e537fb3fd6 Add #define parameter and corresponding build option to
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-15 20:55:10 -08:00
Nathan Binkert ce4aba3e54 Add support for getting the hostname
--HG--
extra : convert_revision : 498a950e574059eac2e3b1969880ecc04cf53f31
2003-12-15 18:24:02 -05:00
Nathan Binkert ef659565ff Clean up time handling code
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-15 18:23:48 -05:00
Nathan Binkert 3c6fc7c269 - Add a new target m5.fast (or just fast for short)
-  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-11 19:22:03 -05:00
Steve Reinhardt 7e6dcd812c Rename RegResetCallback to registerResetCallback().
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-10 17:49:41 -08:00
Nathan Binkert 06aafccce7 Make the simulator compile on an Itanium.
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-09 17:41:08 -05:00
Nathan Binkert 368de4109f Sweeping change in the stats package....again...
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-09 13:05:43 -05:00
Lisa Hsu b6c77fe6f8 remote_gdb.cc:
fix remote gdb

base/remote_gdb.cc:
    fix remote gdb

--HG--
extra : convert_revision : 886cad5037e2124e6087be03f2903f07aeed0679
2003-12-04 19:26:31 -05:00
Steve Reinhardt 745f0044cd Merge zizzer:/bk/m5 into isabel.reinhardt.house:/z/stever/bk/m5
--HG--
extra : convert_revision : d66ebc598fdcfc9477ea5a1e455b21d7b9e56936
2003-12-01 19:34:51 -08:00
Steve Reinhardt 7976794aad Restructuring of LiveProcess etc. to support multiple emulated OS syscall
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-12-01 19:34:38 -08:00
Lisa Hsu c02fc7e99f get rid of the errors from simple-test1 and test1-6
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-23 12:57:16 -05:00
Nathan Binkert 55a7490a11 Go Blue!!!!
base/statistics.hh:
    Simple formatting fixes

--HG--
extra : convert_revision : 608fe1c37f58426d65cb5ec172764a6b610be6c8
2003-11-22 15:12:56 -05:00
Nathan Binkert d1e12b57ce We only need to choose that we do want binning, or we don't.
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-22 15:07:53 -05:00
Nathan Binkert 0bd909277d statistics.cc:
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-12 15:23:31 -05:00
Nathan Binkert 74aaf2401c in the case where we don't have any bins, we don't want to panic
--HG--
extra : convert_revision : e9056ca020d0f3db388b31a074b03e4d521f8705
2003-11-12 14:59:58 -05:00
Steve Raasch 541598bc6f It's important that there be white-space between each element
of a printed statistics line.

base/statistics.cc:
    Add spaces between printed elements

--HG--
extra : convert_revision : edcc9460fa178c39f7e3c15b3bad866ef9b263e4
2003-11-07 08:35:55 -05:00
Nathan Binkert 40820042f1 save and restore the current bin during reset since we
should continue in whatever bin we were in.

--HG--
extra : convert_revision : 30a891ccb03afa0c1dd0c98942ab3ea5ba800660
2003-11-07 01:24:49 -05:00
Steve Raasch 9915bd17c2 Nat's fix for compile bug
base/statistics.hh:
    Too many "const"'s

--HG--
extra : convert_revision : b38303f2e6b415e6bcc520da80e89d99b6976d23
2003-11-06 12:57:06 -05:00
Nathan Binkert 07d56ae7be better binning of Average stats
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-06 02:28:27 -05:00
Nathan Binkert 655e9ef3de Little fixes to make more of the stats reset correctly.
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-06 00:41:14 -05:00
Nathan Binkert f2881c752e Ok, actually call resetStats on all stats
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-05 21:17:13 -05:00