Commit graph

468 commits

Author SHA1 Message Date
Radhika Jagtap
c446dc40bd mem: Edit proto Packet and enhance the python script
This patch changes the decode script to output the optional fields of
the proto message Packet, namely id and flags. The flags field is set
by the communication monitor.

The id field is useful for CPU trace experiments, e.g. linking the
fetch side to decode side. It had to be renamed because it clashes
with a built in python function id() for getting the "identity" of an
object.

This patch also takes a few common function definitions out from the
multiple scripts and adds them to a protolib python module.
2014-03-07 15:56:23 -05:00
Andreas Hansson
e83fdc532b util: Enhance the error messages for packet encode/decode
This patch adds a more verbose error message when the Python protobuf
module cannot be loaded.
2014-02-18 05:50:52 -05:00
ARM gem5 Developers
612f8f074f arm: Add support for ARMv8 (AArch64 & AArch32)
Note: AArch64 and AArch32 interworking is not supported. If you use an AArch64
kernel you are restricted to AArch64 user-mode binaries. This will be addressed
in a later patch.

Note: Virtualization is only supported in AArch32 mode. This will also be fixed
in a later patch.

Contributors:
Giacomo Gabrielli    (TrustZone, LPAE, system-level AArch64, AArch64 NEON, validation)
Thomas Grocutt       (AArch32 Virtualization, AArch64 FP, validation)
Mbou Eyole           (AArch64 NEON, validation)
Ali Saidi            (AArch64 Linux support, code integration, validation)
Edmund Grimley-Evans (AArch64 FP)
William Wang         (AArch64 Linux support)
Rene De Jong         (AArch64 Linux support, performance opt.)
Matt Horsnell        (AArch64 MP, validation)
Matt Evans           (device models, code integration, validation)
Chris Adeniyi-Jones  (AArch64 syscall-emulation)
Prakash Ramrakhyani  (validation)
Dam Sunwoo           (validation)
Chander Sudanthi     (validation)
Stephan Diestelhorst (validation)
Andreas Hansson      (code integration, performance opt.)
Eric Van Hensbergen  (performance opt.)
Gabe Black
2014-01-24 15:29:34 -06:00
Dam Sunwoo
6019d73db4 util: updated Streamline flow to support ARM DS-5 v5.17 protocol
The previous flow supported ARM DS-5 v5.13 protocol.
2014-01-24 15:29:29 -06:00
Nilay Vaish
bb6d7d402b ruby: rename MESI_CMP_directory to MESI_Two_Level
This is because the next patch introduces a three level hierarchy.

