Last Comment Bug 675593 - nspr4!1.pgc path misstake on nspr pgo build
: nspr4!1.pgc path misstake on nspr pgo build
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: mozilla10
Assigned To: ABE Hiroki (:hATrayflood)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-01 03:58 PDT by ABE Hiroki (:hATrayflood)
Modified: 2011-11-27 22:29 PST (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
add -LTCG and fix !1.pgc path (6.57 KB, patch)
2011-08-01 04:00 PDT, ABE Hiroki (:hATrayflood)
no flags Details | Diff | Splinter Review
patch v2: add -LTCG and copy !1.pgc before merge (1.72 KB, patch)
2011-08-02 01:36 PDT, ABE Hiroki (:hATrayflood)
no flags Details | Diff | Splinter Review
patch v3: move pgc from objdir/dist/firefox to objdir/dist/bin (3.53 KB, patch)
2011-09-25 11:58 PDT, ABE Hiroki (:hATrayflood)
ted: review+
Details | Diff | Splinter Review
patch v3 for comm-central (942 bytes, patch)
2011-09-26 10:29 PDT, ABE Hiroki (:hATrayflood)
ted: review+
Details | Diff | Splinter Review
patch v3.1 for mozilla-central (2.43 KB, patch)
2011-10-09 03:23 PDT, ABE Hiroki (:hATrayflood)
ted: review+
emorley: checkin+
Details | Diff | Splinter Review
patch v3 for nsprpub (983 bytes, patch)
2011-10-09 03:25 PDT, ABE Hiroki (:hATrayflood)
ted: review+
emorley: checkin+
Details | Diff | Splinter Review

Description ABE Hiroki (:hATrayflood) 2011-08-01 03:58:06 PDT
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0
Build ID: 20110615151330

Steps to reproduce:

nspr pgo patch (Bug 564851) pushed to mozilla-central. and I tried pgo build.


Actual results:

when create nspr4_s.lib, missing -LTCG.

rm -f nspr4_s.lib
lib -NOLOGO -OUT:"nspr4_s.lib"  ./prvrsion.obj io/./prfdcach.obj io/./prmwait.obj io/./prmapopt.obj io/./priometh.obj io/./pripv6.obj io/./prlayer.obj io/./prlog.obj io/./prmmap.obj io/./prpolevt.obj io/./prprf.obj io/./prscanf.obj io/./prstdio.obj threads/./prcmon.obj threads/./prrwlock.obj threads/./prtpd.obj linking/./prlink.obj malloc/./prmalloc.obj malloc/./prmem.obj md/./prosdep.obj memory/./prshm.obj memory/./prshma.obj memory/./prseg.obj misc/./pralarm.obj misc/./pratom.obj misc/./prcountr.obj misc/./prdtoa.obj misc/./prenv.obj misc/./prerr.obj misc/./prerror.obj misc/./prerrortable.obj misc/./prinit.obj misc/./prinrval.obj misc/./pripc.obj misc/./prlog2.obj misc/./prlong.obj misc/./prnetdb.obj misc/./praton.obj misc/./prolock.obj misc/./prrng.obj misc/./prsystem.obj misc/./prthinfo.obj misc/./prtpool.obj misc/./prtrace.obj misc/./prtime.obj io/./prdir.obj io/./prfile.obj io/./prio.obj io/./prsocket.obj misc/./pripcsem.obj threads/./prcthr.obj threads/./prdump.obj threads/./prmon.obj threads/./prsem.obj threads/combined/./prucpu.obj threads/combined/./prucv.obj threads/combined/./prulock.obj threads/combined/./prustack.obj threads/combined/./pruthr.obj md/windows/./ntmisc.obj md/windows/./ntsec.obj md/windows/./ntsem.obj md/windows/./ntinrval.obj md/windows/./ntgc.obj md/windows/./w95thred.obj md/windows/./w95io.obj md/windows/./w95cv.obj md/windows/./w95sock.obj md/windows/./win32_errors.obj md/windows/./w32ipcsem.obj md/windows/./w32poll.obj md/windows/./w32rng.obj md/windows/./w32shm.obj md/windows/./w95dllmain.obj  
w95dllmain.obj : MSIL .netmodule または /GL を伴ってコンパイルされたモジュールが見つかりました。/LTCG を使用して再開始してください。リンカのパフォーマンスを向上させるためには、コマンドラインに /LTCG を追加してください。
echo not_ranlib nspr4_s.lib
not_ranlib nspr4_s.lib


and when merge nspr4!1.pgc, It from objdir/dist/bin, not objdir/dist/firefox.

make[9]: Entering directory `/f/mozilla/nightly/mozilla-central/obj-i686-pc-mingw32/nsprpub/pr/src'
rm -f nspr4.dll
python /f/mozilla/nightly/mozilla-central/nsprpub/build/win32/pgomerge.py \
		nspr4 f:/mozilla/nightly/mozilla-central/obj-i686-pc-mingw32/dist/bin
Microsoft(R) Profile Guided Optimization Manager 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

f:\mozilla\nightly\mozilla-central\obj-i686-pc-mingw32\dist\bin\nspr4!1.pgc のマージ中
link -nologo -DLL -SUBSYSTEM:WINDOWS -MANIFEST:NO -LIBPATH:"f:/mozilla/nightly/mozilla-central/obj-i686-pc-mingw32/memory/jemalloc/crtsrc/build/intel" -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt19 -DEFAULTLIB:mozcpp19 -DYNAMICBASE -OUT:"nspr4.dll" -LTCG:PGUPDATE -MAP   advapi32.lib wsock32.lib winmm.lib ./prvrsion.obj io/./prfdcach.obj io/./prmwait.obj io/./prmapopt.obj io/./priometh.obj io/./pripv6.obj io/./prlayer.obj io/./prlog.obj io/./prmmap.obj io/./prpolevt.obj io/./prprf.obj io/./prscanf.obj io/./prstdio.obj threads/./prcmon.obj threads/./prrwlock.obj threads/./prtpd.obj linking/./prlink.obj malloc/./prmalloc.obj malloc/./prmem.obj md/./prosdep.obj memory/./prshm.obj memory/./prshma.obj memory/./prseg.obj misc/./pralarm.obj misc/./pratom.obj misc/./prcountr.obj misc/./prdtoa.obj misc/./prenv.obj misc/./prerr.obj misc/./prerror.obj misc/./prerrortable.obj misc/./prinit.obj misc/./prinrval.obj misc/./pripc.obj misc/./prlog2.obj misc/./prlong.obj misc/./prnetdb.obj misc/./praton.obj misc/./prolock.obj misc/./prrng.obj misc/./prsystem.obj misc/./prthinfo.obj misc/./prtpool.obj misc/./prtrace.obj misc/./prtime.obj io/./prdir.obj io/./prfile.obj io/./prio.obj io/./prsocket.obj misc/./pripcsem.obj threads/./prcthr.obj threads/./prdump.obj threads/./prmon.obj threads/./prsem.obj threads/combined/./prucpu.obj threads/combined/./prucv.obj threads/combined/./prulock.obj threads/combined/./prustack.obj threads/combined/./pruthr.obj md/windows/./ntmisc.obj md/windows/./ntsec.obj md/windows/./ntsem.obj md/windows/./ntinrval.obj md/windows/./ntgc.obj md/windows/./w95thred.obj md/windows/./w95io.obj md/windows/./w95cv.obj md/windows/./w95sock.obj md/windows/./win32_errors.obj md/windows/./w32ipcsem.obj md/windows/./w32poll.obj md/windows/./w32rng.obj md/windows/./w32shm.obj md/windows/./w95dllmain.obj  ./nspr.res
PGOMGR : 警告 PG0188: 'nspr4!*.pgc' に一致する .PGC ファイルは見つかりませんでした。
   ライブラリ nspr4.lib とオブジェクト nspr4.exp を作成中
コード生成しています。
840 of 840 (100.00%) profiled functions will be compiled for speed
840 of 840 functions (100.0%) were optimized using profile data
4721882 of 4721882 instructions (100.0%) were optimized using profile data
コード生成が終了しました。
nsinstall -m 444 ./nspr4_s.lib ./nspr4.dll ./nspr4.lib f:/mozilla/nightly/mozilla-central/obj-i686-pc-mingw32/dist/lib
nsinstall -m 444 ./nspr4.dll f:/mozilla/nightly/mozilla-central/obj-i686-pc-mingw32/dist/bin
make[9]: Leaving directory `/f/mozilla/nightly/mozilla-central/obj-i686-pc-mingw32/nsprpub/pr/src'
Comment 1 ABE Hiroki (:hATrayflood) 2011-08-01 04:00:02 PDT
Created attachment 549755 [details] [diff] [review]
add -LTCG and fix !1.pgc path
Comment 2 ABE Hiroki (:hATrayflood) 2011-08-01 04:11:52 PDT
add -LTCG to AR_FLAGS when WINNT nsprpub/config/config.mk:84,94.

nspr module hasn't MOZ_APP_NAME.
I brought it from mozilla/configure.in:9558 to nsprpub/config/autoconf.mk.in:8.
and use it to merge !1.pgc nsprpub/config/rules.mk:288,343.
Comment 3 Wan-Teh Chang 2011-08-01 15:33:47 PDT
Ted: could you take a look at this bug?

h.rayflood: we cannot pass MOZ_APP_NAME to NSPR's build system, because
NSPR is an independent library even though it is affiliated with the Mozilla
project.  Please come up with a patch that does not require passing
MOZ_APP_NAME to NSPR's build system.  Thanks.
Comment 4 ABE Hiroki (:hATrayflood) 2011-08-02 01:36:55 PDT
Created attachment 550031 [details] [diff] [review]
patch v2: add -LTCG and copy !1.pgc before merge
Comment 5 Wan-Teh Chang 2011-08-02 14:16:58 PDT
Comment on attachment 550031 [details] [diff] [review]
patch v2: add -LTCG and copy !1.pgc before merge

Ted, could you review this patch?  I am not familiar with PGO builds.
Thanks.
Comment 6 ABE Hiroki (:hATrayflood) 2011-09-25 11:58:34 PDT
Created attachment 562314 [details] [diff] [review]
patch v3: move pgc from objdir/dist/firefox to objdir/dist/bin
Comment 7 ABE Hiroki (:hATrayflood) 2011-09-26 10:29:32 PDT
Created attachment 562471 [details] [diff] [review]
patch v3 for comm-central
Comment 8 Ted Mielczarek [:ted.mielczarek] 2011-09-27 10:12:26 PDT
Does patch v3 supersede patch v2?
Comment 9 ABE Hiroki (:hATrayflood) 2011-09-27 10:40:05 PDT
(In reply to Ted Mielczarek [:ted, :luser] from comment #8)
> Does patch v3 supersede patch v2?

oh, sorry sorry, patch v2 is obsolete.
Comment 10 Ted Mielczarek [:ted.mielczarek] 2011-10-07 13:22:25 PDT
Comment on attachment 562314 [details] [diff] [review]
patch v3: move pgc from objdir/dist/firefox to objdir/dist/bin

Review of attachment 562314 [details] [diff] [review]:
-----------------------------------------------------------------

::: Makefile.in
@@ +212,5 @@
>  endif
>  else
>  maybe_clobber_profiledbuild:
> +	$(RM) $(DIST)/bin/*.pgc
> +	mv $(DIST)/$(MOZ_APP_NAME)/*.pgc $(DIST)/bin

Maybe this should be -mv, so that this doesn't fail if there are no pgc files there?

::: nsprpub/config/config.mk
@@ +95,2 @@
>  endif # MOZ_PROFILE_USE
> +endif # NO_PROFILE_GUIDED_OPTIMIZE

These changes look fine, but please split them off into a separate patch so I can land them in NSPR CVS for you.
Comment 11 ABE Hiroki (:hATrayflood) 2011-10-09 03:23:48 PDT
Created attachment 565785 [details] [diff] [review]
patch v3.1 for mozilla-central
Comment 12 ABE Hiroki (:hATrayflood) 2011-10-09 03:25:13 PDT
Created attachment 565786 [details] [diff] [review]
patch v3 for nsprpub
Comment 13 ABE Hiroki (:hATrayflood) 2011-10-09 03:30:58 PDT
(In reply to Ted Mielczarek [:ted, :luser] from comment #10)
> Comment on attachment 562314 [details] [diff] [review] [diff] [details] [review]
> patch v3: move pgc from objdir/dist/firefox to objdir/dist/bin
> 
> Review of attachment 562314 [details] [diff] [review] [diff] [details] [review]:
> -----------------------------------------------------------------
> 
> ::: Makefile.in
> @@ +212,5 @@
> >  endif
> >  else
> >  maybe_clobber_profiledbuild:
> > +	$(RM) $(DIST)/bin/*.pgc
> > +	mv $(DIST)/$(MOZ_APP_NAME)/*.pgc $(DIST)/bin
> 
> Maybe this should be -mv, so that this doesn't fail if there are no pgc
> files there?
> 
Thank you for your review.
I use find and mv instead of simple mv.

> ::: nsprpub/config/config.mk
> @@ +95,2 @@
> >  endif # MOZ_PROFILE_USE
> > +endif # NO_PROFILE_GUIDED_OPTIMIZE
> 
> These changes look fine, but please split them off into a separate patch so
> I can land them in NSPR CVS for you.

I attached patch v3 for nsprpub.
Comment 14 Ted Mielczarek [:ted.mielczarek] 2011-10-13 07:00:21 PDT
Comment on attachment 565786 [details] [diff] [review]
patch v3 for nsprpub

Checking in config/config.mk;
/cvsroot/mozilla/nsprpub/config/config.mk,v  <--  config.mk
new revision: 3.36; previous revision: 3.35
done
Checking in config/config.mk;
/cvsroot/mozilla/nsprpub/config/config.mk,v  <--  config.mk
new revision: 3.36; previous revision: 3.35
done
Comment 15 Ed Morley [:emorley] 2011-11-03 17:44:10 PDT
Comment on attachment 565785 [details] [diff] [review]
patch v3.1 for mozilla-central

Try run:
(I added mk_add_options MOZ_PGO=1 to the win32 nightly mozconfig, so hopefully this should test the right thing...)

https://tbpl.mozilla.org/?tree=Try&rev=535f4b9788ef
Comment 16 Ed Morley [:emorley] 2011-11-04 03:13:30 PDT
NSPR part has merged to m-c:
https://hg.mozilla.org/mozilla-central/rev/765f5b79fedf
Comment 17 Ed Morley [:emorley] 2011-11-04 14:28:01 PDT
Comment on attachment 565785 [details] [diff] [review]
patch v3.1 for mozilla-central

https://hg.mozilla.org/integration/mozilla-inbound/rev/782bf4b456e4
Comment 18 Marco Bonardo [::mak] (Away 6-20 Aug) 2011-11-05 03:08:25 PDT
https://hg.mozilla.org/mozilla-central/rev/782bf4b456e4
Comment 19 Makoto Kato [:m_kato] 2011-11-27 22:29:34 PST
http://hg.mozilla.org/comm-central/rev/c38d6dd2c8b7

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