Closed Bug 415565 Opened 16 years ago Closed 14 years ago

Use new NSPR atomic macros - NSS

Categories

(NSS :: Libraries, enhancement, P2)

x86
Windows XP
enhancement

Tracking

(Not tracked)

RESOLVED FIXED
3.12.7

People

(Reporter: swsnyder, Assigned: swsnyder)

References

Details

(Keywords: perf)

Attachments

(2 files, 2 obsolete files)

Use the recently-added NSPR atomic Increment/Decrement/Set/Add macros rather
than function calls in existing code.  The goal is to improve general
performance by moving those atomic operations to inline code.

The inline code is much faster than the function calls at the cost of
increasing the code size by about 8 bytes per use.

For platforms that do not support the use of inline atomic operations, the
original function calls are used, making this patch a no-op.
Marked as dependant on bug 415563 because that patch adds MSVC-compatible casting of parameters to atomic intrinsic functions.
Attached patch Reformatted, with CVS (obsolete) — Splinter Review
Attachment #301304 - Attachment is obsolete: true
This is another of Steve's patches that unfortunately languished for 2 years
because it had no review request.  I've attempted to recreate it on the NSS
trunk with my gsrword script.  Result is attached.  

I will attach a separate patch shortly for the files inside the FIPS boundary.
Attachment #301345 - Attachment is obsolete: true
Attachment #433767 - Flags: review?(wtc)
(In reply to comment #3)

> This is another of Steve's patches that unfortunately languished for 2 years
> because it had no review request.  I've attempted to recreate it on the NSS
> trunk with my gsrword script.  Result is attached.  

Hi, Nelson.

Dare I hope that your interest in Bug 415563 and now this signals an increased emphasis by NSPR devs in performance?

Since you're apparently reviewing my greatest hits from yesteryear, you might also want to look at Bug 356852 (log2 optimization).  This same code met with a more enthusiastic response in the JavaScript camp and has been in use there for over 2 years.
Ping: review request reminder to rrelyea and wtc.
Severity: normal → enhancement
Priority: -- → P2
Target Milestone: --- → 3.12.7
Version: unspecified → trunk
Comment on attachment 433768 [details] [diff] [review]
Steve's patch recreated for NSS FIPS files (3.13 branch)

r+ rrelyea
Attachment #433768 - Flags: review?(rrelyea) → review+
Comment on attachment 433767 [details] [diff] [review]
Steve's patch recreated for NSS trunk (excluding FIPS files)

r=wtc.
Attachment #433767 - Flags: review?(wtc) → review+
First patch committed on trunk.

Bug 415565: Use new NSPR atomic macros in NSS
Patch contributed by Steve Snyder <swsnyder@snydernet.net>, r=wtc

nss/cmd/selfserv/selfserv.c;                    new: 1.94; previous: 1.93
nss/cmd/strsclnt/strsclnt.c;                    new: 1.67; previous: 1.66
nss/lib/certdb/certdb.c;                        new: 1.103; previous: 1.102
nss/lib/certdb/certt.h;                         new: 1.53; previous: 1.52
nss/lib/certdb/crl.c;                           new: 1.69; previous: 1.68
nss/lib/certhigh/certvfypkix.c;                 new: 1.44; previous: 1.43
nss/lib/ckfw/wrap.c;                            new: 1.20; previous: 1.19
nss/lib/dev/devslot.c;                          new: 1.27; previous: 1.26
nss/lib/dev/devtoken.c;                         new: 1.54; previous: 1.53
libpkix/pkix_pl_nss/system/pkix_pl_object.c;    new: 1.12; previous: 1.11
nss/lib/pk11wrap/debug_module.c;                new: 1.15; previous: 1.14
nss/lib/pk11wrap/pk11load.c;                    new: 1.29; previous: 1.28
nss/lib/pk11wrap/pk11skey.c;                    new: 1.119; previous: 1.118
nss/lib/pk11wrap/pk11slot.c;                    new: 1.101; previous: 1.100
nss/lib/pki/certificate.c;                      new: 1.67; previous: 1.66
nss/lib/pki/pki3hack.c;                         new: 1.99; previous: 1.98
nss/lib/pki/pkibase.c;                          new: 1.33; previous: 1.32
nss/lib/ssl/ssl3con.c;                          new: 1.137; previous: 1.136
nss/lib/ssl/sslmutex.c;                         new: 1.25; previous: 1.24
nss/lib/util/nssilock.c;                        new: 1.4; previous: 1.3
Softoken changes committed on 3.13 branch.

Bug 415565: Use new NSPR atomic macros in NSS
Patch contributed by Steve Snyder <swsnyder@snydernet.net>, r=rrelyea

Checking in pkcs11.c; new revision: 1.167.4.2; previous revision: 1.167.4.1
Checking in sftkdb.c; new revision: 1.24.4.1; previous revision: 1.24
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Blocks: FIPS2010
No longer blocks: FIPS2010
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: