Size/Speed optimizations for OS/2

RESOLVED FIXED in 3.7.2

Status

NSS
Build
P2
enhancement
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: jhp (no longer active), Assigned: Wan-Teh Chang)

Tracking

unspecified
3.7.2
x86
OS/2

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

15 years ago
By tweaking how we create import libraries on OS/2, we can achieve around 25%
speedup on load of the DLLs.  Also, by taking advantage of the DEF files already
in the tree, we can make it so the DLLs export less functions, reducing size and
maybe increasing speed.
(Reporter)

Comment 1

15 years ago
Created attachment 112556 [details] [diff] [review]
patch
(Reporter)

Updated

15 years ago
Attachment #112556 - Flags: review?(wtc)

Comment 2

15 years ago
This patch doesn't work.

nss3.dll doesn't load because it is looking for softokn.dll when all we have is
softokn3.dll.

It's related to the def file used to create the DLL I think.
(Reporter)

Comment 3

15 years ago
Created attachment 114899 [details] [diff] [review]
patch v2

I was not adding the LIBRARY_VERSION to the def file.  This was causing the
internal library name not to match the actuall DLL name.
Attachment #112556 - Attachment is obsolete: true
(Reporter)

Comment 4

15 years ago
Created attachment 114900 [details] [diff] [review]
patch v2.1

Remove revision string change from nssckapi
Attachment #114899 - Attachment is obsolete: true
(Reporter)

Updated

15 years ago
Attachment #114900 - Flags: review?(wtc)
(Assignee)

Comment 5

15 years ago
Comment on attachment 114900 [details] [diff] [review]
patch v2.1

In security/coreconf/OS2.mk, could you try defining
PROCESS_MAP_FILE like this:

PROCESS_MAP_FILE = \
    echo LIBRARY $(LIBRARY_NAME)$(LIBRARY_VERSION) INITINSTANCE TERMINSTANCE >
$@;\
    echo PROTMODE >> $@;\
    echo CODE	 LOADONCALL MOVEABLE DISCARDABLE >> $@;\
    echo DATA	 PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@;\
    echo EXPORTS >> $@;\
    grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \
    sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' >> $@

and in security/coreconf/rules.mk, removing the following
change?

>@@ -380,6 +363,13 @@
> 
> $(MAPFILE): $(LIBRARY_NAME).def
> 	@$(MAKE_OBJDIR)
>+ifeq ($(OS_ARCH),OS2)
>+	echo LIBRARY $(LIBRARY_NAME)$(LIBRARY_VERSION) INITINSTANCE TERMINSTANCE > $@
>+	echo PROTMODE >> $@
>+	echo CODE    LOADONCALL MOVEABLE DISCARDABLE >> $@
>+	echo DATA    PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
>+	echo EXPORTS >> $@
>+endif
> 	$(PROCESS_MAP_FILE)
(Reporter)

Comment 6

15 years ago
Created attachment 115016 [details] [diff] [review]
patch v2.2

Patch with wtc's comments.
Attachment #114900 - Attachment is obsolete: true
(Reporter)

Updated

15 years ago
Attachment #115016 - Flags: review?(wtc)
(Assignee)

Comment 7

15 years ago
Comment on attachment 115016 [details] [diff] [review]
patch v2.2

Have you tested your change to the XP_OS2_EMX part
of mozilla/security/coreconf/OS2.mk?  Does gcc understand
the same *.def file format as VACPP?

Your changes to security/coreconf/rules.mk and
security/nss/lib/ckfw/nssck.api are good.  Mike, could
you review Javier's changes to mozilla/security/coreconf/OS2.mk
too?
Attachment #115016 - Flags: superreview?(mkaply)
Attachment #115016 - Flags: review?(wtc)
Attachment #115016 - Flags: review+

Comment 8

15 years ago
Comment on attachment 115016 [details] [diff] [review]
patch v2.2

Looks good to me. I had Javier sit down and explain it all.
Attachment #115016 - Flags: superreview?(mkaply) → superreview+
(Assignee)

Comment 9

15 years ago
Patch checked into the NSS TIP (3.8), NSS_3_7_BRANCH (3.7.2),
and NSS_CLIENT_TAG (mozilla 1.4alpha).
Severity: normal → enhancement
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 3.7.2
Attachment #114900 - Flags: review?(wtc)
Attachment #112556 - Flags: review?(wtc)
You need to log in before you can comment on or make changes to this bug.