History log of /gem5/SConstruct
Revision Date Author Comments
# 14209:7efe1c187149 22-Apr-2016 Andreas Sandberg <andreas.sandberg@arm.com>

stats: Add beta support for HDF5 stat dumps

This changeset add support for stat dumps in the HDF5 file
format. HDF5 is a binary data format that represents data in a
file-system-like balanced tree. It has native support for
N-dimensional arrays and binary data (e.g., frame buffers).

It has the following benefits over traditional text stat files:

* Efficient storage of time series (multiple stat dumps)

* Fast lookup of stats

* Plenty of existing tooling (e.g., Python libraries and graphical
viewers)

* File format can be used to store frame buffers together with
normal stats.

Drawbacks:

* Large startup cost (single stat dump larger than text equivalent)

* Stat dumps are slower than text

Known limitations:

* Distributions and histograms aren't supported.

HDF5 stat output can be enabled using the 'h5' URL scheme when
overriding the stat file name on gem5's command line. The following
parameters are supported:

* chunking (unsigned): Number of time steps to pre-allocate
(default: 10)

* desc (bool): Output stat descriptions (default: True)

* formulas (bool): Output derived stats (default: True)

Example gem5 command line:

./build/ARM/gem5.opt \
--stats-file="h5://stats.h5?desc=False;formulas=False" \
configs/example/fs.py

Example Python stat consumer that computes IPC:
import h5py

f = h5py.File('stats.h5', 'r')
group = f['/system/cpu']
for i, c in zip(group['committedInsts'], group['numCycles']):
print i, c, i / c

Change-Id: I351c6cbff2fb7bef9012f47876ba227ed288975b
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/8121
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>


# 14044:f0737a28cd4a 21-May-2019 Ciro Santilli <ciro.santilli@arm.com>

scons: allow passing arbitrary CCFLAGS and LDFLAGS from the CLI

The flags may be passed as:

scons CCFLAGS_EXTRA='-Wno-error -pedantic' \
LDFLAGS_EXTRA='-g -g' build/<arch>/gem5.opt

The initial motivation for this commit is to help disable warning that
have become errors while bisecting.

scons orders the flags by Append call order, and ideally these flags
should be added last to override the others, since the last GCC flags
take precedence. However I haven't found a simple way to put them at
the very end.

Change-Id: Ida24dfb9604d88b99f113392ab5e47d578ba7259
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19048
Reviewed-by: Juha Jäykkä <juha.jaykka@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>


# 14037:a1e12c851596 20-Apr-2017 John Alsop <johnathan.alsop@amd.com>

mem-ruby: Enable set size increase

Add NUMBER_BITS_PER_SET environment variable to control
the size of the bitmask in Set.hh (default=64).
Necessary for configs which require >64 instances of a given
machine type. This can be set in the build_opts file, e.g.
by adding the following line:
NUMBER_BITS_PER_SET = <number>

Change-Id: I314a3cadca8ce975fcf4a60d9022494751688e88
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18968
Reviewed-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>


# 13758:f4b8f1be28fc 12-Mar-2019 Gabe Black <gabeblack@google.com>

scons: Don't use isdir in AddLocalRPATH.

isdir isn't a nice way to check if an FS.Base is a File or a Dir as was
initially assumed, it literally checks if a path can be stat-ed and is
reported as a directory by stat. This means that if a directory is
going to be created as part of the build, the result of that test will
change depending on whether that part of the build has happened
successfully before.

A better check which behaves as originally intended is to check whether
the Node is an instance of the SCons.Node.FS.Dir class.

Change-Id: Id041917d50b768a8205769c0a05320f92b09993c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17128
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13715:4ba223628b62 25-Jan-2019 Andreas Sandberg <andreas.sandberg@arm.com>

scons: Add support for specifying Python version

Add a sticky variable (PYTHON_CONFIG) to select which python-config
version to use. This can, for example, be used to build with Python 3
or with Python 2.7 in a custom location.

Change-Id: I1f4c00d66f85a9c99f50fe4d746b69dd82b60b4b
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/16003
Reviewed-by: Gabe Black <gabeblack@google.com>


# 13713:cd0c57cd48f7 22-Feb-2019 Andrea Mondelli <Andrea.Mondelli@ucf.edu>

scons: conditional use of new RPATH inclusion

On OSX, clang doesn’t support the -z option.
This patch resolve the compiler error produced on MacOS platform.

Change-Id: Idfe69c30fe40add97d16d0f2e25e598b30d26a9d
Reviewed-on: https://gem5-review.googlesource.com/c/16649
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13706:4c1d26d1766e 20-Feb-2019 Gabe Black <gabeblack@google.com>

scons: Add a convenience method to set RPATH for local libraries.

When linking in a dynamic library which is in the gem5 build directory,
it's useful to set RPATH so that you don't have to set LD_LIBRARY_PATH
when you run gem5 so that the dynamic linker can find it.

Since it's tricky and not entirely obvious how to set up those paths
correctly, this change adds a small convenience function which does
that for you. It also handles situations where the same dynamic
library may be linked into different binaries in different directories
which each need a different relative RPATH. It does that by letting the
environment for each binary set a construction variable which says
how to get from that particular binary back to the build directory.
This helper method then sets RPATH to start at $ORIGIN (the binary),
to follow that relative path to the variant build directory, and then
the per-library but not per-binary path to the library's directory.

This change also adds the -z origin linker flag which makes the linker
handle $ORIGIN properly.

Change-Id: I45f4d72cd14396a73e0b963cea6a39d9bfb7f984
Reviewed-on: https://gem5-review.googlesource.com/c/16566
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13577:70ab75eec40b 21-Dec-2018 Ciro Santilli <ciro.santilli@arm.com>

scons: add helpers to access GDB XML description files

Change-Id: Ic3b18887544b7710ed07a86d28dc62d8441b3476
Reviewed-on: https://gem5-review.googlesource.com/c/15255
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13541:a23fca6305e1 10-Jan-2019 Andrea Mondelli <andrea.mondelli@ucf.edu>

scons: added support of default Python installation on MacOS

Recent MacOS versions are distributed with python 2.7.
This version of python is sufficient to compile and run gem5.

This patch allows to use the default python instead of the version provided
by third-party tools (e.g., brew)

The default MacOS LLDB debugger is linked against the default python
installation, which conflicts with Python framework provided by third-party
package systems.

This patch removes the need of gem5 to have multiple python installations
on MacOS, if not explicitly installed.

Change-Id: I98f24804149cb2e04ca432c66d2f57e0296af7b2
Reviewed-on: https://gem5-review.googlesource.com/c/15475
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>


# 13421:79af503161d7 06-Nov-2018 Ciro Santilli <ciro.santilli@arm.com>

scons: add --gold-linker to link with the gold linker

This option can significantly speedup link time on Linux systems, which is
the main bottleneck to rebuild after small changes.

Change-Id: I3b0bdd61f7dcef0d73629c8ee2ee98091953fec3
Reviewed-on: https://gem5-review.googlesource.com/c/14075
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 13027:542176b23324 31-Aug-2018 Ciro Santilli <ciro.santilli@arm.com>

scons: remove as version check

GNU as 2.31.1 checks if the input and output files are the same:

Assembler messages:
Fatal error: The input and output files must be distinct

The check already does not work for llvm-as which has a different
output format.

Since it is too hard to maintain the check correctly for all possible
assemblers, it is better to just remove it completely.

Change-Id: I38a993ab83ca83d4a2f5e77820d2ca903f70c6ac
Reviewed-on: https://gem5-review.googlesource.com/12403
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 13020:b5f05a988593 07-Sep-2018 Earl Ou <shunhsingou@google.com>

Fix SConstruct for asan build

Sometimes it's easier to debug gem5 built with ASan enabled. This CL fixes
some build error when using --with-asan.

Bug: None
Test: ./scripts/build_gem5 --with-asan --with-ubsan build/ARM/gem5.debug

Change-Id: Iaaaaebc3f25749e11f97bf454ddd0153b3de56e7
Reviewed-on: https://gem5-review.googlesource.com/12511
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>


# 12920:76a7817ebea3 22-Aug-2018 Gabe Black <gabeblack@google.com>

base: If valgrind is available, tell it about Fiber stacks.

Valgrind can get confused when switching stacks between different
Fibers. If valgrind (and its headers) are available, this change adds
calls to some hooks so valgrind knows where the new stacks are and
doesn't report a bunch of false positives.

Change-Id: I00aefe60372be6de7371dec29427d7182dbee7b6
Reviewed-on: https://gem5-review.googlesource.com/12227
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>


# 12790:9cfb7f1c50b6 19-Jun-2018 Matteo M. Fusi <matteo.fusi@bsc.es>

SConstruct: additional message for the error checking of the python 2.7 headers

One of the most common errors during the installation of gem5 is the one
related to the failure of the check of the Python2.7 headers in the
SConstruct file. In some cases the headers are correctly installed, but a
wrong selection of the C compiler can make this check fail. This commit
wants to add some useful information this error message.

Change-Id: I0d087ad01c6e4cca3559f23070c37b5c13600962
Reviewed-on: https://gem5-review.googlesource.com/11389
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12688:8d2a4af53baa 30-Apr-2018 Giacomo Travaglini <giacomo.travaglini@arm.com>

scons: Fix --with-ubsan/asan compilation flags

SConstruct was using an undefined env variable; this patch uses the main
Environment variable.

Change-Id: I30ab6b4bbfa6d9a71a30fb33406a799bfb476821
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/10181
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12617:50e248e0788b 23-Mar-2018 Gabe Black <gabeblack@google.com>

scons: Re-enable override based warnings on gcc.

These warnings have been fixed.

Change-Id: I28ee5f4ae21412121849fcb9d273939d8e462842
Reviewed-on: https://gem5-review.googlesource.com/9344
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12563:8d59ed22ae79 06-Mar-2018 Gabe Black <gabeblack@google.com>

scons: Switch from the print statement to the print function.

Starting with version 3, scons imposes using the print function instead
of the print statement in code it processes. To get things building
again, this change moves all python code within gem5 to use the
function version. Another change by another author separately made this
same change to the site_tools and site_init.py files.

Change-Id: I2de7dc3b1be756baad6f60574c47c8b7e80ea3b0
Reviewed-on: https://gem5-review.googlesource.com/8761
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12485:cf80a4255d6e 30-Jan-2018 Hanhwi Jang <jang.hanhwi@gmail.com>

scons: Resolve backtrace implementation existence testing failure

Change backtrace implementation testing code not to have NULL pointer.

SCons fails to find backtrace implementation even if it exists.
The implementation testing code contains NULL pointers as a backtrace
buffer argument. Some compilers check the buffer is NULL pointed
or not, and generate a compilation error.

Change-Id: Icc5bc9a887b7a6bbc804b5b8a5a35a935c78a922
Reviewed-on: https://gem5-review.googlesource.com/7681
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12305:b6ebf3d20329 20-Nov-2017 Gabe Black <gabeblack@google.com>

scons: Get rid of a flag which makes Werror optional.

This flag wasn't being used. Also move the Werror code to the
SConstruct now that it's being applied universally.

Change-Id: I18b00d4b41bc1add9271ca299c020c14970a6926
Reviewed-on: https://gem5-review.googlesource.com/5982
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 12304:299452fa8cc4 20-Nov-2017 Gabe Black <gabeblack@google.com>

scons: Move some compiler flag setting code to the SConstruct.

These settings are invariant, so there's no reason to apply them over
and over again for the child environments used for various build
products.

Change-Id: Icb4053105e4f1c43008f2422ba30c7206b7ff365
Reviewed-on: https://gem5-review.googlesource.com/5981
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 12246:9ffa51416f39 08-Nov-2017 Gabe Black <gabeblack@google.com>

scons: Move Transform and termcap functionality into their own files.

Change-Id: Ica08e93f3873a7eafd02fe7d44c3bdbf0ce7f6b7
Reviewed-on: https://gem5-review.googlesource.com/5565
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12245:ad6fa75d2aba 08-Nov-2017 Gabe Black <gabeblack@google.com>

scons: Move python path management out of the SConstruct.

Make site_init.py manage sys.path, and the "default" tool set
PYTHONPATH on any environment that's created. The paths to add are
tracked in a common gem5_python_paths.py.

Change-Id: I3387d4394d47a2f9c83322644cfd05909c6890fa
Reviewed-on: https://gem5-review.googlesource.com/5564
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12244:33af7397d081 08-Nov-2017 Gabe Black <gabeblack@google.com>

scons: Pull style hook management out of the main SConstruct.

Put the code which supports style hooks for mercurial and git into two
scons "tools".

Change-Id: I3ffed85a177be4f9e458fff7b1cf16a3a479914e
Reviewed-on: https://gem5-review.googlesource.com/5563
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12243:c56b7387cddc 08-Nov-2017 Gabe Black <gabeblack@google.com>

scons: Override the "default" tool to set up the default env.

This imports various environment variables into the scons environment,
and sets some general properties on it. These are basically just copied
directly from the SConstruct and have the same behavior here.

gem5_tool_list will be used later on to add scons "tools" which should
be automatically added to new Environment objects.

Change-Id: Ib255955090c7b1e1cb80c703c18a9c867fcf1c9e
Reviewed-on: https://gem5-review.googlesource.com/5562
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12242:585b6820ced0 08-Nov-2017 Gabe Black <gabeblack@google.com>

scons: Move scons and python version checking into site_init.py.

In an effort to shrink and modularize the main scons files, this
change pulls the scons and python version checking code out of the
main file and into site_init.py which runs before the SConstruct
starts. This will be a place to put really generic code which has to
do with the very fundemental aspects of getting scons to work. Other
checks, like checks for particular tools or particular versions of
tools, will happen in other more specialized files.

Change-Id: Icd00ecadbe1141aef4dbadcf42d6ddef1f3a701f
Reviewed-on: https://gem5-review.googlesource.com/5561
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12230:48021d6b51eb 28-Sep-2017 Giacomo Travaglini <giacomo.travaglini@arm.com>

base: Introducing utility for writing raw data in png format

Originally it was possible to use a Bitmap writer class for dumping a
framebuffer snapshot in a .bmp file. This patch enables you to choose
another format. In particular it implements the writing of PNG Images
using libpng library. The latter has to be already installed in your
machine, otherwise gem5 will default to the Bitmap format. This
configurable writer has been introduced in the VNC frame dumping mechanism,
which is storing changed frame buffers from the VNC server

Change-Id: Id7e5763c82235f1ce90381c8486b85a7cce734ce
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5181
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 12222:6db0fc7407a5 15-Oct-2017 Gabe Black <gabeblack@google.com>

scons: Stop generating inc.d in the isa parser.

Generating dependency/build product information in the isa parser breaks scons
idea of how a build is supposed to work. Arm twisting it into working forced
a lot of false dependencies which slowed down the build.

Change-Id: Iadee8c930fd7c80136d200d69870df7672a6b3ca
Reviewed-on: https://gem5-review.googlesource.com/5081
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>


# 12178:62b9e0a3b056 05-Aug-2017 Paul Rosenfeld <prosenfeld@micron.com>

scons: bump required python version to 2.7 to support pybind11

Change-Id: Ic3652f975477f2e5d144e054489ab73ed9f82b55
Reviewed-on: https://gem5-review.googlesource.com/4440
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Joe Gross <joe.gross@amd.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 12158:c66cf095928d 27-Jul-2017 Andreas Sandberg <andreas.sandberg@arm.com>

sim: Use named constants for pseudo ops

Use named constants from a shared header instead of magic values when
handling pseudo ops.

Change-Id: If157060bbcd772ce7e8556482b44ca714f4319b1
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/4262
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>


# 12063:06cd2c297b04 06-Jun-2017 Gabe Black <gabeblack@google.com>

scons: Try to handle problems with gcc, lto and partial linking.

gcc has had a lot of problems with incremental linking and partial linking
at the same time. Basically, the partial link assumes that it's the only
link that's going to happen, and it converts weak external symbols into
regular external symbols. Then when the real final link happens, those
symbols are duplicated and the link fails.

Versions of gcc 6 and greater add an option called -flinker-output which
lets you tell the linker to do an incremental link. Unfortunately, other
bugs make that fail, and so gcc 6 doesn't work either. Hopefully version
7 works better.

A --force-lto option was added so that, when only one of lto and partial
linking is available, you can switch from having partial linking to having
lto.

Change-Id: I5e293f5cfb07a14343dc74030d99cb161fb8bbbe
Reviewed-on: https://gem5-review.googlesource.com/3680
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>


# 12061:0225580779db 04-Jun-2017 Jason Lowe-Power <jason@lowepower.com>

scons: Add use_tuntap to export list

Fixes broken build after c58537c.

Change-Id: I686ffaaad4fe558b6e51c89c9b26121318c2b721
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/3647
Reviewed-by: Gabe Black <gabeblack@google.com>


# 12056:1ad5b3161819 03-Jun-2017 Gabe Black <gabeblack@google.com>

dev: Add a version of EtherTap which uses the tap driver.

The object is called EtherTap (as opposed to EtherTapStub, what the former
EtherTap was renamed to), and its existance is gated on the linux/if_tun.h
header file existing. That's probably overly strict, but it will hopefully
be minimally likely to break the build for other systems.

Change-Id: Ie03507fadf0d843a4d4d52f283c44a416c6f2a74
Reviewed-on: https://gem5-review.googlesource.com/3646
Reviewed-by: Nathan Binkert <nate@binkert.org>
Maintainer: Nathan Binkert <nate@binkert.org>


# 12034:4b685699cdaa 19-May-2017 Gabe Black <gabeblack@google.com>

scons: Enable explicitly building something with no variant.

The SConstruct currently expects all explicit targets to be under a
variant directory like ARM or X86 which tells it what settings to use,
etc. There are things which scons knows how to build however, which do not
live under a variant directory, specifically everything under ext.

This change makes scons not look for a variant directory when it
encounters a target which is built by something in ext. This enables
things like explicitly building the systemc libraries, for example.

Change-Id: I8982a96fe49e3cb970ec78e11cea08703990c686
Reviewed-on: https://gem5-review.googlesource.com/3460
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Christian Menard <christian.menard@tu-dresden.de>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>


# 12016:893091853afd 02-May-2017 Gabe Black <gabeblack@google.com>

scons: Use the generalized switching headers on the GPU ISA.

Now that the switching header implementation has been generalized, there's
no need to have two nearly identical implementations for the two different
groups of headers.

Change-Id: Ie7c24fcddbc672ac5ca2d69bfc35696f42c55580
Reviewed-on: https://gem5-review.googlesource.com/2984
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>


# 12015:469a2f126b4c 02-May-2017 Gabe Black <gabeblack@google.com>

scons: arch: Generalize the switching header code.

Factor out the ISA ness of the switching header generating function. Also
turn it into a SCons builder which builds a single header, and a wrapping
method which uses the builder on a group of header files which all target
the same subdirectory.

Change-Id: I87705f97b6ebd9baebd4ebcfea19cc1218a64ad0
Reviewed-on: https://gem5-review.googlesource.com/2983
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>


# 12013:755a563d1883 01-May-2017 Gabe Black <gabeblack@google.com>

scons: Get rid of the all_isa_deps variable.

This value can be computed more directly and more locally near where it's
used.

Change-Id: Ib5f45015494a6c8033ce0ac4b8931688f37492c8
Reviewed-on: https://gem5-review.googlesource.com/2982
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>


# 11999:252c50d5b736 01-May-2017 Gabe Black <gabeblack@google.com>

scons: Get rid of the PHONY_BASE construction variable.

The value of that variable can be computed more directly and more locally
to where it's consumed.

Change-Id: I5ca1f732a34e22d4dae2aeb6ee7fc8adebe1caa0
Reviewed-on: https://gem5-review.googlesource.com/2981
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>


# 11992:358cdf876d3d 03-May-2017 Gabe Black <gabeblack@google.com>

scons: Fix the compiler flag used for partial linking.

It seems that g++ can generally handle the -r flag for generating a
relocatable object file, but ld can't always handle the --relocatable
flag.

Change-Id: I15f32e469590a814131d4e992b392a7ad6c52b83
Reviewed-on: https://gem5-review.googlesource.com/3001
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 11989:dbb16376953c 30-Jan-2017 Andreas Sandberg <andreas.sandberg@arm.com>

scons: Remove SWIG support

Remove remaining SWIG support from the build infrastructure.

Change-Id: I7549cd0f952ca3a51481918eefef3a29f03af359
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2920
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>


# 11988:665cd5f8b52b 27-Feb-2017 Andreas Sandberg <andreas.sandberg@arm.com>

python: Use PyBind11 instead of SWIG for Python wrappers

Use the PyBind11 wrapping infrastructure instead of SWIG to generate
wrappers for functionality that needs to be exported to Python. This
has several benefits:

* PyBind11 can be redistributed with gem5, which means that we have
full control of the version used. This avoid a large number of
hard-to-debug SWIG issues we have seen in the past.

* PyBind11 doesn't rely on a custom C++ parser, instead it relies on
wrappers being explicitly declared in C++. The leads to slightly
more boiler-plate code in manually created wrappers, but doesn't
doesn't increase the overall code size. A big benefit is that this
avoids strange compilation errors when SWIG doesn't understand
modern language features.

* Unlike SWIG, there is no risk that the wrapper code incorporates
incorrect type casts (this has happened on numerous occasions in
the past) since these will result in compile-time errors.

As a part of this change, the mechanism to define exported methods has
been redesigned slightly. New methods can be exported either by
declaring them in the SimObject declaration and decorating them with
the cxxMethod decorator or by adding an instance of
PyBindMethod/PyBindProperty to the cxx_exports class variable. The
decorator has the added benefit of making it possible to add a
docstring and naming the method's parameters.

The new wrappers have the following known issues:

* Global events can't be memory managed correctly. This was the
case in SWIG as well.

Change-Id: I88c5a95b6cf6c32fa9e1ad31dfc08b2e8199a763
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Andrew Bardsley <andrew.bardsley@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2231
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>


# 11986:c12e4625ab56 27-Feb-2017 Andreas Sandberg <andreas.sandberg@arm.com>

ext: Add pybind rev f4b81b3

Change-Id: I52e4fc9ebf2f59da57d8cf8f3e37cc79598c2f5f
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2229
Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Pierre-Yves Péneau <pierre-yves.peneau@lirmm.fr>


# 11982:a17ad156c01e 28-Apr-2017 Gabe Black <gabeblack@google.com>

scons: Add builders for partially linked object files.

These intermediate object files can be used to perform a hierarchical
link.

Change-Id: I27634731734eebe6531ce6b0894abdd59ffdc5c9
Reviewed-on: https://gem5-review.googlesource.com/2944
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 11979:2ed253d495b6 28-Apr-2017 Gabe Black <gabeblack@google.com>

scons: Add a Transform() for when linking shared libraries.

Change-Id: I7ddba0cc7be559633328011c1c7e2282f509b78c
Reviewed-on: https://gem5-review.googlesource.com/2943
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 11978:4791dea211c8 28-Apr-2017 Gabe Black <gabeblack@google.com>

scons: Find ext build directories automatically.

The ext directories with SConscripts in them are easy to find
automatically. Avoid boilerplate listing them out and SConscript()ing
them manually.

Change-Id: Ib723882aebc00e639eb8ec44904bb05ffa2c6b55
Reviewed-on: https://gem5-review.googlesource.com/2942
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 11944:00c719186596 05-Apr-2017 Andreas Sandberg <andreas.sandberg@arm.com>

scons: Fix hook installation error caused by stale cache

Due to the way SCons caches some file system state internally, it
sometimes "remembers" that a file or directory didn't exist at some
point. The git hook installation script sometimes needs to create a
hooks directory in the repository. Due to the cached state of the
hooks directory, the build system tries to create it twice. The second
mkdir operation leads to an error since the directory already exists.

Fix this issue by clearing the cached state of the hooks directory
after creating it.

Change-Id: I3f67f75c06ef928b439a0742f7619b7e92ed093b
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2660
Reviewed-by: Gabe Black <gabeblack@google.com>


# 11928:9b1161fa252c 25-Mar-2017 Gabe Black <gabeblack@google.com>

scons: Collapse symlinks when installing git hooks.

When naively computing the relative path between the git hooks directory and a
hook we want to install, that will generally start with a few ".." path
components to work back out of the .git directory into the working directory.'
If the hooks directory is actually a symlink, then following ".." directory
entries won't get us back to where we came from, they'll take us to the actual
parent directory of hooks. The relative path we computed would then try to go
forward from this other directory using a path that would have worked in the
working directory, hopefully going somewhere that doesn't exist, but
potentially going to a totally unrelated file with the same relative path.

To avoid this problem, we should expand any symlinks in both the hooks
directory path, and the path to the hook script. That way, any ".." components
will go where we'd expect them to, and the relative path will actually go from
hooks to the script we expect.

Change-Id: I64d51bc817351f89b1d60eceaf450cc0a4553415
Reviewed-on: https://gem5-review.googlesource.com/2542
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 11927:8f764ba85a6c 25-Mar-2017 Gabe Black <gabeblack@google.com>

scons: Use a relative symlink for git hooks more selectively.

If the hooks directory is a symlink, then there are at least two possible
scenarios to consider when installing a hook which is itself a symlink. The
first is that hooks is a relative symlink, and so is likely intended to stay
in place relative to .git and the git working directory. In that case, it's ok
for the symlinks inside of hooks to be relative to the working directory too,
since they should also stay in place relatively speaking.

The second situation is that the symlink is absolute. In that case, moving the
git working directory will move the hook relative to the hook directory, and
any relative symlink will become broken. In that case, the hook symlink needs
to be absolute.

The same logic likely applies to the .git directory itself, although I haven't
run into a situation in practice where the .git directory is actually a
symlink.

Change-Id: I047aa198094dd0fd5a841417d93b211ece02783f
Reviewed-on: https://gem5-review.googlesource.com/2541
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 11926:3e3d489a3a69 25-Mar-2017 Gabe Black <gabeblack@google.com>

scons: Detect and remove broken git hook symlinks.

When installing a git hook, it's possible for the hook to not "exist" if it's
actually a symlink which points to a file that doesn't exist. Trying to create
a new symlink in its place without first removing the old one causes a build
failure in these cases.

If the hook doesn't "exist" but is still a link, that means it's actually a
broken link and should be deleted by the hook installation function before any
new symlink is created.

Change-Id: I59aa51feb5bd74ca33e51e89cde2ceabeb41bd76
Reviewed-on: https://gem5-review.googlesource.com/2540
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>


# 11925:cc1e01a99561 24-Mar-2017 Gabe Black <gabeblack@google.com>

scons: Stop generating an a.out checking the "as" version.

Change-Id: I71d07fc64bdb3c6c3e93e2a1fd358cc899a70678
Reviewed-on: https://gem5-review.googlesource.com/2500
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>


# 11887:f08918a690cf 05-Feb-2017 Andreas Sandberg <andreas.sandberg@arm.com>

scons: Automatically add a git commit message hook

Gerrit requires that all commit messages have a Change-Id tag. This
tag is added automatically by a commit message hook in Git. Include
the default Gerrit commit message hook and add it automatically using
scons to make life easier for everyone.

Change-Id: I1270fbaaadf6ed151bddf14521a38e0c1a02d131
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2166
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>


# 11811:83677ded6358 09-Feb-2017 Bjoern A. Zeeb <baz21@cam.ac.uk>

scons: make build better on FreeBSD

Various changes we found needed to build gem5 successfully on
FreeBSD.

Reviewed at http://reviews.gem5.org/r/3378/

Signed-off-by: Jason Lowe-Power <jason@lowepower.com>


# 11798:e034a4566653 19-Jan-2017 Tony Gutierrez <anthony.gutierrez@amd.com>

ruby: guard usage of GPUCoalescer code in Profiler

the GPUCoalescer code is used in the ruby profiler regardless of
whether or not the coalescer code has been compiled, which can
lead to link/run time errors. here we add #ifdefs to guard the
usage of GPUCoalescer code. eventually we should refactor this
code to use probe points.


# 11500:024291dab733 30-May-2016 Andreas Hansson <andreas.hansson@arm.com>

scons: Bump minimum gcc version to 4.8

After reaching consensus on the mailing list, this patch officially
makes gcc 4.8 the minimum.

A few checks in the SConstruct are cleaned up as a result. This patch
also adds "-fno-omit-frame-pointer" when using ASAN (which is part of
the gcc/clang recommended flags).


# 11497:bfed9fdf0ac7 27-May-2016 Matteo Andreozzi <Matteo.Andreozzi@arm.com>

scons: Enable override suggestions on gcc 5.0+

---
SConstruct | 4 ++++
1 file changed, 4 insertions(+)


# 11476:8c67ac296e75 09-May-2016 Andreas Sandberg <andreas.sandberg@arm.com>

scons: Rewrite git style hook installer

The SCons script currently assumes that .git is a proper directory
with all git meta data. This isn't the case if the working directory
was checked out using git worktrees. In such case .git is a file with
meta data telling git where the repository data is stored.

This changeset updates changes the SConstruct file to rely on git
rev-parse to get the real git directory.

Change-Id: I3d0475eabc12e868193797067a88e540a9b6e927
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>


# 11469:015cad6e65d5 28-Apr-2016 Curtis Dunham <Curtis.Dunham@arm.com>

scons: emit correct message before installing git hook

Change-Id: Ied2e018a9a1b6db446edbaac871ac4efd795ec36
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>


# 11450:98e5204d0a52 18-Apr-2016 Andreas Sandberg <andreas.sandberg@arm.com>

scons: Fix Python 2.6 compatibility

Don't use Python 2.7-style with statements in the SConstruct file.


# 11408:cb18b6551499 30-Mar-2016 Andreas Sandberg <andreas.sandberg@arm.com>

scons: Automatically install the git style hook

Add a check in the main SConscript that installs the git pre-commit
hook in util/ if git is used.

Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
[andreas.sandberg@arm.com: Cleanups suggested by Steve]
Reviewed-by: Steve Reinhardt <steve.reinhardt@amd.com>


# 11401:55f9a21e34b4 30-Mar-2016 Andreas Sandberg <andreas.sandberg@arm.com>

scons, style: Rename style.py to hgstyle.py

The Mercurial style checker extensions are currently stored in
style.py. This is not ideal since they won't work with other version
control systems. This changeset renames style.py to hgstyle.py and
adds upgrade code to scons that automatically updates the hooks in
hgrc.

Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Nathanael Premillieu <nathananel.premillieu@arm.com>
Reviewed-by: Steve Reinhardt <steve.reinhardt@amd.com>


# 11342:a4d19e7cd26d 17-Feb-2016 Andreas Hansson <andreas.hansson@arm.com>

scons: Enable building with the gcc/clang Address Sanitizer

Allow the user to easily build gem5 with the Address Sanitizer, part
of both gcc and clang these days.


# 11308:7d8836fd043d 19-Jan-2016 Tony Gutierrez <anthony.gutierrez@amd.com>

gpu-compute: AMD's baseline GPU model


# 11294:a368064a2ab5 11-Jan-2016 Andreas Hansson <andreas.hansson@arm.com>

scons: Enable -Wextra by default

Make best use of the compiler, and enable -Wextra as well as
-Wall. There are a few issues that had to be resolved, but they are
all trivial.


# 11293:25352d3d491e 11-Jan-2016 Andreas Hansson <andreas.hansson@arm.com>

ext: Replace gzstream with iostream3 from zlib to avoid LGPL

This patch replaces the gzstream zlib wrapper with the iostream3
wrapper provided as part of zlib contributions. The main reason for
the switch is to avoid including LGPL in the default gem5
build. iostream3 is provided under a more permissive license:

The code is provided "as is", with the permission to use, copy,
modify, distribute and sell it for any purpose without fee.


# 11235:4162427127e9 03-Dec-2015 Andreas Sandberg <andreas.sandberg@arm.com>

sim: Add support for generating back traces on errors

Add functionality to generate a back trace if gem5 crashes (SIGABRT or
SIGSEGV). The current implementation uses glibc's stack traversal
support if available and stubs out the call to print_backtrace()
otherwise.


# 11212:47e2adf7fb1a 15-Nov-2015 Joe Gross <joseph.gross@amd.com>

sim: support for distcc pump server settings


# 10915:71ace17ccb3d 07-Jul-2015 Andreas Sandberg <andreas.sandberg@arm.com>

ext: Add the NoMali GPU no-simulation library

Add revision 9adf9d6e2d889a483a92136c96eb8a434d360561 of NoMali-model
from https://github.com/ARM-software/nomali-model. This library
implements the register interface of the Mali T6xx/T7xx series GPUs,
but doesn't do any rendering. It can be used to hide the effects of
software rendering.


# 10881:133d8bb2024f 03-Jul-2015 Curtis Dunham <Curtis.Dunham@arm.com>

scons: remove dead leading underscore check

e56c3d8 (2008) added it but 8e37348 (2010) removed its only use.


# 10878:0e466ba12a99 03-Jul-2015 Andreas Hansson <andreas.hansson@arm.com>

scons: Bump compiler requirement to gcc >= 4.7 and clang >= 3.1

This patch updates the compiler minimum requirement to gcc 4.7 and
clang 3.1, thus allowing:

1. Explicit virtual overrides (no need for M5_ATTR_OVERRIDE)
2. Non-static data member initializers
3. Template aliases
4. Delegating constructors

This patch also enables a transition from --std=c++0x to --std=c++11.


# 10866:0421e52a57af 09-Jun-2015 Andreas Hansson <andreas.hansson@arm.com>

scons: Allow GNU assembler version strings with hyphen

Make scons a bit more forgiving when determining the GNU assembler version.


# 10860:cba0f26038b4 01-Jun-2015 Andreas Sandberg <andreas.sandberg@arm.com>

kvm, arm: Add support for aarch64

This changeset adds support for aarch64 in kvm. The CPU module
supports both checkpointing and online CPU model switching as long as
no devices are simulated by the host kernel. It currently has the
following limitations:

* The system register based generic timer can only be simulated by
the host kernel. Workaround: Use a memory mapped timer instead to
simulate the timer in gem5.

* Simulating devices (e.g., the generic timer) in the host kernel
requires that the host kernel also simulates the GIC.

* ID registers in the host and in gem5 must match for switching
between simulated CPUs and KVM. This is particularly important
for ID registers describing memory system capabilities (e.g.,
ASID size, physical address size).

* Switching between a virtualized CPU and a simulated CPU is
currently not supported if in-kernel device emulation is
used. This could be worked around by adding support for switching
to the gem5 (e.g., the KvmGic) side of the device models. A
simpler workaround is to avoid in-kernel device models
altogether.


# 10841:38af38f1f307 23-May-2015 Andreas Sandberg <andreas.sandberg@arm.com>

build: Don't test for KVM xsave support on ARM

The current build tests for KVM unconditionally check for xsave
support. This obviously never works on ARM since xsave is
x86-specific. This changeset refactors the build tests probing for KVM
support and moves the xsave test to an x86-specific section of
is_isa_kvm_compatible().


# 10710:9b71309d29f9 02-Mar-2015 Andreas Hansson <andreas.hansson@arm.com>

tests: Run regression timeout as foreground

Allow the user to send signals such as Ctrl C to the gem5 runs. Note
that this assumes coreutils >= 8.13, which aligns with Ubuntu 12.04
and RHE6.


# 10671:d59e40b074c6 03-Feb-2015 Andreas Hansson <andreas.hansson@arm.com>

scons: Avoid implicit command dependencies

Work around a bug in scons that causes the param wrappers being
compiled twice. The easiest way for us to do so is to tell scons to
ignore implicit command dependencies.


# 10607:b3ea7444f466 22-Dec-2014 Gabe Black <gabeblack@google.com>

scons: Make the USE_KVM variable available in C++.

We need it to determine whether we should expect KVM related parameters
exist in the cirrus graphics device.


# 10584:babb40bd2fc6 02-Dec-2014 Andreas Hansson <andreas.hansson@arm.com>

scons: Ensure dictionary iteration is sorted by key

This patch adds sorting based on the SimObject name or parameter name
for all situations where we iterate over dictionaries. This should
ensure a deterministic and consistent order across the host systems
and hopefully avoid regression results differing across python
versions.


# 10458:64809024b924 16-Oct-2014 Andreas Hansson <andreas.hansson@arm.com>

config: Add the ability to read a config file using C++ and Python

This patch adds the ability to load in config.ini files generated from
gem5 into another instance of gem5 built without Python configuration
support. The intended use case is for configuring gem5 when it is a
library embedded in another simulation system.

A parallel config file reader is also provided purely in Python to
demonstrate the approach taken and to provided similar functionality
for as-yet-unknown use models. The Python configuration file reader
can read both .ini and .json files.

C++ configuration file reading:

A command line option has been added for scons to enable C++ configuration
file reading: --with-cxx-config

There is an example in util/cxx_config that shows C++ configuration in action.
util/cxx_config/README explains how to build the example.

Configuration is achieved by the object CxxConfigManager. It handles
reading object descriptions from a CxxConfigFileBase object which
wraps a config file reader. The wrapper class CxxIniFile is provided
which wraps an IniFile for reading .ini files. Reading .json files
from C++ would be possible with a similar wrapper and a JSON parser.

After reading object descriptions, CxxConfigManager creates
SimObjectParam-derived objects from the classes in the (generated with this
patch) directory build/ARCH/cxx_config

CxxConfigManager can then build SimObjects from those SimObjectParams (in an
order dictated by the SimObject-value parameters on other objects) and bind
ports of the produced SimObjects.

A minimal set of instantiate-replacing member functions are provided by
CxxConfigManager and few of the member functions of SimObject (such as drain)
are extended onto CxxConfigManager.

Python configuration file reading (configs/example/read_config.py):

A Python version of the reader is also supplied with a similar interface to
CxxConfigFileBase (In Python: ConfigFile) to config file readers.

The Python config file reading will handle both .ini and .json files.

The object construction strategy is slightly different in Python from the C++
reader as you need to avoid objects prematurely becoming the children of other
objects when setting parameters.

Port binding also needs to be strictly in the same port-index order as the
original instantiation.


# 10457:c0302ad57921 16-Oct-2014 Andreas Hansson <andreas.hansson@arm.com>

scons: Add Undefined Behavior Sanitizer (UBSan) option

This patch adds the Undefined Behavior Sanitizer (UBSan) for clang and
gcc >= 4.9. Due to the performance impact, the usage is guarded by a
command-line option.


# 10456:1e2cf7b3e9d4 22-Sep-2014 Curtis Dunham <Curtis.Dunham@arm.com>

scons: Add --without-tcmalloc build option

Disabling tcmalloc is required for valgrind's memcheck to work properly;
this option makes it easier to create such a build.


# 10453:d0365cc3d05f 16-Oct-2014 Andrew Bardsley <Andrew.Bardsley@arm.com>

config: Add a --without-python option to build process

Add the ability to build libgem5 without embedded Python or the
ability to configure with Python.

This is a prelude to a patch to allow config.ini files to be loaded
into libgem5 using only C++ which would make embedding gem5 within
other simulation systems easier.

This adds a few registration interfaces to things which cross
between Python and C++. Namely: stats dumping and SimObject resolving


# 10428:0caf62b57dfd 09-Oct-2014 Andreas Hansson <andreas.hansson@arm.com>

ext: Add DRAMPower to enable on-line DRAM power modelling

This patch adds the open-source (BSD 3-clause) tool DRAMPower, commit
8d3cf4bbb10aa202d850ef5e5e3e4f53aa668fa6, to be built as a part of the
simulator. We have chosen this specific version of DRAMPower as it
provides the necessary functionality, and future updates will be
coordinated with the DRAMPower development team. The files added only
include the bits needed to build the library, thus excluding all
memory specifications, traces, and the stand-alone DRAMPower
command-line tool.

A future patch includes the DRAMPower functionality in the DRAM
controller, to enable on-line DRAM power modelling, and avoid using
post-processing of traces.


# 10425:ceb471d74fe9 09-Oct-2014 Andreas Hansson <andreas.hansson@arm.com>

scons: Warn for known gcc and swig incompatibilities


# 10416:dd64a2984966 27-Sep-2014 Andreas Hansson <andreas.hansson@arm.com>

scons: Address issues related to gcc 4.9.1

Fix a number few minor issues to please gcc 4.9.1. Removing the
'-fuse-linker-plugin' flag means no libraries are part of the LTO
process, but hopefully this is an acceptable loss, as the flag causes
issues on a lot of systems (only certain combinations of gcc, ld and
ar work).


# 10384:fa66d9c5e180 25-Aug-2014 Curtis Dunham <Curtis.Dunham@arm.com>

tests: automatically kill regressions that take too long

When GNU coreutils 'timeout' is available, limit each regression
simulation to 4 hours.


# 10319:4207f9bfcceb 03-Sep-2014 Andreas Sandberg <Andreas.Sandberg@ARM.com>

arch, cpu: Factor out the ExecContext into a proper base class

We currently generate and compile one version of the ISA code per CPU
model. This is obviously wasting a lot of resources at compile
time. This changeset factors out the interface into a separate
ExecContext class, which also serves as documentation for the
interface between CPUs and the ISA code. While doing so, this
changeset also fixes up interface inconsistencies between the
different CPU models.

The main argument for using one set of ISA code per CPU model has
always been performance as this avoid indirect branches in the
generated code. However, this argument does not hold water. Booting
Linux on a simulated ARM system running in atomic mode
(opt/10.linux-boot/realview-simple-atomic) is actually 2% faster
(compiled using clang 3.4) after applying this patch. Additionally,
compilation time is decreased by 35%.


# 10278:362875aec1ba 13-Aug-2014 Andreas Sandberg <Andreas.Sandberg@ARM.com>

scons: Silence clang 3.4 warnings on Ubuntu 12.04

This changeset fixes three types of warnings that occur in clang 3.4
on Ubuntu 12.04:

* Certain versions of libstdc++ (primarily 4.8) use struct and class
interchangeably. This triggers a warning in clang.

* Swig has a tendency to generate code with the register class which
was deprecated in C++11. This triggers a deprecation warning in
clang.

* Swig sometimes generates Python wrapper code which returns
uninitialized values. It's unclear if this is actually a problem
(the cases might be limited to failure paths). We'll silence these
warnings for now since there is little we can do about the
generated code.


# 10264:894679c8cd63 10-Aug-2014 Andreas Hansson <andreas.hansson@arm.com>

scons: Warn for incompatible gcc and binutils

It seems gcc >4.8 does not get along well with binutils <= 2.22, and
to help users this patch adds a warning with an indication for how to
fix the issue. It might even be worth adding a Exit(-1) and stop the
build.


# 10238:b21b3aad6bd1 10-Jun-2014 Andreas Hansson <andreas.hansson@arm.com>

scons: Bump the compiler version to gcc 4.6 and clang 3.0

This patch bumps the supported version of gcc from 4.4 to 4.6, and
clang from 2.9 to 3.0. This enables, amongst other things, range-based
for loops, lambda expressions, etc. The STL implementation shipping
with 4.6 also has a full functional implementation of unique_ptr and
shared_ptr.


# 10196:be0e1724eb39 09-May-2014 Curtis Dunham <Curtis.Dunham@arm.com>

arch: teach ISA parser how to split code across files

This patch encompasses several interrelated and interdependent changes
to the ISA generation step. The end goal is to reduce the size of the
generated compilation units for instruction execution and decoding so
that batch compilation can proceed with all CPUs active without
exhausting physical memory.

The ISA parser (src/arch/isa_parser.py) has been improved so that it can
accept 'split [output_type];' directives at the top level of the grammar
and 'split(output_type)' python calls within 'exec {{ ... }}' blocks.
This has the effect of "splitting" the files into smaller compilation
units. I use air-quotes around "splitting" because the files themselves
are not split, but preprocessing directives are inserted to have the same
effect.

Architecturally, the ISA parser has had some changes in how it works.
In general, it emits code sooner. It doesn't generate per-CPU files,
and instead defers to the C preprocessor to create the duplicate copies
for each CPU type. Likewise there are more files emitted and the C
preprocessor does more substitution that used to be done by the ISA parser.

Finally, the build system (SCons) needs to be able to cope with a
dynamic list of source files coming out of the ISA parser. The changes
to the SCons{cript,truct} files support this. In broad strokes, the
targets requested on the command line are hidden from SCons until all
the build dependencies are determined, otherwise it would try, realize
it can't reach the goal, and terminate in failure. Since build steps
(i.e. running the ISA parser) must be taken to determine the file list,
several new build stages have been inserted at the very start of the
build. First, the build dependencies from the ISA parser will be emitted
to arch/$ISA/generated/inc.d, which is then read by a new SCons builder
to finalize the dependencies. (Once inc.d exists, the ISA parser will not
need to be run to complete this step.) Once the dependencies are known,
the 'Environments' are made by the makeEnv() function. This function used
to be called before the build began but now happens during the build.
It is easy to see that this step is quite slow; this is a known issue
and it's important to realize that it was already slow, but there was
no obvious cause to attribute it to since nothing was displayed to the
terminal. Since new steps that used to be performed serially are now in a
potentially-parallel build phase, the pathname handling in the SCons scripts
has been tightened up to deal with chdir() race conditions. In general,
pathnames are computed earlier and more likely to be stored, passed around,
and processed as absolute paths rather than relative paths. In the end,
some of these issues had to be fixed by inserting serializing dependencies
in the build.

Minor note:
For the null ISA, we just provide a dummy inc.d so SCons is never
compelled to try to generate it. While it seems slightly wrong to have
anything in src/arch/*/generated (i.e. a non-generated 'generated' file),
it's by far the simplest solution.


# 10181:6270235e0585 09-May-2014 Curtis Dunham <Curtis.Dunham@arm.com>

scons: Require SWIG >= 2.0.4 and remove vector typemaps

SWIG commit fd666c1 (*) made it unnecessary for gem5 to have these
typemaps to handle Vector types.

* https://github.com/swig/swig/commit/fd666c1440628a847793bbe1333c27dfa2f757f0


# 10160:3f4372fa8e6c 13-Apr-2014 Andreas Hansson <andreas.hansson@arm.com>

scons: Fix python-config parsing by adding strip()

This patch fixes an issue with the way the python-config path is
parsed, as it caused issues on systems where a newline ended up being
included in the path.


# 10158:24a198a46ff0 10-Apr-2014 Stian Hvatum <stian@dream-web.no>

scons: compile on systems where python2 and python3 co-exist
Compile gem5 on systems where python2 and python3 co-exists without any
changes in path. python2-config is chosen over python-config if it exists.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>


# 10135:7bbd1a21e566 23-Mar-2014 Curtis Dunham <Curtis.Dunham@arm.com>

scons: Shush scons

make 'scons -s' actually silent.


# 10106:b7e7533097b9 07-Mar-2014 Mitch Hayenga <Mitch.Hayenga@arm.com>

scons: Fix clang version identification for OSX

The version string may have additional trailing information


# 10068:7867c5f28b90 18-Feb-2014 Andreas Hansson <andreas.hansson@arm.com>

scons: Add PROTOC from the environment

This patch adds PROTOC to the build environment.


# 10066:06a33d872798 18-Feb-2014 Andreas Hansson <andreas.hansson@arm.com>

mem: Add a wrapped DRAMSim2 memory controller

This patch adds DRAMSim2 as a memory controller by wrapping the
external library and creating a sublass of AbstractMemory that bridges
between the semantics of gem5 and the DRAMSim2 interface.

The DRAMSim2 wrapper extracts the clock period from the config
file. There is no way of extracting this information from DRAMSim2
itself, so we simply read the same config file and get it from there.

To properly model the response queue, the wrapper keeps track of how
many transactions are in the actual controller, and how many are
stacking up waiting to be sent back as responses (in the wrapper). The
latter requires us to move away from the queued port and manage the
packets ourselves. This is due to DRAMSim2 not having any flow control
on the response path.

DRAMSim2 assumes that the transactions it is given are matching the
burst size of the choosen memory. The wrapper checks to ensure the
cache line size of the system matches the burst size of DRAMSim2 as
there are currently no provisions to split the system requests. In
theory we could allow a cache line size smaller than the burst size,
but that would lead to inefficient use of the DRAM, so for not we
fatal also in this case.


# 9986:7cab06691984 15-Oct-2013 Andreas Sandberg <andreas@sandberg.pp.se>

kvm: Set the perf exclude_host attribute if available

The performance counting framework in Linux 3.2 and onwards supports
an attribute to exclude events generated by the host when running
KVM. Setting this attribute allows us to get more reliable
measurements of the guest machine. For example, on a highly loaded
system, the instruction counts from the guest can be severely
distorted by the host kernel (e.g., by page fault handlers).

This changeset introduces a check for the attribute and enables it in
the KVM CPU if present.


# 9926:45a013c50eff 17-Oct-2013 Stan Czerniawski <stan.czerniawski@arm.com>

build: Enable color diagnostics in clang by preserving TERM.


# 9903:cb74b075186e 02-Oct-2013 Andreas Hansson <andreas.hansson@arm.com>

kvm: Only include KVM support for supported kernels

This patch adds a check to ensure that the KVM API provided by the
running kernel is what we are expecting.


# 9900:19dc2b26eefa 01-Oct-2013 Andreas Sandberg <andreas@sandberg.pp.se>

scons, kvm: Check for the presence of POSIX timers

The kvm-based CPU module requires support for POSIX timers. This
changeset adds a check for POSIX timers and ensures that gem5 is
linked with librt if necessary. KVM support is disabled if POSIX
timers are not supported by the host. This fixes a compilation issue
for some glibc versions where clock_nanosleep and timer_create are in
different libraries.


# 9888:68d6b600d51f 30-Sep-2013 Andreas Sandberg <andreas@sandberg.pp.se>

ext: Include libfputils

This changeset includes libfputils from revision bbf0d61d75. This
library can be used to convert to and from 80-bit floats and query the
type of an 80-bit float, which is needed to support the x87 FPU.


# 9883:7e0dff1c165b 24-Sep-2013 Andreas Sandberg <andreas@sandberg.pp.se>

kvm: Initial x86 support

This changeset adds support for KVM on x86. Full support is split
across a number of commits since some features are relatively
complex. This changeset includes support for:

* Integer state synchronization (including segment regs)
* CPUID (gem5's CPUID values are inserted into KVM)
* x86 legacy IO (remapped and handled by gem5's memory system)
* Memory mapped IO
* PCI
* MSRs
* State dumping

Most of the functionality is fairly straight forward. There are some
quirks to support PCI enumerations since this is done in the TLB(!) in
the simulated CPUs. We currently replicate some of that code.

Unlike the ARM implementation, the x86 implementation of the virtual
CPU does not use the cycles hardware counter. KVM on x86 simulates the
time stamp counter (TSC) in the kernel. If we just measure host cycles
using perfevent, we might end up measuring a slightly different number
of cycles. If we don't get the cycle accounting right, we might end up
rewinding the TSC, with all kinds of chaos as a result.

An additional feature of the KVM CPU on x86 is extended state
dumping. This enables Python scripts controlling the simulator to
request dumping of a subset of the processor state. The following
methods are currenlty supported:

* dumpFpuRegs
* dumpIntRegs
* dumpSpecRegs
* dumpDebugRegs
* dumpXCRs
* dumpXSave
* dumpVCpuEvents
* dumpMSRs

Known limitations:
* M5 ops are currently not supported.
* FPU synchronization is not supported (only affects CPU switching).

Both of the limitations will be addressed in separate commits.


# 9877:b072123bc071 18-Sep-2013 Andreas Hansson <andreas.hansson@arm.com>

swig: Warn on use of incompatible swig/gcc combinations

This patch removes the fixed swig warning concerning 2.0.9/2.0.10 and
adds a warning message for incompatible combinations of swig and gcc.


# 9846:a4b5fd8937c9 04-Sep-2013 Andreas Hansson <andreas.hansson@arm.com>

scons: Enable build on OSX

This patch changes the SConscript to build gem5 with libc++ on OSX as
the conventional libstdc++ does not have the C++11 constructs that the
current code base makes use of (e.g. std::forward).

Since this was the last use of the transitional TR1, the unordered map
and set header can now be simplified as well.


# 9812:9265bcff11b7 18-Jul-2013 Andreas Hansson <andreas.hansson@arm.com>

scons: Use python-config instead of distutils

This patch changes how we determine the Python-related compiler and
linker flags. The previous approach used the internal LINKFORSHARED
which is not intended as part of the external API
(http://bugs.python.org/issue3588) and causes failures on recent OSX
installations.

Instead of using distutils we now rely on python-config and scons
ParseConfig. For backwards compatibility we also parse out the
includes and libs although this could safely be dropped. The drawback
of this patch is that Python 2.5 is now required, but hopefully that
is an acceptable compromise as any system with gcc 4.4 most likely
will have Python >= 2.5.


# 9740:101441a7b420 04-Jun-2013 Ali Saidi <Ali.Saidi@ARM.com>

scons: ammend swig warning error to version 2.0.10 as well


# 9657:0e15490aad4f 22-Apr-2013 Andreas Sandberg <andreas.sandberg@arm.com>

kvm: Add basic support for ARM

Architecture specific limitations:
* LPAE is currently not supported by gem5. We therefore panic if LPAE
is enabled when returning to gem5.
* The co-processor based interface to the architected timer is
unsupported. We can't support this due to limitations in the KVM
API on ARM.
* M5 ops are currently not supported. This requires either a kernel
hack or a memory mapped device that handles the guest<->m5
interface.


# 9651:f551c8ad12a5 22-Apr-2013 Andreas Sandberg <Andreas.Sandberg@ARM.com>

kvm: Basic support for hardware virtualized CPUs

This changeset introduces the architecture independent parts required
to support KVM-accelerated CPUs. It introduces two new simulation
objects:

KvmVM -- The KVM VM is a component shared between all CPUs in a shared
memory domain. It is typically instantiated as a child of the
system object in the simulation hierarchy. It provides access
to KVM VM specific interfaces.

BaseKvmCPU -- Abstract base class for all KVM-based CPUs. Architecture
dependent CPU implementations inherit from this class
and implement the following methods:

* updateKvmState() -- Update the
architecture-dependent KVM state from the gem5
thread context associated with the CPU.

* updateThreadContext() -- Update the thread context
from the architecture-dependent KVM state.

* dump() -- Dump the KVM state using (optional).

In order to deliver interrupts to the guest, CPU
implementations typically override the tick() method and
check for, and deliver, interrupts prior to entering
KVM.

Hardware-virutalized CPU currently have the following limitations:
* SE mode is not supported.
* PC events are not supported.
* Timing statistics are currently very limited. The current approach
simply scales the host cycles with a user-configurable factor.
* The simulated system must not contain any caches.
* Since cycle counts are approximate, there is no way to request an
exact number of cycles (or instructions) to be executed by the CPU.
* Hardware virtualized CPUs and gem5 CPUs must not execute at the
same time in the same simulator instance.
* Only single-CPU systems can be simulated.
* Remote GDB connections to the guest system are not supported.

Additionally, m5ops requires an architecture specific interface and
might not be supported.


# 9591:b6a47b43f4df 18-Mar-2013 Andreas Sandberg <andreas@sandberg.pp.se>

scons: Try to use 'tcmalloc' before 'tcmalloc_minimal'

tcmalloc_minimal doesn't support the heap checker on Debian, while
tcmalloc does. Instead of always linking with tcmalloc_minimal, if it
exists, we first check for tcmalloc and then use tcmalloc_minimal as a
fallback.


# 9590:699f4ee61445 18-Mar-2013 Andreas Sandberg <andreas@sandberg.pp.se>

scons: Avoid malloc/free compiler optimization when using tcmalloc

According to the tcmalloc readme, the recommended way of compiling
applications that make use of tcmalloc is to disable compiler
optimizations that make assumptions about malloc and friends. This
changeset adds the necessary compiler flags for both gcc and clang.

From the tcmalloc readme:
"NOTE: When compiling with programs with gcc, that you plan to link
with libtcmalloc, it's safest to pass in the flags

-fno-builtin-malloc -fno-builtin-calloc
-fno-builtin-realloc -fno-builtin-free

when compiling."


# 9589:d2fbb792a8a0 18-Mar-2013 Andreas Sandberg <andreas@sandberg.pp.se>

scons: Don't explicitly add tcmalloc_minimal to LIBS

SCons automatically adds a library to LIBS if conf.CheckLib succeeds,
so there is no need to explicitly add the library.


# 9588:d4924e68028f 18-Mar-2013 Andreas Sandberg <andreas@sandberg.pp.se>

scons: Include flags required to link statically with Python

Python requires the flags in LINKFORSHARED to be added the linker
flags when linking with a statically with Python. Failing to do so can
lead to errors from the Python's dynamic module loader at start up.


# 9585:ef864175dcc0 14-Mar-2013 Andreas Sandberg <andreas@sandberg.pp.se>

scons: Check for known buggy version of SWIG (2.0.9)

SWIG version 2.0.9 uses fully qualified module names despite of the
importing module being in the same package as the imported
module. This has the unfortunate consequence of causing the following
error when importing m5.internal.event:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "src/python/importer.py", line 75, in load_module
exec code in mod.__dict__
File "src/python/m5/__init__.py", line 35, in <module>
import internal
File "src/python/importer.py", line 75, in load_module
exec code in mod.__dict__
File "src/python/m5/internal/__init__.py", line 32, in <module>
import event
File "src/python/importer.py", line 75, in load_module
exec code in mod.__dict__
File "build/X86/python/swig/event.py", line 107, in <module>
class Event(m5.internal.serialize.Serializable):
AttributeError: 'module' object has no attribute 'internal'

When 'event' is loaded, it triggers 'serialize' to be loaded. However,
it seems like the dictionary of 'm5' isn't updated until after
__init__.py terminates, which means that 'event' never sees the
'internal' attribute on 'm5'. Older versions of SWIG didn't include
the fully qualified module name if the modules were in the same
package.


# 9556:463684ff6fd1 19-Feb-2013 Andreas Hansson <andreas.hansson@arm.com>

scons: Unify the flags shared by gcc and clang

This patch restructures and unifies the flags used by gcc and clang as
they are largely the same. The common parts are now dealt with in a
shared block of code, and the few bits and pieces that are
specifically affecting either gcc or clang are done separately.


# 9552:460cf901acba 19-Feb-2013 Andreas Hansson <andreas.hansson@arm.com>

scons: Add warning for overloaded virtual functions

A derived function with a different signature than a base class
function will result in the base class function of the same name being
hidden. The parameter list and return type for the member function in
the derived class must match those of the member function in the base
class, otherwise the function in the derived class will hide the
function in the base class and no polymorphic behaviour will occur.

This patch addresses these warnings by ensuring a unique function name
to avoid (unintentionally) hiding any functions.


# 9551:f867e530f39b 19-Feb-2013 Andreas Hansson <andreas.hansson@arm.com>

scons: Add warning for missing field initializers

This patch adds a warning for missing field initializers for both gcc
and clang, and addresses the warnings that were generated.


# 9537:ad5b3252dcc6 15-Feb-2013 Anthony Gutierrez <atgutier@umich.edu>

ext lib: add libfdt to enable flattened device tree support

this patch adds libfdt, a library necessary for supporting
flattened device tree support in current and future versions of
the linux/android kernel for ARM.


# 9477:d0aacc54cee9 21-Jan-2013 Andreas Hansson <andreas.hansson@arm.com>

scons: Disable protobuf if pkg-config and CheckLib fails

This patch changes the use of pkg-config such that protobuf is still
evaluated with CheckLib even if it fails. This is to allow setups
where libprotobuf is available, but not configured through
protobuf. Moreover, if CheckLib fails to use libprotobuf then all the
tracing is disabled, but scons is allowed to continue with a warning.


# 9420:965d857ac791 07-Jan-2013 Andreas Hansson <andreas.hansson@arm.com>

scons: Enforce gcc >= 4.4 or clang >= 2.9 and c++0x support

This patch checks that the compiler in use is either gcc >= 4.4 or
clang >= 2.9. and enables building with --std=c++0x in all cases. As a
consequence, we can tidy up the hashmap and always have static_assert
available. If anyone wants to use alternative compilers, icc for
example supports c++0x to a similar level and could be added if
needed.

This patch opens up for a more elaborate use of c++0x features that
are present in gcc 4.4 and clang 2.9, e.g. auto typed variables,
variadic templates, rvalues and move semantics, and strongly typed
enums. There will be no going back on this one...


# 9419:54d5c0e5852a 07-Jan-2013 Andreas Hansson <andreas.hansson@arm.com>

scons: Remove stale compiler options

This patch simply prunes the SUNCC and ICC compiler options as they
are both sufficiently stale that they would have to be re-written from
scratch anyhow. The patch serves to clean things up before shifting to
a build environment that enforces basic c++11 compliance as done in
the following patch.


# 9416:4bf9aa9d40bb 07-Jan-2013 Andreas Sandberg <Andreas.Sandberg@ARM.com>

scons: Whitelist useful environment variables

Scons normally removes all environment variables that aren't
whitelisted from the build environment. This messes up things like
ccache, distcc, and the clang static analyzer. This changeset adds the
DISTCC_, CCACHE_, and CCC_ prefixes to the environment variable
whitelist.


# 9396:0c0ec9d87746 07-Jan-2013 Andreas Hansson <andreas.hansson@arm.com>

scons: Add support for google protobuf building

This patch enables the use of protobuf input files in the build
process, thus allowing .proto files to be added to input. Each .proto
file is compiled using the protoc tool and the newly created C++
source is added to the list of sources.

The first location where the protobufs will be used is in the
capturing and replay of memory traces, involving the communication
monitor and the trace-generator state of the traffic generator. This
will follow in the next patch.

This patch does add a dependency on the availability of the BSD
licensed protobuf library (and headers), and the protobuf compiler,
protoc. These dependencies are checked in the SConstruct, similar to
e.g. swig. The user can override the use of protoc from the PATH by
specifying the PROTOC environment variable.

Although the dependency on libprotobuf and protoc might seem like a
big step, they add significant value to the project going
forward. Execution traces and other types of traces could easily be
added and parsers for C++ and Python are automatically generated. We
could also envision using protobufs for the checkpoints, description
of the traffic-generator behaviour etc. The sky is the limit. We could
also use the GzipOutputStream from the protobuf library instead of the
current GPL gzstream.

Currently, only the C++ source and header is generated. Going forward
we might want to add the Python output to support simple command-line
tools for displaying and editing the traces.


# 9255:60f043573a65 25-Sep-2012 Andreas Sandberg <Andreas.Sandberg@arm.com>

base: Check for static_assert support and provide fallback

C++11 has support for static_asserts to provide compile-time assertion
checking. This is very useful when testing, for example, structure
sizes to make sure that the compiler got the right alignment or vector
sizes.


# 9239:c9f8a432e5ea 21-Sep-2012 Andreas Hansson <andreas.hansson@arm.com>

Scons: Verbose messages when dependencies are not installed

This patch adds a few more checks to ensure that a compiler is present
on the system, along with swig. It references the relevant packages on
Ubuntu/RedHat, and also adds a similar line for the Python headers.


# 9227:c208c904ab13 14-Sep-2012 Andreas Hansson <andreas.hansson@arm.com>

gcc: Enable Link-Time Optimization for gcc >= 4.6

This patch adds Link-Time Optimization when building the fast target
using gcc >= 4.6, and adds a scons flag to disable it (-no-lto). No
check is performed to guarantee that the linker supports LTO and use
of the linker plugin, so the user has to ensure that binutils GNU ld
>= 2.21 or the gold linker is available. Typically, if gcc >= 4.6 is
available, the latter should not be a problem. Currently the LTO
option is only useful for gcc >= 4.6, due to the limited support on
clang and earlier versions of gcc. The intention is to also add
support for clang once the LTO integration matures.

The same number of jobs is used for the parallel phase of LTO as the
jobs specified on the scons command line, using the -flto=n flag that
was introduced with gcc 4.6. The gold linker also supports concurrent
and incremental linking, but this is not used at this point.

The compilation and linking time is increased by almost 50% on
average, although ARM seems to be particularly demanding with an
increase of almost 100%. Also beware when using this as gcc uses a
tremendous amount of memory and temp space in the process. You have
been warned.

After some careful consideration, and plenty discussions, the flag is
only added to the fast target, and the warning that was issued in an
earlier version of this patch is now removed. Similarly, the flag used
to enable LTO, now the default is to use it, and the flag has been
modified to disable LTO. The rationale behind this decision is that
opt is used for development, whereas fast is only used for long runs,
e.g. regressions or more elaborate experiments where the additional
compile and link time is amortized by a much larger run time.

When it comes to the return on investment, the regression seems to be
roughly 15% faster with LTO. For a bit more detail, I ran twolf on
ARM.fast, with three repeated runs, and they all finish within 42
minutes (+- 25 seconds) without LTO and 31 minutes (+- 25 seconds)
with LTO, i.e. LTO gives an impressive >25% speed-up for this case.

Without LTO (ARM.fast twolf)

real 42m37.632s
user 42m34.448s
sys 0m0.390s

real 41m51.793s
user 41m50.384s
sys 0m0.131s

real 41m45.491s
user 41m39.791s
sys 0m0.139s

With LTO (ARM.fast twolf)

real 30m33.588s
user 30m5.701s
sys 0m0.141s

real 31m27.791s
user 31m24.674s
sys 0m0.111s

real 31m25.500s
user 31m16.731s
sys 0m0.106s


# 9224:b0539d08bda8 14-Sep-2012 Andreas Hansson <andreas.hansson@arm.com>

scons: Use c++0x with gcc >= 4.4 instead of 4.6

This patch shifts the version of gcc for which we enable c++0x from
4.6 to 4.4 The more long term plan is to see what the c++0x features
can bring and what level of support would be enabled simply by bumping
the required version of gcc from 4.3 to 4.4.

A few minor things had to be fixed in the code base, most notably the
choice of a hashmap implementation. In the Ruby Sequencer there were
also a few minor issues that gcc 4.4 was not too happy about.


# 9219:258753d3bc47 12-Sep-2012 Jason Power <power.jg@gmail.com>

Ruby: Modify Scons so that we can put .sm files in extras
Also allows for header files which are required in slicc generated
code to be in a directory other than src/mem/ruby/slicc_interface.


# 9119:a8749b39f1f8 12-Jul-2012 Andreas Hansson <andreas.hansson@arm.com>

scons: Add LIBRARY_PATH from the user environment to Scons

This patch adds the LIBRARY_PATH from the users OS environment to
Scons build environment. This path is used when linking to search for
libraries, and this patch enables tcmalloc to be used during the build
even if it is not placed in the default search paths.


# 9072:d8e5ca139d7c 20-Jun-2012 Andreas Hansson <andreas.hansson@arm.com>

swig: Use SWIG from environment when determining version

This patch fixes a minor issue in the SConstruct where a hardcoded
swig is used instead of the environment SWIG when determining the
version.


# 9071:64db8473f3ab 18-Jun-2012 Andreas Hansson <andreas.hansson@arm.com>

Build: Point to the appropriate tcmalloc package

This patch updates the message printed if the user does not have
tcmalloc available. It turns out that the correct package (which
creates all required symlinks etc) is libgoogle-perftools-dev. This
has been verified on Ubuntu 12.04.


# 9068:d421f95f92d9 11-Jun-2012 Ali Saidi <Ali.Saidi@ARM.com>

scons: Make compiler version error more verbose and easier to debug.


# 9045:eb2975c014cd 05-Jun-2012 Ali Saidi <Ali.Saidi@ARM.com>

sim: Add support for tcmalloc if it's installed and available.
This package is available in Ubuntu, Debian, and Redhat as google-perftools.
With multiple tests on a single machine I've seen a little over 10% performance
gain with tcmalloc.


# 9044:904ddeecc653 05-Jun-2012 Ali Saidi <Ali.Saidi@ARM.com>

sim: Remove FastAlloc

While FastAlloc provides a small performance increase (~1.5%) over regular malloc it isn't thread safe.
After removing FastAlloc and using tcmalloc I've seen a performance increase of 12% over libc malloc
when running twolf for ARM.


# 8980:903a824a0583 08-May-2012 Steve Reinhardt <steve.reinhardt@amd.com>

scons: allow override of SWIG binary on command line


# 8960:e7adb2ea547e 23-Apr-2012 Steve Reinhardt <steve.reinhardt@amd.com>

scons: update minimum SWIG version to 1.3.34

We should try to keep this synced with the wiki
(which I also just updated, but which was
previously inconsistent).


# 8947:217fbc57df05 14-Apr-2012 Andreas Hansson <andreas.hansson@arm.com>

Regression: Add ANSI colours to highlight test status

This patch adds a very basic pretty-printing of the test status
(passed or failed) to highlight failing tests even more: green for
passed, and red for failed. The printing only uses ANSI it the target
output is a tty and supports ANSI colours. Hence, any regression
scripts that are outputting to files or sending e-mails etc should
still be fine.


# 8946:fb6c89334b86 14-Apr-2012 Andreas Hansson <andreas.hansson@arm.com>

clang/gcc: Fix compilation issues with clang 3.0 and gcc 4.6

This patch addresses a number of minor issues that cause problems when
compiling with clang >= 3.0 and gcc >= 4.6. Most importantly, it
avoids using the deprecated ext/hash_map and instead uses
unordered_map (and similarly so for the hash_set). To make use of the
new STL containers, g++ and clang has to be invoked with "-std=c++0x",
and this is now added for all gcc versions >= 4.6, and for clang >=
3.0. For gcc >= 4.3 and <= 4.5 and clang <= 3.0 we use the tr1
unordered_map to avoid the deprecation warning.

The addition of c++0x in turn causes a few problems, as the
compiler is more stringent and adds a number of new warnings. Below,
the most important issues are enumerated:

1) the use of namespaces is more strict, e.g. for isnan, and all
headers opening the entire namespace std are now fixed.

2) another other issue caused by the more stringent compiler is the
narrowing of the embedded python, which used to be a char array,
and is now unsigned char since there were values larger than 128.

3) a particularly odd issue that arose with the new c++0x behaviour is
found in range.hh, where the operator< causes gcc to complain about
the template type parsing (the "<" is interpreted as the beginning
of a template argument), and the problem seems to be related to the
begin/end members introduced for the range-type iteration, which is
a new feature in c++11.

As a minor update, this patch also fixes the build flags for the clang
debug target that used to be shared with gcc and incorrectly use
"-ggdb".


# 8897:1021e1f313d0 16-Mar-2012 Marc Orr <marc.orr@gmail.com>

build: remove implicit-cache setting of scons from recent build faster patch


# 8887:20ea02da9c53 09-Mar-2012 Geoffrey Blake <geoffrey.blake@arm.com>

CheckerCPU: Make CheckerCPU runtime selectable instead of compile selectable

Enables the CheckerCPU to be selected at runtime with the --checker option
from the configs/example/fs.py and configs/example/se.py configuration
files. Also merges with the SE/FS changes.


# 8881:042d509574c1 06-Mar-2012 Marc Orr <marc.orr@gmail.com>

build scripts: Made minor modifications to reduce build overhead time.

1. --implicit-cache behavior is default.
2. makeEnv in src/SConscript is conditionally called.
3. decider set to MD5-timestamp
4. NO_HTML build option changed to SLICC_HTML (defaults to False)


# 8879:347fc850752c 02-Mar-2012 Steve Reinhardt <steve.reinhardt@amd.com>

SConstruct: rename and document AddM5Option

Got rid of gratuitous M5 reference in the function name.
In the process, wondered why we have this function at all and
spent time trying to get rid of it and eventually firgured out
why it's needed. Put the answer in a comment so we don't have
to wonder again.


# 8878:ac6eb417e7b4 02-Mar-2012 Steve Reinhardt <steve.reinhardt@amd.com>

SConstruct: update comments & doc strings

Lots of references to 'M5' still, and some to SE/FS


# 8809:bb10807da889 01-Feb-2012 Gabe Black <gblack@eecs.umich.edu>

Merge with head, hopefully the last time for this batch.


# 8805:42dd80cf4cb4 28-Jan-2012 Gabe Black <gblack@eecs.umich.edu>

SE/FS: Get rid of the FULL_SYSTEM config option.


# 8737:770ccf3af571 31-Jan-2012 Koan-Sin Tan <koansin.tan@gmail.com>

clang: Enable compiling gem5 using clang 2.9 and 3.0

This patch adds the necessary flags to the SConstruct and SConscript
files for compiling using clang 2.9 and later (on Ubuntu et al and OSX
XCode 4.2), and also cleans up a bunch of compiler warnings found by
clang. Most of the warnings are related to hidden virtual functions,
comparisons with unsigneds >= 0, and if-statements with empty
bodies. A number of mismatches between struct and class are also
fixed. clang 2.8 is not working as it has problems with class names
that occur in multiple namespaces (e.g. Statistics in
kernel_stats.hh).

clang has a bug (http://llvm.org/bugs/show_bug.cgi?id=7247) which
causes confusion between the container std::set and the function
Packet::set, and this is currently addressed by not including the
entire namespace std, but rather selecting e.g. "using std::vector" in
the appropriate places.


# 8655:e4001326a5ba 09-Jan-2012 Andreas Hansson <andreas.hansson@arm.com>

MAC: Make gem5 compile and run on MacOSX 10.7.2

Adaptations to make gem5 compile and run on OSX 10.7.2, with a stock
gcc 4.2.1 and the remaining dependencies from macports, i.e. python
2.7,.2 swig 2.0.4, mercurial 2.0. The changes include an adaptation of
the SConstruct to handle non-library linker flags, and Darwin-specific
code to find the memory usage of gem5. A number of Ruby files relied
on ambigious uint (without the 32 suffix) which caused compilation
errors.


# 8614:2fc7787f47a9 10-Nov-2011 Gabe Black <gblack@eecs.umich.edu>

GCC: Guard some gcc flags so they're used when available and needed.


# 8492:1ad244a20877 08-Aug-2011 Nilay Vaish<nilay@cs.wisc.edu>

BuildEnv: Eliminate RUBY as build environment variable
This patch replaces RUBY with PROTOCOL in all the SConscript files as
the environment variable that decides whether or not certain components
of the simulator are compiled.


# 8483:b5052cad1fd3 02-Aug-2011 Gabe Black <gblack@eecs.umich.edu>

Scons: Make some Action objects fit the abreviated output format.


# 8482:353abb676fa2 02-Aug-2011 Nilay Vaish<nilay@cs.wisc.edu>

Scons: Drop RUBY as compile time option.
This patch drops RUBY as a compile time option. Instead the PROTOCOL option
is used to figure out whether or not to build Ruby. If the specified protocol
is 'None', then Ruby is not compiled.


# 8474:7f49e6a176b8 19-Jul-2011 Gabe Black <gblack@eecs.umich.edu>

SCons: Only print all the SConsopts being read if verbose is turned on.


# 8336:3a2aebf01bf3 03-Jun-2011 Steve Reinhardt <steve.reinhardt@amd.com>

SConstruct: automatically update .hg/hgrc with style hooks.
Seems easier than pestering people about it.
Note also that path is now absolute, so you don't get errors
when invoking hg from subdirectories.
Also whacked unused mercurial_bin_not_found message (the
code that used this was deleted a couple months ago in
rev 5138d1e453f1).


# 8297:d57afdcf38f5 12-May-2011 Nathan Binkert <nate@binkert.org>

stats: delete mysql support
we can add it back within python in some future changeset


# 8268:3f49ed206f46 02-May-2011 Steve Reinhardt <steve.reinhardt@amd.com>

scons: interpret paths relative to launch directory

Make sure all command-line targets and EXTRAS directories
are interpreted relative to the launch directory. This
turns out to be very useful when building code from an
EXTRAS directory using SCons's -C option.

We were trying to do this with targets but it didn't actually
work since we didn't update BUILD_TARGETS (so SCons got
confused internally). We weren't even trying with EXTRAS.

To simplify the code, the default target is also interpreted
relative to the launch dir even though it was explicitly
handled as relative to the m5 dir before... I doubt anyone
really uses this anyway so it didn't seem worth the complexity.
(Maybe we should get rid of it?)


# 8267:06f3a4cbd585 02-May-2011 Steve Reinhardt <steve.reinhardt@amd.com>

scons: allow use of current builds as default build settings
Currently the --default= option only looks at the predefined
build configs (in m5/build_opts), so you're limited to basing
a new build config off of those (ALPHA_SE, etc.). If you've
already defined a non-standard build config and want to clone
it or tweak it, you have to start from scratch. This patch
causes --default= to look first among the existing builds
(in build/variables) before looking in build_opts so you
can specify an existing non-standard build config as a
starting point for a new config.


# 8152:a6052f50deed 18-Mar-2011 Steve Reinhardt <steve.reinhardt@amd.com>

base: disable FastAlloc in debug builds by default
FastAlloc's reuse policies can mask allocation bugs, so
we typically want it disabled when debugging. Set
FORCE_FAST_ALLOC to enable even when debugging, and set
NO_FAST_ALLOC to disable even in non-debug builds.


# 8126:5138d1e453f1 11-Mar-2011 Gabe Black <gblack@eecs.umich.edu>

SCons: Stop embedding the mercurial revision into the binary.

This causes a lot of rebuilds that could have otherwise possibly been
avoided, and, more annoyingly, a lot of unnecessary rerunning of the
regressions. The benefits of having the revision in the output haven't
materialized, so this change removes it.


# 8122:159c07f22c8e 04-Mar-2011 Gabe Black <gblack@eecs.umich.edu>

SCons: Fix the polarity on the --ignore-style check.


# 8121:457c24115bde 04-Mar-2011 Gabe Black <gblack@eecs.umich.edu>

SCons: Clean up some inconsistent capitalization in scons options.


# 8120:e4257cde2d79 04-Mar-2011 Gabe Black <gblack@eecs.umich.edu>

SCons: Turn some scons variables into command line options.


# 8100:cf1afc88070f 01-Mar-2011 Gabe Black <gblack@eecs.umich.edu>

SCons: Separately label the global non-sticky options.

The global sticky options were being printed with a heading, and then the
global nonsticky options were being printed immediately after them without a
heading. Because the two lists ran together and the first had its own heading,
it looked like -all- those options where sticky even though some of them
aren't. This change adds a label to the second list so it's clear they're
different.


# 7865:d38c1f650a4e 21-Jan-2011 Gabe Black <gblack@eecs.umich.edu>

SConstruct: Fix the librt check in SConstruct.


# 7840:ed75cee5c793 15-Jan-2011 Nathan Binkert <nate@binkert.org>

time: improve time datastructure

Use posix clock functions (and librt) if it is available.
Inline a bunch of functions and implement more operators.
* * *
time: more cleanup


# 7827:49b7d40ee88a 10-Jan-2011 Nathan Binkert <nate@binkert.org>

style: clean up style hook code a bit

I've renamed the check_whitespace operation to check_style. You're going to
need to change your .hg/hgrc file. While you're at it, add a pre-qrefresh
hook please.


# 7816:b5003ac75977 08-Jan-2011 Steve Reinhardt <steve.reinhardt@amd.com>

scons: show sources and targets when building, and colorize output.

I like the brevity of Ali's recent change, but the ambiguity of
sometimes showing the source and sometimes the target is a little
confusing. This patch makes scons typically list all sources and
all targets for each action, with the common path prefix factored
out for brevity. It's a little more verbose now but also more
informative.

Somehow Ali talked me into adding colors too, which is a whole
'nother story.


# 7807:15553b536bd6 30-Dec-2010 Nathan Binkert <nate@binkert.org>

style: make style hook work with pre-qrefresh and update to use new code
clean up the code a little bit while we're at it.

I recommend that everyone adds the pre-qrefresh hook below since it
will make qref run the style hook and not just commit/qpush

[extensions]
style = <m5 path>/util/style.py

[hooks]
pretxncommit.style = python:style.check_whitespace
pre-qrefresh.style = python:style.check_whitespace


# 7769:d4216d81c99e 19-Nov-2010 Ali Saidi <Ali.Saidi@ARM.com>

SCons: Fix compilation on OS X


# 7756:846fb3ffe0dc 15-Nov-2010 Ali Saidi <Ali.Saidi@ARM.com>

SCons: Cleanup SCons output during compile


# 7739:f97a5f4d0879 09-Nov-2010 Gabe Black <gblack@eecs.umich.edu>

scons: Work around for old versions of scons mistaking strings for sequences.


# 7727:e40fbbe1ed4f 08-Nov-2010 Ali Saidi <Ali.Saidi@ARM.com>

scons: add a parameter to configure SCons' build cache


# 7618:47d9409b2b7f 23-Aug-2010 Ali Saidi <Ali.Saidi@arm.com>

BUILD: GCC 4.4.1/2 have a bug in their auto-vectorizer that we trip on


# 7457:95160760db54 15-Jun-2010 Nathan Binkert <nate@binkert.org>

build: grab the right library if we're using a debug version of python


# 7450:2302e04c506e 07-Jun-2010 Steve Reinhardt <stever@gmail.com>

scons: make RUBY a regular (non-global) sticky var
and force it to True for builds that imply Ruby protocols
(else unexpected things happen when testing these builds
with RUBY=False).


# 6994:c6951099a1cb 26-Feb-2010 Nathan Binkert <nate@binkert.org>

cpu_models: get rid of cpu_models.py and move the stuff into SCons


# 6814:cdf3b0523858 17-Jan-2010 Gabe Black <gblack@eecs.umich.edu>

SCons: Make --help reflect the arguments to scons.

The arguments were added to the global_sticky_vars Variables object after the
basic help text was generated. As a result, the "actual:" value wouldn't
reflect the arguments to scons and wouldn't really be the "actual" value used
by the build. This change fixes that by updating global_sticky_vars slightly
earlier.


# 6658:f4de76601762 23-Sep-2009 Nathan Binkert <nate@binkert.org>

arch: nuke arch/isa_specific.hh and move stuff to generated config/the_isa.hh


# 6655:380a32b43336 22-Sep-2009 Nathan Binkert <nate@binkert.org>

scons: add slicc and ply to sys.path and PYTHONPATH so everyone has access


# 6654:4c84e771cca7 22-Sep-2009 Nathan Binkert <nate@binkert.org>

python: Move more code into m5.util allow SCons to use that code.
Get rid of misc.py and just stick misc things in __init__.py
Move utility functions out of SCons files and into m5.util
Move utility type stuff from m5/__init__.py to m5/util/__init__.py
Remove buildEnv from m5 and allow access only from m5.defines
Rename AddToPath to addToPath while we're moving it to m5.util
Rename read_command to readCommand while we're moving it
Rename compare_versions to compareVersions while we're moving it.


# 6168:ba6fe02228db 11-May-2009 Nathan Binkert <nate@binkert.org>

ruby: add RUBY sticky option that must be set to add ruby to the build
Default is false


# 6157:eaf2fd8f54c0 11-May-2009 Nathan Binkert <nate@binkert.org>

ruby: Migrate all of ruby and slicc to SCons.
Add the PROTOCOL sticky option sets the coherence protocol that slicc
will parse and therefore ruby will use. This whole process was made
difficult by the fact that the set of files that are output by slicc
are not easily known ahead of time. The easiest thing wound up being
to write a parser for slicc that would tell me. Incidentally this
means we now have a slicc grammar written in python.


# 6143:010490fd482a 04-May-2009 Nathan Binkert <nate@binkert.org>

scons: re-work the *Source functions to take more information.
Start by turning all of the *Source functions into classes
so we can do more calculations and more easily collect the data we need.
Add parameters to the new classes for indicating what sorts of flags the
objects should be compiled with so we can allow certain files to be compiled
without Werror for example.


# 6121:18aff7f548c1 21-Apr-2009 Nathan Binkert <nate@binkert.org>

scons: Rename the basic environment from env -> main.
env is used as a local variable all over the place and sometimes it is
easy to get confused as to whether the global env or local env is being
used. This will become especially important when I change the way we
support our variants.


# 6120:4dcea6c903fa 21-Apr-2009 Nathan Binkert <nate@binkert.org>

scons: Fix two problems with the way that the library path is generated.
1) -L is automatically added, so don't do it ourselves
2) prepend the paths for gzstream and libelf so they are certain to
come first. The problem is that python might add /usr/lib to the path
and the user might have a locally installed version of libelf installed.


# 6113:4e008e4ecc92 21-Apr-2009 Nathan Binkert <nate@binkert.org>

scons: make default target work again


# 6108:66014cd0dc61 21-Apr-2009 Nathan Binkert <nate@binkert.org>

SCons: Export export_vars so SConsopts files can add to them


# 6025:044903442dcb 09-Apr-2009 Nathan Binkert <nate@binkert.org>

alpha: get rid of all turbolaser remnants


# 6017:7e310503019e 17-Mar-2009 Nathan Binkert <nate@binkert.org>

includes: add ext to the includes path.
move dnet to the correct place so that we use this


# 6016:9116be67b6d8 17-Mar-2009 Nathan Binkert <nate@binkert.org>

ply: put the absolute path to ply in the environment, not a relative one


# 6003:8f374fd9a348 07-Mar-2009 Nathan Binkert <nate@binkert.org>

scons: fix the library path stuff


# 5990:886da6fa6d4a 05-Mar-2009 Ali Saidi <saidi@eecs.umich.edu>

SCons: Fix bug with .hg dir not existing.


# 5952:c1ee8282291d 26-Feb-2009 Ali Saidi <saidi@eecs.umich.edu>

CPA: Add new object for gathering critical path annotations.


# 5872:98f6215dffce 15-Feb-2009 Nathan Binkert <nate@binkert.org>

SCons: Fix read_command so it can properly deal with command strings


# 5871:8007803be77a 11-Feb-2009 Nathan Binkert <nate@binkert.org>

scons: clean up the main SConstruct file more.
Add some features to read_command so it works a little bit better
Clean up the mercurial checks.
Filter the user environment and only pick out the useful stuff.


# 5863:f73e06bc8765 09-Feb-2009 Nathan Binkert <nate@binkert.org>

scons: Require SCons version 0.98.1
This allows me to clean things up so we are up to date with respect to
deprecated features. There are many features scheduled for permanent failure
in scons 2.0 and 0.98.1 provides the most compatability for that. It
also paves the way for some nice new features that I will add soon


# 5749:7015e400bd1d 15-Nov-2008 Clint Smullen <cws3k@cs.virginia.edu>

Output: Include gzstream package to allow automatically-gzipped output
The gzstream package provides an ostream-interface for writing gzipped files.
The package comes from:
http://www.cs.unc.edu/Research/compgeom/gzstream/
And is distributed under the LGPL license. Both the license and version
information has been preservered, though all other files in the package have
been purged. Minor modifications to the code have been made. The output module
detects when a filename ends in .gz and constructs an ogzstream object instead
of an ofstream object. This works for both the create(...) and find(...)
commands. Additionally, since gzstream objects needs to be closed to ensure
proper file termination, I have the output deconstructor deleting all ostream's
that it manages on behalf of find(...). At the moment, the only output file
that I know this functionality works for is stats, i.e. by specifying
"--stats-file=m5stats.txt.gz" on the command line.


# 5742:828a8296270e 10-Nov-2008 Nathan Binkert <nate@binkert.org>

SCons: Allow top level directory of EXTRAS able to contain SConscripts.
The current EXTRAS will fail if the top level directory pointed to by EXTRAS
has a SConscript file in it. We allow this by including the directory name
of the EXTRA in the build directory which prevents a clash between
src/SConscript and extra/SConscript. Maintain compatibility with older uses
of EXTRAS by adding a -I for each top level extra directory.


# 5708:96614cd66f76 26-Oct-2008 Ali Saidi <saidi@eecs.umich.edu>

BATCH: Run as, ar, and ranlib with BATCH_CMD so that they execute on the batch hosts, not local host.


# 5588:d8b246a665c1 08-Oct-2008 Ali Saidi <saidi@eecs.umich.edu>

Scons: Update compare_versions() to ignore trailing charecters after an int. This is a fix for a mysql version number that includes a (E.g. 5.0.51a)


# 5571:7f81bb169068 28-Sep-2008 Nathan Binkert <nate@binkert.org>

gcc: Version 4.3 adds some warnings that we're turning off.
We just can't deal with right now.


# 5550:26231e06f86d 19-Sep-2008 Nathan Binkert <nate@binkert.org>

We're searching for g++ incorrectly


# 5522:e56c3d89be79 03-Aug-2008 Nathan Binkert <nate@binkert.org>

libm5: Create a libm5 static library for embedding m5.

This should allow m5 to be more easily embedded into other simulators.
The m5 binary adds a simple main function which then calls into the m5
libarary to start the simulation. In order to make this work
correctly, it was necessary embed python code directly into the
library instead of the zipfile hack. This is because you can't just
append the zipfile to the end of a library the way you can a binary.
As a result, Python files that are part of the m5 simulator are now
compile, marshalled, compressed, and then inserted into the library's
data section with a certain symbol name. Additionally, a new Importer
was needed to allow python to get at the embedded python code.

Small additional changes include:
- Get rid of the PYTHONHOME stuff since I don't think anyone ever used
it, and it just confuses things. Easy enough to add back if I'm wrong.
- Create a few new functions that are key to initializing and running
the simulator: initSignals, initM5Python, m5Main.

The original code for creating libm5 was inspired by a patch Michael
Adler, though the code here was done by me.


# 5398:9727ba4600de 08-Apr-2008 Ali Saidi <saidi@eecs.umich.edu>

SCons: Manually specifying header only directories with Dir() works around the problem


# 5397:58e5b68f7095 07-Apr-2008 Ali Saidi <saidi@eecs.umich.edu>

SCons: Make BATCH options global sticky so libelf is built appropriately.


# 5396:0347e9a6d2c2 07-Apr-2008 Ali Saidi <saidi@eecs.umich.edu>

SCons: Add check for SCons version since the latest are broken.


# 5385:658926ff82ed 24-Mar-2008 Steve Reinhardt <stever@gmail.com>

Add FAST_ALLOC_DEBUG and FAST_ALLOC_STATS as SConstruct options.


# 5344:d4faff20645a 11-Feb-2008 Steve Reinhardt <stever@gmail.com>

EXTRAS now points to src instead of needing 'src' subdir.


# 5343:d90312be2aa8 11-Feb-2008 Steve Reinhardt <stever@gmail.com>

Wait to set BUILD_DIR until *after* env is copied.


# 5342:c19e3a1a607c 05-Feb-2008 Steve Reinhardt <stever@gmail.com>

Cleaned up os.path imports a bit.


# 5341:4efeab4cc2a5 05-Feb-2008 Steve Reinhardt <stever@gmail.com>

Make EXTRAS work for SConsopts too.
Requires pushing source files down into 'src' subdir relative
to directory listed in EXTRAS.


# 5274:7888bf966443 19-Nov-2007 Ali Saidi <saidi@eecs.umich.edu>

Compiling: Make sure that libelf is also compiled for 64bit on OS X.


# 5273:69faa6c5e314 16-Nov-2007 Steve Reinhardt <stever@gmail.com>

Make EXTRAS work for relative directories.
Also print a little feedback when processing EXTRAS.


# 5227:46118115ac3d 08-Nov-2007 Ali Saidi <saidi@eecs.umich.edu>

Compiling: If possible compile a 64 bit binary on Mac OS X.


# 5204:6c4fab6c1113 01-Nov-2007 Steve Reinhardt <stever@gmail.com>

SConstruct: fix scons null conf object problem
so that "scons --help" works again.


# 5200:9cfaa7c2f766 31-Oct-2007 Steve Reinhardt <stever@gmail.com>

SConstruct: undo half of last changeset; looked innocuous but wasn't.


# 5199:a1809e673f69 31-Oct-2007 Steve Reinhardt <stever@gmail.com>

SConstruct: Fix env Dir/String problem


# 4973:bbbf2e4c4135 12-Aug-2007 Ali Saidi <saidi@eecs.umich.edu>

Style: fix IGNORE_STYLE so it isn't required on the command line.


# 4949:302707329b7e 12-Aug-2007 Nathan Binkert <nate@binkert.org>

style: If IGNORE_STYLE=True is set on the scons command line, ignore style.
Use this in the regress script to avoid issues with the checker.


# 4781:59a75bd0ddf4 28-Jul-2007 Nathan Binkert <nate@binkert.org>

style: Check/Fix whitespace on SCons files


# 4775:6e09e9894365 27-Jul-2007 Nathan Binkert <nate@binkert.org>

scons: make things work when EXTRAS is not defined.


# 4773:6103346eeb28 25-Jul-2007 Nathan Binkert <nate@binkert.org>

Add a new SCons option called EXTRAS that allows you to include stuff in
the build process that is outside of the main M5 tree.


# 4743:0e355a30d805 22-Jul-2007 Steve Reinhardt <stever@eecs.umich.edu>

Merge Gabe's changes with mine.


# 4742:0936d7c23999 14-Jul-2007 Steve Reinhardt <stever@eecs.umich.edu>

Handle broken swig version that prints version info on stderr.


# 4678:fd95d7ddd1ee 22-Jul-2007 Nathan Binkert <nate@binkert.org>

Add code to turn the style stuff into a mercurial hook.
Nag the user during compile if they have an hg cloned copy of M5, have
mercurial installed, but don't have the style hook enabled.


# 4554:9beeb46559ec 10-Jun-2007 Nathan Binkert <binkertn@umich.edu>

Add the -templatereduce option to swig to prepare for more templates.
remove the old scanner and replace it with ours instead of just adding ours,
this fixes some issues with dependency tracking.


# 4494:b7c909b5a5e9 30-May-2007 Ali Saidi <saidi@eecs.umich.edu>

Fix compiling on Solaris since Nate's libelf change

SConstruct:
export env after we've set CC/CXX
ext/libelf/SConscript:
pull in the CC/CXX variables from env. Use gm4 if it exists
ext/libelf/elf_begin.c:
ext/libelf/libelf_allocate.c:
include errno.h instead of sys/errno.h
ext/libelf/elf_common.h:
use the more standard uintX_t
ext/libelf/elf_strptr.c:
ext/libelf/elf_update.c:
include sysmacros.h on Solaris for roundup()


# 4202:f7a05daec670 11-Mar-2007 Nathan Binkert <binkertn@umich.edu>

Rework the way SCons recurses into subdirectories, making it
automatic. The point is that now a subdirectory can be added
to the build process just by creating a SConscript file in it.
The process has two passes. On the first pass, all subdirs
of the root of the tree are searched for SConsopts files.
These files contain any command line options that ought to be
added for a particular subdirectory. On the second pass,
all subdirs of the src directory are searched for SConscript
files. These files describe how to build any given subdirectory.
I have added a Source() function. Any file (relative to the
directory in which the SConscript resides) passed to that
function is added to the build. Clean up everything to take
advantage of Source().
function is added to the list of files to be built.


# 4120:3e09b5d32c45 03-Mar-2007 Gabe Black <gblack@eecs.umich.edu>

Add build hooks for x86.


# 3942:edc24787baf6 27-Jan-2007 Ali Saidi <saidi@eecs.umich.edu>

I missed a couple of things


# 3940:b87f85bb4275 27-Jan-2007 Ali Saidi <saidi@eecs.umich.edu>

While I'm waiting for legion to run make m5 compile with a few more compilers

SConstruct:
src/SConscript:
Add flags for Intel CC while i'm at it
src/base/compiler.hh:
the _Pragma stuff needst to be called this way unless someone happens to have a cleaner way
src/base/cprintf_formats.hh:
add std:: where appropriate
src/base/statistics.hh:
use this->map since icc was getting confused about std::map vs the locally defined map
src/cpu/static_inst.hh:
Add some more dummy returns where needed
src/mem/packet.hh:
add more dummy returns where needed
src/sim/host.hh:
use limits to come up with max tick


# 3918:1f9a98d198e8 26-Jan-2007 Ali Saidi <saidi@eecs.umich.edu>

make our code a little more standards compliant
pretty close to compiling w/ suns compiler

briefly:
add dummy return after panic()/fatal()
split out flags by compiler vendor
include cstring and cmath where appropriate
use std namespace for string ops

SConstruct:
Add code to detect compiler and choose cflags based on detected compiler
Fix zlib check to work with suncc
src/SConscript:
split out flags by compiler vendor
src/arch/sparc/isa/decoder.isa:
use correct namespace for sqrt
src/arch/sparc/isa/formats/basic.isa:
add dummy return around panic
src/arch/sparc/isa/formats/integerop.isa:
use correct namespace for stringops
src/arch/sparc/isa/includes.isa:
include cstring and cmath where appropriate
src/arch/sparc/isa_traits.hh:
remove dangling comma
src/arch/sparc/system.cc:
dummy return to make sun cc front end happy
src/arch/sparc/tlb.cc:
src/base/compression/lzss_compression.cc:
use std namespace for string ops
src/arch/sparc/utility.hh:
no reason to say something is unsigned unsigned int
src/base/compression/null_compression.hh:
dummy returns to for suncc front end
src/base/cprintf.hh:
use standard variadic argument syntax instead of gnuc specefic renaming
src/base/hashmap.hh:
don't need to define hash for suncc
src/base/hostinfo.cc:
need stdio.h for sprintf
src/base/loader/object_file.cc:
munmap is in std namespace not null
src/base/misc.hh:
use M5 generic noreturn macros
use standard variadic macro __VA_ARGS__
src/base/pollevent.cc:
we need file.h for file flags
src/base/random.cc:
mess with include files to make suncc happy
src/base/remote_gdb.cc:
malloc memory for function instead of having a non-constant in an array size
src/base/statistics.hh:
use std namespace for floor
src/base/stats/text.cc:
include math.h for rint (cmath won't work)
src/base/time.cc:
use suncc version of ctime_r
src/base/time.hh:
change macro to work with both gcc and suncc
src/base/timebuf.hh:
include cstring from memset and use std::
src/base/trace.hh:
change variadic macros to be normal format
src/cpu/SConscript:
add dummy returns where appropriate
src/cpu/activity.cc:
include cstring for memset
src/cpu/exetrace.hh:
include cstring fro memcpy
src/cpu/simple/base.hh:
add dummy return for panic
src/dev/baddev.cc:
src/dev/pciconfigall.cc:
src/dev/platform.cc:
src/dev/sparc/t1000.cc:
add dummy return where appropriate
src/dev/ide_atareg.h:
make define work for both gnuc and suncc
src/dev/io_device.hh:
add dummy returns where approirate
src/dev/pcidev.hh:
src/mem/cache/cache_impl.hh:
src/mem/cache/miss/blocking_buffer.cc:
src/mem/cache/tags/lru.hh:
src/mem/cache/tags/split.hh:
src/mem/cache/tags/split_lifo.hh:
src/mem/cache/tags/split_lru.hh:
src/mem/dram.cc:
src/mem/packet.cc:
src/mem/port.cc:
include cstring for string ops
src/dev/sparc/mm_disk.cc:
add dummy return where appropriate
include cstring for string ops
src/mem/cache/miss/blocking_buffer.hh:
src/mem/port.hh:
Add dummy return where appropriate
src/mem/cache/tags/iic.cc:
cast hastSets to double for log() call
src/mem/physical.cc:
cast pmemAddr to char* for munmap
src/sim/byteswap.hh:
make define work for suncc and gnuc


# 3718:9d40568cfaeb 04-Dec-2006 Steve Reinhardt <stever@eecs.umich.edu>

Better handling of scons -u targets.


# 3717:d4eacb8998d2 04-Dec-2006 Steve Reinhardt <stever@eecs.umich.edu>

SConstruct:
Couple minor fixes.

SConstruct:
Couple minor fixes.


# 3716:70d75ce167a3 04-Dec-2006 Steve Reinhardt <stever@eecs.umich.edu>

import os.path.join as joinpath


# 3685:c60391e0f767 29-Nov-2006 Kevin Lim <ktlim@umich.edu>

Add in O3CPU to default CPU list.


# 3643:d9700ac6ca6d 13-Nov-2006 Ali Saidi <saidi@eecs.umich.edu>

Parse CC/CXX early so that we use the correct compiler for testing dependencies/versions/libraries/etc


# 3584:8c3cdb2c001c 09-Nov-2006 Ali Saidi <saidi@eecs.umich.edu>

Get SPARC to the point that it starts running. Add ability to load the ROM bin files, cleanup lockstep printing a bit
Since we don't have a platform yet, you need to comment out the default responder stuff in Bus.py to make it work.

SConstruct:
Add TARGET_ISA to the list of environment variables that end up in the build_env for python
configs/common/FSConfig.py:
add a simple SPARC system to being testing with, you'll need to change makeLinuxAlphaSystem to makeSparcSystem in fs.py for now
src/SConscript:
add a raw file object, at least until we get more info about how to compile openboot properly
src/arch/sparc/system.cc:
src/arch/sparc/system.hh:
add parameters for ROM files (OBP/Reset/Hypervisor), a ROM, load files into ROM
src/base/loader/object_file.cc:
src/base/loader/object_file.hh:
add option to try raw when nothing works
src/cpu/exetrace.cc:
cleanup lockstep printing a little bit
src/cpu/m5legion_interface.h:
change the instruction to be 32 bits because it is
src/mem/physical.cc:
fix assert that doesn't work if memory starts somewhere above 0
src/python/m5/objects/BaseCPU.py:
Add if statement to choose between sparc tlbs and alpha tlbs
src/python/m5/objects/System.py:
Add a sparc system that sets the rom addresses correctly
src/python/m5/params.py:
add the ability to add Addr() together


# 3583:f2b9961c45bd 09-Nov-2006 Nathan Binkert <binkertn@umich.edu>

Factor out all of the encumbered stuff into separate SConscript
files so the directories can easily be deleted.
Remove the FullCPU from the ALL_CPU_LIST and only add it if
it exists.


# 3546:c4074658f1e1 07-Nov-2006 Gabe Black <gblack@eecs.umich.edu>

Made kern a switching header file directory.

SConstruct:
Put the code to make a switching header directory into a function so they are easy to make.
src/arch/SConscript:
Replace switching header code with the new function call.
src/kern/SConscript:
Created a new switching header directory in kern, and moved the declaration of some source files here.


# 3494:5ee078c93ec8 06-Nov-2006 Ali Saidi <saidi@eecs.umich.edu>

replace NULL with 0.... Why isn't NULL defined by default on Mac OS X I don't know


# 3483:edede8473667 04-Nov-2006 Ali Saidi <saidi@eecs.umich.edu>

fixes so that M5 will compile under solaris

SConstruct:
Add check to see if we need to include libsocket
src/arch/sparc/floatregfile.cc:
src/arch/sparc/intregfile.cc:
use memset rather than bzero and include the appropriate headerfile
src/base/pollevent.cc:
If we're compling under solaris we need sys/file.h
src/base/random.cc:
src/base/random.hh:
solaris doesn't have random(), so use rint with the correct rounding mode
if we're compiling on solaris
src/base/stats/flags.hh:
u_int32_t??
src/base/time.hh:
grab the timersub() define from freebsd since it doesn't exist in solaris
src/cpu/inst_seq.hh:
we don't need to include stdint here
src/sim/byteswap.hh:
the method to detect endianness on Solaris is a little more complex...


# 3356:39c17056dd41 20-Oct-2006 Nathan Binkert <binkertn@umich.edu>

Construct a correct value of PYTHONHOME from the interpreter
running SCons, make it into a sticky option that can be
overridden at build time, and set it up before the interpreter
is started. Also, fix the code that turns sticky options into
config/*.hh so that it works with types other than bool.


# 3118:3f4d39e125ae 01-Oct-2006 Steve Reinhardt <stever@eecs.umich.edu>

Move Python setup into Configure section so we can test whether the
setup is correct and provide meeaningful error messages when it's not.
Also fix for building on Cygwin where python lib is in /bin and not /lib.


# 3053:b0c9652cf9b9 21-Aug-2006 Steve Reinhardt <stever@eecs.umich.edu>

SConstruct:
Add checks for swig & libz, version check for swig.
Factor out version check code into function, use for mysql too.

SConstruct:
Add checks for swig & libz, version check for swig.
Factor out version check code into function, use for mysql too.


# 3049:2f90320192d3 21-Aug-2006 Steve Reinhardt <stever@eecs.umich.edu>

TEST_CPU_MODELS isn't used anymore.


# 3036:5d8a97f49d12 17-Aug-2006 Steve Reinhardt <stever@eecs.umich.edu>

SConstruct:
rename build/*/test dir to build/*/tests for consistency

SConstruct:
rename build/*/test dir to build/*/tests for consistency


# 2953:10e7700b27f6 22-Jul-2006 Kevin Lim <ktlim@umich.edu>

Last minute check in. Very few functional changes other than some minor config updates. Also include some recently generated stats.

SConstruct:
Make test CPUs option non-sticky.
configs/common/FSConfig.py:
Be sure to set the memory mode.
configs/test/fs.py:
Wrong string.
tests/SConscript:
Only test valid CPUs that have been compiled in.
tests/test1/ref/alpha/atomic/config.ini:
tests/test1/ref/alpha/atomic/config.out:
tests/test1/ref/alpha/atomic/m5stats.txt:
tests/test1/ref/alpha/atomic/stdout:
tests/test1/ref/alpha/detailed/config.ini:
tests/test1/ref/alpha/detailed/config.out:
tests/test1/ref/alpha/detailed/m5stats.txt:
tests/test1/ref/alpha/detailed/stdout:
tests/test1/ref/alpha/timing/config.ini:
tests/test1/ref/alpha/timing/config.out:
tests/test1/ref/alpha/timing/m5stats.txt:
tests/test1/ref/alpha/timing/stdout:
Update output.


# 2932:eba74420a01c 21-Jul-2006 Kevin Lim <ktlim@umich.edu>

Minor functionality updates.

SConstruct:
Include an option to specify the CPUs being tested.
src/cpu/SConscript:
Checker isn't SMT right now, so don't do SMT tests with the O3CPU if we're using the checker.
src/python/m5/objects/O3CPU.py:
Include default options. Unfortunately FullO3Config.py is still needed because it specifies which FUPool is being used.
tests/SConscript:
Several minor updates (sorry for one commit). Updated the copyright and fixed some m5 style issues. Also added the ability to specify which CPUs to run the tests on.


# 2929:f986dc04e25f 19-Jul-2006 Kevin Lim <ktlim@umich.edu>

Put regression tests back into m5. They are located in the "tests" directory. The directory output and reference outputs have changed slightly. Now the directory is ALPHA_SE/test/<test>/<cpu_model>/, and for the reference stats <test>/ref/<arch>/<cpu_model>

Right now only non-SMT SE regression tests have been added back in. The rest are pending getting SMT working, and consolidating the FS configuration files.

Eventually support for different OSs can be added so you can specify which versions of the binary you want to run from one config file.

Note: mp-test1 doesn't have any reference stats because MP mode doesn't currently work. The test itself should probably work once the code is fixed.

SConstruct:
Updates to allow for regression tests to work via the command line "scons build/ALPHA_SE/test/debug/quick" and such once again.
src/cpu/SConscript:
Keep a list of SMT supporting CPUs so that the regression tests can easily specify which CPUs to use if they are SMT only.


# 2817:273f7fb94f83 30-Jun-2006 Korey Sewell <ksewell@umich.edu>

Make O3CPU model independent of the ISA

Use O3CPU when building instead of AlphaO3CPU.

I could use some better python magic in the cpu_models.py file!

AUTHORS:
add middle initial
SConstruct:
change from AlphaO3CPU to O3CPU
src/cpu/SConscript:
edits to build O3CPU instead of AlphaO3CPU
src/cpu/cpu_models.py:
change substitution template to use proper CPU EXEC CONTEXT For O3CPU Model...

Actually, some Python expertise could be used here. The 'env' variable is not
passed to this file, so I had to parse through the ARGV to find the ISA...
src/cpu/o3/base_dyn_inst.cc:
src/cpu/o3/bpred_unit.cc:
src/cpu/o3/commit.cc:
src/cpu/o3/cpu.cc:
src/cpu/o3/cpu.hh:
src/cpu/o3/decode.cc:
src/cpu/o3/fetch.cc:
src/cpu/o3/iew.cc:
src/cpu/o3/inst_queue.cc:
src/cpu/o3/lsq.cc:
src/cpu/o3/lsq_unit.cc:
src/cpu/o3/mem_dep_unit.cc:
src/cpu/o3/rename.cc:
src/cpu/o3/rob.cc:
use isa_specific.hh
src/sim/process.cc:
only initi NextNPC if not ALPHA
src/cpu/o3/alpha/cpu.cc:
alphao3cpu impl
src/cpu/o3/alpha/cpu.hh:
move AlphaTC to it's own file
src/cpu/o3/alpha/cpu_impl.hh:
Move AlphaTC to it's own file ...
src/cpu/o3/alpha/dyn_inst.cc:
src/cpu/o3/alpha/dyn_inst.hh:
src/cpu/o3/alpha/dyn_inst_impl.hh:
include paths
src/cpu/o3/alpha/impl.hh:
include paths, set default MaxThreads to 2 instead of 4
src/cpu/o3/alpha/params.hh:
set Alpha Specific Params here
src/python/m5/objects/O3CPU.py:
add O3CPU class
src/cpu/o3/SConscript:
include isa-specific build files
src/cpu/o3/alpha/thread_context.cc:
NEW HOME of AlphaTC
src/cpu/o3/alpha/thread_context.hh:
new home of AlphaTC
src/cpu/o3/isa_specific.hh:
includes ISA specific files
src/cpu/o3/params.hh:
base o3 params
src/cpu/o3/thread_context.hh:
base o3 thread context
src/cpu/o3/thread_context_impl.hh:
base o3 thead context impl


# 2792:440dfbb180a7 22-Jun-2006 Kevin Lim <ktlim@umich.edu>

Changes to get OzoneCPU to compile once more.
The changes largely are fixing up the memory accesses to use ports/Requests/Packets, supporting the splitting off of instantiation of template classes, and handling some of the reorganization that happened.

OzoneCPU is untested for now but at least compiles. Fixes will be coming shortly.

SConstruct:
Remove OzoneSimpleCPU from list of CPUs.
src/cpu/SConscript:
Leave out OzoneSimpleCPU.
src/cpu/ozone/bpred_unit.cc:
Fixes to get OzoneCPU to compile.
src/cpu/ozone/checker_builder.cc:
src/cpu/ozone/cpu.cc:
src/cpu/ozone/cpu.hh:
src/cpu/ozone/cpu_builder.cc:
src/cpu/ozone/cpu_impl.hh:
src/cpu/ozone/dyn_inst.hh:
src/cpu/ozone/dyn_inst_impl.hh:
src/cpu/ozone/front_end.cc:
src/cpu/ozone/front_end.hh:
src/cpu/ozone/front_end_impl.hh:
src/cpu/ozone/lw_back_end.hh:
src/cpu/ozone/lw_back_end_impl.hh:
src/cpu/ozone/lw_lsq.hh:
src/cpu/ozone/lw_lsq_impl.hh:
src/cpu/ozone/ozone_impl.hh:
src/cpu/ozone/rename_table.cc:
src/cpu/ozone/simple_params.hh:
src/cpu/ozone/thread_state.hh:
Fixes to get OzoneCPU back to compiling.


# 2786:eb979e479472 18-Jun-2006 Steve Reinhardt <stever@eecs.umich.edu>

Merge zizzer.eecs.umich.edu:/bk/newmem
into tpx31.:C:/cygwin/home/stever/bk/newmem


# 2781:b689ee340f27 17-Jun-2006 Kevin Lim <ktlim@umich.edu>

Merge ktlim@zizzer:/bk/newmem
into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem-merge


# 2776:1b766ee324d5 18-Jun-2006 Steve Reinhardt <stever@eecs.umich.edu>

Put sconsign in bulid dir.


# 2766:0844a9607f77 17-Jun-2006 Kevin Lim <ktlim@umich.edu>

Fix up code to be able to use the Checker.

SConstruct:
Remove check for Checker from this SConstruct
src/arch/SConscript:
Specific check if CheckerCPU is being used. Not the cleanest, but works for now.
src/cpu/SConscript:
Code to handle using the CheckerCPU a little better. Allows -c to be used normally.


# 2761:55b821162cd2 17-Jun-2006 Steve Reinhardt <stever@eecs.umich.edu>

Minor fixes in comments.

SConstruct:
Fix paths in comments and other minor comment edits.
src/cpu/SConscript:
Fix path in comment.


# 2733:e0eac8fc5774 16-Jun-2006 Kevin Lim <ktlim@umich.edu>

Two updates that got combined into one ChangeSet accidentally. They're both pretty simple so they shouldn't cause any trouble.

First: Rename FullCPU and its variants in the o3 directory to O3CPU to differentiate from the old model, and also to specify it's an out of order model.

Second: Include build options for selecting the Checker to be used. These options make sure if the Checker is being used there is a CPU that supports it also being compiled.

SConstruct:
Add in option USE_CHECKER to allow for not compiling in checker code. The checker is enabled through this option instead of through the CPU_MODELS list. However it's still necessary to treat the Checker like a CPU model, so it is appended onto the CPU_MODELS list if enabled.
configs/test/test.py:
Name change for DetailedCPU to DetailedO3CPU. Also include option for max tick.
src/base/traceflags.py:
Add in O3CPU trace flag.
src/cpu/SConscript:
Rename AlphaFullCPU to AlphaO3CPU.

Only include checker sources if they're necessary. Also add a list of CPUs that support the Checker, and only allow the Checker to be compiled in if one of those CPUs are also being included.
src/cpu/base_dyn_inst.cc:
src/cpu/base_dyn_inst.hh:
Rename typedef to ImplCPU instead of FullCPU, to differentiate from the old FullCPU.
src/cpu/cpu_models.py:
src/cpu/o3/alpha_cpu.cc:
src/cpu/o3/alpha_cpu.hh:
src/cpu/o3/alpha_cpu_builder.cc:
src/cpu/o3/alpha_cpu_impl.hh:
Rename AlphaFullCPU to AlphaO3CPU to differentiate from old FullCPU model.
src/cpu/o3/alpha_dyn_inst.hh:
src/cpu/o3/alpha_dyn_inst_impl.hh:
src/cpu/o3/alpha_impl.hh:
src/cpu/o3/alpha_params.hh:
src/cpu/o3/commit.hh:
src/cpu/o3/cpu.hh:
src/cpu/o3/decode.hh:
src/cpu/o3/decode_impl.hh:
src/cpu/o3/fetch.hh:
src/cpu/o3/iew.hh:
src/cpu/o3/iew_impl.hh:
src/cpu/o3/inst_queue.hh:
src/cpu/o3/lsq.hh:
src/cpu/o3/lsq_impl.hh:
src/cpu/o3/lsq_unit.hh:
src/cpu/o3/regfile.hh:
src/cpu/o3/rename.hh:
src/cpu/o3/rename_impl.hh:
src/cpu/o3/rob.hh:
src/cpu/o3/rob_impl.hh:
src/cpu/o3/thread_state.hh:
src/python/m5/objects/AlphaO3CPU.py:
Rename FullCPU to O3CPU to differentiate from old FullCPU model.
src/cpu/o3/commit_impl.hh:
src/cpu/o3/cpu.cc:
src/cpu/o3/fetch_impl.hh:
src/cpu/o3/lsq_unit_impl.hh:
Rename FullCPU to O3CPU to differentiate from old FullCPU model.
Also #ifdef the checker code so it doesn't need to be included if it's not selected.


# 2716:b9114064d77a 11-Jun-2006 Nathan Binkert <binkertn@umich.edu>

Merge iceaxe.:/Volumes/work/research/m5/head
into iceaxe.:/Volumes/work/research/m5/merge

src/cpu/simple/base.cc:
src/kern/kernel_stats.cc:
src/kern/kernel_stats.hh:
src/kern/system_events.cc:
src/kern/system_events.hh:
src/python/m5/objects/System.py:
src/sim/system.cc:
src/sim/system.hh:
hand merge


# 2708:c4157b162e7b 09-Jun-2006 Steve Reinhardt <stever@eecs.umich.edu>

Merge vm1.(none):/home/stever/bk/newmem
into vm1.(none):/home/stever/bk/newmem-py

src/python/m5/__init__.py:
src/sim/syscall_emul.cc:
Hand merge.


# 2670:9107b8bd08cd 02-Jun-2006 Kevin Lim <ktlim@umich.edu>

Merge ktlim@zizzer:/bk/newmem
into zizzer.eecs.umich.edu:/.automount/zamp/z/ktlim2/clean/newmem


# 2668:1f891cd3d920 31-May-2006 Kevin Lim <ktlim@umich.edu>

Merge ktlim@zizzer:/bk/newmem
into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem


# 2667:fe64b8353b1c 09-Jun-2006 Steve Reinhardt <stever@eecs.umich.edu>

Move main control from C++ into Python.
User script now invokes initialization and
simulation loop after building configuration.
These functions are exported from C++ to Python
using SWIG.

SConstruct:
Set up SWIG builder & scanner.
Set up symlinking of source files into build directory
(by not disabling the default behavior).
configs/test/test.py:
Rewrite to use new script-driven interface.
Include a sample option.
src/SConscript:
Set up symlinking of source files into build directory
(by not disabling the default behavior).
Add SWIG-generated main_wrap.cc to source list.
src/arch/SConscript:
Set up symlinking of source files into build directory
(by not disabling the default behavior).
src/arch/alpha/ev5.cc:
src/arch/alpha/isa/decoder.isa:
src/cpu/o3/alpha_cpu_impl.hh:
src/cpu/trace/opt_cpu.cc:
src/cpu/trace/trace_cpu.cc:
src/sim/pseudo_inst.cc:
src/sim/root.cc:
src/sim/serialize.cc:
src/sim/syscall_emul.cc:
SimExit() is now exitSimLoop().
src/cpu/base.cc:
SimExitEvent is now SimLoopExitEvent
src/python/SConscript:
Add SWIG build command for main.i.
Use python/m5 in build dir as source for zip archive...
easy now with file duplication enabled.
src/python/m5/__init__.py:
- Move copyright notice back to C++ so we can print
it right away, even for interactive sessions.
- Get rid of argument parsing code; just provide default
option descriptors for user script to call optparse with.
- Don't clutter m5 namespace by sucking in all of m5.config
and m5.objects.
- Move instantiate() function here from config.py.
src/python/m5/config.py:
- Move instantiate() function to __init__.py.
- Param.Foo deferred type lookups must use m5.objects
namespace now (not m5).
src/python/m5/objects/AlphaConsole.py:
src/python/m5/objects/AlphaFullCPU.py:
src/python/m5/objects/AlphaTLB.py:
src/python/m5/objects/BadDevice.py:
src/python/m5/objects/BaseCPU.py:
src/python/m5/objects/BaseCache.py:
src/python/m5/objects/Bridge.py:
src/python/m5/objects/Bus.py:
src/python/m5/objects/CoherenceProtocol.py:
src/python/m5/objects/Device.py:
src/python/m5/objects/DiskImage.py:
src/python/m5/objects/Ethernet.py:
src/python/m5/objects/Ide.py:
src/python/m5/objects/IntrControl.py:
src/python/m5/objects/MemObject.py:
src/python/m5/objects/MemTest.py:
src/python/m5/objects/Pci.py:
src/python/m5/objects/PhysicalMemory.py:
src/python/m5/objects/Platform.py:
src/python/m5/objects/Process.py:
src/python/m5/objects/Repl.py:
src/python/m5/objects/Root.py:
src/python/m5/objects/SimConsole.py:
src/python/m5/objects/SimpleDisk.py:
src/python/m5/objects/System.py:
src/python/m5/objects/Tsunami.py:
src/python/m5/objects/Uart.py:
Fix up imports (m5 namespace no longer includes m5.config).
src/sim/eventq.cc:
src/sim/eventq.hh:
Support for Python-called simulate() function:
- Use IsExitEvent flag to signal events that want
to exit the simulation loop gracefully (instead of
calling exit() to terminate the process).
- Modify interface to hand exit event object back to
caller so it can be inspected for cause.
src/sim/host.hh:
Add MaxTick constant.
src/sim/main.cc:
Move copyright notice back to C++ so we can print
it right away, even for interactive sessions.
Use PYTHONPATH environment var to set module path
(instead of clunky code injection method).
Move main control from here into Python:
- Separate initialization code and simulation loop
into separate functions callable from Python.
- Make Python interpreter invocation more pure (more
like directly invoking interpreter).
Add -i and -p flags (only options on binary itself;
other options processed by Python).
Import readline package when using interactive mode.
src/sim/sim_events.cc:
SimExitEvent is now SimLoopExitEvent, and uses
IsSimExit flag to terminate loop (instead of
exiting simulator process).
src/sim/sim_events.hh:
SimExitEvent is now SimLoopExitEvent, and uses
IsSimExit flag to terminate loop (instead of
exiting simulator process).
Get rid of a few unused constructors.
src/sim/sim_exit.hh:
SimExit() is now exitSimLoop().
Get rid of unused functions.
Add comments.


# 2665:a124942bacb8 31-May-2006 Ali Saidi <saidi@eecs.umich.edu>

Updated Authors from bk prs info


# 2656:320826b719a8 30-May-2006 Steve Reinhardt <stever@eecs.umich.edu>

Clean up Python embedding to build on zizzer (where python2.4
is currently in /usr/local instead of /usr).

SConstruct:
Use information from the Python interpreter used to run scons
to find the version & paths for include & library files.
This means that linking with a different interpreter requires
invoking scons with that interpreter... add comment to that effect.
src/sim/main.cc:
Check return codes of Python interpreter calls for errors.
Get rid of include of obsolete header.


# 2655:da93a2088efa 30-May-2006 Steve Reinhardt <stever@eecs.umich.edu>

Link in Python interpreter.
Use embedded zip archive to carry Python code instead
of homegrown embedded string/file mechanism.
Do argument parsing in Python instead of C++.

SConstruct:
Add Python interpreter include path & library.
Define two new simple builders which copy &
concatenate files, respectively, for use by
the Python embedded zipfile code.
src/SConscript:
Encapsulate environment creation in a function.
Add code to append Python zip archive to final executable.
Eliminate references to obsolete files.
src/python/SConscript:
Rewrite to generate embedded zip archive of Python code
(replacing old "embedded string" mechanism).
src/python/m5/__init__.py:
Move main arg-parsing loop here (out of C++ main()).
src/python/m5/config.py:
Minor fix (version incompatibility?).
src/sim/main.cc:
Invoke embedded Python interpreter to parse args
and generate config.ini, replacing C++ arg parsing code.


# 2654:9559cfa91b9d 30-May-2006 Kevin Lim <ktlim@umich.edu>

Merge ktlim@zizzer:/bk/m5
into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem

SConstruct:
src/SConscript:
src/arch/SConscript:
src/arch/alpha/faults.cc:
src/arch/alpha/tlb.cc:
src/base/traceflags.py:
src/cpu/SConscript:
src/cpu/base.cc:
src/cpu/base.hh:
src/cpu/base_dyn_inst.cc:
src/cpu/cpu_exec_context.cc:
src/cpu/cpu_exec_context.hh:
src/cpu/exec_context.hh:
src/cpu/o3/alpha_cpu.hh:
src/cpu/o3/alpha_cpu_impl.hh:
src/cpu/o3/alpha_dyn_inst.hh:
src/cpu/o3/cpu.cc:
src/cpu/o3/cpu.hh:
src/cpu/o3/regfile.hh:
src/cpu/ozone/cpu.hh:
src/cpu/simple/base.cc:
src/cpu/base_dyn_inst.hh:
src/cpu/o3/2bit_local_pred.cc:
src/cpu/o3/2bit_local_pred.hh:
src/cpu/o3/alpha_cpu.cc:
src/cpu/o3/alpha_cpu_builder.cc:
src/cpu/o3/alpha_dyn_inst.cc:
src/cpu/o3/alpha_dyn_inst_impl.hh:
src/cpu/o3/alpha_impl.hh:
src/cpu/o3/alpha_params.hh:
src/cpu/o3/bpred_unit.cc:
src/cpu/o3/bpred_unit.hh:
src/cpu/o3/bpred_unit_impl.hh:
src/cpu/o3/btb.cc:
src/cpu/o3/btb.hh:
src/cpu/o3/comm.hh:
src/cpu/o3/commit.cc:
src/cpu/o3/commit.hh:
src/cpu/o3/commit_impl.hh:
src/cpu/o3/cpu_policy.hh:
src/cpu/o3/decode.cc:
src/cpu/o3/decode.hh:
src/cpu/o3/decode_impl.hh:
src/cpu/o3/fetch.cc:
src/cpu/o3/fetch.hh:
src/cpu/o3/fetch_impl.hh:
src/cpu/o3/free_list.cc:
src/cpu/o3/free_list.hh:
src/cpu/o3/iew.cc:
src/cpu/o3/iew.hh:
src/cpu/o3/iew_impl.hh:
src/cpu/o3/inst_queue.cc:
src/cpu/o3/inst_queue.hh:
src/cpu/o3/inst_queue_impl.hh:
src/cpu/o3/mem_dep_unit.cc:
src/cpu/o3/mem_dep_unit.hh:
src/cpu/o3/mem_dep_unit_impl.hh:
src/cpu/o3/ras.cc:
src/cpu/o3/ras.hh:
src/cpu/o3/rename.cc:
src/cpu/o3/rename.hh:
src/cpu/o3/rename_impl.hh:
src/cpu/o3/rename_map.cc:
src/cpu/o3/rename_map.hh:
src/cpu/o3/rob.cc:
src/cpu/o3/rob.hh:
src/cpu/o3/rob_impl.hh:
src/cpu/o3/sat_counter.cc:
src/cpu/o3/sat_counter.hh:
src/cpu/o3/store_set.cc:
src/cpu/o3/store_set.hh:
src/cpu/o3/tournament_pred.cc:
src/cpu/o3/tournament_pred.hh:
Hand merges.


# 2653:c27948389a6e 30-May-2006 Steve Reinhardt <stever@eecs.umich.edu>

Fix SCons version check.

SConstruct:
Handle SCons version check error when running
on SCons 0.96 and previous.


# 2638:b419cc6a4419 22-May-2006 Steve Reinhardt <stever@eecs.umich.edu>

Make scons auto-configure stuff per-build-root.
Undo changes to allow multiple build roots in a single
invocation... this would have been too messy to maintain
with the auto-configure stuff, and probably isn't useful anyway.


# 2637:18e4273315cd 22-May-2006 Steve Reinhardt <stever@eecs.umich.edu>

Get rid of FastCPU model.
It doesn't compile, and if we really want this we should
start over from scratch and see if we can reuse parts from
BaseSimpleCPU (e.g., derive a FastSimpleCPU).

SConstruct:
src/arch/SConscript:
src/cpu/cpu_models.py:
Get rid of FastCPU model.


# 2635:47ee03367e30 22-May-2006 Steve Reinhardt <stever@eecs.umich.edu>

Make CPU_MODELS default to just the two SimpleCPU variants
for now (since those are the only ones that compile).


# 2634:db0b1133abd5 22-May-2006 Steve Reinhardt <stever@eecs.umich.edu>

Clean up libelf handling.

SConstruct:
Clean up libelf handling. Required better handling of
per-build-root stuff in general (though libelf is the
only thing in that category currently).
src/SConscript:
No libelf-specific stuff in here anymore.
src/base/loader/elf_object.cc:
Just need to include gelf.h... it includes libelf.h.


# 2632:1bb2f91485ea 22-May-2006 Steve Reinhardt <stever@eecs.umich.edu>

New directory structure:
- simulator source now in 'src' subdirectory
- imported files from 'ext' repository
- support building in arbitrary places, including
outside of the source tree. See comment at top
of SConstruct file for more details.
Regression tests are temporarily disabled; that
syetem needs more extensive revisions.

SConstruct:
Update for new directory structure.
Modify to support build trees that are not subdirectories
of the source tree. See comment at top of file for
more details.
Regression tests are temporarily disabled.
src/arch/SConscript:
src/arch/isa_parser.py:
src/python/SConscript:
Update for new directory structure.