Closed Bug 425626 Opened 17 years ago Closed 17 years ago

Enable PGO with Sun Studio on Solaris

Categories

(Firefox Build System :: General, defect)

x86
OpenSolaris
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch draft patch (obsolete) — Splinter Review
For firefox, the profile will be in directory objdir/browser.profile. I changed rules.mk because bug 402824.
Attached patch patchSplinter Review
Changes: Right place for PROFILE_GEN_*; Add -xlinkopt=2 for SPARC, it gives ~3% performance enhancement. From manpage of CC. -xlinkopt[=level] (SPARC) Perform link-time optimizations on relo- catable object files. The link optimizer performs a number of advanced performance optimizations on the binary object code at link-time. The value level sets the level of optimizations performed, and must be 0, 1, or 2. The optimization levels are: 0 The link optimizer is disabled. (This is the default.) 1 Perform optimizations based on control flow analysis, including instruction cache coloring and branch optimizations, at link time. 2 Perform additional data flow analysis, including dead-code elimination and address computation simplification, at link time. Specifying -xlinkopt without a level parameter implies -xlinkopt=1. These optimizations are performed at link time by analyzing the object binary code. The object files are not rewritten but the resulting executable code may differ from the original object codes. This option is most effective when used to compile the whole program, and with profile feedback. When compiling in separate steps, -xlinkopt must appear on both compile and link steps: example% CC -c -xlinkopt a.cc b.cc example% CC -o myprog -xlinkopt=2 a.o Note that the level parameter is only used when the compiler is linking. In the example above, the link optimizer level is 2 even though the object binaries were compiled with an implied level of 1. Do not use the -zcompreloc linker option when you compile with -xlinkopt. You must use -xlinkopt on at least some of the compilation commands for -xlinkopt to be useful at link time. The optimizer can still perform some limited optimizations on object binaries not com- piled with -xlinkopt. -xlinkopt will optimize code coming from static libraries that appear on the compiler command line, but it will skip and not optimize code com- ing from shared (dynamic) libraries that appear on the command line. You can also use -xlinkopt when building shared libraries (compiling with -G ). The link optimizer is most effective when used with run-time profile feedback. Profiling reveals the most and least used parts of the code and directs the optimizer to focus its effort accord- ingly. This is particularly important with large applications where optimal placement of code per- formed at link time can reduce instruction cache misses. Typically, this would be compiled as fol- lows: example% CC -o progt -xO5 -xprofile=collect:prog file.cc example% progt example% CC -o prog -xO5 -xprofile=use:prog -xlinkopt file.cc For details on using profile feedback, see -xpro- file Note that compiling with this option increases link time slightly. Object file sizes also increase, but the size of the executable remains the same. Compiling with -xlinkopt and -g increases the size of the executable by including debugging information.
Attachment #312234 - Attachment is obsolete: true
Attachment #312701 - Flags: review?(ted.mielczarek)
Comment on attachment 312701 [details] [diff] [review] patch r=me *without* the rules.mk change. Simply removing that bit isn't the right way to fix that. See bug 402824 for discussion on the right way to fix it. I'm fine with the rest of this patch.
Attachment #312701 - Flags: review?(ted.mielczarek) → review+
It's not the right way to fix it; it's not the right way to do it, either. I agree to leave it as bug 402824, and go with the rest first.
Comment on attachment 312701 [details] [diff] [review] patch request approval1.9 with no change to rules.mk It only affects Solaris build.
Attachment #312701 - Flags: approval1.9?
Comment on attachment 312701 [details] [diff] [review] patch a1.9=beltzner
Attachment #312701 - Flags: approval1.9? → approval1.9+
Checking in configure.in; /cvsroot/mozilla/configure.in,v <-- configure.in new revision: 1.1977; previous revision: 1.1976 done Checking in xpcom/reflect/xptcall/src/md/unix/Makefile.in; /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v <-- Makefile.in new revision: 1.102; previous revision: 1.101 done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: