MOZ_COVERAGE build for a static build

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
17 years ago
11 years ago

People

(Reporter: bernard.alleysson, Unassigned)

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

17 years ago
I've been able to make a MOZ_COVERAGE build of a static build
I think that someone at mozilla.org could be interested so I'll post some
patches here...
(Reporter)

Comment 1

17 years ago
Created attachment 53334 [details] [diff] [review]
use win32.order to build mozilla.exe
(Reporter)

Comment 2

17 years ago
Created attachment 53335 [details] [diff] [review]
use MOZ_SRC_FLIPPED instead of MOZ_SRC
(Reporter)

Comment 3

17 years ago
Created attachment 53336 [details] [diff] [review]
fix pdb file names for static modules
(Reporter)

Comment 4

17 years ago
that's all

modified files are:

config/exe.inc: use the exact same linker option used in dll.inc

config/makefile.win: replace \ by / in MOZ_SRC because without the fix windows
API like SearchTreeForFile()in trace.cpp will fail

modules/staticmod/meta.mak: fix so that the pdb for mail.dll is mail.pdb and not
mail.dll.pdb (this is coherent with other similar makefiles)

to use those patches:

1 env for a static build + set MOZ_COVERAGE = 1
2 build
3 use mozilla
4 close mozilla
5 notice that win32.order files are created when mozilla is closing
6 set MOZ_COVERAGE = 1, set MOZ_NO_COVERAGE = 1
7 rebuild (now order files previously created will be used)
8 you now have a MOZ_COVERAGE build for a static build

frankly it won't change the world but it was nice to try...

(Reporter)

Comment 5

17 years ago
oops, please change

/DMOZ_SRC=\"$(MOZ_SRC_FLIPPED)"
to
/DMOZ_SRC=\"$(MOZ_SRC_FLIPPED)\"

in http://bugzilla.mozilla.org/attachment.cgi?id=53335&action=edit

I don't understand why I cant edit my own patches...
Bouncing to waterson.
Assignee: seawood → waterson

Comment 7

17 years ago
So, does this make any difference? One of the problems using linker ordering
files on Win32 was that we couldn't figure out how to get any of the file-scoped
|static| routines included in the ordering.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I've been playing with this lately and came up with nearly indentical patches
trying to get it to work. The one difference was that I changed dll.inc and
exe.inc to use a new build flag, MOZ_USE_COVERAGE so we don't have the insanity of 
 "if defined(MOZ_COVERAGE) && !defined(MOZ_NO_COVERAGE)" elsewhere

Maybe it should be "MOZ_USE_LINK_ORDERING" or something clearer, but
MOZ_USE_COVERAGE has the advantage of tying it to the existing MOZ_COVERAGE flag
used to generate the data.
I haven't figured out an answer for Chris's question about non-reorderable
statics. Testing a simple startup and visit a couple pages about 10% of the
function calls weren't reorderable. It won't be too hard to measure whether
different orderings successfully isolate them or not.
(Reporter)

Comment 9

17 years ago
"So, does this make any difference?"

No big difference.
I've made two builds of a 0.9.4 source tarball (static build has been broken
somewhere between 0.9.4 and 0.9.5), static and MOZ_COVERAGE static.
The only difference I can see is that the working set ("Mem usage" in windows
task manager) dropped from 15100 to 14600 Ko (ie -3%) on startup.
Startup was with no sidebar, about:blank, and a new profile. That was also
the exact same steps I used to to create order files.

"One of the problems using linker ordering
files on Win32 was that we couldn't figure out how to get any of the file-scoped
|static| routines included in the ordering"

another solution would be to distribute code to several code segments by using 
#pragma code_seg(XXX) all around the code :-(

for instance MFC (MFC42x.dll) can be built either way, using linker ordering or
several code segments


 

Updated

17 years ago
Target Milestone: --- → Future

Updated

17 years ago
Status: NEW → ASSIGNED
Product: Browser → Seamonkey
Assignee: waterson → nobody
Status: ASSIGNED → NEW
QA Contact: granrosebugs → build-config
Target Milestone: Future → ---
On trunk we're using PGO for windows which is kind of the same idea with a completely different mechanism.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.