I had a short discussion with the gcc community on IRC. After having this discussion I think it would be of great benefit if -xsafe=mem would be available for -xO3 and the compiler would more aggressively issue such speculative read accesses because other platforms greatly benefit from such instructions, making up to 30% of the load instructions in heavily branched applications like firefox. The Sun Studio compiler may be much too conservative since it was written in days when a CPU had much less bandwidth than the CPU of today.
Olga 2010/3/31 Darryl Gove <darryl.g...@oracle.com>: > I'd guess that since it enables the compiler to perform speculative memory > accesses, in theory it could cause additional page faults that were not > originally there. So it's probably most appropriate in the situation where > the compiler has profile feedback information that indicates that the load > will eventually be performed. > > Regards, > > Darryl. > > > On 3/30/2010 8:36 PM, ольга крыжановская wrote: >> >> Why does this option require -xO5 and not a lesser level like -xO3? >> Why is this not the default in ON? >> >> Olga >> >> On Tue, Mar 30, 2010 at 6:45 AM, Darryl Gove<darryl.g...@oracle.com> >> wrote: >>> >>> Hi, >>> >>> The flag basically means that memory traps don't get forwarded to the >>> application. So the kernel still gets to handle the trap, but the app >>> won't >>> segfault if you access a bad address. >>> >>> The option is basically to allow the compiler to use speculative memory >>> accesses. >>> >>> Regards, >>> >>> Darryl. >>> >>> >>> On 3/28/2010 2:42 PM, ольга крыжановская wrote: >>>> >>>> Does -xsafe=mem work with mmap() for files? From the documentation it >>>> says that -xsafe=mem turns of the memory traps. Does that include >>>> traps used by the kernel to serve files mapped into mmap() into the >>>> process address space? >>>> >>>> Olga >>> >>> _______________________________________________ >>> tools-compilers mailing list >>> tools-compil...@opensolaris.org >> >> >> > > -- , _ _ , { \/`o;====- Olga Kryzhanovska -====;o`\/ } .----'-/`-/ olga.kryzhanov...@gmail.com \-`\-'----. `'-..-| / http://twitter.com/fleyta \ |-..-'` /\/\ Solaris/BSD//C/C++ programmer /\/\ `--` `--` _______________________________________________ on-discuss mailing list on-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/on-discuss