https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77468

--- Comment #1 from PeteVine <tulipawn at gmail dot com> ---
GCC 5.3's profile (./c-ray-mt -t 64 -s 1600x1200 -r 8 -i sphfract -o
output.ppm):

CPU: ARM Cortex-A53, speed 1536 MHz (estimated)
Counted CPU_CYCLES events (Cycle) with a unit mask of 0x00 (No unit mask) count
100000

samples  %        linenr info                 image name               symbol
name  
4247694  63.5062  c-ray-mt.c:372              c-ray-mt                 shade
1281882  19.1651  c-ray-mt.c:336              c-ray-mt                 trace
1022514  15.2874  c-ray-mt.c:310              c-ray-mt                
render_scanline
49166     0.7351  e_pow.c:65                  libm-2.23.so            
__pow_finite 
17372     0.2597  c-ray-mt.c:454              c-ray-mt                
get_primary_ray
17013     0.2544  e_exp.c:248                 libm-2.23.so             __exp1
14750     0.2205  c-ray-mt.c:501              c-ray-mt                
get_sample_pos
13948     0.2085  (no location information)   no-vmlinux              
/no-vmlinux  
13325     0.1992  w_pow.c:26                  libm-2.23.so             pow
4844      0.0724  e_pow.c:455                 libm-2.23.so             checkint
4426      0.0662  fputc.c:32                  libc-2.23.so             fputc
932       0.0139  mpa.c:768                   libm-2.23.so             __sqr
393       0.0059  c-ray-mt.c:170              c-ray-mt                 main
214       0.0032  mpa.c:615                   libm-2.23.so             __mul
27       4.0e-04  mpa.c:443                   libm-2.23.so            
sub_magnitudes
19       2.8e-04  mpa.c:375                   libm-2.23.so            
add_magnitudes
11       1.6e-04  mpa.c:333                   libm-2.23.so             __dbl_mp
8        1.2e-04  mpa.c:114                   libm-2.23.so             __cpy
7        1.0e-04  mpexp.c:44                  libm-2.23.so             __mpexp
5        7.5e-05  c-ray-mt.c:656              c-ray-mt                
thread_func
5        7.5e-05  strtod_l.c:481              libc-2.23.so            
____strtod_l_internal
5        7.5e-05  strpbrk.c:30                libc-2.23.so             strpbrk
5        7.5e-05  syscall-template.S:86       libc-2.23.so             write
5        7.5e-05  mpa.c:310                   libm-2.23.so             __mp_dbl
5        7.5e-05  mpa.c:563                   libm-2.23.so             __sub
3        4.5e-05  fileops.c:808               libc-2.23.so            
_IO_file_overflow@@GLIBC_2.17
3        4.5e-05  cancellation.c:69           libc-2.23.so            
__libc_disable_asynccancel
3        4.5e-05  fileops.c:501               libc-2.23.so            
new_do_write
3        4.5e-05  strtod_l.c:338              libc-2.23.so            
str_to_mpn.isra.0
3        4.5e-05  mpa.c:899                   libm-2.23.so             __dvd
3        4.5e-05  halfulp.c:64                libm-2.23.so            
__halfulp
2        3.0e-05  malloc.c:2940               libc-2.23.so             free
2        3.0e-05  getpagesize.c:28            libc-2.23.so            
getpagesize
2        3.0e-05  random.c:288                libc-2.23.so             random
2        3.0e-05  random_r.c:357              libc-2.23.so             random_r
2        3.0e-05  mpa.c:516                   libm-2.23.so             __add
2        3.0e-05  mplog.c:41                  libm-2.23.so             __mplog
1        1.5e-05  dl-runtime.c:66             ld-2.23.so              
_dl_fixup
1        1.5e-05  rtld.c:647                  ld-2.23.so              
_dl_initial_error_catch_tsd
1        1.5e-05  dl-lookup.c:806             ld-2.23.so              
_dl_lookup_symbol_x
1        1.5e-05  dl-load.c:871               ld-2.23.so              
_dl_map_object_from_fd
1        1.5e-05  dl-reloc.c:149              ld-2.23.so              
_dl_relocate_object
1        1.5e-05  dl-tls.c:321                ld-2.23.so              
allocate_dtv
1        1.5e-05  dl-lookup.c:92              ld-2.23.so              
check_match
1        1.5e-05  strcmp.S:52                 ld-2.23.so               strcmp
1        1.5e-05  fileops.c:494               libc-2.23.so            
_IO_do_write@@GLIBC_2.17
1        1.5e-05  filedoalloc.c:95            libc-2.23.so            
_IO_file_doallocate
1        1.5e-05  fileops.c:200               libc-2.23.so            
_IO_file_finish@@GLIBC_2.17
1        1.5e-05  dl-addr.c:126               libc-2.23.so             _dl_addr
1        1.5e-05  malloc.c:3842               libc-2.23.so            
_int_free
1        1.5e-05  syscall-template.S:84       libc-2.23.so             mprotect
1        1.5e-05  strtod_l.c:197              libc-2.23.so            
round_and_return
1        1.5e-05  strtod.c:64                 libc-2.23.so             strtod
1        1.5e-05  strtok.c:40                 libc-2.23.so             strtok
1        1.5e-05  mpa.c:83                    libm-2.23.so             __acr
1        1.5e-05  k_standard.c:99             libm-2.23.so            
__kernel_standard
1        1.5e-05  slowpow.c:51                libm-2.23.so            
__slowpow
1        1.5e-05  allocatestack.c:263         libpthread-2.23.so      
__free_stacks
1        1.5e-05  pthread_create.c:125        libpthread-2.23.so      
__nptl_deallocate_tsd
1        1.5e-05  pthread_join.c:45           libpthread-2.23.so      
pthread_join

versus gcc 7's:

samples  %        linenr info                 image name               symbol
name

4293002  60.4752  c-ray-mt.c:372              c-ray-mt                 shade
1465464  20.6439  c-ray-mt.c:336              c-ray-mt                 trace
1199915  16.9031  c-ray-mt.c:310              c-ray-mt                
render_scanline
52646     0.7416  e_pow.c:65                  libm-2.23.so            
__pow_finite
17097     0.2408  c-ray-mt.c:454              c-ray-mt                
get_primary_ray
16953     0.2388  e_exp.c:248                 libm-2.23.so             __exp1
14991     0.2112  (no location information)   no-vmlinux              
/no-vmlinux
14445     0.2035  w_pow.c:26                  libm-2.23.so             pow
13474     0.1898  c-ray-mt.c:501              c-ray-mt                
get_sample_pos
4792      0.0675  e_pow.c:455                 libm-2.23.so             checkint
4448      0.0627  fputc.c:32                  libc-2.23.so             fputc
823       0.0116  mpa.c:768                   libm-2.23.so             __sqr
381       0.0054  c-ray-mt.c:170              c-ray-mt                 main
201       0.0028  mpa.c:615                   libm-2.23.so             __mul
22       3.1e-04  mpa.c:443                   libm-2.23.so            
sub_magnitudes
17       2.4e-04  mpa.c:375                   libm-2.23.so            
add_magnitudes
7        9.9e-05  mpa.c:114                   libm-2.23.so             __cpy
7        9.9e-05  mpa.c:899                   libm-2.23.so             __dvd
7        9.9e-05  mpexp.c:44                  libm-2.23.so             __mpexp
6        8.5e-05  mpa.c:83                    libm-2.23.so             __acr
6        8.5e-05  mpa.c:333                   libm-2.23.so             __dbl_mp
6        8.5e-05  mpa.c:310                   libm-2.23.so             __mp_dbl
5        7.0e-05  syscall-template.S:86       libc-2.23.so             write
4        5.6e-05  strtod_l.c:481              libc-2.23.so            
____strtod_l_internal
4        5.6e-05  strpbrk.c:30                libc-2.23.so             strpbrk
4        5.6e-05  halfulp.c:64                libm-2.23.so            
__halfulp
3        4.2e-05  c-ray-mt.c:656              c-ray-mt                
thread_func
3        4.2e-05  fileops.c:808               libc-2.23.so            
_IO_file_overflow@@GLIBC_2.17
3        4.2e-05  mpa.c:516                   libm-2.23.so             __add
2        2.8e-05  dl-lookup.c:355             ld-2.23.so              
do_lookup_x
2        2.8e-05  cancellation.c:32           libc-2.23.so            
__libc_enable_asynccancel
2        2.8e-05  malloc.c:3320               libc-2.23.so            
_int_malloc
2        2.8e-05  malloc.c:3173               libc-2.23.so             calloc
2        2.8e-05  mplog.c:41                  libm-2.23.so             __mplog
2        2.8e-05  pthread_cond_wait.c:102     libpthread-2.23.so      
pthread_cond_wait@@GLIBC_2.17
2        2.8e-05  pthread_create.c:254        libpthread-2.23.so      
start_thread
1        1.4e-05  dl-tls.c:450                ld-2.23.so              
_dl_allocate_tls_init
1        1.4e-05  dl-lookup.c:806             ld-2.23.so              
_dl_lookup_symbol_x
1        1.4e-05  dl-load.c:871               ld-2.23.so              
_dl_map_object_from_fd
1        1.4e-05  dl-misc.c:288               ld-2.23.so              
_dl_name_match_p
1        1.4e-05  dl-reloc.c:149              ld-2.23.so              
_dl_relocate_object
1        1.4e-05  access.c:28                 ld-2.23.so               access
1        1.4e-05  dl-lookup.c:92              ld-2.23.so              
check_match
1        1.4e-05  strcmp.S:52                 ld-2.23.so               strcmp
1        1.4e-05  fileops.c:1256              libc-2.23.so            
_IO_file_write@@GLIBC_2.17
1        1.4e-05  iogetline.c:49              libc-2.23.so            
_IO_getline_info
1        1.4e-05  cancellation.c:69           libc-2.23.so            
__libc_disable_asynccancel
1        1.4e-05  thread-freeres.c:28         libc-2.23.so            
__libc_thread_freeres
1        1.4e-05  mpn2dbl.c:39                libc-2.23.so            
__mpn_construct_double
1        1.4e-05  dl-addr.c:126               libc-2.23.so             _dl_addr
1        1.4e-05  getpagesize.c:28            libc-2.23.so            
getpagesize
1        1.4e-05  memcpy.S:50                 libc-2.23.so             memcpy
1        1.4e-05  fileops.c:501               libc-2.23.so            
new_do_write
1        1.4e-05  random.c:288                libc-2.23.so             random
1        1.4e-05  strtod_l.c:197              libc-2.23.so            
round_and_return
1        1.4e-05  strtod_l.c:338              libc-2.23.so            
str_to_mpn.isra.0
1        1.4e-05  strerror_l.c:66             libc-2.23.so            
strerror_thread_freeres
1        1.4e-05  strlen.S:88                 libc-2.23.so             strlen
1        1.4e-05  vfprintf.c:1236             libc-2.23.so             vfprintf
1        1.4e-05  k_standard.c:99             libm-2.23.so            
__kernel_standard
1        1.4e-05  slowpow.c:51                libm-2.23.so            
__slowpow
1        1.4e-05  allocatestack.c:762         libpthread-2.23.so      
__deallocate_stack
1        1.4e-05  cleanup_compat.c:41         libpthread-2.23.so      
_pthread_cleanup_pop

Reply via email to