Detect when icecream is in use
Categories
(Firefox Build System :: General, enhancement)
Tracking
(firefox67 fixed)
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.
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
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
- Using the icecc wrappers as CC/CXX:
CC="/usr/lib/icecc/bin/cc"
CXX="/usr/lib/icecc/bin/c++"
- 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 | ||
Comment 2•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f9b03a056b55b4df66643716e10be0c026c1bb35
Assignee | ||
Comment 3•5 years ago
|
||
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.
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=06d4cf7f4ef00f410f1aaa49f512d198d8743075
Assignee | ||
Comment 5•5 years ago
|
||
(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
Comment 7•5 years ago
|
||
bugherder |
Assignee | ||
Comment 8•5 years ago
|
||
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.
Description
•