[PATCH] simulate-thread tweaks and fixes
Andrew MacLeod
amacleod@redhat.com
Fri Feb 24 18:43:00 GMT 2012
I've been toying with the simulate-thread framework a bit. With the
timeout threshold is back to where it originally was, the spectre of
huge log files when an infinite loop happens is back.
This patch has the following modifications:
1) An instruction count threshold has been added.
This will truly prevent infinite loops which were the original
issue. If the count reaches the threshold value, the test case fails.
I've set the current limit to 10,000, which I would expect to be
sufficient. The highest Ive seen so far is 877, but I'm sure someone
will find something higher :-). A testcase can override this value if
it wishes. If we encounter targets where this is not high enough, we
can raise it further. The main point is to avoid generating 10's of
gigabytes of log files when a fast machine hits an infinite loop and the
time based timeout doesnt kick in quickly enough.
If a test does fail for this reason, the log file will issue a FAIL
message indicating the instruction count threshold was exceeded.
2) I tweaked the atomic-load-int128.c testcase to avoid an inadvertent
hostile thread situation that was not intended.
3) The speculative-store.c testcase had a bug in it where the verify
function was not returning a value when successful. ThIs resulted in an
UNSUPPORTED result occasionally because the testcase didn't run far
enough to indicate GDB had successfully run, yet no FAIL was issued.
4) I lowered the hostile thread threshold by an order of magnitude so
that if a hostile thread is encountered frequently, it wont rapidly
approach the new instruction count threshold. This could happen on
compare_and_swap loop targets.
I've tried this on x86_64-unknown-linux-gnu and everything seems good.
If anyone wants to try it on their more stressed arch, all you need to
do is apply the patch to the testsuite and run 'make check-gcc
RUNTESTFLAGS=simulate-thread.exp' to see if the results are as expected.
OK for mainline?
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simulate.diff
Type: text/x-patch
Size: 7240 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120224/b731c777/attachment.bin>
More information about the Gcc-patches
mailing list