The default bug view has changed. See this FAQ.

Build NSPR on Solaris with -xO4 optimization

RESOLVED FIXED in 4.4

Status

NSPR
NSPR
P2
normal
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: Kirk Erickson, Assigned: Kirk Erickson)

Tracking

4.1.2
Sun
Solaris

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 4 obsolete attachments)

(Assignee)

Description

14 years ago
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.
(Assignee)

Comment 1

14 years ago
Created attachment 122819 [details] [diff] [review]
Proposed patch for TIP of NSPR

Patch for the TIP of NSPR.
(Assignee)

Comment 2

14 years ago
Created attachment 122820 [details]
Selfserv Stress with proposed patch for 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?
(Assignee)

Updated

14 years ago
Attachment #122819 - Flags: review?(wtc)

Comment 3

14 years ago
Comment on attachment 122819 [details] [diff] [review]
Proposed patch for TIP of NSPR

r=wtc.
Attachment #122819 - Flags: review?(wtc) → review+
(Assignee)

Comment 4

14 years ago
Created attachment 122823 [details] [diff] [review]
Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH

Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH.

Comment 5

14 years ago
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-
(Assignee)

Comment 6

14 years ago
Created attachment 122831 [details] [diff] [review]
Proposed patch for TIP of NSPR

> 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
(Assignee)

Updated

14 years ago
Attachment #122819 - Attachment is obsolete: true
(Assignee)

Comment 7

14 years ago
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.
(Assignee)

Comment 8

14 years ago
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
(Assignee)

Comment 9

14 years ago
Created attachment 123445 [details] [diff] [review]
Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH

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

Comment 10

14 years ago
Created attachment 123535 [details] [diff] [review]
Proposed patch for TIP of NSPR

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.

Updated

14 years ago
Attachment #122831 - Attachment is obsolete: true

Updated

14 years ago
Attachment #123535 - Flags: review?(kirk.erickson)

Comment 11

14 years ago
Created attachment 123536 [details] [diff] [review]
Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH

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
(Assignee)

Comment 12

14 years ago
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+
(Assignee)

Comment 13

14 years ago
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
(Assignee)

Comment 14

14 years ago
Closing.  Both the TIP and NSPRPUB_RELEASE_4_1_BRANCH
changes have been updated to compile -xO4 under Solaris.
Status: ASSIGNED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED

Updated

14 years ago
Target Milestone: 4.4.1 → 4.4
Version: 4.4 → 4.1.2

Comment 15

14 years ago
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?
Attachment #123535 - Flags: approval1.4? → approval1.4+

Comment 16

14 years ago
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.