summaryrefslogtreecommitdiff
path: root/util
AgeCommit message (Collapse)Author
2016-03-30style: Refactor the style checker as a Python packageAndreas Sandberg
Refactor the style checker into a Python module that can be reused by command line tools that integrate with git. In particular: * Create a style package in util * Move style validators from style.py to the style/validators.py. * Move style verifiers from style.py to the style/verifiers.py. * Move utility functions (sort_includes, region handling, file_types) into the style package * Move generic code from style.py to style/style.py. Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Steve Reinhardt <steve.reinhardt@amd.com> --HG-- rename : util/style.py => util/hgstyle.py rename : util/sort_includes.py => util/style/sort_includes.py extra : rebase_source : ad6cf9b9a18c48350dfc7b7c77bea6c5344fb53c
2016-03-30style: Change include sorter to yield one line at a timeAndreas Sandberg
The include sorter class normally yields one string per line and relies on the caller to merge lines into a block of text separated by newlines. However, there are cases when this isn't true. This makes diffing using Python's difflib hard. This changeset updates the include sorter to never do this and always yield one line at a time. Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Steve Reinhardt <steve.reinhardt@amd.com> --HG-- extra : rebase_source : 154c9c7e1ebdd77e09fe5f28d0cfddc9e6c6b1eb
2016-03-30scons, style: Rename style.py to hgstyle.pyAndreas Sandberg
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> --HG-- rename : util/style.py => util/hgstyle.py extra : rebase_source : ee8107ef245901371b368b7c2046ecdd89e3ff4c
2016-03-30style: Remove unsupported style.py commandsAndreas Sandberg
Remove the unsupported style.py subcommands (fixwhite, chkwhite), which leaves the chkformat command as the only remaining command. Since the script now only supports one command, remove the sub-command support altogether. 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> --HG-- extra : rebase_source : 548081a5f5358064bffd941b51dd895cff1e2df8
2016-03-29copyright: Update copyright in sort_includes.pyAndreas Sandberg
The following changes introduced substantial changes to sort_includes.py: - hg:84b4d6af0ecc - util: Fix state leakage in ... - hg:e2f9644a7738 - style: Update the style checker to handle new ... Since the file didn't include a copyright header at the time, I never added the correct ARM copyright notice. This changeset adds the correct copyright notice. Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
2016-03-28copyright: add copyright missing from files I createdNathan Binkert
2016-03-24style: Strip newline when checking linesAndreas Sandberg
The style checker incorrectly includes newlines when checking lines of code, which effectively decreases the column limit by 1. This changeset strips the newline character from before calling line checkers. Change-Id: I0a8c7707ece57d782d11cc86db4b8064db291ce0 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
2016-03-16misc: Fix argument handling for m5 initparam utilGabor Dozsa
2016-03-08configs: Add a lat_mem_rd style test scriptAndreas Hansson
This patch adds a config script that broadly replicates the behaviour of lat_mem_rd. The test is based on traffic generators, and as such we simply randomise addresses in increasingly large ranges, and play them back using the trace functionality of the traffic generator. The test script is accompanied by a post-processing and visualisation script. At the moment no configurability is added to tweak the memory hierarchy, but a follow on patch could easily extend the functionality.
2016-02-29util: update Java JNI interface to m5opsPrakash Ramrakhyani
Synchronize with ab19693da "pseudo inst,util: Add optional key to initparam pseudo instruction"
2016-02-24cpu: TraceGen fix for tick frequency checkMatteo Andreozzi
Bug fix for check on protobuf file frequency being different than global frequency. The ASCII encoder script is also fixed, and the example trace used in the regressions is updated.
2016-02-06util: fix apparent statetrace bugSteve Reinhardt
In the process of trying to eliminate boolean comparisons, I ran across this statement that appears to be a bug (should have been an assignment).
2016-02-06util: added line length and boolean comparison style checkersSteve Reinhardt
Added checkers for line length and boolean comparisons (== true/== false) to the style script.
2016-02-06style: fix missing spaces in control statementsSteve Reinhardt
Result of running 'hg m5style --skip-all --fix-control -a'.
2016-02-06style: remove trailing whitespaceSteve Reinhardt
Result of running 'hg m5style --skip-all --fix-white -a'.
2016-02-06util: clean up and extend style checkerSteve Reinhardt
Added a new Verifier object to check for and fix spacing between if/while/for and following paren. Restructured Verifier class to make it easier to add new subclasses, particularly by using a global list of verifiers to auto-generate command line options and simplify the invocation loop.
2016-02-06util: delete old unused style-checking scriptsSteve Reinhardt
The functions in these scripts were apparently folded into style.py but the old scripts were orphaned without being deleted. Get rid of them so their existence is no longer confusing.
2016-01-19gpu-compute: AMD's baseline GPU modelTony Gutierrez
2016-01-07config: Updates for distributed gem5 simulationsGabor Dozsa
2016-01-07dev: Distributed Ethernet link for distributed gem5 simulationsGabor Dozsa
Distributed gem5 (abbreviated dist-gem5) is the result of the convergence effort between multi-gem5 and pd-gem5 (from Univ. of Wisconsin). It relies on the base multi-gem5 infrastructure for packet forwarding, synchronisation and checkpointing but combines those with the elaborated network switch model from pd-gem5. --HG-- rename : src/dev/net/multi_etherlink.cc => src/dev/net/dist_etherlink.cc rename : src/dev/net/multi_etherlink.hh => src/dev/net/dist_etherlink.hh rename : src/dev/net/multi_iface.cc => src/dev/net/dist_iface.cc rename : src/dev/net/multi_iface.hh => src/dev/net/dist_iface.hh rename : src/dev/net/multi_packet.hh => src/dev/net/dist_packet.hh
2016-01-07pseudo inst,util: Add optional key to initparam pseudo instructionGabor Dozsa
The key parameter can be used to read out various config parameters from within the simulated software.
2015-09-18dev, arm: Add gem5 extensions to support more than 8 coresKarthik Sangaiah
Previous ARM-based simulations were limited to 8 cores due to limitations in GICv2 and earlier. This changeset adds a set of gem5-specific extensions that enable support for up to 256 cores. When the gem5 extensions are enabled, the GIC uses CPU IDs instead of a CPU bitmask in the GIC's register interface. To OS can enable the extensions by setting bit 0x200 in ICDICTR. This changeset is based on previous work by Matt Evans.
2015-12-07cpu: Support virtual addr in elastic tracesRadhika Jagtap
This patch adds support to optionally capture the virtual address and asid for load/store instructions in the elastic traces. If they are present in the traces, Trace CPU will set those fields of the request during replay.
2015-12-07cpu: Create record type enum for elastic tracesRadhika Jagtap
This patch replaces the booleans that specified the elastic trace record type with an enum type. The source of change is the proto message for elastic trace where the enum is introduced. The struct definitions in the elastic trace probe listener as well as the Trace CPU replace the boleans with the proto message enum. The patch does not impact functionality, but traces are not compatible with previous version. This is preparation for adding new types of records in subsequent patches.
2015-12-07util: Add decode and encode scripts for elastic tracesRadhika Jagtap
This patch adds python scripts to parse a protobuf encoded O3CPU elastic trace and convert it to a text file output and vice versa.
2015-12-04util: term: drop CC from MakefileBjoern A. Zeeb
With clang there are systems without gcc being installed anymore and we should not rely on that. This patch drops CC so that system's default compiler is invoked. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
2015-12-04util: DrainManager/Checkpoint changes in SystemC couplingAbdul Mutaal Ahmad
Due to changes in Drain Manager, the lastest systemc coupling doesn't work. The code for handling Checkpoint has been modified and it is now compatiable with new drain manager. Testing is being done on systemC coupling. It needs more testing to verify checkpointing feature. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
2015-09-10sim: Update C++ config example to match SystemC exampleAndrew Bardsley
Update the use of the drain manager, and checkpointing to match changes to gem5 since the example was written.
2015-11-22config: Minor fixes to the DRAM utilisation sweepAndreas Hansson
2015-09-30base: remove Trace::enabled flagCurtis Dunham
The DTRACE() macro tests both Trace::enabled and the specific flag. This change uses the same administrative interface for enabling/disabling tracing, but masks the SimpleFlags settings directly. This eliminates a load for every DTRACE() test, e.g. DPRINTF.
2015-09-30isa,cpu: Add support for FS SMT InterruptsMitch Hayenga
Adds per-thread interrupt controllers and thread/context logic so that interrupts properly get routed in SMT systems.
2015-09-25util: Fix minor issues in DRAM sweep scriptsAndreas Hansson
This patch fixes a few issues in the sweep scripts, bringing them up-to-date with the latest memory configs and options.
2015-09-15misc: Bugfix for Freezing Terminal in SystemC SimulationAbdul Mutaal Ahmad
If the terminal was used in the SystemC or TLM simulations the simulation gets in a deadlock state. This is because of the Event queue gets locked while servicing the async events leading to event queue deadlock. This was solved by locking the queue at the beginning of service of async events. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
2015-09-15misc: Bugfix in TLM integration regarding CleanEvict CommandAbdul Mutaal Ahmad
The CleanEvict command was not considered in /util/tlm/sc_port.cc this could lead to a simulator crash. This issue is solved by ignoring this special command type. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
2015-09-11dev, arm: Rewrite the HDLCD controllerAndreas Sandberg
Rewrite the HDLCD controller to use the new DMA engine and pixel pump. This fixes several bugs in the current implementation: * Broken/missing interrupt support (VSync, underrun, DMA end) * Fragile resolution changes (changing resolutions used to cause assertion errors). * Support for resolutions with a width that isn't divisible by 32. * The pixel clock can now be set dynamically. This breaks checkpoint compatibility. Checkpoints can be upgraded with the checkpoint conversion script. However, upgraded checkpoints won't contain the state of the current frame. That means that HDLCD controllers restoring from a converted checkpoint immediately start drawing a new frame (i.e, expect timing differences).
2015-09-02sim: tag-based checkpoint versioningCurtis Dunham
This commit addresses gem5 checkpoints' linear versioning bottleneck. Since development is distributed across many private trees, there exists a sort of 'race' for checkpoint version numbers: internally a checkpoint version may be used but then resynchronizing with the external tree causes a conflict on that version. This change replaces the linear version number with a set of unique strings called tags. Now the only conflicts that can arise are of tag names, where collisions are much easier to avoid. The checkpoint upgrader (util/cpt_upgrader.py) upgrades the version representation, as one would expect. Each tag version implements its upgrader code in a python file in the util/cpt_upgraders directory rather than adding a function to the upgrader script itself. The version tags are stored in the 'Globals' section rather than 'root' (as the version was previously) because 'Globals' gets unserialized first and can provide a warning before any other unserialization errors can occur.
2015-08-05util: Enable DRAM sweep to print power and efficiencyAndreas Hansson
This patch enhances the functionality of the DRAM sweep script to not only plot the bandwidth utilisation, but also total power and power efficiency. To do so, a command-line switch is added, and a bit more data extracted from the stats.
2015-08-03misc: Coupling gem5 with SystemC TLM2.0Matthias Jung
Transaction Level Modeling (TLM2.0) is widely used in industry for creating virtual platforms (IEEE 1666 SystemC). This patch contains a standard compliant implementation of an external gem5 port, that enables the usage of gem5 as a TLM initiator component in SystemC based virtual platforms. Both TLM coding paradigms loosely timed (b_transport) and aproximately timed (nb_transport) are supported. Compared to the original patch a TLM memory manager was added. Furthermore, the transaction object was removed and for each TLM payload a PacketPointer that points to the original gem5 packet is added as an TLM extension. For event handling single events are now created. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
2015-07-20util: added .cl OpenCL extension to file_type.pyBrad Beckmann
2015-07-20util: added .mk makefile extension to file_types.pyBrad Beckmann
2015-07-31util: add a vimrc that matches gem5 style guideAnthony Gutierrez
2015-07-24base: refactor process class (specifically FdMap and friends)Brandon Potter
This patch extends the previous patch's alterations around fd_map. It cleans up some of the uglier code in the process file and replaces it with a more concise C++11 version. As part of the changes, the FdMap class is pulled out of the Process class and receives its own file.
2015-07-15dev: add support for multi gem5 runsGabor Dozsa
Multi gem5 is an extension to gem5 to enable parallel simulation of a distributed system (e.g. simulation of a pool of machines connected by Ethernet links). A multi gem5 run consists of seperate gem5 processes running in parallel (potentially on different hosts/slots on a cluster). Each gem5 process executes the simulation of a component of the simulated distributed system (e.g. a multi-core board with an Ethernet NIC). The patch implements the "distributed" Ethernet link device (dev/src/multi_etherlink.[hh.cc]). This device will send/receive (simulated) Ethernet packets to/from peer gem5 processes. The interface to talk to the peer gem5 processes is defined in dev/src/multi_iface.hh and in tcp_iface.hh. There is also a central message server process (util/multi/tcp_server.[hh,cc]) which acts like an Ethernet switch and transfers messages among the gem5 peers. A multi gem5 simulations can be kicked off by the util/multi/gem5-multi.sh wrapper script. Checkpoints are supported by multi-gem5. The checkpoint must be initiated by a single gem5 process. E.g., the gem5 process with rank 0 can take a checkpoint from the bootscript just before it invokes 'mpirun' to launch an MPI test. The message server process will notify all the other peer gem5 processes and make them take a checkpoint, too (after completing a global synchronisation to ensure that there are no inflight messages among gem5).
2015-07-03util: Remove DRAMPower trace scriptAndreas Hansson
This script is deprecated and DRAMPower is now properly integrated with the controller model.
2015-06-01sim, arm: add checkpoint upgrader for d02b45a5Curtis Dunham
The insertion of CONTEXTIDR_EL2 in the ARM miscellaneous registers obsoletes old checkpoints.
2015-03-19config: Add soak test for memtest.pyAndreas Hansson
This patch adds a random option to memtest.py which allows the user to easily test valid random tree topologies. The patch also adds a wrapper script to run soak tests using the newly introduced option. We also adjust the progress interval and progress limit check to make the output less noisy, and avoid false positives. Bring on the pain.
2015-02-16cpu: add support for outputing a protobuf formatted CPU traceAli Saidi
Doesn't support x86 due to static instruction representation. --HG-- rename : src/cpu/CPUTracers.py => src/cpu/InstPBTrace.py
2015-02-11style: Fix broken m5format commandAndreas Sandberg
The m5format command didn't actually work due to parameter handling issues and missing language detection. This changeset fixes those issues and cleans up some of the code to shared between the style checker and the format checker.
2015-02-11style: Fix incorrect style checker option nameAndreas Sandberg
The style used to support the option -w to automatically fix white space issues. However, this option was actually wired up to fix all styles issues the checker encountered. This changeset cleans up the code that handles automatic fixing and adds an option to fix all issues, and separate options for white spaces and include ordering.
2015-02-03style: Update the style checker to handle new include orderAndreas Sandberg
As of August 2014, the gem5 style guide mandates that a source file's primary header is included first in that source file. This helps to ensure that the header file does not depend on include file ordering and avoids surprises down the road when someone tries to reuse code. In the new order, include files are grouped into the following blocks: * Primary header file (e.g., foo.hh for foo.cc) * Python headers * C system/stdlib includes * C++ stdlib includes * Include files in the gem5 source tree Just like before, include files within a block are required to be sorted in alphabetical order. This changeset updates the style checker to enforce the new order.