Detect when icecream is in use

RESOLVED FIXED in Firefox 67

Status

enhancement
RESOLVED FIXED
10 months ago
3 months ago

People

(Reporter: ted, Assigned: ted)

Tracking

(Blocks 1 bug)

Trunk
mozilla67
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(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:
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.

Comment 6

4 months ago
Pushed by tmielczarek@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/22436d124e3a
detect icecream usage in build telemetry. r=chmanchester,glandium

Comment 7

4 months ago
bugherder
Status: NEW → RESOLVED
Closed: 4 months 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.