[PATCH v4 2/2] add benchmark for strcoll
Stefan Liebler
stli@linux.vnet.ibm.com
Wed Jun 17 11:16:00 GMT 2015
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 <stli@linux.vnet.ibm.com>
* benchtests/bench-strcoll.c:
Include string.h.
(main): Remove unused variable res.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bench-strcoll_20150617.patch
Type: text/x-patch
Size: 657 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150617/8eb2e0a5/attachment.bin>
More information about the Libc-alpha
mailing list