From patchwork Wed Jun 17 07:49:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 7212 Received: (qmail 20774 invoked by alias); 17 Jun 2015 07:50:23 -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 20756 invoked by uid 89); 17 Jun 2015 07:50:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: plane.gmane.org To: libc-alpha@sourceware.org From: Stefan Liebler Subject: Re: [PATCH v4 2/2] add benchmark for strcoll Date: Wed, 17 Jun 2015 09:49:55 +0200 Lines: 145 Message-ID: References: <554F5714.9040700@web.de> <20150512171748.GK24663@spoyarek.pnq.redhat.com> Mime-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: <20150512171748.GK24663@spoyarek.pnq.redhat.com> On 05/12/2015 07:17 PM, Siddhesh Poyarekar wrote: > On Sun, May 10, 2015 at 03:03:16PM +0200, Leonhard Holz wrote: >> V4 of this patch with hopefully all nits resolved. >> >> * benchtests/bench-strcoll.c: New benchmark. >> * benchtests/Makefile: Generate locales and run benchmark. >> * benchtests/strcoll-inputs/filelist#C: New benchmark input file. >> * benchtests/strcoll-inputs/filelist#en_US.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#ar_SA.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#cs_CZ.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#da_DK.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#el_GR.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#en_GB.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#en_US.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#es_ES.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#fr_FR.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#hi_IN.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#hu_HU.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#is_IS.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#it_IT.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#iw_IL.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#ja_JP.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#pl_PL.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#pt_PT.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#ru_RU.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#sr_RS.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#sv_SE.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#tr_TR.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#vi_VN.UTF-8: Likewise. >> * benchtests/strcoll-inputs/lorem_ipsum#zh_CN.UTF-8: Likewise. > > Thanks, I'll test and push this. > > Siddhesh > Hi, I get the following error messages while "make bench" on s390: bench-strcoll.c: In function ‘count_words’: bench-strcoll.c:93:3: error: implicit declaration of function ‘strdup’ [-Werror=implicit-function-declaration] char *tmp = strdup (text); ^ bench-strcoll.c:93:15: error: incompatible implicit declaration of built-in function ‘strdup’ [-Werror] char *tmp = strdup (text); ^ bench-strcoll.c:95:3: error: implicit declaration of function ‘strtok’ [-Werror=implicit-function-declaration] char *token = strtok (tmp, delim); ^ bench-strcoll.c:95:17: error: initialization makes pointer from integer without a cast [-Werror] char *token = strtok (tmp, delim); ^ bench-strcoll.c:100:13: error: assignment makes pointer from integer without a cast [-Werror] token = strtok (NULL, delim); ^ bench-strcoll.c: In function ‘str_word_list’: bench-strcoll.c:130:16: error: incompatible implicit declaration of built-in function ‘strdup’ [-Werror] char *toks = strdup (str); ^ bench-strcoll.c:131:16: error: initialization makes pointer from integer without a cast [-Werror] char *word = strtok (toks, delim); ^ bench-strcoll.c:136:12: error: assignment makes pointer from integer without a cast [-Werror] word = strtok (NULL, delim); ^ bench-strcoll.c: In function ‘copy_word_list’: bench-strcoll.c:150:22: error: incompatible implicit declaration of built-in function ‘strdup’ [-Werror] copy->words[i] = strdup (list->words[i]); ^ bench-strcoll.c: In function ‘compare_words’: bench-strcoll.c:171:3: error: implicit declaration of function ‘strcoll’ [-Werror=implicit-function-declaration] return strcoll (s1, s2); ^ bench-strcoll.c: In function ‘main’: bench-strcoll.c:249:7: error: implicit declaration of function ‘strchr’ [-Werror=implicit-function-declaration] char *locale = strchr (input_files[i], '#'); ^ bench-strcoll.c:249:22: error: incompatible implicit declaration of built-in function ‘strchr’ [-Werror] char *locale = strchr (input_files[i], '#'); ^ bench-strcoll.c:237:12: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable] timing_t res; ^ cc1: all warnings being treated as errors The following patch fixes the issues on s390. Please test. Bye Stefan --- 2015-06-17 Stefan Liebler * benchtests/bench-strcoll.c: Include string.h. (main): Remove unused variable res. diff --git a/benchtests/bench-strcoll.c b/benchtests/bench-strcoll.c index c3d9a08..ded04a6 100644 --- a/benchtests/bench-strcoll.c +++ b/benchtests/bench-strcoll.c @@ -24,6 +24,7 @@ #include #include "json-lib.h" #include "bench-timing.h" +#include /* Many thanks to http://generator.lorem-ipsum.info/ */ #define INPUT_PREFIX "strcoll-inputs/" @@ -234,9 +235,6 @@ bench_file (json_ctx_t *json_ctx, const char *testname, const char *filename, int main (void) { - timing_t res; - TIMING_INIT (res); - json_ctx_t *json_ctx = malloc (sizeof (json_ctx_t)); assert (json_ctx != NULL); json_init (json_ctx, 2, stdout);