summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-30misc: Don't build region.py as a PySourceAndreas Sandberg
The style refactor change (style: Refactor the style checker as a Python package) moved region.py from src/python/m5/util/ to util/style/. The SConscript update accidentally got lost in that commit. This commit removes region.py from src/python/SConscript. Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> --HG-- extra : amend_source : f69b75bf636dd4a4232af3e10c29f7eaa4d59dc8
2016-03-30arm: Clean up m5ops assembly libraryAndreas Sandberg
The m5ops assembly library contains a lot of repetitive code. This changeset adds two macros, FOREACH_M5OP and FOREACH_M5_ANNOTATION, to m5ops.h that simplify architecture-specific implementations. The ARM and ARMv8 m5op implementations have been updated to use the new macros. Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
2016-03-30style: Change maximum line length to 79 charactersAndreas Sandberg
The old style guide used to mandate 78 characters as the maximum line length to accommodate traditional diffs on 80-column terminals. This is an uncommon use case and it has therefore been decided (see email thread on gem5-dev [1]) that a maximum length of 79-characters makes more sense. [1] http://comments.gmane.org/gmane.comp.emulators.m5.devel/29789 Signed-off-by: Andreas Sandberg <aandreas.sandberg@arm.com> Reviewed-by: Brandon Potter <brandon.potter@amd.com> --HG-- rename : util/style.py => util/hgstyle.py extra : rebase_source : 63efcc4da2585ef8c323d6f322736f64d71742f8
2016-03-30style: Add a style checker that doesn't depend on MercurialAndreas Sandberg
The current style checker script, hgstyle.py, assumes that it is being run from Mercurial. This means that it depends on the Mercurial Python libraries, which aren't necessarily present if using git. This changeset adds a new style checker script, style.py, that has been designed to be run from the command line. The script has support for detecting which revision control system is used and is able to query both git and Mercurial for changes. This enables the script to operate on modified regions and/or all of the modified files in the repository. 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 : 2b420aff79d190f32557bc8822518cbc5d93e999
2016-03-30scons: Automatically install the git style hookAndreas Sandberg
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> --HG-- extra : rebase_source : 4b805cdd74bc5442a65abf8a62e3e341f352c04e
2016-03-30style: Add a git pre-commit hookAndreas Sandberg
Add a git pre-commit hook that verifies that files that are about to be committed. Since git stages changes into an index and the index contains the changes that will be committed, the style checker only looks at the state of files in the index. 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: Steve Reinhardt <steve.reinhardt@amd.com> --HG-- extra : rebase_source : 22a028bf13524cba188bd7896a0304f4c14ffeeb
2016-03-30style: Add repository helper functionsAndreas Sandberg
Add an AbstractRepo class and implementations for git and Mercurial that provide a common interface to query repository status for style checkers. The class defines the interfaces to list modified files that are about to be committed and methods to identify changed regions. 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: Steve Reinhardt <steve.reinhardt@amd.com> --HG-- rename : util/style.py => util/hgstyle.py extra : rebase_source : da1f482a1ecac2b0be437dc400b4a66bd3b301cc
2016-03-30style: Remove style validatorsAndreas Sandberg
Style validators provide a subset of the style verifier functionality and are only exposed through the "hg m5format" command. This functionality seems to be both redundant and unused. Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> --HG-- extra : rebase_source : f4847ac3ddc86f6684565b65a942e04979972a7b
2016-03-30style: Add a control character checkerAndreas Sandberg
Add a style checker that verifies that source code doesn't contain non-printable (control) characters. The only allowed control characters are: * 0x0a / \n: New line * 0x09 / \t: Tab (the whitespace checker enforces no-tabs for C/C++ files) Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Brandon Potter <brandon.potter@amd.com> --HG-- extra : rebase_source : 9ba3e2971774a7b3d73cda34bbee1f19c4add746
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-30kvm: Add an option to force context sync on kvm entry/exitAndreas Sandberg
This changeset adds an option to force the kvm-based CPUs to always synchronize the gem5 thread context representation on entry/exit into the kernel. This is very useful for debugging. Unfortunately, it is also the only way to get reliable register contents when using remote gdb functionality. The long-term solution for the latter would be to implement a kvm-specific thread context. Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-by: Alexandru Dutu <alexandru.dutu@amd.com>
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-21arm: Refactor the TLB test interfaceAndreas Sandberg
Refactor the TLB and page table walker test interface to use a dynamic registration mechanism. Instead of patching a couple of empty methods to wire up a TLB tester, this change allows such testers to register themselves using the setTestInterface() method.
2016-03-21gpu-compute: remove unused variable from scoreboard check stagejkalamat
appease clang by removing the unused private member variable, 'numGlbMemPipes', from the scoreboard check stage
2016-03-20cpu: warn if TrafficGen is suppressing a large numer of packetsAndreas Hansson
Add a basic warning for every 10000 packet that is suppressed to alert the user.
2016-03-17base: add symbol support for dynamic librariesBrandon Potter
Libraries are loaded into the process address space using the mmap system call. Conveniently, this happens to be a good time to update the process symbol table with the library's incoming symbols so we handle the table update from within the system call. This works just like an application's normal symbols. The only difference between a dynamic library and a main executable is when the symbol table update occurs. The symbol table update for an executable happens at program load time and is finished before the process ever begins executing. Since dynamic linking happens at runtime, the symbol loading happens after the library is first loaded into the process address space. The library binary is examined at this time for a symbol section and that section is parsed for symbol types with specific bindings (global, local, weak). Subsequently, these symbols are added to the table and are available for use by gem5 for things like trace generation. Checkpointing should work just as it did previously. The address space (and therefore the library) will be recorded and the symbol table will be entirely recorded. (It's not possible to do anything clever like checkpoint a program and then load the program back with different libraries with LD_LIBRARY_PATH, because the library becomes part of the address space after being loaded.)
2016-03-17base: style cleanup for ObjectFile and ElfObjectBrandon Potter
2016-03-17stats: update stats for ld.so supportSteve Reinhardt
Additional auxv entries leads to more instructions in start-up while walking the list, along with different cache conflicts wrt stack entries.
2016-03-17base: support dynamic loading of Linux ELF objects in SE modeBrandon Potter
2016-03-17stats: update stats for mmap changesSteve Reinhardt
2016-03-17syscall_emul: update x86 mmap base addressBrandon Potter
2016-03-17syscall_emul: move mmapGrowsDown() to LiveProcessSteve Reinhardt
The mmapGrowsDown() method was a static method on the OperatingSystem class (and derived classes), which worked OK for the templated syscall emulation methods, but made it hard to access elsewhere. This patch moves the method to be a virtual function on the LiveProcess method, where it can be overridden for specific platforms (for now, Alpha). This patch also changes the value of mmapGrowsDown() from being false by default and true only on X86Linux32 to being true by default and false only on Alpha, which seems closer to reality (though in reality most people use ASLR and this doesn't really matter anymore). In the process, also got rid of the unused mmap_start field on LiveProcess and OperatingSystem mmapGrowsUp variable.
2016-03-17syscall_emul: fix bugs for mmap2 system call and x86-32 syscallsBrandon Potter
2016-03-17stats: update stats for mmap() change.Steve Reinhardt
SE O3 runs see an additional reg read per mmap() call.
2016-03-17syscall_emul: extend mmap system call to support file backed mmapsBrandon Potter
For O3, which has a stat that counts reg reads, there is an additional reg read per mmap() call since there's an arg we no longer ignore. Otherwise, stats should not be affected.
2016-03-17syscall_emul: add many Linux kernel flagsBrandon Potter
2016-03-17syscall_emul: rename OpenFlagTransTable structBrandon Potter
The structure definition only had the open system call flag set in mind when it was named, so we rename it here with the intention of using it to define additional tables to translate flags for other system calls in the future.
2016-03-17syscall_emul: add extra debug support for syscallsAlexandru Dutu
Breaks the debug output from system calls into two levels: Base and Verbose. A macro is added specifically for system calls which allows developers to easily add new debug messages in a consistent manner. The macro also contains a field to print thread IDs along with the CPU ID.
2016-03-17syscall_emul, style: refactor lseekBrandon Potter
2016-03-17syscall_emul, style: fix newline issue inside assertBrandon Potter
2016-03-17mem: Adjust cache queue reserve to more conservative valuesAndreas Hansson
The cache queue reserve is there as an overflow to give us enough headroom based on when we block the cache, and how many transactions we may already have accepted before actually blocking. The previous values were probably chosen to be "big enough", when we actually know that we check the MSHRs after every single allocation, and for the write buffers we know that we implicitly may need one entry for every outstanding MSHR. * * * mem: Adjust cache queue reserve to more conservative values The cache queue reserve is there as an overflow to give us enough headroom based on when we block the cache, and how many transactions we may already have accepted before actually blocking. The previous values were probably chosen to be "big enough", when we actually know that we check the MSHRs after every single allocation, and for the write buffers we know that we implicitly may need one entry for every outstanding MSHR.
2016-03-17stats: Bump stats to match cache changesAndreas Hansson
Update stats to match current behaviour. As a result of the earlier conflict check we are seeing a few prefetch requests being ignored before being sent as upward snoops.
2016-03-17mem: Create a separate class for the cache write bufferAndreas Hansson
This patch breaks out the cache write buffer into a separate class, without affecting any stats. The goal of the patch is to avoid encumbering the much-simpler write queue with the complex MSHR handling. In a follow on patch this simplification allows us to implement write combining. The WriteQueue gets its own class, but shares a common ancestor, the generic Queue, with the MSHRQueue.
2016-03-16stats: overdue updates to long regressionsSteve Reinhardt
2016-03-16misc: Add a gitignore file based on the current hgignoreAndreas Sandberg
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
2016-03-16misc: Fix argument handling for m5 initparam utilGabor Dozsa
2016-03-16arm: Fix disasm printingNathanael Premillieu
Fix the printDataInst function to properly print the immediate value.
2016-03-13scons: fix building in non-standard locationsSteve Reinhardt
It's apparently not widely known that our scons scripts allow you to put the build directory wherever you want; not only does it not have to be immediately under the root of your repo, it doesn't even have to be underneath the root at all. (For example, sometimes it's useful to build on a local disk if your repo is on a slow NFS mount.) I point this out because this functionality has been broken for close to two years but no one seems to have noticed yet. This patch fixes an assumption that crept in in changeset be0e1724eb39 (May 09 2014) that the build dir would be immediately under the top level of the repo, preventing builds anywhere else.
2016-02-18stats: update gpu-ruby-GPU_RfO statsSteve Reinhardt
Output changed way back in this cset: changeset: 11345:b6a66a90e0a1 user: John Kalamatianos <john.kalamatianos@amd.com> summary: gpu: fix bugs with MemFence, Flat Instrs and Resource utilization
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-03-08syscall_emul: Fix erroneous use of deleteAndreas Hansson
clang correctly points out an erroneous use of delete.
2015-06-17sim: Add voltage() function to clocked_objectDavid Guillen Fandos
Adding voltage function which returns the current voltage for a given clocked object. It's handy for power models and similar stuff that need to retrieve voltage. Function frequency() is already there, so I see no reason for not having this one too.
2015-05-05cpu: Change literal integer constants to meaningful labelsRekai Gonzalez Alberquilla
fu_pool and inst_queue were using -1 for "no such FU" and -2 for "all those FUs are busy at the moment" when requesting for a FU and replying. This patch introduces new constants NoCapableFU and NoFreeFU respectively. In addition, the condition (idx == -2 || idx != -1) is equivalent to (idx != -1), so this patch also simplifies that. --HG-- extra : rebase_source : 4833717b9d1e09d7594d1f34f882e13fc4b86846
2016-03-04base: Fix gpu-compute output stream creationAndreas Hansson
Match changes in output stream.
2015-11-27kvm: Shutdown KVM and disconnect performance counters on forkAndreas Sandberg
We can't/shouldn't use KVM after a fork since the child and parent probably point to the same VM. Knowing the exact effects of this is hard, but they are likely to be messy. We also disconnect the performance counters attached to the guest. This works around what seems to be a kernel bug where spurious SIGIOs get delivered to the forked child process. Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se> [sascha.bischoff@arm.com: Rebased patches onto a newer gem5 version] Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com> [andreas.sandberg@arm.com: Fatal if entering KVM in child process ] Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>