This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Enclosed is the resolved preprocessed code of the tests/dataconv.c benchmark
and a gdb session breaking in the loop.
To me it looks like the bm_timeout_var check has been optimized out of the
loop (as has the data assignments). Is this valid with bm_timeout_var volatile?
Anyway, optimizing away the data assignments from the loop, means it is no longer
a useful benchmark.
extern volatile int bm_timeout_var;
extern int bm_test_ok;
void bm_initstats (void);
void bm_starttest (void);
void bm_endtest (int);
double bm_get_cycles (void);
void bm_set_result (double);
void bm_error (const char *);
void bm_set_args (int, char **);
void bm_set_tag (const char *);
void bm_do_nothing (int);
int bm_return_zero (void);
short a[20] = {
1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 };
long b[20];
int main (int argc, char **argv) {
bm_set_args (argc, argv);
{
{
bm_set_args ( argc , argv );
{
int count = 3;
bm_initstats ();
while (count--) {
((
b[0] = a[0],
b[1] = a[1],
b[2] = a[2],
b[3] = a[3],
b[4] = a[4],
b[5] = a[5],
b[6] = a[6],
b[7] = a[7],
b[8] = a[8],
b[9] = a[9],
b[10] = a[10],
b[11] = a[11],
b[12] = a[12],
b[13] = a[13],
b[14] = a[14],
b[15] = a[15],
b[16] = a[16],
b[17] = a[17],
b[18] = a[18],
b[19] = a[19]
)) ;
}
do {
count = 0;
bm_starttest ();
do {
{
((
b[0] = a[0],
b[1] = a[1],
b[2] = a[2],
b[3] = a[3],
b[4] = a[4],
b[5] = a[5],
b[6] = a[6],
b[7] = a[7],
b[8] = a[8],
b[9] = a[9],
b[10] = a[10],
b[11] = a[11],
b[12] = a[12],
b[13] = a[13],
b[14] = a[14],
b[15] = a[15],
b[16] = a[16],
b[17] = a[17],
b[18] = a[18],
b[19] = a[19]
));
};
count++;
} while (! bm_timeout_var );
bm_endtest (count);
} while (!bm_test_ok);
};
bm_set_result ( bm_get_cycles () * 1 ) ;
}
}
return 0;
}
set_category 'misc'
set_test dataconv 'data type conversion effectiveness'
runtest 'FROM=short, TO=long' \
\''-DFROM=short'\'' '\''-DTO=long'\'' bug.c'
Benchmark started on Tue Nov 23 14:01:44 EET 1999
c: /devel/tmp/egcs-19991110.obj/gcc/xgcc -B/devel/tmp/egcs-19991110.obj/gcc/ -g -O2
c++: /devel/tmp/egcs-19991110.obj/gcc/g++ -B/devel/tmp/egcs-19991110.obj/gcc/ -L/devel/tmp/egcs-19991110.obj/rs6000-ibm-aix4.2.0.0/libstdc++/ -g -O2
f77: /devel/tmp/egcs-19991110.obj/gcc/g77 -B/devel/tmp/egcs-19991110.obj/gcc/ -L/devel/tmp/egcs-19991110.obj/rs6000-ibm-aix4.2.0.0/libf2c/ -g -O2
running at 20 MHz, 50.00 nanosec clock.
=== category misc ===
testing dataconv, data type conversion effectiveness
[1] + Stopped (SIGTSTP) ./runbench.rdb --CC 'gcc' --opt '-g -O2' --time 1 --with-egcs /devel/tmp/egcs-19991110.obj
$ bg %1
[1] ./runbench.rdb --CC 'gcc' --opt '-g -O2' --time 1 --with-egcs /devel/tmp/egcs-19991110.obj&
$ sleep 240
$ ps -fu rdb
UID PID PPID C STIME TTY TIME CMD
rdb 10628 13744 0 14:01:28 pts/2 0:00 script bug.out
rdb 11510 14480 60 14:02:00 pts/1 7:09 ./a.out 1
rdb 11656 13958 0 14:01:28 pts/1 0:00 sh -is
rdb 13332 11656 39 14:09:15 pts/1 0:00 ps -fu rdb
rdb 13744 16046 0 13:19:50 pts/2 0:00 -ksh
rdb 13958 10628 0 14:01:28 pts/2 0:00 script bug.out
rdb 14480 11656 0 14:01:38 pts/1 0:00 sh ./runbench.rdb --CC gcc --op
$ gdb a.out 11510
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "rs6000-ibm-aix4.2.0.0"...
/devel/tmp/benchmarks/11510: No such file or directory.
Attaching to program `/devel/tmp/benchmarks/a.out', process 11510
main (argc=536875768, argv=0x20000f08) at bug.c:84
84 count++;
(gdb) l
79 b[17] = a[17],
80 b[18] = a[18],
81 b[19] = a[19]
82 ));
83 };
84 count++;
85 } while (! bm_timeout_var );
86 bm_endtest (count);
87 } while (!bm_test_ok);
88 };
(gdb) p count
$1 = -44472476
(gdb) p bm_timeout_var
$2 = 1
(gdb) set radix 0x10
Input and output radices now set to decimal 16, hex 10, octal 20.
(gdb) p $pc
$3 = 0x100003a0
(gdb) x/10i $pc-0x10
0x10000390 <main+400>: lha r11,34(r29)
0x10000394 <main+404>: lha r9,36(r29)
0x10000398 <main+408>: lha r0,38(r29)
0x1000039c <main+412>: lil r3,0
0x100003a0 <main+416>: cal r3,1(r3)
0x100003a4 <main+420>: beq 0x100003a0 <main+416>
0x100003a8 <main+424>: st r0,76(r28)
0x100003ac <main+428>: st r9,72(r28)
0x100003b0 <main+432>: st r11,68(r28)
0x100003b4 <main+436>: st r10,64(r28)
(gdb) q
The program is running. Quit anyway (and detach it)? (y or n) y
Detaching from program: /devel/tmp/benchmarks/a.out process 11510
$ kill -1 11510
$ ./runbench.rdb[15]: 11510 Hangup
FATAL: got ' ', but expected TAG, RESULT or ERROR
That's all, folks! Now please enter 'make mail' to send the
results for inclusion into the benchmark database!
[1] + Done ./runbench.rdb --CC 'gcc' --opt '-g -O2' --time 1 --with-egcs /devel/tmp/egcs-19991110.obj
-----Original Message-----
From: Brown, Rodney
Sent: Monday, 22 November 1999 15:33
To: 'gcc-bugs@gcc.gnu.org'
Subject: 199911{02.11} snapshots on rs6000-ibm-aix4.2.0.0 loop in the
benchmarks
Running the benchmark dataconv test, I think the "FROM=short, TO=long"
varient at -O2 loops (killed at ~5000min and ~3000min) on
rs6000-ibm-aix4.2.0.0 (20MHz RIOS/1). This started happening in the
19991102 snapshot and still happens in the 19991110 snapshot.
...
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |