Closed Bug 905879 Opened 7 years ago Closed 7 years ago

Make build status/tier tracking more robust

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla26

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file)

The code for tracking build status (aka tier traversal) was pieced together quickly with the goal of landing something that worked. In bug 883209, I'm putting together patches for incorporating resource monitoring into the build system. A goal of that patch is to correlate resource usage with events during the build, including tier traversal.

Unfortunately, the current logic for tracking tiers is not up to snuff. It only tracks the currently running tiers. It doesn't hold historical information. It doesn't support concurrently executing directories. There's lots of assertions for state tracking.

In this bug, we'll clean the code up a bit and make the resource monitoring patch easier to grok.
Per request in bug 883209, I've split the tier monitor refactoring into
a separate patch.

Among the refactoring of the BUILDSTATUS emitting and tracking code, I
also snuck a change into the precompile tier to rejiggle dependencies a
little. It saves a few extra $(MAKE) calls and makes it so that tier is
tracked properly (since it doesn't have the usual subtiers).
Attachment #791051 - Flags: review?(mh+mozilla)
Assignee: nobody → gps
Blocks: 906101
Comment on attachment 791051 [details] [diff] [review]
More robust tier tracking

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

::: config/makefiles/precompile/Makefile.in
@@ +25,5 @@
>  endef
>  
> +default::
> +	$(call BUILDSTATUS,TIER_START  precompile IPDL WebIDL XPIDL)
> +	+$(MAKE) export

might as well do $(MAKE) ipdl webidl xpidl, and get rid of the export rule. (and if you're worried about -jN, yes, that works properly with it)

::: config/rules.mk
@@ +731,5 @@
>  tier_$(1)::
> +ifdef TIER_$(1)_CUSTOM
> +	$$(foreach dir,$$($$@_dirs),$$(call SUBMAKE,,$$(dir)))
> +else
> +	$(call BUILDSTATUS_P,BUILDSTATUS TIER_START $(1))

Relying on printf is actually fragile when doing parallel builds. Just replace SUBTIERS with TIER_START $(1) in the one-liner you're replacing.
Attachment #791051 - Flags: review?(mh+mozilla) → review+
(In reply to Mike Hommey [:glandium] from comment #2)
> ::: config/makefiles/precompile/Makefile.in
> @@ +25,5 @@
> >  endef
> >  
> > +default::
> > +	$(call BUILDSTATUS,TIER_START  precompile IPDL WebIDL XPIDL)
> > +	+$(MAKE) export
> 
> might as well do $(MAKE) ipdl webidl xpidl, and get rid of the export rule.
> (and if you're worried about -jN, yes, that works properly with it)

Until we refactor how tiers work, the export target is here to preserve |make export| behavior.
https://hg.mozilla.org/integration/mozilla-inbound/rev/0e046ece4b23
Status: NEW → ASSIGNED
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/0e046ece4b23
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Blocks: 907849
Blocks: 911957
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.