public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ?
@ 2005-03-14 14:09 castet dot matthieu at free dot fr
2005-03-15 0:30 ` [Bug libc/789] " gotom at debian dot or dot jp
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: castet dot matthieu at free dot fr @ 2005-03-14 14:09 UTC (permalink / raw)
To: glibc-bugs
Hi,
I am trying to use the hp-timing macro for some benchmark, but the
HP_TIMING_ACCUM seem broken on ia32.
When compiling, gcc give me that error :
error: impossible register constraint in `asm'
Somebody have an idea how to correct it ?
Thanks
Matthieu
PS : I am using gcc 3.3.5 (Debian 1:3.3.5-8) and 2.3.4.
--
Summary: HP_TIMING_ACCUM broken on ia32 ?
Product: glibc
Version: 2.3.4
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: castet dot matthieu at free dot fr
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
@ 2005-03-15 0:30 ` gotom at debian dot or dot jp
2005-03-15 7:19 ` jakub at redhat dot com
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gotom at debian dot or dot jp @ 2005-03-15 0:30 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From gotom at debian dot or dot jp 2005-03-15 00:30 -------
Do you have a short sample code to show us your problem?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
2005-03-15 0:30 ` [Bug libc/789] " gotom at debian dot or dot jp
@ 2005-03-15 7:19 ` jakub at redhat dot com
2005-03-15 8:31 ` castet dot matthieu at free dot fr
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at redhat dot com @ 2005-03-15 7:19 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From jakub at redhat dot com 2005-03-15 07:19 -------
Does the http://sources.redhat.com/ml/libc-alpha/2005-03/msg00053.html
patch help?
FYI, HP_TIMING_ACCUM is never used by glibc, so it might as well be simply nuked.
You can use HP_TIMING_ACCUM_NT...
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
2005-03-15 0:30 ` [Bug libc/789] " gotom at debian dot or dot jp
2005-03-15 7:19 ` jakub at redhat dot com
@ 2005-03-15 8:31 ` castet dot matthieu at free dot fr
2005-03-15 8:35 ` castet dot matthieu at free dot fr
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: castet dot matthieu at free dot fr @ 2005-03-15 8:31 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From castet dot matthieu at free dot fr 2005-03-15 08:28 -------
http://sources.redhat.com/ml/libc-alpha/2005-03/msg00053.html doesn't help.
I can't use HP_TIMING_ACCUM_NT, because I use it in thread environement.
Actually I use atomic operation on 32 bits variable because my diff is enough
small :
old_time = atomic_exchange_and_add(&buf->stat_time_low, (unsigned int)(diff));
if ((old_time + (unsigned int)(diff)) < old_time)
atomic_increment(&buf->stat_time_high);
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
` (2 preceding siblings ...)
2005-03-15 8:31 ` castet dot matthieu at free dot fr
@ 2005-03-15 8:35 ` castet dot matthieu at free dot fr
2005-03-15 10:15 ` jakub at redhat dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: castet dot matthieu at free dot fr @ 2005-03-15 8:35 UTC (permalink / raw)
To: glibc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1967 bytes --]
------- Additional Comments From castet dot matthieu at free dot fr 2005-03-15 08:35 -------
Created an attachment (id=434)
--> (http://sources.redhat.com/bugzilla/attachment.cgi?id=434&action=view)
testcase
in src/nptl :
$ gcc /tmp/test.c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes
-Wwrite-strings -g -mpreferred-stack-boundary=2 -I../include -I.
-I/home/castetm/trace/contrib/libc_compil/build/nptl -I.. -I../libio
-I/home/castetm/trace/contrib/libc_compil/build -I../sysdeps/i386/elf
-I../nptl/sysdeps/unix/sysv/linux/i386/i686
-I../nptl/sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux
-I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../nptl/sysdeps/unix/sysv
-I../nptl/sysdeps/unix -I../nptl/sysdeps/i386/i686 -I../nptl/sysdeps/i386
-I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu
-I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet
-I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu
-I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486
-I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32
-I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf
-I../sysdeps/generic -D_LIBC_REENTRANT -D_LIBC_REENTRANT -include
../include/libc-symbols.h -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -o /tmp/test
/tmp/test.c:4: attention : function declaration isn't a prototype
/tmp/test.c: Dans la fonction « main »:
/tmp/test.c:20: attention : implicit declaration of function `printf'
/tmp/test.c:18: error: impossible register constraint in `asm'
/tmp/test.c:21: embrouillé par les erreurs précédentes, abandon
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
` (3 preceding siblings ...)
2005-03-15 8:35 ` castet dot matthieu at free dot fr
@ 2005-03-15 10:15 ` jakub at redhat dot com
2005-03-15 14:27 ` castet dot matthieu at free dot fr
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at redhat dot com @ 2005-03-15 10:15 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From jakub at redhat dot com 2005-03-15 10:15 -------
http://sources.redhat.com/ml/libc-alpha/2005-03/msg00056.html
BTW, your testcase is broken, 1) you have not initialized stat_time
2) you only do HP_TIMING_NOW (end); in the cycle, so you count first cycle
10 times, second one 9 times and so on.
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
` (4 preceding siblings ...)
2005-03-15 10:15 ` jakub at redhat dot com
@ 2005-03-15 14:27 ` castet dot matthieu at free dot fr
2005-03-15 14:34 ` castet dot matthieu at free dot fr
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: castet dot matthieu at free dot fr @ 2005-03-15 14:27 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From castet dot matthieu at free dot fr 2005-03-15 14:27 -------
Now the testcase compile (my file still don't compile because of missing
register in class Q_REGS).
But if you run the testcase, it loop forever :(.
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
` (5 preceding siblings ...)
2005-03-15 14:27 ` castet dot matthieu at free dot fr
@ 2005-03-15 14:34 ` castet dot matthieu at free dot fr
2005-03-15 22:31 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: castet dot matthieu at free dot fr @ 2005-03-15 14:34 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From castet dot matthieu at free dot fr 2005-03-15 14:34 -------
Created an attachment (id=435)
--> (http://sources.redhat.com/bugzilla/attachment.cgi?id=435&action=view)
corrected testcase
There something funny using HP_TIMING_ACCUM_NT : depending if stat_time is
local or global, the number of clock change : it takes 298 for local vs 711 for
global...
--
What |Removed |Added
----------------------------------------------------------------------------
Attachment #434 is|0 |1
obsolete| |
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
` (6 preceding siblings ...)
2005-03-15 14:34 ` castet dot matthieu at free dot fr
@ 2005-03-15 22:31 ` cvs-commit at gcc dot gnu dot org
2005-03-16 9:14 ` castet dot matthieu at free dot fr
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-15 22:31 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-15 22:31 -------
Subject: Bug 789
CVSROOT: /cvs/glibc
Module name: libc
Changes by: roland@sources.redhat.com 2005-03-15 22:31:22
Modified files:
sysdeps/i386/i686: hp-timing.h
Log message:
2005-03-15 Jakub Jelinek <jakub@redhat.com>
[BZ #789]
* sysdeps/i386/i686/hp-timing.h (HP_TIMING_ACCUM): Fix asm constraints.
Remove memory clobber.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/i386/i686/hp-timing.h.diff?cvsroot=glibc&r1=1.6&r2=1.7
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
` (7 preceding siblings ...)
2005-03-15 22:31 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-16 9:14 ` castet dot matthieu at free dot fr
2005-03-22 12:09 ` castet dot matthieu at free dot fr
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: castet dot matthieu at free dot fr @ 2005-03-16 9:14 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From castet dot matthieu at free dot fr 2005-03-16 09:14 -------
thanks, it works.
Now there something wrong with dl_hp_timing_overhead : it is used in
HP_TIMING_ACCUM, but not in HP_TIMING_ACCUM_NT. Also it is initialised in
HP_TIMING_DIFF_INIT, so we could think it is used in HP_TIMING_DIFF...
PS : __temp1 is a useless var
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
` (8 preceding siblings ...)
2005-03-16 9:14 ` castet dot matthieu at free dot fr
@ 2005-03-22 12:09 ` castet dot matthieu at free dot fr
2005-09-23 19:11 ` drepper at redhat dot com
2005-09-23 20:17 ` castet dot matthieu at free dot fr
11 siblings, 0 replies; 13+ messages in thread
From: castet dot matthieu at free dot fr @ 2005-03-22 12:09 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From castet dot matthieu at free dot fr 2005-03-22 12:09 -------
it is still broken because it make no difference between __PIC__ and no __PIC__.
I think __arch_compare_and_exchange_val_64_acq should be fixed and we should use it.
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
` (9 preceding siblings ...)
2005-03-22 12:09 ` castet dot matthieu at free dot fr
@ 2005-09-23 19:11 ` drepper at redhat dot com
2005-09-23 20:17 ` castet dot matthieu at free dot fr
11 siblings, 0 replies; 13+ messages in thread
From: drepper at redhat dot com @ 2005-09-23 19:11 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2005-09-23 19:10 -------
This is all a non-issue. The code isn't used.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |WORKSFORME
http://sourceware.org/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libc/789] HP_TIMING_ACCUM broken on ia32 ?
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
` (10 preceding siblings ...)
2005-09-23 19:11 ` drepper at redhat dot com
@ 2005-09-23 20:17 ` castet dot matthieu at free dot fr
11 siblings, 0 replies; 13+ messages in thread
From: castet dot matthieu at free dot fr @ 2005-09-23 20:17 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From castet dot matthieu at free dot fr 2005-09-23 20:16 -------
So why are not removed it ?
--
http://sourceware.org/bugzilla/show_bug.cgi?id=789
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-09-23 20:17 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-14 14:09 [Bug libc/789] New: HP_TIMING_ACCUM broken on ia32 ? castet dot matthieu at free dot fr
2005-03-15 0:30 ` [Bug libc/789] " gotom at debian dot or dot jp
2005-03-15 7:19 ` jakub at redhat dot com
2005-03-15 8:31 ` castet dot matthieu at free dot fr
2005-03-15 8:35 ` castet dot matthieu at free dot fr
2005-03-15 10:15 ` jakub at redhat dot com
2005-03-15 14:27 ` castet dot matthieu at free dot fr
2005-03-15 14:34 ` castet dot matthieu at free dot fr
2005-03-15 22:31 ` cvs-commit at gcc dot gnu dot org
2005-03-16 9:14 ` castet dot matthieu at free dot fr
2005-03-22 12:09 ` castet dot matthieu at free dot fr
2005-09-23 19:11 ` drepper at redhat dot com
2005-09-23 20:17 ` castet dot matthieu at free dot fr
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).