Last Comment Bug 190537 - Size/Speed optimizations for OS/2
: Size/Speed optimizations for OS/2
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Build (show other bugs)
: unspecified
: x86 OS/2
: P2 enhancement (vote)
: 3.7.2
Assigned To: Wan-Teh Chang
: Wan-Teh Chang
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-24 14:52 PST by jhp (no longer active)
Modified: 2003-02-24 18:16 PST (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (4.85 KB, patch)
2003-01-24 14:53 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
patch v2 (5.52 KB, patch)
2003-02-19 11:06 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
patch v2.1 (5.00 KB, patch)
2003-02-19 11:08 PST, jhp (no longer active)
no flags Details | Diff | Splinter Review
patch v2.2 (5.10 KB, patch)
2003-02-20 09:48 PST, jhp (no longer active)
wtc: review+
mozilla: superreview+
Details | Diff | Splinter Review

Description jhp (no longer active) 2003-01-24 14:52:50 PST
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.
Comment 1 jhp (no longer active) 2003-01-24 14:53:22 PST
Created attachment 112556 [details] [diff] [review]
patch
Comment 2 Mike Kaply [:mkaply] 2003-02-10 22:37:03 PST
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.
Comment 3 jhp (no longer active) 2003-02-19 11:06:49 PST
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.
Comment 4 jhp (no longer active) 2003-02-19 11:08:35 PST
Created attachment 114900 [details] [diff] [review]
patch v2.1

Remove revision string change from nssckapi
Comment 5 Wan-Teh Chang 2003-02-19 21:57:26 PST
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)
Comment 6 jhp (no longer active) 2003-02-20 09:48:58 PST
Created attachment 115016 [details] [diff] [review]
patch v2.2

Patch with wtc's comments.
Comment 7 Wan-Teh Chang 2003-02-20 10:44:08 PST
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?
Comment 8 Mike Kaply [:mkaply] 2003-02-20 10:52:54 PST
Comment on attachment 115016 [details] [diff] [review]
patch v2.2

Looks good to me. I had Javier sit down and explain it all.
Comment 9 Wan-Teh Chang 2003-02-24 18:16:22 PST
Patch checked into the NSS TIP (3.8), NSS_3_7_BRANCH (3.7.2),
and NSS_CLIENT_TAG (mozilla 1.4alpha).

Note You need to log in before you can comment on or make changes to this bug.