<?xml version="1.0"?>
<rss version="2.0"><channel><title>Flyspray</title>
<description>Flyspray:: M5 Bugs: Recently opened tasks</description>
<link>http://flyspray.rocks.cc/</link>
<item>
<title>Checkpoint Tester Identifies Mismatches (Bugs) for X86_FS</title>
<description>While using the checkpoint tester script, I noticed that X86_FS encounters differences in the checkpoint state.  This problem exists for both atomic and timing mode, as well as classic and Ruby memory systems.<br />
<br />
A short test with the checkpoint tester script, will identify the problem:<br />
<br />
% util/checkpoint-tester.py -i 2000 -- build/ALPHA_FS_MOESI_hammer/m5.debug configs/example/fs.py --script test/halt.sh<br />
<br />
Identified differences in the checkpoint:<br />
<br />
--- checkpoint-test/m5out/cpt.10000/m5.cpt      Wed Jan 12 14:59:28 2011<br />
+++ checkpoint-test/test.4/cpt.10000/m5.cpt     Wed Jan 12 15:00:42 2011<br />
@@ -10,20 +10,20 @@<br />
 so_state=2<br />
 locked=false<br />
 _status=1<br />
-instCnt=10<br />
+instCnt=9<br />
 <br />
 [system.cpu.xc.0]<br />
 _status=0<br />
-funcExeInst=16<br />
+funcExeInst=15<br />
 quiesceEndTick=0<br />
 iplLast=0<br />
 iplLastTick=0<br />
 floatRegs.i=0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<br />
 0 0 0 0<br />
-intRegs=549755813888 0 2097152 0 0 0 590336 0 0 0 0 0 0 0 0 0 0 2097208 380 0 0 0 0 2097189 0 0 0 0<br />
 0 0 0 0 133 0 0 0 0 0 0<br />
+intRegs=549755813888 0 2097152 0 0 0 590336 0 0 0 0 0 0 0 0 0 <br />
+18446743523955834880 2097182 380 0 0<br />
0 0 2097189 0 0 0 0 0 0 0 0 133 0 0 0 0 0 0<br />
 _pc=2097202<br />
-_npc=2097208<br />
-_upc=1<br />
-_nupc=2<br />
+_npc=2097210<br />
+_upc=0<br />
+_nupc=1<br />
 regVal=3758096401 0 0 458752 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4294905840 1024 2 243392 0 1288 0<br />
 0 0 260 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1974748653749254 0 0 0<br />
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1280 0 0 0 0 0 0 0 0 0 0 0 0 0 0 132609<br />
0 0 0 0 67108864 0 0 0 0 0 16 8 16 16 16 16 0 0 0 0 0 24 0 0 0 0 0 0 0 0 0 483328 0 0 0 0 0 0 0 0 0<br />
0 0 0 483328 0 0 0 0 983295 983295 983295 983295 983295 983295 65535 65535 23 65535 65535 983295 655<br />
35 45768 43728 45768 45768 45768 45768 45952 0 45952 45952 45952 43976 45952 0 0 0 0 0 0 0 0 0 0 0 4<br />
276095232 0<br />
 <br />
 [system.cpu.tickEvent]<br />
<br />
</description>
<link>http://flyspray.gem5.org/task/337</link>
</item><item>
<title>Cleanup RemoteGDB code</title>
<description>The remote gdb code could use some better structuring and perhaps templating on the ISA.</description>
<link>http://flyspray.gem5.org/task/334</link>
</item><item>
<title>Create a &quot;generic&quot; ISA directory.</title>
<description>A non-trivial amount of code is exactly the same between multiple ISAs or is the same but with minor modifications. A directory in arch called &amp;quot;generic&amp;quot; should be created for these common implementations which will be put in an namespace called GenericISA. The individual ISAs can wrap these versions of functions or pieces of functions, or import them directly into their own namespace with &amp;quot;using&amp;quot;.<br />
<br />
<br />
<br />
<br />
The directory has been created, and now more common code needs to be moved into it.</description>
<link>http://flyspray.gem5.org/task/333</link>
</item><item>
<title>minor FS checkpoint/restore discrepancies</title>
<description>Running the following command:<br />
  util/checkpoint-tester.py -i 200000000000 -- build/ALPHA_FS/m5.opt configs/example/fs.py --script tests/halt.sh<br />
reveals a few discrepancies.<br />
<br />
First, the files that restore from a checkpoint always seem to have 24 more instructions in instCnt and funcExeInst than the original run.<br />
<br />
Second, sometimes the first field of rtc.clock_data (the seconds field?) is a 1 in the checkpoints regenerated from earlier checkpoints, even though it's always a 0 in the original checkpoints.<br />
</description>
<link>http://flyspray.gem5.org/task/332</link>
</item><item>
<title>Process output files don't obey -d flag</title>
<description>The 'output' and 'errout' flags of the Process object (which can be set using the options of the same name on se.py) allow users to redirect the output of the simulated program independently from simulator output.  However, the files created using these flags show up in the current working directory, even if the user has specified an output directory using the global '-d' option.  This behavior is wrong; all output should go to the directory specified by '-d' unless absolute pathnames are given.<br />
<br />
The fundamental problem is that the 'open()' call in Process::openOutputFile() doesn't use the 'simout' directory in base/output.{cc,hh}.  It's not a totally trivial fix since the existing code for opening output files deals in ostreams, and Process wants a bare file descriptor.<br />
</description>
<link>http://flyspray.gem5.org/task/331</link>
</item><item>
<title>Regressions no longer retry on user kill</title>
<description>There's some code I added to tests/SConscript that intentionally avoids creating the 'status' output file if m5 terminates with one of a certain set of signals such as SIGINT.  (Grep for retry_signals in that file to see where.)  Without this code, premature termination of m5 counts as a test failure (as is often appropriate, e.g., if you hit an assertion failure or SIGSEGV).  The intended effect here is that if you ^C a regression test for some reason then restart it, it will re-run the test automatically, rather than reporting a failed test and requiring you to go delete the output files to force scons to re-run it.<br />
<br />
This used to work (I know it did when I added this code in March 2009, see <a href="http://repo.m5sim.org/m5/rev/e0344c15e73b">http://repo.m5sim.org/m5/rev/e0344c15e73b</a>).  It doesn't anymore; I just ^C'd a regression and got the old behavior.  I suspect the interrupt return code is getting lost in the transition from C++ to Python, but a quick skim doesn't turn up any changes since then that would look suspicious, and I don't have time to dig into this right now.  Anything come to mind, Nate?<br />
<br />
</description>
<link>http://flyspray.gem5.org/task/330</link>
</item><item>
<title>Bitfield definitions in ARM ISA</title>
<description>Steve Reinhardt:<br />
I do see lots of repeated definitions of rn, rd, and rm.  Also for other fields like lsb, msb, rotation, that are defined in multiple places (e.g., 2 out of 3 branches of an if/else if tree) I'd prefer to see them defined at the top in a common place; I don't think that avoiding extracting them in the one case where they're not needed is a real performance issue.  If our decode cache isn't broken then actual from-scratch decode should not be a performance issue at all.<br />
<br />
I had a couple of other ideas:<br />
1. Maybe we should define bits() as a method on ExtMachInst, so we can say machInst.bits(X,Y).  That's not a huge win by itself, but if we couple it with getting rid of &amp;quot;def bitfield&amp;quot; and have bitfields in the ISA language be attributes on the ExtMachInst, then you could even say &amp;quot;decode bits(5,3)&amp;quot; right in the ISA language.<br />
2. We could extend bits() to take multiple pairs of bit indices, concatenating the indicated ranges, so expressions like:<br />
timm = (bits(machInst, 19, 16) &amp;lt;&amp;lt; 12) | bits(machInst, 11, 0);<br />
could be rewritten as:<br />
timm = machInst.bits(19, 16, 11, 0);<br />
<br />
I think #2 would even be useful in converting some of your if/else if structures back to switches, which I find preferable because they make it clear(er) that you've covered all the possible cases.<br />
<br />
<br />
Gabe Black wrote:<br />
I've had thoughts similar to these. For instance, it would be nice to add a function to either the ExtMachInst (or the StaticInst) that would return an IntRegIndex from a set of bits. That would get rid of some of the stacks of casts that tend to happen around register indexes. It wouldn't be that bad (knock on wood) to add new types of bitfields to BitUnions that would do arbitrarily complex things when reading or writing bits. The problem is that they'd need to be set up first, and if they only show up once or twice the overhead makes them a lot more verbose than just calling bits directly.<br />
<br />
I'd be fine with moving the common definitions to the tops of the blocks they're used in. The thing to watch out for is bitfields that are -almost- the same but that are changed around sometimes. There are instances of that and they have caused some bugs.<br />
<br />
While these sorts of extensions are a good idea and would clean things up even outside of ARM in some places, they won't remove all instances of having to do things the hard way because there are plenty of places where the bits of interest shift for what seems like (or literaly is) every different instruction in a group, or where things are combined like bit a == bit b, or a == 1 and b != 010. It's sort of a mess.<br />
<br />
Steve Reinhardt:<br />
I'm still not very happy with all the redundant bitfield stuff, even<br />
if it is caused by IntRegIndex casting issues.  (It looks like the big<br />
problem is that IntRegIndex is an enum rather than an integer type...<br />
is there a big benefit from that?  Clearly the cost is pretty high, in<br />
my opinion.  Why not replace it with a typedef to an integer type and<br />
a bunch of constants, maybe in their own Arm::IntReg namespace if that<br />
helps?)<br />
<br />
I'd also like to see the extended bits() notation (or something<br />
similar) that concatenates bitfields, e.g., replacing expressions<br />
like:<br />
  (bits(data, 15) &amp;lt;&amp;lt; 2) | bits(data,11,10)<br />
