public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Stump <mikestump@comcast.net>
To: Hans-Peter Nilsson <hp@axis.com>
Cc: jwakely@redhat.com, libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: Splitting up 27_io/basic_istream/ignore/wchar_t/94749.cc (takes too long)
Date: Fri, 9 Jun 2023 10:18:45 -0700	[thread overview]
Message-ID: <7F48B21B-835B-4741-9B9E-660A2D302A67@comcast.net> (raw)
In-Reply-To: <20230609162026.CC34320433@pchp3.se.axis.com>

On Jun 9, 2023, at 9:20 AM, Hans-Peter Nilsson via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> 
> The test 27_io/basic_istream/ignore/wchar_t/94749.cc takes
> about 10 minutes to run for cris-elf in the "gdb simulator"

I'd let the libstdc++ people comment on specific things.  I'll comment on general things.  We could let line count (or word count or character count) scale the timeout in part, we could record times in a db and put an expected run time into test cases or in an along side db. We could have factors for slow systems, slow simulators. A 5 GHz x86_64 will likely be faster that a 40 year old pdp11. We can have these scale factors trigger off OS, cpu statically, and/or we can do a quick bogomips calculation and let that scale it and record that scaling factor in the build tree.

A wealth of possibilities. Solutions that require maintenance or test case modification are annoying. Solutions that need port work are annoying. I'd be tempted to say bogomips into the build (test) tree.  There are two parts, time to compile test cases and time to run them.  I'd be fine with a half solution that only does what you need.  The other part can be done by someone that has a need.

I'd invite comments by others on other solutions or commentary on downsides.  For example, having a 208 thread count machine that takes 2-3 minutes to run the full testsuite is nice. A problem arises when 4-10 test cases suddenly start timing out.  You then go to around 10-53 minutes to test, which  is annoying. Anything that boosts the timeouts can hinder early port bring up, which, we'd like to avoid. I mention it without much a solution other than a db approach in the test tree that records each test case and can identify test cases that timeout and trim the timeout for them to something nicer like base + 50% once they timeout with a larger allotment of time.

We could entertain wild thoughts. For example, make a run cache that caches run results given an object. See an object in the future, just look it up in a hash cache for the object and return those results instead of running it.  This can give you a large speedup in testing and would simultaneously advantage all slow simulation ports.  Maybe a 20-100x speedup? If you want to go this way I'd say do it in python at the bottom as it would be nice to switch over to python in the next 5-20 years and away from tcl.

A object cache in python, should be fairly small wether it is used for remembering run times from previous runs and setting a timeout based upon it, or as a does it run  and pass or run and fail cache.  The caches are likely only part of the problem, one still needs to have a timeout when no cache entry it present.  They can speed testing for the day to day grind of people that run 1-200 times a week.


  reply	other threads:[~2023-06-09 17:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 16:20 Hans-Peter Nilsson
2023-06-09 17:18 ` Mike Stump [this message]
2023-06-09 17:49   ` Hans-Peter Nilsson
2023-06-09 21:47   ` Bernhard Reutner-Fischer
2023-06-10 18:29     ` Mike Stump
2023-06-12  8:35       ` Bernhard Reutner-Fischer
2023-06-12 22:26         ` Mike Stump
2023-06-09 20:40 ` Jonathan Wakely
2023-06-10  4:05   ` [PATCH] (Re: Splitting up 27_io/basic_istream/ignore/wchar_t/94749.cc (takes too long)) Hans-Peter Nilsson
2023-06-10  7:12     ` Jonathan Wakely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7F48B21B-835B-4741-9B9E-660A2D302A67@comcast.net \
    --to=mikestump@comcast.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hp@axis.com \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).