Bug 1253057 - Record PGO phases as build tiers; r=ted

This will enable each PGO phase to show up in mach's resource reporting,
making it easier to compare PGO runtime across machines. This does
confuse the rendering of `mach resource-usage` a bit since it doesn't
know how to handle overlapping tiers. But the raw data is captured as
expected. I don't think `mach resource-usage` is that heavily used right
now, so I don't care about a minor regression for PGO builds.

MozReview-Commit-ID: HalvEwITmif

--HG--
extra : rebase_source : 5c27c6bda814cd61c0da792d9336980dc4f530a9
This commit is contained in:
Gregory Szorc 2016-03-03 09:47:44 -08:00
Родитель 354975fe89
Коммит ecfbed3062
1 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -38,6 +38,16 @@
comma := ,
ifdef MACH
ifndef NO_BUILDSTATUS_MESSAGES
define BUILDSTATUS
@echo 'BUILDSTATUS $1'
endef
endif
endif
CWD := $(CURDIR)
ifneq (1,$(words $(CWD)))
$(error The mozilla directory cannot be located in a path with spaces.)
@ -225,12 +235,23 @@ everything: clean build
# is usable in multi-pass builds, where you might not have a runnable
# application until all the build passes and postflight scripts have run.
profiledbuild::
$(call BUILDSTATUS,TIERS pgo_profile_generate pgo_package pgo_profile pgo_clobber pgo_profile_use)
$(call BUILDSTATUS,TIER_START pgo_profile_generate)
$(MAKE) -f $(TOPSRCDIR)/client.mk realbuild MOZ_PROFILE_GENERATE=1 MOZ_PGO_INSTRUMENTED=1 CREATE_MOZCONFIG_JSON=
$(call BUILDSTATUS,TIER_FINISH pgo_profile_generate)
$(call BUILDSTATUS,TIER_START pgo_package)
$(MAKE) -C $(OBJDIR) package MOZ_PGO_INSTRUMENTED=1 MOZ_INTERNAL_SIGNING_FORMAT= MOZ_EXTERNAL_SIGNING_FORMAT=
rm -f $(OBJDIR)/jarlog/en-US.log
$(call BUILDSTATUS,TIER_FINISH pgo_package)
$(call BUILDSTATUS,TIER_START pgo_profile)
MOZ_PGO_INSTRUMENTED=1 JARLOG_FILE=jarlog/en-US.log EXTRA_TEST_ARGS=10 $(MAKE) -C $(OBJDIR) pgo-profile-run
$(call BUILDSTATUS,TIER_FINISH pgo_profile)
$(call BUILDSTATUS,TIER_START pgo_clobber)
$(MAKE) -f $(TOPSRCDIR)/client.mk maybe_clobber_profiledbuild CREATE_MOZCONFIG_JSON=
$(call BUILDSTATUS,TIER_FINISH pgo_clobber)
$(call BUILDSTATUS,TIER_START pgo_profile_use)
$(MAKE) -f $(TOPSRCDIR)/client.mk realbuild MOZ_PROFILE_USE=1 CREATE_MOZCONFIG_JSON=
$(call BUILDSTATUS,TIER_FINISH pgo_profile_use)
#####################################################
# Build date unification