Build profiles are only one click away

76 views
Skip to first unread message

Florian Quèze

unread,
Oct 19, 2023, 12:30:21 PM10/19/23
to dev-platform
Ever wondered why building Firefox takes so long? You can now visualize the answer!

As of last week, clicking any Firefox build job on treeherder shows a big « Open in Firefox Profiler » grey button. Clicking it opens a profile of the build in a Firefox Profiler tab. The profile contains both a sampling of resource use (CPU, memory, disk I/O) and markers indicating what the build was doing at any time.

This makes it really easy to understand which parts of the build were multi-threaded and which parts of the build were not taking advantage of the available cores.

For your local builds, after `mach build` finishes, you can run `mach resource-usage` to open a profile in a Firefox tab.

Many thanks to glandium who helped me land and polish this over the last few days.

Direct link to an example profile: https://share.firefox.dev/46BPftW

I hope this will help make our builds faster!

--
Florian Quèze

Florian Quèze

unread,
Nov 14, 2023, 10:59:39 AM11/14/23
to dev-platform
Quick follow-up message to add that most test jobs also upload profiles with markers showing when each test ran.

In addition to markers for the names of the tests, there are also markers showing the name of the test folders, making it clear which tests take long, when we restart the browser, and if the time was used with the CPU busy or idle.

This profile makes it easy to see which tests ran in parallel.


--
Florian Quèze
Reply all
Reply to author
Forward
0 new messages