Closed Bug 1481614 Opened 6 years ago Closed 5 years ago

Detect when icecream is in use

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: ted, Assigned: ted)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We'd like to report icecream usage in build telemetry, but we don't currently detect icecream in configure. We'll need to add some detection so we can report its usage.

The MDN docs (that presumably people are using) show two methods of using icecream:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Using_Icecream

  1. Using the icecc wrappers as CC/CXX:
CC="/usr/lib/icecc/bin/cc"
CXX="/usr/lib/icecc/bin/c++"
  1. Using icecream+ccache, setting CCACHE_PREFIX:
mk_add_options 'export CCACHE_PREFIX=icecc'

export CC=clang
export CXX=clang++

ac_add_options --with-ccache

For the former case it's a little tricky but those wrappers are symlinks to the icecc binary:

$ readlink /usr/lib/icecc/bin/cc
../../../bin/icecc
$(realpath /usr/lib/icecc/bin/cc) --version
ICECC 1.1

So it should be sufficient to check in configure "is CC a symlink to a binary named icecc?" To be thorough we could then invoke the symlink target with --version to see if it reports itself as ICECC.

For the latter case we should be able to look for CCACHE_PREFIX=icecc in the results of mozconfig evaluation.

Assignee: nobody → ted

This patch adds detection for when icecream is in use to build telemetry.
icecream is commonly enabled in two ways: by either setting CC/CXX to point
to icecream's cc/c++ symlinks, or by setting adding
mk_add_options 'export CCACHE_PREFIX=icecc' to a mozconfig when also using
ccache. For the former, this patch adds a simple configure check to see
if CC is a symlink to a file named 'icecc'. For the latter the telemetry
code simply looks for any mk_add_options lines from the mozconfig
containing that setting.

A simple test for the mozconfig version is added, but we don't currently
have a facility for writing telemetry tests that depend on configure values.
Local manual testing shows that it does work as expected.

Attachment #9040244 - Attachment description: bug 1481614 - detect icecream usage in build telemetry. r?build → bug 1481614 - detect icecream usage in build telemetry. r?glandium

(In reply to Ted Mielczarek [:ted] [:ted.mielczarek] from comment #4)

https://treeherder.mozilla.org/#/
jobs?repo=try&revision=06d4cf7f4ef00f410f1aaa49f512d198d8743075

The results on Try look a mess because of infra issues, but the builds that didn't hit those seem fine.

Pushed by tmielczarek@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/22436d124e3a
detect icecream usage in build telemetry. r=chmanchester,glandium
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

Here's a quick query that just shows the count of users using icecream:
https://sql.telemetry.mozilla.org/queries/61806/source#159003

Currently showing 26 unique clients.

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