From patchwork Thu Feb 14 02:58:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1041766 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-100021-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sourceware.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="QadvmyOn"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 440LhF3Qw2z9sMp for ; Thu, 14 Feb 2019 13:59:08 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=FHf b1eijH5MwoQ0BUoAazGVViy1UfFAibV4Mj9sTlsJvZQtAho7VmG+by8MQ9L2RmsO nIf/5ZYZmMOObUp3qawBzNXrDjLGrTeKAcwb34PLwaYEpq5EZ2QkjW7NisoTonum zqfkpqa5okotQHDJu/uDJvmpGZIR/svjNBOWHxXI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=/qHcDlQY1 7wkXwCT843vJuHZZgo=; b=QadvmyOnNmIINlY3D4AgJ3AzAIBWCNC56dSgdGPnZ zo/FRCaOu3phqHY7iwlrL7CslHLPZHtzgvufh59VcV6D1Sa012FXzApeNVKHHbTl 2D96Oq2ZyKt8v2rXsTyaPmLTLZg06F8TH0UgButwr+gAGcWw89QlFFm9Sgc+doew QA= Received: (qmail 34772 invoked by alias); 14 Feb 2019 02:59:02 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 34137 invoked by uid 89); 14 Feb 2019 02:59:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=H*RU:sk:relay.m, Hx-spam-relays-external:sk:relay.m, H*Ad:U*siddhesh, H*r:sk:siddhes X-HELO: common.maple.relay.mailchannels.net X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Trouble-Thread: 34640e0f45dcc4d5_1550113137612_1247734912 X-MC-Loop-Signature: 1550113137612:3737409594 X-MC-Ingress-Time: 1550113137612 X-DH-BACKEND: pdx1-sub0-mail-a29 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Cc: Siddhesh Poyarekar Subject: [COMMITTED] benchtests: Remove useless ORIG_SRC in memmove benchmarks Date: Thu, 14 Feb 2019 08:28:33 +0530 Message-Id: <20190214025833.32612-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: 0 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledruddtgedgheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepufhiugguhhgvshhhucfrohihrghrvghkrghruceoshhiugguhhgvshhhsehsohhurhgtvgifrghrvgdrohhrgheqnecukfhppeduvdefrddvhedvrddvtddvrddujedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlihhnrghrohdqlhgrphhtohhprdhlohgtrghlughomhgrihhnpdhinhgvthepuddvfedrvdehvddrvddtvddrudejvddprhgvthhurhhnqdhprghthhepufhiugguhhgvshhhucfrohihrghrvghkrghruceoshhiugguhhgvshhhsehsohhurhgtvgifrghrvgdrohhrgheqpdhmrghilhhfrhhomhepshhiugguhhgvshhhsehsohhurhgtvgifrghrvgdrohhrghdpnhhrtghpthhtohepshhiugguhhgvshhhsehsohhurhgtvgifrghrvgdrohhrghenucevlhhushhtvghrufhiiigvpedt The ORIG_SRC argument is likely a useless relic from the original correctness tests that are not needed in the benchmarks. Remove the argument and use S1 to point to the source to avoid confusion. * benchtests/bench-memmove.c (do_one_test): Remove unused ORIG_SRC. (do_test): Adjust. * benchtests/bench-memmove-large.c (do_one_test): Remove unused ORIG_SRC. (do_test): Adjust. --- ChangeLog | 9 +++++++++ benchtests/bench-memmove-large.c | 8 ++++---- benchtests/bench-memmove.c | 8 ++++---- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20eb89d017..4a3ec3d559 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2019-02-14 Siddhesh Poyarekar + + * benchtests/bench-memmove.c (do_one_test): Remove unused + ORIG_SRC. + (do_test): Adjust. + * benchtests/bench-memmove-large.c (do_one_test): Remove unused + ORIG_SRC. + (do_test): Adjust. + 2019-01-13 Jim Wilson [BZ #24040] diff --git a/benchtests/bench-memmove-large.c b/benchtests/bench-memmove-large.c index ffc16cec8b..710c648634 100644 --- a/benchtests/bench-memmove-large.c +++ b/benchtests/bench-memmove-large.c @@ -30,8 +30,8 @@ IMPL (memmove, 1) typedef char *(*proto_t) (char *, const char *, size_t); static void -do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, const - char *orig_src, size_t len) +do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, + size_t len) { size_t i, iters = 16; timing_t start, stop, cur; @@ -62,7 +62,7 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len) if (align2 + len >= page_size) return; - s1 = (char *) (buf1 + align1); + s1 = (char *) (buf2 + align1); s2 = (char *) (buf2 + align2); for (i = 0, j = 1; i < len; i++, j += 23) @@ -75,7 +75,7 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len) json_array_begin (json_ctx, "timings"); FOR_EACH_IMPL (impl, 0) - do_one_test (json_ctx, impl, s2, (char *) (buf2 + align1), s1, len); + do_one_test (json_ctx, impl, s2, s1, len); json_array_end (json_ctx); json_element_object_end (json_ctx); diff --git a/benchtests/bench-memmove.c b/benchtests/bench-memmove.c index a5d957791a..a4d5ecd638 100644 --- a/benchtests/bench-memmove.c +++ b/benchtests/bench-memmove.c @@ -47,8 +47,8 @@ simple_memmove (char *dst, const char *src, size_t n) } static void -do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, const - char *orig_src, size_t len) +do_one_test (json_ctx_t *json_ctx, impl_t *impl, char *dst, char *src, + size_t len) { size_t i, iters = INNER_LOOP_ITERS; timing_t start, stop, cur; @@ -79,7 +79,7 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len) if (align2 + len >= page_size) return; - s1 = (char *) (buf1 + align1); + s1 = (char *) (buf2 + align1); s2 = (char *) (buf2 + align2); for (i = 0, j = 1; i < len; i++, j += 23) @@ -92,7 +92,7 @@ do_test (json_ctx_t *json_ctx, size_t align1, size_t align2, size_t len) json_array_begin (json_ctx, "timings"); FOR_EACH_IMPL (impl, 0) - do_one_test (json_ctx, impl, s2, (char *) (buf2 + align1), s1, len); + do_one_test (json_ctx, impl, s2, s1, len); json_array_end (json_ctx); json_element_object_end (json_ctx);