with:<br />
  bits(data, 15, 15, 11, 10)<br />
(or something similar... I'm open to ideas for better syntax).  This<br />
makes it more obvious that the bitfields are being concatenated and<br />
avoids the magic '2' that really represents the width of bits(_, 11,<br />
10) without being obvious about that.  There are even cases where<br />
another shift gets folded in that are more confusing; for example, I<br />
think this:<br />
   (bits(machInst, 9) &amp;lt;&amp;lt; 6) | (bits(machInst, 7, 3) &amp;lt;&amp;lt; 1)<br />
is much less clear than:<br />
  bits(machInst, 9, 9, 7, 3) &amp;lt;&amp;lt; 1<br />
<br />
</description>
<link>http://flyspray.gem5.org/task/328</link>
</item><item>
<title>Improve handling of the FSR in SPARC.</title>
<description>SPARC's FSR controls floating point operations and also tracks floating point condition codes. The register should probably be split into a control register and an integer register for the condition codes. That way the condition codes would be renameable like the integer ones, and instructions that set them won't be serializing.</description>
<link>http://flyspray.gem5.org/task/327</link>
</item><item>
<title>glibc reads /proc/meminfo and that can effect simulation</title>
<description>The 20.parser benchmark tends to fail because glibc reads /proc/meminfo to determine how much memory is available in the system. qsort() uses that information to choose an algorithm to use thus depending on the host system, the guest can make a different choice. Ultimately, we need to provide a fake /proc/meminfo on open() syscalls that either has some generic info or better yet has the correct information for the simulated system. </description>
<link>http://flyspray.gem5.org/task/326</link>
</item><item>
<title>Add statistics to bus</title>
<description>We never had any statistics for the bus in the new memory system. It would be nice to know how busy each one is and the amount of data, number of requests, etc that is transmitted across each one.<br />
<br />
Ali<br />
<br />
</description>
<link>http://flyspray.gem5.org/task/324</link>
</item></channel>
</rss>
