Detect when icecream is in use

RESOLVED FIXED in Firefox 67


10 months ago
3 months ago


(Reporter: ted, Assigned: ted)


(Blocks 1 bug)

Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)



(1 attachment)

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:

  1. Using the icecc wrappers as CC/CXX:
  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
$(realpath /usr/lib/icecc/bin/cc) --version

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)

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

Comment 6

4 months ago
Pushed by
detect icecream usage in build telemetry. r=chmanchester,glandium

Comment 7

4 months ago
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

Here's a quick query that just shows the count of users using icecream:

Currently showing 26 unique clients.

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