Closed Bug 204092 Opened 21 years ago Closed 21 years ago

Build NSPR on Solaris with -xO4 optimization

Categories

(NSPR :: NSPR, defect, P2)

4.1.2
Sun
Solaris
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kirk.erickson, Assigned: kirk.erickson)

Details

Attachments

(3 files, 4 obsolete files)

Chris, of the iWS team reported that there are no
known vulnerabilities compiling -xO4, and that the
webserver is being compiled with -xO4.

Pallab reported gains in iWS stress compiling NSS 
and NSPR -xO4.

I opened this bug to propose a patch for the TIP,
and subsequently NSPRPUB_RELEASE_4_1_BRANCH.  

Note, currently we use default optimization (-xO2) in
buiding NSPR on Solaris.  I will open a sister bug to
propose a similiar change in NSS, shifting from -xO3 
to -xO4.
Attached patch Proposed patch for TIP of NSPR (obsolete) — Splinter Review
Patch for the TIP of NSPR.
This was with NSS compiled -xO3 and NSPR compile -O (-xO2),
and -xO4 (XXX-x04 runs).  Its a small gain, basically a wash.
Something like .16% at 1 op/sec on both restarts and full handshakes.

Pallab, could you document the gain you saw in iWS performance
when NSPR was compiled -xO4 compared to without (-x02), and email
me so I can update this bug and lobby for checkin?
Attachment #122819 - Flags: review?(wtc)
Comment on attachment 122819 [details] [diff] [review]
Proposed patch for TIP of NSPR

r=wtc.
Attachment #122819 - Flags: review?(wtc) → review+
Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH.
Comment on attachment 122823 [details] [diff] [review]
Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH

You need to set OPTIMIZER to -xO4 when BUILD_OPT is defined.
Attachment #122823 - Flags: review-
Attached patch Proposed patch for TIP of NSPR (obsolete) — Splinter Review
> You need to set OPTIMIZER to -xO4 when BUILD_OPT is defined.

Setting OPTIMIZER had no effect for me.  This patch sets
OPTIMIZER_FLAGS when MOZ_OPTIMIZE is non-zero (BUILD_OPT=1),
and we're not compiling with gcc.

NSPR before (-xO2):
-rwxrwxr-x   1 ke119340 staff	  396380 May  8 22:36 libnspr4.so
-rwxrwxr-x   1 ke119340 staff	   40080 May  8 22:37 libplc4.so
-rwxrwxr-x   1 ke119340 staff	   16756 May  8 22:36 libplds4.so

NSPR after (-xO4):
-rwxrwxr-x   1 ke119340 staff	  427492 May  9 00:43 libnspr4.so
-rwxrwxr-x   1 ke119340 staff	   40112 May  9 00:43 libplc4.so
-rwxrwxr-x   1 ke119340 staff	   18204 May  9 00:43 libplds4.so
Attachment #122819 - Attachment is obsolete: true
Comment on attachment 122831 [details] [diff] [review]
Proposed patch for TIP of NSPR

Wan-Teh - we concluded this patch for the TIP was ready for checkin, right?

You liked the original, but this one differs in that MOZ_OPTIMIZE must be
non-zero.
Current NSPR version is 4.4.  Set priority P2, and target milestone 4.4.1.
Also targeting NSPRPUB_RELEASE_4_1_BRANCH.
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → 4.4.1
Version: 4.4.3 → 4.4
Updated 4.1 fix as per discussion with Wan-Teh yesterday.
Now we set OPTIMIZER = -xO4 when BUILD_OPT is defined.
Attachment #122823 - Attachment is obsolete: true
This patch is essentially the same as Kirk's.
The if statement that Kirk's modifying may change
soon to test -n "$MOZ_DEBUG" instead, so it is better
not to use it.
Attachment #122831 - Attachment is obsolete: true
Attachment #123535 - Flags: review?(kirk.erickson)
Kirk, your patch is incorrect because the part you modified
is ifdef'd for Solaris x86.  Please try this patch.  Thanks.
Attachment #123445 - Attachment is obsolete: true
Comment on attachment 123535 [details] [diff] [review]
Proposed patch for TIP of NSPR

Apparently, this already got checked in.  It worked for me. Thank-you Wan-Teh.
Attachment #123535 - Flags: review?(kirk.erickson) → review+
Comment on attachment 123536 [details] [diff] [review]
Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH

Checked in Wan-Teh's version of the 4.1 branch patch, after testing:

Checking in SunOS5.mk;
/cvsroot/mozilla/nsprpub/config/SunOS5.mk,v  <--  SunOS5.mk
new revision: 3.15.2.3; previous revision: 3.15.2.2
done
Closing.  Both the TIP and NSPRPUB_RELEASE_4_1_BRANCH
changes have been updated to compile -xO4 under Solaris.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: 4.4.1 → 4.4
Version: 4.4 → 4.1.2
Comment on attachment 123535 [details] [diff] [review]
Proposed patch for TIP of NSPR

Requesting mozilla 1.4 approval.  Compile NSPR
on Solaris with -xO4 optimization, the same
optimization level the rest of Mozilla is compiled
with
(http://lxr.mozilla.org/seamonkey/source/configure.in#1401).
Risk is low.  No known compiler optimization bugs
with -xO4.
Attachment #123535 - Flags: approval1.4?
Comment on attachment 123535 [details] [diff] [review]
Proposed patch for TIP of NSPR

Patch checked in on the NSPRPUB_PRE_4_2_CLIENT_BRANCH
for mozilla 1.4 final.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: