public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Wilco Dijkstra <wilco@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] Benchtests: Remove simple_strcpy_chk
Date: Wed,  8 Mar 2023 18:46:30 +0000 (GMT)	[thread overview]
Message-ID: <20230308184630.ED8EB385B53B@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=73a284f618aa81d2bd1f93b299ac5dbf95f396b1

commit 73a284f618aa81d2bd1f93b299ac5dbf95f396b1
Author: Wilco Dijkstra <wilco.dijkstra@arm.com>
Date:   Fri Mar 3 12:44:46 2023 +0000

    Benchtests: Remove simple_strcpy_chk
    
    Remove the slow byte oriented simple_strcpy_chk and simple_stpcpy_chk.
    Adjust iteration count to increase benchmark time.
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Diff:
---
 benchtests/bench-stpcpy_chk.c | 13 -------------
 benchtests/bench-strcpy_chk.c | 15 +--------------
 2 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/benchtests/bench-stpcpy_chk.c b/benchtests/bench-stpcpy_chk.c
index aaacd336ba..85d5a5e924 100644
--- a/benchtests/bench-stpcpy_chk.c
+++ b/benchtests/bench-stpcpy_chk.c
@@ -22,24 +22,11 @@
 #include "bench-string.h"
 
 extern void __attribute__ ((noreturn)) __chk_fail (void);
-char *simple_stpcpy_chk (char *, const char *, size_t);
 extern char *normal_stpcpy (char *, const char *, size_t)
   __asm ("stpcpy");
 extern char *__stpcpy_chk (char *, const char *, size_t);
 
-IMPL (simple_stpcpy_chk, 0)
 IMPL (normal_stpcpy, 1)
 IMPL (__stpcpy_chk, 2)
 
-char *
-simple_stpcpy_chk (char *dst, const char *src, size_t len)
-{
-  if (! len)
-    __chk_fail ();
-  while ((*dst++ = *src++) != '\0')
-    if (--len == 0)
-      __chk_fail ();
-  return dst - 1;
-}
-
 #include "bench-strcpy_chk.c"
diff --git a/benchtests/bench-strcpy_chk.c b/benchtests/bench-strcpy_chk.c
index 6fce90cc98..48ecaaf392 100644
--- a/benchtests/bench-strcpy_chk.c
+++ b/benchtests/bench-strcpy_chk.c
@@ -26,26 +26,13 @@
    symbol, which is part of the public ABI and may be used
    externally. */
 extern void __attribute__ ((noreturn)) __chk_fail (void);
-char *simple_strcpy_chk (char *, const char *, size_t);
 extern char *normal_strcpy (char *, const char *, size_t)
   __asm ("strcpy");
 extern char *__strcpy_chk (char *, const char *, size_t);
 
-IMPL (simple_strcpy_chk, 0)
 IMPL (normal_strcpy, 1)
 IMPL (__strcpy_chk, 2)
 
-char *
-simple_strcpy_chk (char *dst, const char *src, size_t len)
-{
-  char *ret = dst;
-  if (! len)
-    __chk_fail ();
-  while ((*dst++ = *src++) != '\0')
-    if (--len == 0)
-      __chk_fail ();
-  return ret;
-}
 #endif
 
 #include <fcntl.h>
@@ -77,7 +64,7 @@ do_one_test (impl_t *impl, char *dst, const char *src,
 	     size_t len, size_t dlen)
 {
   char *res;
-  size_t i, iters = INNER_LOOP_ITERS8;
+  size_t i, iters = INNER_LOOP_ITERS_LARGE;
   timing_t start, stop, cur;
 
   if (dlen <= len)

                 reply	other threads:[~2023-03-08 18:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230308184630.ED8EB385B53B@sourceware.org \
    --to=wilco@sourceware.org \
    --cc=glibc-cvs@sourceware.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).