--HG--
rename : build_opts/ALPHA_MESI_CMP_directory => build_opts/ALPHA_MESI_Two_Level
rename : build_opts/X86_MESI_CMP_directory => build_opts/X86_MESI_Two_Level
rename : configs/ruby/MESI_CMP_directory.py => configs/ruby/MESI_Two_Level.py
rename : src/mem/protocol/MESI_CMP_directory-L1cache.sm => src/mem/protocol/MESI_Two_Level-L1cache.sm
rename : src/mem/protocol/MESI_CMP_directory-L2cache.sm => src/mem/protocol/MESI_Two_Level-L2cache.sm
rename : src/mem/protocol/MESI_CMP_directory-dir.sm => src/mem/protocol/MESI_Two_Level-dir.sm
rename : src/mem/protocol/MESI_CMP_directory-dma.sm => src/mem/protocol/MESI_Two_Level-dma.sm
rename : src/mem/protocol/MESI_CMP_directory-msg.sm => src/mem/protocol/MESI_Two_Level-msg.sm
rename : src/mem/protocol/MESI_CMP_directory.slicc => src/mem/protocol/MESI_Two_Level.slicc
rename : tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_CMP_directory/config.ini => tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_Two_Level/config.ini
rename : tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_CMP_directory/ruby.stats => tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_Two_Level/ruby.stats
rename : tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_CMP_directory/simerr => tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_Two_Level/simerr
rename : tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_CMP_directory/simout => tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_Two_Level/simout
rename : tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_CMP_directory/stats.txt => tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_Two_Level/stats.txt
rename : tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_CMP_directory/system.pc.com_1.terminal => tests/long/fs/10.linux-boot/ref/x86/linux/pc-simple-timing-ruby-MESI_Two_Level/system.pc.com_1.terminal
rename : tests/quick/se/00.hello/ref/alpha/linux/simple-timing-ruby-MESI_CMP_directory/config.ini => tests/quick/se/00.hello/ref/alpha/linux/simple-timing-ruby-MESI_Two_Level/config.ini
rename : tests/quick/se/00.hello/ref/alpha/linux/simple-timing-ruby-MESI_CMP_directory/ruby.stats => tests/quick/se/00.hello/ref/alpha/linux/simple-timing-ruby-MESI_Two_Level/ruby.stats
rename : tests/quick/se/00.hello/ref/alpha/linux/simple-timing-ruby-MESI_CMP_directory/simerr => tests/quick/se/00.hello/ref/alpha/linux/simple-timing-ruby-MESI_Two_Level/simerr
rename : tests/quick/se/00.hello/ref/alpha/linux/simple-timing-ruby-MESI_CMP_directory/simout => tests/quick/se/00.hello/ref/alpha/linux/simple-timing-ruby-MESI_Two_Level/simout
rename : tests/quick/se/00.hello/ref/alpha/linux/simple-timing-ruby-MESI_CMP_directory/stats.txt => tests/quick/se/00.hello/ref/alpha/linux/simple-timing-ruby-MESI_Two_Level/stats.txt
rename : tests/quick/se/00.hello/ref/alpha/tru64/simple-timing-ruby-MESI_CMP_directory/config.ini => tests/quick/se/00.hello/ref/alpha/tru64/simple-timing-ruby-MESI_Two_Level/config.ini
rename : tests/quick/se/00.hello/ref/alpha/tru64/simple-timing-ruby-MESI_CMP_directory/ruby.stats => tests/quick/se/00.hello/ref/alpha/tru64/simple-timing-ruby-MESI_Two_Level/ruby.stats
rename : tests/quick/se/00.hello/ref/alpha/tru64/simple-timing-ruby-MESI_CMP_directory/simerr => tests/quick/se/00.hello/ref/alpha/tru64/simple-timing-ruby-MESI_Two_Level/simerr
rename : tests/quick/se/00.hello/ref/alpha/tru64/simple-timing-ruby-MESI_CMP_directory/simout => tests/quick/se/00.hello/ref/alpha/tru64/simple-timing-ruby-MESI_Two_Level/simout
rename : tests/quick/se/00.hello/ref/alpha/tru64/simple-timing-ruby-MESI_CMP_directory/stats.txt => tests/quick/se/00.hello/ref/alpha/tru64/simple-timing-ruby-MESI_Two_Level/stats.txt
rename : tests/quick/se/50.memtest/ref/alpha/linux/memtest-ruby-MESI_CMP_directory/config.ini => tests/quick/se/50.memtest/ref/alpha/linux/memtest-ruby-MESI_Two_Level/config.ini
rename : tests/quick/se/50.memtest/ref/alpha/linux/memtest-ruby-MESI_CMP_directory/ruby.stats => tests/quick/se/50.memtest/ref/alpha/linux/memtest-ruby-MESI_Two_Level/ruby.stats
rename : tests/quick/se/50.memtest/ref/alpha/linux/memtest-ruby-MESI_CMP_directory/simerr => tests/quick/se/50.memtest/ref/alpha/linux/memtest-ruby-MESI_Two_Level/simerr
rename : tests/quick/se/50.memtest/ref/alpha/linux/memtest-ruby-MESI_CMP_directory/simout => tests/quick/se/50.memtest/ref/alpha/linux/memtest-ruby-MESI_Two_Level/simout
rename : tests/quick/se/50.memtest/ref/alpha/linux/memtest-ruby-MESI_CMP_directory/stats.txt => tests/quick/se/50.memtest/ref/alpha/linux/memtest-ruby-MESI_Two_Level/stats.txt
rename : tests/quick/se/60.rubytest/ref/alpha/linux/rubytest-ruby-MESI_CMP_directory/config.ini => tests/quick/se/60.rubytest/ref/alpha/linux/rubytest-ruby-MESI_Two_Level/config.ini
rename : tests/quick/se/60.rubytest/ref/alpha/linux/rubytest-ruby-MESI_CMP_directory/ruby.stats => tests/quick/se/60.rubytest/ref/alpha/linux/rubytest-ruby-MESI_Two_Level/ruby.stats
rename : tests/quick/se/60.rubytest/ref/alpha/linux/rubytest-ruby-MESI_CMP_directory/simerr => tests/quick/se/60.rubytest/ref/alpha/linux/rubytest-ruby-MESI_Two_Level/simerr
rename : tests/quick/se/60.rubytest/ref/alpha/linux/rubytest-ruby-MESI_CMP_directory/simout => tests/quick/se/60.rubytest/ref/alpha/linux/rubytest-ruby-MESI_Two_Level/simout
rename : tests/quick/se/60.rubytest/ref/alpha/linux/rubytest-ruby-MESI_CMP_directory/stats.txt => tests/quick/se/60.rubytest/ref/alpha/linux/rubytest-ruby-MESI_Two_Level/stats.txt
2014-01-04 00:03:33 -06:00
Nilay Vaish
59a041c5e7 util: update checkpoint aggregation script
The checkpoint aggregation script had become outdated due to numerous changes
to checkpoints over the past couple of years.  This updates the script.  It
now supports aggregation for x86 architecture instead of alpha.  Also a couple
of new options have been added that specify the size of the memory file to be
created and whether or not the memory file should be compressed.
2013-12-03 10:36:03 -06:00
Chander Sudanthi
3e6da89419 ARM: add support for TEEHBR access
Thumb2 ARM kernels may access the TEEHBR via thumbee_notifier
in arch/arm/kernel/thumbee.c.  The Linux kernel code just seems
to be saving and restoring the register.  This patch adds support
for the TEEHBR cp14 register.  Note, this may be a special case
when restoring from an image that was run on a system that
supports ThumbEE.
2013-10-31 13:41:13 -05:00
Geoffrey Blake
be4aa2b6ba dev: Fix race conditions in IDE device on newer kernels
Newer linux kernels and distros exercise more functionality in the IDE device
than previously, exposing 2 races. The first race is the handling of aborted
DMA commands would immediately report the device is ready back to the kernel
and cause already in flight commands to assert the simulator when they returned
and discovered an inconsitent device state.  The second race was due to the
Status register not being handled correctly, the interrupt status bit would get
stuck at 1 and the driver eventually views this as a bad state and logs the
condition to the terminal.  This patch fixes these two conditions by making the
device handle aborted commands gracefully and properly handles clearing the
interrupt status bit in the Status register.
2013-10-31 13:41:13 -05:00
Ali Saidi
68dee58c38 arm: fix m5ops binary for ARM and add m5fail.
Changes to make m5ops work under virtualization seemed to break them working
with non-virtualized systems and the recently added m5 fail command makes
the m5op binary not compile.  For now remove the code for virtualization.
2013-10-31 13:41:13 -05:00
Dam Sunwoo
1e2a455a23 util: Streamline .apc project convertsion script
This Python script generates an ARM DS-5 Streamline .apc project based
on gem5 run. To successfully convert, the gem5 runs needs to be run
with the context-switch-based stats dump option enabled (The guest
kernel also needs to be patched to allow gem5 interrogate its task
information.) See help for more information.
2013-10-17 10:20:45 -05:00
Andreas Sandberg
fec2dea5c3 x86: Add support for m5ops through a memory mapped interface
In order to support m5ops in virtualized environments, we need to use
a memory mapped interface. This changeset adds support for that by
reserving 0xFFFF0000-0xFFFFFFFF and mapping those to the generic IPR
interface for m5ops. The mapping is done in the
X86ISA::TLB::finalizePhysical() which means that it just works for all
of the CPU models, including virtualized ones.
2013-09-30 12:20:53 +02:00
Andreas Hansson
19a5b68db7 arch: Resurrect the NOISA build target and rename it NULL
This patch makes it possible to once again build gem5 without any
ISA. The main purpose is to enable work around the interconnect and
memory system without having to build any CPU models or device models.

The regress script is updated to include the NULL ISA target. Currently
no regressions make use of it, but all the testers could (and perhaps
should) transition to it.

--HG--
rename : build_opts/NOISA => build_opts/NULL
rename : src/arch/noisa/SConsopts => src/arch/null/SConsopts
rename : src/arch/noisa/cpu_dummy.hh => src/arch/null/cpu_dummy.hh
rename : src/cpu/intr_control.cc => src/cpu/intr_control_noisa.cc
2013-09-04 13:22:57 -04:00
Steve Reinhardt
ecfe7dc3ef util/regress: set --no-lto on regressions
See comment for motivation.
2013-08-21 17:31:08 -07:00
Anthony Gutierrez
cf56619b0c arm: use -march when compiling m5op_arm.S
Using arm-linux-gnueabi-gcc 4.7.3-1ubuntu1 on Ubuntu 13.04 to compiled
the m5 binary yields the error:

m5op_arm.S: Assembler messages:
m5op_arm.S:85: Error: selected processor does not support ARM mode `bxj lr'

For each of of the SIMPLE_OPs. Apparently, this compiler doesn't like the
interworking of these code types for the default arch. Adding -march=armv7-a
makes it compile. Another alternative that I found to work is replacing the
bxj lr instruction with mov pc, lr, but I don't know how that affects the
KVM stuff and if bxj is needed.
2013-08-14 10:51:47 -04:00
Nilay Vaish
e038741598 x86: add tlb checkpointing
This patch adds checkpointing support to x86 tlb. It upgrades the
cpt_upgrader.py script so that previously created checkpoints can
be updated. It moves the checkpoint version to 6.
2013-08-07 14:51:17 -05:00
Andreas Hansson
cc8911261e util: Auto generate the packet proto definitions
This patch simplifies the usage of the packet trace encoder/decoder by
attempting to automatically generating the packet proto definitions in
case they cannot be found.
2013-05-30 12:53:53 -04:00
Andreas Sandberg
1ae30c68c1 arm: Add support for the m5fail pseudo-op 2013-05-14 15:06:50 +02:00
Andreas Sandberg
e1cbe33c72 arm: Fix compilation error in m5 utility
Changeset 5ca6098b9560 accidentally broke the m5 utility. This
changeset adds the missing co-processor call used to trigger the
pseudo-op in ARM mode and fixes an alignment issue that caused some
pseudo-ops to leave thumb mode.
2013-05-14 15:03:45 +02:00
Andreas Sandberg
4153a76478 arm: Make libm5 a dependency of the m5 utility
The m5 utility wasn't relinked properly since libm5.a wasn't a
dependency of the utility. This changeset addresses that issue.
2013-05-07 14:47:04 +02:00
Andreas Sandberg
33ab8f735d kvm: Add support for pseudo-ops on ARM
This changeset adds support for m5 pseudo-ops when running in
kvm-mode. Unfortunately, we can't trap the normal gem5 co-processor
entry in KVM (it doesn't seem to be possible to trap accesses to
non-existing co-processors). We therefore use BZJ instructions to
cause a trap from virtualized mode into gem5. The BZJ instruction is
becomes a normal branch to the gem5 fallback code when running in
simulated mode, which means that this patch does not need to change
the ARM ISA-specific code.

Note: This requires a patched host kernel.
2013-04-22 13:20:32 -04:00
Andreas Hansson
2018f61c26 util: Add a utility script for decoding packet traces
This patch adds a simple Python script that reads the protobuf-encoded
packet traces (not gzipped), and prints them to an ASCII trace file.

The script can also be used as a template for other packet output
formats.
2013-03-26 14:49:58 -04:00
Andreas Hansson
7885a1646d util: Add a utility script for encoding packet traces
This patch adds a simple Python script that reads a simple ASCII trace
format and encodes it as protobuf output compatible with the traffic
generator.

The script can also be used as a template for other packet input
formats that should be converted to the gem5 packet protobuf format.
2013-03-26 14:49:55 -04:00
Andreas Sandberg
670fc52f18 x86: Revert [02321b16685f] which breaks m5ops on x86
Changeset 02321b16685f added m5_writefile to m5op_x86.S a second time,
which causes a compilation error on when compiling for x86. This
changeset reverts that changeset and fixes the error.
2013-03-25 13:20:15 +01:00
Matt Horsnell
e88e7d88b9 o3: fix tick used for renaming and issue with range selection
Fixes the tick used from rename:
- previously this gathered the tick on leaving rename which was always 1 less
  than the dispatch. This conflated the decode ticks when back pressure built
  in the pipeline.
- now picks up tick on entry.

Added --store_completions flag:
- will additionally display the store completion tail in the viewer.
- this highlights periods when large numbers of stores are outstanding (>16 LSQ
  blocking)

Allows selection by tick range (previously this caused an infinite loop)
2013-02-15 17:40:09 -05:00
Lluís Vilanova
25efbb5bdc util: add writefile to m5 util program for x86 2013-01-08 08:54:13 -05:00
Lluís Vilanova
807168a1de util: add m5_fail op.
Used as a command in full-system scripts helps the user ensure the benchmarks have finished successfully.

For example, one can use:

    /path/to/benchmark args || /sbin/m5 fail 1

and thus ensure gem5 will exit with an error if the benchmark fails.
2013-01-08 08:54:12 -05:00
Andreas Sandberg
35be32b7ea util: Fix stack corruption in the m5 util
The number of arguments specified when calling parse_int_args() in
do_exit() is incorrect. This leads to stack corruption since it causes
writes past the end of the ints array.
2013-01-07 16:56:37 -05:00
Andreas Sandberg
38925ff621 arm: Remove the register mapping hack used when copying TCs
In order to see all registers independent of the current CPU mode, the
ARM architecture model uses the magic MISCREG_CPSR_MODE register to
change the register mappings without actually updating the CPU
mode. This hack is no longer needed since the thread context now
provides a flat interface to the register file. This patch replaces
the CPSR_MODE hack with the flat register interface.
2013-01-07 13:05:44 -05:00
Andreas Sandberg
17b47d35e1 arch: Move the ISA object to a separate section
After making the ISA an independent SimObject, it is serialized
automatically by the Python world. Previously, this just resulted in
an empty ISA section. This patch moves the contents of the ISA to that
section and removes the explicit ISA serialization from the thread
contexts, which makes it behave like a normal SimObject during
serialization.

Note: This patch breaks checkpoint backwards compatibility! Use the
cpt_upgrader.py utility to upgrade old checkpoints to the new format.
2013-01-07 13:05:42 -05:00
Lluis Vilanova
bb4f6562ae x86, util: add m5_writefile to m5op_x86.S
Committed by: Nilay Vaish
2012-11-03 12:57:28 -05:00
James Clarkson
fdcfbda38d m5: Expose m5 pseudo-instructions to C/C++ via a static library
Updated the util/m5/Makefile.arm so that m5op_arm.S is used to create
a static library - libm5.a. Allowing users to insert m5
psuedo-instructions into their applications for fine-grained
checkpointing, switching cpus or dumping statistics. e.g.

#include <m5op.h>

void foo(){
	...
	m5_reset_stats(<delay>,<period>)
	m5_work_begin(<workid>,<threadid>);
	...
	m5_work_end(<workid>,<threadid>);
	m5_dump_stats(<delay>,<period>);
}
2012-10-09 12:58:25 +01:00
Dam Sunwoo
81406018b0 ARM: dump stats and process info on context switches
This patch enables dumping statistics and Linux process information on
context switch boundaries (__switch_to() calls) that are used for
Streamline integration (a graphical statistics viewer from ARM).
2012-11-02 11:32:01 -05:00
Andreas Hansson
9baa35ba80 Mem: Separate the host and guest views of memory backing store
This patch moves all the memory backing store operations from the
independent memory controllers to the global physical memory. The main
reason for this patch is to allow address striping in a future set of
patches, but at this point it already provides some useful
functionality in that it is now possible to change the number of
memory controllers and their address mapping in combination with
checkpointing. Thus, the host and guest view of the memory backing
store are now completely separate.

With this patch, the individual memory controllers are far simpler as
all responsibility for serializing/unserializing is moved to the
physical memory. Currently, the functionality is more or less moved
from AbstractMemory to PhysicalMemory without any major
changes. However, in a future patch the physical memory will also
resolve any ranges that are interleaved and properly assign the
backing store to the memory controllers, and keep the host memory as a
single contigous chunk per address range.

Functionality for future extensions which involve CPU virtualization
also enable the host to get pointers to the backing store.
2012-10-15 08:12:32 -04:00
Sascha Bischoff
29acf859eb Util: Added script to semantically diff two config.ini files
This script (util/diff_config.pl) takes two config.ini files and compares them.
It highlights value changes, as well as displaying which parts are unique to
a specific config.ini file. This is useful when trying to replicate an earlier
experiment and when trying to make small changes to an existing configuration.
2012-09-25 11:49:40 -05:00
Djordje Kovacevic
d060a28a29 CPU: Add abandoned instructions to O3 Pipe Viewer 2012-09-25 11:49:40 -05:00
Ali Saidi
98e1ce638f ARM: Fix the compiler and platform identification for building on ARM. 2012-09-07 14:20:53 -05:00
Ali Saidi
0ecb351c51 ARM: fix m5 op binary to properly convert 64bit operands 2012-09-07 14:20:53 -05:00
Djordje Kovacevic
124aac72b4 CPU: O3-PipeView.py doesn't display the end of timelines.
Insts' timeline that stretches over multiple lines doesn't always get printed.
2012-09-07 14:20:53 -05:00
Nathanael Premillieu
fe2faa1975 util: Fix issues with style checker. 2012-07-27 16:08:05 -04:00
Matt Evans
234fd1c4d8 Style: Make style.py's invalid warning print which file caused the infraction. 2012-06-29 11:19:06 -04:00
Ali Saidi
c06970b673 cpt: update some comments in the checkpoint migration script 2012-06-05 10:36:59 -04:00
Ali Saidi
70d7d6cc7f sim: Provide a framework for detecting out of data checkpoints and migrating them. 2012-06-05 01:23:10 -04:00
Ali Saidi
798403b689 ARM: Update m5op assembly for thumb compilation. 2012-05-10 18:04:26 -05:00
Nilay Vaish
6ea7fcc54a util/regress: Add the missing comma in the list of builds 2012-04-26 20:28:45 -05:00
Nilay Vaish
86f248e2a7 Regression: Add a test for x86 timing full system ruby simulation 2012-04-25 22:43:36 -05:00
Gabe Black
214d7af2fe m5=>gem5: Make the regression script build gem5.* instead of m5.* 2012-02-07 04:43:05 -08:00
Gabe Black
82939294d6 Regressions: Fix the regress script when "all" is used.
When the "all" test is specified, the "tests" list should have two elements in
it, "quick" and "long", not a single element "quick,long". The later would be
appropriate as the default for one of the command line options which are split
at commas, but at that point "tests" should already be a list.
2012-02-05 01:23:22 -08:00
Andreas Hansson
096a550757 Regression: Update the regress script after SE/FS merge
This patch updates the regress script to reflect the merge of the
SE/FS builds and the new structure of the test directories. It adds a
"mode" flag to the script, that defaults to both se and fs.
2012-02-02 04:51:13 -05:00
Dam Sunwoo
0ed3c84c7b util: implements "writefile" gem5 op to export file from guest to host filesystem
Usage: m5 writefile <filename>

File will be created in the gem5 output folder with the identical filename.
Implementation is largely based on the existing "readfile" functionality.
Currently does not support exporting of folders.
2012-01-31 07:46:04 -08:00
Nathan Binkert
a1b4cb58f1 hgfilesize: skip files that have been removed 2012-01-10 22:50:54 -08:00
Ali Saidi
80a6907927 ARM: Add support for initparam m5 op 2012-01-09 18:08:20 -06:00
Nathan Binkert
abf26fd828 hooks: Add a hook to limit the size of any individual file 2012-01-06 18:19:13 -05:00
Steve Reinhardt
ed61e02b24 style.py: don't die on empty files 2011-09-24 08:12:26 -07:00
Prakash Ramrakhyani
e4830ad2eb gem5ops: Implement Java JNI for gem5Ops
These ops allow gem5 ops to be called from within java programs like the following:
import jni.gem5Op;

public  class HelloWorld {

    public static void main(String[] args) {
        gem5Op gem5 = new gem5Op();
        System.out.println("Rpns0:" + gem5.rpns());
        System.out.println("Rpns1:" + gem5.rpns());
    }

    static {
        System.loadLibrary("gem5OpJni");
    }
}

When building you need to make sure classpath include gem5OpJni.jar:
javac -classpath $CLASSPATH:/path/to/gem5OpJni.jar HelloWorld.java

and when running you need to make sure both the java and library path are set:
java -classpath $CLASSPATH:/path/to/gem5OpJni.jar -Djava.library.path=/path/to/libgem5OpJni.so HelloWorld
2011-09-13 12:06:13 -05:00
Giacomo Gabrielli
69ef57fd0f O3: Create a pipeline activity viewer for the O3 CPU model.
Implemented a pipeline activity viewer as a python script (util/o3-pipeview.py)
and modified O3 code base to support an extra trace flag (O3PipeView) for
generating traces to be used as inputs by the tool.
2011-07-15 11:53:35 -05:00
Gabe Black
ec89fffb07 tracediff: Check for --debug-flags now instead of --trace-flags. 2011-07-02 22:52:26 -07:00
Ali Saidi
0b7ca66919 ARM: Cleanup m5ops usage of r0 and r1 a bit. 2011-06-17 12:20:11 -05:00
Gedare Bloom
3f1f16703d ARM: Add m5ops and related support for workbegin() and workend() to ARM ISA. 2011-06-17 12:20:10 -05:00
Nathan Binkert
0c424344fa copyright: Add code for finding all copyright blocks and create a COPYING file
The end of the COPYING file was generated with:
% python ./util/find_copyrights.py configs src system tests util

Update -C command line option to spit out COPYING file
2011-06-02 17:36:07 -07:00
Nathan Binkert
1c23bc100f style: Make the style hook work in directories other than the root. 2011-05-24 21:19:31 -07:00
Steve Reinhardt
7411f348d5 util/regress: make default action a more thorough regression
Changed the --variants option to --test-variants and added a new
--compile-variants option for variants that are only compiled
(not tested).  The former still defaults to 'opt' and the latter
defaults to 'debug,fast'.

Also changed the behavior when no tests are specified from just
compiling to running the 'quick' tests.

As a result, a plain 'util/regress' invocation will now compile
(but not test) the debug and fast builds, and compile and run the
quick regressions on the opt build.  This should be the default
set of tests that are run before committing.  Since the nightly
regressions use this same script, this will also be the new
nightly regression behavior.

Test-only regressions can still be done by setting --compile=''.
Compile-only regressions can be done by setting --test=''.
2011-05-23 14:27:20 -07:00
Ali Saidi
48f7fda706 ARM: Add vfpv3 support to native trace. 2011-05-04 20:38:26 -05:00
Gabe Black
947a5ba9a5 Util: Replace mkblankimage.sh with the new gem5img.py.
This change replaces the mkblankimage.sh script, used for creating new disk
images, with a new gem5img.py script. The new version is written in python
instead of bash, takes its parameters from command line arguments instead of
prompting for them, and finds a free loopback device dynamically instead of
hardcoding /dev/loop1. The file system used is now optionally configurable,
and the blank image is filled by a "hole" left by lseek and write instead of
literally filling it with zeroes.

The functionality of the new script is broken into subcommands "init",
"mount", "umount", "new", "partition", and "format". "init" creates a new file
of the appropriate size, partitions it, and then formats the first (and only)
new parition. "mount" attaches a new loopback device to the first parition of
the image file and mounts it to the specified mount point. "umount" unmounts
the specified mount point and identifies and cleans up the underlying loopback
device. "new", "partition", and "format" are the individual stages of "init"
but broken out so they can be run individually. That's so an image can be
reinitialized in place if needed.

Two features of the original script are being dropped. The first is the
ability to specify a source directory to copy into the new file system. The
second is the ability to specify a list of commands to run which are expected
to (but not required to) update the permissions of the files in the new fs.
Both of these seem easy enough to do manually, especially given the "mount"
and "umount" commands, that removing them would meaningfully simplify the
script without making it less useful.
2011-04-29 04:46:19 -04:00
Steve Reinhardt
41680f4bad Change default regression build from 'fast' to 'opt' 2011-04-20 13:47:42 -07:00
Nathan Binkert
ddb0f1bca0 style: fix all_regions code and remove bogus region type 2011-04-17 14:21:04 -07:00
Nathan Binkert
6402721d8e style: remove extra debugging print 2011-04-17 13:57:40 -07:00
Nathan Binkert
a2889ef16d file_types: Make code work in Python 2.4 2011-04-17 13:57:03 -07:00
Nathan Binkert
39a055645f includes: sort all includes 2011-04-15 10:44:06 -07:00
Nathan Binkert
50fda09ac7 style: add sort_includes to the style hook 2011-04-15 10:43:51 -07:00
Nathan Binkert
5add771e85 style: move style verifiers into classes 2011-04-15 10:43:47 -07:00
Nathan Binkert
2d5e1de4d9 style: add a user interface wrapper class
makes things work both with mercurial and stand alone with stdio
2011-04-15 10:43:30 -07:00
Nathan Binkert
e5ecfde222 util: python implementation of a routine that will sort includes
I didn't realize that the perl version existed when I started this,
this version has a lot more features than the previous one since it will
sort and separate python, system, and m5 headers in separate groups, it
will remove duplicates, it will also convert c headers to stl headers
2011-04-15 10:43:06 -07:00
Nathan Binkert
326adda5f3 util: fix the language type function 2011-04-13 09:32:17 -07:00
Lisa Hsu
83664630ee util: update aggregator to handle x86 checkpoints.
Also, make update to understand some of the newer serialized variables
2011-03-19 21:12:55 -07:00
Gabe Black
591b05cf02 Regressions: Make X86_FS run automatically. 2011-03-12 14:38:57 -08:00
Gabe Black
fa448129b1 SCons: Turn some scons variables into command line options. 2011-03-03 23:54:31 -08:00
Gabe Black
441ab29820 Statetrace: Stub out the missing i386 version of sendState. 2011-03-02 22:53:11 -08:00
Gabe Black
9d2650792f Statetrace: Rename i386 to i686.
--HG--
rename : util/statetrace/arch/i386/tracechild.cc => util/statetrace/arch/i686/tracechild.cc
rename : util/statetrace/arch/i386/tracechild.hh => util/statetrace/arch/i686/tracechild.hh
2011-03-02 22:53:11 -08:00
Gabe Black
3bcd77ddef Statetrace: Fix the i686 detection macro. 2011-03-02 22:53:11 -08:00
Gabe Black
16d997840a Statetrace: Use sys/user.h instead of linux/user.h. 2011-03-02 22:53:11 -08:00
Gabe Black
d7a47af12d Statetrace: Tweak the help for the -nt option. 2011-03-02 22:53:11 -08:00
Gabe Black
eab89a09d2 Statetrace: Accomodate cross compiling statetrace with scons.
--HG--
rename : util/statetrace/arch/tracechild_amd64.cc => util/statetrace/arch/amd64/tracechild.cc
rename : util/statetrace/arch/tracechild_amd64.hh => util/statetrace/arch/amd64/tracechild.hh
rename : util/statetrace/arch/tracechild_arm.cc => util/statetrace/arch/arm/tracechild.cc
rename : util/statetrace/arch/tracechild_arm.hh => util/statetrace/arch/arm/tracechild.hh
rename : util/statetrace/arch/tracechild_i386.cc => util/statetrace/arch/i386/tracechild.cc
rename : util/statetrace/arch/tracechild_i386.hh => util/statetrace/arch/i386/tracechild.hh
rename : util/statetrace/arch/tracechild_sparc.cc => util/statetrace/arch/sparc/tracechild.cc
rename : util/statetrace/arch/tracechild_sparc.hh => util/statetrace/arch/sparc/tracechild.hh
rename : util/statetrace/tracechild_arch.cc => util/statetrace/base/arch_check.h
rename : util/statetrace/regstate.hh => util/statetrace/base/regstate.hh
rename : util/statetrace/statetrace.cc => util/statetrace/base/statetrace.cc
rename : util/statetrace/tracechild.cc => util/statetrace/base/tracechild.cc
rename : util/statetrace/tracechild.hh => util/statetrace/base/tracechild.hh
2011-03-02 22:53:11 -08:00
Gabe Black
9151c4039a Statetrace: Convert the build to scons. 2011-03-02 22:53:11 -08:00
Gabe Black
db090ea139 Statetrace: Allow the user to override CXX. 2011-03-02 22:53:11 -08:00
Gabe Black
43eda1f285 Statetrace: Get rid of explicit register name handling. 2011-03-02 22:53:10 -08:00
Gabe Black
3c19e45a68 Statetrace: Kill the printer functionality in statetrace. 2011-03-02 22:53:10 -08:00
Gabe Black
3df970f0de Statetrace: Clean up style. 2011-03-02 22:53:10 -08:00
Gabe Black
9836972a13 Util: Get rid of the make_release.py script.
Since we're not doing releases any more we don't really need this script. If
we need it in the future, we can resurrect it from the history.
2011-02-15 23:22:32 -08:00
Brad Beckmann
dfa8cbeb06 m5: added work completed monitoring support 2011-02-06 22:14:19 -08:00
Ali Saidi
25822ee655 mkblankimage: bash != sh on many systems and this script needs bash 2011-01-18 16:30:00 -06:00
Gabe Black
43b58ce3ad Style checker: Fix a couple bugs in style.py. 2011-01-13 12:30:18 -08:00
Nathan Binkert
fcc621ac79 style: prevent the style hook from aborting uncleanly because of an exception 2011-01-10 11:11:16 -08:00
Nathan Binkert
3c8cc170d2 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.
2011-01-10 11:11:15 -08:00
Nathan Binkert
fe6574ecc0 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
2010-12-30 12:53:56 -05:00
Gabe Black
cb3674cd27 X86: Remove reserved* from the m5 utility program for x86. 2010-11-22 05:47:54 -05:00
Ali Saidi
fe300c6de2 ARM: Add full-system regressions 2010-11-08 13:58:25 -06:00
Ali Saidi
432fa0aad6 ARM: Add support for M5 ops in the ARM ISA 2010-11-08 13:58:24 -06:00
Joel Hestness
73d9a51835 util/m5/m5.c: ensure readfile() buffer pages are in page table
(and marked dirty, in case that matters) by touching them beforehand
2010-08-12 17:16:04 -07:00
Steve Reinhardt
cbd65e95db util: add a script for testing checkpointing
See comments in util/checkpoint-tester.py for details.
2010-07-05 21:39:38 -07:00
Lisa Hsu
aeb6e2e3ec utils: checkpoint aggregator: some physmem files are too big to read at once,
break it up into reading one page at a time. Also, avoid redoing a aggregating a checkpoint that's
already done.

--HG--
rename : util/checkpoint-aggregator.py => util/checkpoint_aggregator.py
2010-06-03 10:34:40 -07:00
Ali Saidi
d3a519ef0c ARM: Fixup native trace support and add some v7/recent stack code 2010-06-02 12:58:17 -05:00
Gabe Black
d75ad847b3 Statetrace: Fix compile problems with the AMD64 version of statetrace. 2010-05-02 00:39:46 -07:00
Nathan Binkert
d2eb589675 regress: add some new options
add -n/--no-exec which doesn't execute scons, but just prints the command line
add -j0 which tries to calculate how many cpus you have
add -D/--build-dir to specify a build directory other than ./build
2010-03-23 16:31:47 -07:00
Brad Beckmann
ab2f864af2 m5: Regression Tester Update
This patch includes the necessary regression updates to test the new ruby
configuration system.  The patch includes support for multiple ruby protocols
and adds the ruby random tester.  The patch removes atomic mode test for
ruby since ruby does not support atomic mode acceses.  These tests can be
added back in when ruby supports atomic mode for real.

--HG--
rename : tests/quick/50.memtest/test.py => tests/quick/60.rubytest/test.py
2010-01-29 20:29:40 -08:00
Nathan Binkert
6bb9486598 style_hook: Fix the style hook
Re-enable it and update it for more modern versions of mercurial.
2010-01-23 09:43:18 -08:00
Derek Hower
589218168c Automated merge with ssh://hg@m5sim.org/m5 2010-01-22 17:23:21 -06:00
Lisa Hsu
1c448e2ab0 copyrights: add copyright info to the files I added.
checkpoint-aggregator.py was written at UM so I added a UM copyright, agg_se.py was
written at AMD so I added the AMD copyright.
2010-01-20 16:47:40 -08:00
Lisa Hsu
d6da172517 util: do checkpoint aggregation more cleanly, fix last changeset.
1) Move alpha-specific code out of page_table.cc:serialize().
2) Begin serializing M5_pid and unserializing it, but adding an function to do optional paramIn so that old checkpoints don't need to be fixed up.
3) Fix up alpha startup code so that the unserialized M5_pid value is properly written to DTB_IPR_ASN.
4) Fix the memory unserialize that I forgot somehow in the last changeset.
5) Add in an agg_se.py to handle aggregated checkpoints. --bench foo-bar plus positional arguments foo bar are the only changes in usage from se.py.
Note this aggregation stuff has only been tested for Alpha and nothing else, though it should take a very minimal amount of work to get it to work with another ISA.
2010-01-19 22:03:44 -08:00
Derek Hower
279f179bab merge 2010-01-19 15:48:12 -06:00
Lisa Hsu
4a40ac71f8 util: make a generic checkpoint aggregator that can aggregate different cpts into one multi-programmed cpt. Make minor changes to serialization/unserialization to get it to work properly. Note that checkpoints were made with a comment at the beginning with // - this must be changed to ## to work properly with the python config parser in the aggregator. 2010-01-18 14:30:31 -08:00
Nathan Binkert
a02b21977a regress: add POWER to regressions 2009-10-28 11:56:43 -07:00
Steve Reinhardt
7a8ee4f40a rundiff: Don't flush stdout until after postcontext is printed. 2009-09-26 10:50:50 -07:00
Nathan Binkert
2278363015 slicc: Pure python implementation of slicc.
This is simply a translation of the C++ slicc into python with very minimal
reorganization of the code.  The output can be verified as nearly identical
by doing a "diff -wBur".

Slicc can easily be run manually by using util/slicc
2009-09-22 18:12:39 -07:00
Polina Dudnik
114d8724dd Functionality migrated to sequencer. 2009-09-17 17:39:52 -05:00
Polina Dudnik
a4fc1bad94 [mq]: first_patch 2009-08-21 15:52:46 -05:00
Gabe Black
e09ae149af Statetrace: Make sure the current state is loaded to print the initial stack frame.
The early call to child->step() was removed earlier because it confused the
new differences-only protocol ARM sendState() was using. It's necessary that
that gets called at least once before attempting to print the initial stack
frame, though, because otherwise statetrace doesn't know what the stack
pointer is. By putting the first call to child->step() in a common spot, both
needs are met.
2009-07-29 00:35:49 -07:00
Gabe Black
873112ea99 ARM: Make sure the target process doesn't run away from statetrace. 2009-07-29 00:14:43 -07:00
Gabe Black
52b4a7c36f ARM: Only send information that changed between statetrace and M5. 2009-07-27 00:54:30 -07:00
Gabe Black
1ad4de2528 imported patch statetracehost.patch 2009-07-27 00:54:04 -07:00
Ali Saidi
081b6fe9db ARM: Add ARM support to statetrace. 2009-07-27 00:53:39 -07:00
Gabe Black
6835dbce34 Statetrace: Fix up headers. 2009-07-27 00:53:32 -07:00
Nathan Binkert
5738dc3400 stats: fix usage of jobfile 2009-07-02 16:48:21 -07:00
Gabe Black
fa63af110c makerelease: Don't hide x86 any more. 2009-06-23 00:14:24 -07:00
Gabe Black
be3542ebdb Regressions: Build ARM_SE regressions by default. 2009-06-23 00:07:39 -07:00
Steve Reinhardt
6566028801 util: mkblankimage.sh should be executable 2009-05-22 21:24:09 -07:00
Nathan Binkert
8d2e51c7f5 includes: sort includes again 2009-05-17 14:34:52 -07:00
Steve Reinhardt
4f7d6a881c rundiff: flush stdout after each diff 2009-04-21 11:34:26 -07:00
Nathan Binkert
08043c777f style: fix style hook for some newer versions of mercurial. 2009-04-08 22:21:25 -07:00
Ali Saidi
d5ef9ee06b CPA: Add m5ops for critical path annotation work. 2009-02-26 19:29:16 -05:00
Nathan Binkert
64ed39f61b pseudo inst: Add new wake cpu instruction for sending a message to wake a cpu.
It's instantaneous and so it's somewhat bogus, but it's a first step.
2009-01-24 07:27:22 -08:00
Ali Saidi
758d6ccf1f Fix style hook for Mercurial >= 1.1 2009-01-13 00:14:04 -05:00
Gabe Black
49dcab0ce6 X86: Set up support for adding m5 pseudo insts to a binary. 2009-01-07 00:05:33 -08:00
Nathan Binkert
d6b229ea0f Add the mkblankimage.sh utility to the utils directory. 2008-12-03 04:57:55 -08:00
Nathan Binkert
47e2b08893 util/m5: Add a new function called pin to bind a program to a set of cores.
This is not m5 specific and this currently only works in linux.
2008-12-03 04:57:54 -08:00
Nathan Binkert
ab593c69b6 util/m5: reorganize code so it is easier to add operations 2008-12-03 04:57:53 -08:00
Steve Reinhardt
3701794d33 Minor tracediff bug fixes. 2008-11-17 11:22:16 -08:00
Clint Smullen
ba8936120e Remove the pointless, repository destroying assertion and just have the script check every line in the file if it cannot get context information. 2008-11-15 00:21:31 -05:00
Nathan Binkert
eb5d9ba72b pseudo inst: Add rpns (read processor nanoseconds) instruction.
This instruction basically returns the number of nanoseconds that the CPU
has been running.
2008-11-10 11:51:18 -08:00
Steve Reinhardt
72743e5020 tracediff: add '#' support for sub-arg alternatives, '-n' param 2008-11-06 20:23:05 -08:00
Ali Saidi
0bd9bbae4c Cleanup m5term changes with Nate's comments. 2008-10-01 16:37:49 -04:00
Ali Saidi
4ba87133bd Make m5term use select() so OS X is happy. 2008-10-01 16:27:52 -04:00
Ali Saidi
3a3e356f4e style: Remove non-leading tabs everywhere they shouldn't be. Developers should configure their editors to not insert tabs 2008-09-10 14:26:15 -04:00
Nathan Binkert
f9a597ddf3 m5ops: clean up the m5ops stuff.
- insert warnings for deprecated m5ops
- reserve opcodes for Ali's stuff
- remove code for stuff that has been deprecated forever
- simplify m5op_alpha
2008-07-11 08:52:50 -07:00
Nathan Binkert
f82d4e2364 python: Move various utility classes into a new m5.util package so
they're all in the same place.  This also involves having just one
jobfile.py and moving it into the utils directory to avoid
duplication.  Lots of improvements to the utility as well.

--HG--
rename : src/python/m5/attrdict.py => src/python/m5/util/attrdict.py
rename : util/pbs/jobfile.py => src/python/m5/util/jobfile.py
rename : src/python/m5/util.py => src/python/m5/util/misc.py
rename : src/python/m5/multidict.py => src/python/m5/util/multidict.py
rename : util/stats/orderdict.py => src/python/m5/util/orderdict.py
2008-06-14 20:19:49 -07:00
Nathan Binkert
ed84388b85 Add hg commands for style check so you can check at times other than commit 2008-06-14 19:37:26 -07:00
Ali Saidi
8c0baf2ce4 Update make release, README, and RELEASE_NOTES for b5
--HG--
extra : convert_revision : a4958e934f599bff24b251507da7c266c89430fc
2008-02-26 17:28:31 -05:00
Steve Reinhardt
b7ea470a97 Fix minor bug in util/style.py
--HG--
extra : convert_revision : d37accc884c2967d87dd267debab5afeb8b6ed85
2007-12-11 10:41:30 -08:00
Steve Reinhardt
088d7c7096 Might as well ship splash2 scripts since we get questions on the list.
--HG--
extra : convert_revision : 0bc61d239eb24956aa401bbf39470bfa81c86c29
2007-11-20 07:36:49 -08:00
Steve Reinhardt
af6e4bf96a Add -k flag to util/regress.
--HG--
extra : convert_revision : 6dae828a1b6a254821095a1743325976202beec1
2007-11-13 18:45:51 -08:00
Ali Saidi
4df5d6483e RELEASE: A little more work on make_release.py
--HG--
extra : convert_revision : e3efbc0a79212c7474d547545411518b057cc1e9
2007-11-04 18:57:16 -05:00