Open honggyukim opened 4 years ago
Here are the brief diff output of failed tests.
t015_longjmp: diff result of -pg -O1
--- expect 2020-02-09 09:18:24.736757759 +0900
+++ result 2020-02-09 09:18:24.736757759 +0900
@@ -5,3 +5,2 @@
} /* _setjmp */
- bar();
} /* main */
015 longjmp : NG
t051_return: diff result of -pg -O0
--- expect 2020-02-09 09:18:47.677287048 +0900
+++ result 2020-02-09 09:18:47.677287048 +0900
@@ -1,3 +1,6 @@
main() {
- return_large();
+ return_large() {
+ memset();
+ } /* return_large */
+ memcpy();
return_small();
051 return : NG
t083_arg_float: diff result of -pg -O0
--- expect 2020-02-09 09:17:26.339354642 +0900
+++ result 2020-02-09 09:17:26.339354642 +0900
@@ -1,6 +1,6 @@
main() {
- float_add(-0.100000, 0.200000) = 0.100000;
- float_sub(0.100000, 0.200000) = -0.100000;
- float_mul(300.000000, 400.000000) = 120000.000000;
- float_div(40000000000.000000, -0.020000) = -2000000000000.000000;
+ float_add(0.000000, 0.000000) = 0.000000;
+ float_sub(0.000000, 0.000000) = 0.000000;
+ float_mul(0.000000, 0.000000) = 0.000000;
+ float_div(0.000000, 0.000000) = 0.000000;
} /* main */
083 arg_float : NG
t191_posix_spawn: diff result of -pg -O0
--- expect 2020-02-09 09:19:47.294609847 +0900
+++ result 2020-02-09 09:19:47.294609847 +0900
@@ -1,2 +1,3 @@
main() {
+ memset();
posix_spawn();
191 posix_spawn : NG
t198_lib_arg_float: diff result of -pg -O0
--- expect 2020-02-09 09:20:44.631816472 +0900
+++ result 2020-02-09 09:20:44.631816472 +0900
@@ -1,4 +1,4 @@
main() {
- expf(1.000000) = 2.718282;
- log(2.718282) = 1.000000;
+ expf(0.000000) = 0.000000;
+ log(0.000000) = 0.000000;
} /* main */
198 lib_arg_float : NG
t201_arg_dwarf1: diff result of -pg -O0
--- expect 2020-02-09 09:21:06.084252828 +0900
+++ result 2020-02-09 09:21:06.084252828 +0900
@@ -2,5 +2,5 @@
foo(-1, 32768) = 32767;
- bar("string argument", 'c', 0.000010, &null) {
+ bar("string argument", 'c', 0.000000, &null) {
null("NULL");
- } = -1.000000; /* bar */
+ } = 0.000000; /* bar */
baz(ONE) {
201 arg_dwarf1 : NG
t225_dynamic_size: diff result of -pg -O0
--- expect 2020-02-09 09:21:42.168969609 +0900
+++ result 2020-02-09 09:21:42.168969609 +0900
@@ -1,3 +1,6 @@
main() {
- big();
+ memcpy();
+ big() {
+ memcpy();
+ } /* big */
} /* main */
225 dynamic_size : NG
t231_arg_bound: diff result of -pg -O0
--- expect 2020-02-09 09:22:01.921353279 +0900
+++ result 2020-02-09 09:22:01.921353279 +0900
@@ -12,3 +12,3 @@
} /* foo */
- many(12, 0, 1, 0);
+ many(1, 0, 1, 0);
pass() {
231 arg_bound : NG
It seems that -fno-inline
option doesn't actually ignore function inlining in clang-9
so t015_longjmp
fails.
Here is the result that clang compiled uftrace runs gcc compiled test programs.
063 retval : OK SG SG SG SG SK SK SK SK SK
083 arg_float : NG NG NG NG NG SK SK SK SK SK
084 arg_mixed : NG NG NG NG NG SK SK SK SK SK
085 arg_reg : NG NG NG NG NG SK SK SK SK SK
087 arg_variadic : NG NG NG NG NG SK SK SK SK SK
125 report_range : NG OK OK OK OK OK OK NG OK OK
136 dynamic : OK OK OK OK OK NG NG NG NG NG
151 recv_runcmd : NG NG NG NG NG NG NG NG NG NG
182 thread_exit : NG NG NG OK OK OK OK OK OK OK
198 lib_arg_float : NG NG NG NG NG SK SK SK SK SK
201 arg_dwarf1 : SG NG NG NG NG SK SK SK SK SK
203 arg_dwarf3 : NG NG NG NG NG SK SK SK SK SK
204 arg_dwarf4 : OK OK NG NG OK SK SK SK SK SK
222 external_data : OK OK OK NG OK OK OK OK OK OK
228 read_pmu_cycle3 : OK OK NG NG NG OK OK OK OK OK
232 dynamic_unpatch : OK OK OK OK OK NG NG NG NG NG
It shows less failures than clang compiled test programs.
Regarding t083_arg_float
. it can be simply reproduced as follows.
$ gcc -pg -g s-exp-float.c
$ uftrace -a a.out
# DURATION TID FUNCTION
0.660 us [ 10295] | __monstartup();
0.407 us [ 10295] | __cxa_atexit();
[ 10295] | main(1, 0x7ffc95ba3e78) {
0.315 us [ 10295] | float_add(0.000000, 0.000000) = 0.000000;
0.280 us [ 10295] | float_sub(0.000000, 0.000000) = 0.000000;
0.124 us [ 10295] | float_mul(0.000000, 0.000000) = 0.000000;
0.096 us [ 10295] | float_div(0.000000, 0.000000) = 0.000000;
3.141 us [ 10295] | } = 0; /* main */
I've compiled uftrace with clang-9.0.1 and run tests in x86_64. The result is as follows:
The tests are executed after changing as follows: