From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id 52A063858D35; Sat, 10 Jun 2023 07:12:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52A063858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-51496f57e59so3564829a12.2; Sat, 10 Jun 2023 00:12:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686381178; x=1688973178; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JKachCkvJcGCjGW27WQplckqEMKIQ5Sw+H4QJqqN9wY=; b=DAZ0vKPHDz1ja2HwXjc7IF5IqGQNsGyaW5AOV2hxgNuffOyNEj1WHkIxZgrmpeXM5b 2jQLFUDM8gEmXX1GhB5ySbuk8mpg8U2COxV2gytLDC6YiAFUbJb1aUW8XhUkp+6X7aiA b7/Ihq9IHF7svziQIl3vszhctBuAdqH/m/LP4Y9LAl/RS8d6HcprJghn/i9dl1fgawOl sl85KZnqIgxSIjhY9RCR0MAGHUIsdMUQNusbPBwA5/u4MIUoZsPoh+JipeKu07HpL9Nl x69FI1iQJZRQwtbVGleltdz9rgoWwNUnmjbPk2DcNuWb0Yg/TSIsGfwm6IaP78/WYWHK ygTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686381178; x=1688973178; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JKachCkvJcGCjGW27WQplckqEMKIQ5Sw+H4QJqqN9wY=; b=fGcLJzeaJJ4MgJ4tmwzO2oLXl+FYRK7CBpptlmpZ2oZzfZhPpQyi6Mi6UZifYAClK4 RfY3dFFle7gTJLmD1ehXagSBgoc+r3sv0MRUq+i0efVYx4gyEy/exSL9ONg7mBMGnIfr TAWj8hu96JnbB2bH1qlOWNyRLaFvKtT9D2THlVCwuMuYFqGPrioytIYZ4QiL5vWLmg/I Va3OfMRG8r88+QkaNVx0XrL6fN401s3NEuqLFKGVkr8X7intxV5/2fFwzxClTzZ4J83n 2HWxzPl/MCKzCvHHzLhBrBQTq50o1i4JPhe3ANAYq5zB59G5E/iYt6uBYR6RYgfH2Hk5 LonA== X-Gm-Message-State: AC+VfDySyBI+B7fjWpRX+hbgm7fd61j8PbKDAGwsI7/a2U9yvsVbdYbE nPM5G3wvFO2EbrsO0AfP+jlyR4+9DmR7IQQGcoA= X-Google-Smtp-Source: ACHHUZ6uX0Dkv3K91DkrrQyCVBFzXRrhot0+cgujG8EQvcqTK0GsDnMmyavrptqGHNxmYjHx0/yUX8kkHHPPpxYEKmU= X-Received: by 2002:a17:907:8a12:b0:969:7739:2eb7 with SMTP id sc18-20020a1709078a1200b0096977392eb7mr3873476ejc.4.1686381177543; Sat, 10 Jun 2023 00:12:57 -0700 (PDT) MIME-Version: 1.0 References: <20230609162026.CC34320433@pchp3.se.axis.com> <20230610040528.1058420420@pchp3.se.axis.com> In-Reply-To: <20230610040528.1058420420@pchp3.se.axis.com> From: Jonathan Wakely Date: Sat, 10 Jun 2023 08:12:45 +0100 Message-ID: Subject: Re: [PATCH] (Re: Splitting up 27_io/basic_istream/ignore/wchar_t/94749.cc (takes too long)) To: Hans-Peter Nilsson Cc: Jonathan Wakely , "libstdc++" , gcc-patches Content-Type: multipart/alternative; boundary="0000000000000b21bf05fdc137de" X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000000b21bf05fdc137de Content-Type: text/plain; charset="UTF-8" On Sat, 10 Jun 2023, 06:18 Hans-Peter Nilsson via Libstdc++, < libstdc++@gcc.gnu.org> wrote: > Thank you for your consideration. (Or is that phrase only used > negatively?) > > > From: Jonathan Wakely > > Date: Fri, 9 Jun 2023 21:40:15 +0100 > > > test01, test02, test03 and test04 should run almost instantly. On my > system > > they take about 5 microseconds each. So I don't think splitting those up > > will help. > > Right. > > > I thought it would help to avoid re-allocating the buffer and zeroing it > > again. If we reuse the same buffer, then we just have to loop until we > > overflow the 32-bit counter. That would make the whole test run much > > faster, which would reduce the total time for a testsuite run. Splitting > > the file up into smaller files would not decrease the total time, only > > decrease the time for that single test so it doesn't time out. > > > > I've attached a patch that does that. I makes very little difference for > > me, probably because allocating zero-filled pages isn't actually > expensive > > on linux. Maybe it will make a differene for your simulator though? > > Nope, just some five seconds down (from about 10min 21s). > Bah, worth a try :) > > You could also try reducing the size of the buffer: > > +#ifdef SIMULATOR_TEST > > + static const streamsize bufsz = 16 << limits::digits10; > > +#else > > static const streamsize bufsz = 2048 << limits::digits10; > > +#endif > > Was that supposed to be with or without the patch? Anyway; > both: 606s. Only smaller bufsz: 614s. (All numbers subject > to usual system jitter.) > > > test06 is the really slow part, that takes 10+ seconds for me. But that > > entire function should already be skipped for simulators. > > Yep, we may have been here before... I certainly get a > deja-vu feeling here, but visiting old email conversations > of ours, it seems I easily conflate several similar ones. > I see that here, test06 was always #ifndef SIMULATOR_TEST. > > > We can probably skip test05 for simulators too, none of the code it tests > > is platform-specific, so as long as it's being tested on x86 we don't > > really need to test it on cris-elf too. > > Thanks. Let's do that, then. The similar s/wchar_t/char/ > test clocks in at "only" 3m30s, but I suggest treating it > the same, if nothing else than for symmetry. > > Ok as below? > OK for trunk, and all branches you care about. > -- >8 -- > Subject: [PATCH] testsuite: Cut down 27_io/basic_istream/.../94749.cc for > simulators > > The test wchar_t/94749.cc can take about 10 minutes on some > simulator/host combinations with char/94749.cc at a third of > that time. The cause is test05 which is quite heavy and > includes wrapping a 32-bit counter. Run it only for native > setups. > > * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc (main) > [! SIMULATOR_TEST]: Also exclude running test05. > * testsuite/27_io/basic_istream/ignore/char/94749.cc: Ditto. > --- > libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/94749.cc | 2 +- > .../testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git > a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/94749.cc > b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/94749.cc > index 6416863983b7..9160995c05ec 100644 > --- a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/94749.cc > +++ b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/94749.cc > @@ -221,8 +221,8 @@ main() > test02(); > test03(); > test04(); > - test05(); > #ifndef SIMULATOR_TEST > + test05(); > test06(); > #endif > } > diff --git > a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc > b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc > index 65e0a326c109..a5b9eb71a389 100644 > --- a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc > +++ b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc > @@ -221,8 +221,8 @@ main() > test02(); > test03(); > test04(); > - test05(); > #ifndef SIMULATOR_TEST > + test05(); > test06(); > #endif > } > -- > 2.30.2 > > --0000000000000b21bf05fdc137de--