Closed Bug 1876094 Opened 1 year ago Closed 1 year ago

profdata generated in 123 isnt backwards-compatible with llvm 16

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox-esr115 unaffected, firefox122 unaffected, firefox123 wontfix, firefox124 wontfix)

RESOLVED INVALID
Tracking Status
firefox-esr115 --- unaffected
firefox122 --- unaffected
firefox123 --- wontfix
firefox124 --- wontfix

People

(Reporter: gaston, Unassigned)

References

(Regression)

Details

(Keywords: regression)

suspecting a regression from bug #1839832, we (OpenBSD) use the profiling data taken from treeherder as a source for our own builds.

for various reasons, we cant generate our own profdata (because iirc llvm crashes or generates garbage on OpenBSD) so we resort to mozilla-provided archives.

we've recently switched from llvm 13 to llvm 16, but we don't use llvm 17. So to be able to reuse profdata with a compatible llvm version, so far i've been "repackaging" the profdata using a debian VM with multiple llvm versions installed:

llvm-profdata-17 merge merged.profdata.17 --text --output=orig.profdata.txt
llvm-profdata-16 merge orig.profdata.txt --output=merged.profdata

and that worked fine so far on 122, which profiling data was already built with llvm 17.

On the first beta build of 123.0b1, taking profdata.tar.xz from https://treeherder.mozilla.org/jobs?repo=mozilla-beta&selectedTaskRun=MkIGFY9RTRmsV4whAn2Elg.0, that is now broken:

root@debian:/tmp/tmp.PNl7R4z0wc# llvm-profdata-17 merge merged.profdata.17 --text --output=orig.profdata.txt
root@debian:/tmp/tmp.PNl7R4z0wc# llvm-profdata-16 merge orig.profdata.txt --output=pouet
warning: orig.profdata.txt: invalid instrumentation profile data (file header is corrupt)
error: no profile can be merged

ive tried comparing the orig.profdata.txt headers from a 122.0 & a 123.0b1 builds, but i'm far from being an llvm expert..

hence me suspecting the only profiling-related change in 123 i've seen after a quick look. Any idea from llvm wizards ?

Set release status flags based on info from the regressing bug 1839832

:sergesanspaille, since you are the author of the regressor, bug 1839832, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

We had patches that downgraded the profile data version to keep compatibility with the rust compiler, which was using LLVM 16. Those patches have been removed, hence the profiles now are "normal" LLVM 17 profiles.

Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(sguelton)
Resolution: --- → INVALID

(In reply to Mike Hommey [:glandium] from comment #2)

We had patches that downgraded the profile data version to keep compatibility with the rust compiler, which was using LLVM 16. Those patches have been removed, hence the profiles now are "normal" LLVM 17 profiles.

thanks for the explanation, just to make sure i get this right:

  • until 123, the llvm 17 that was used for mozilla builds had patches because the rust version used internally was built with llvm 16, which were removed (where? bug# ?) so it's not technically a regression from bug #1939832 ?
  • that means one has now to use llvm 17 to reuse the profdata files, and using the merge --text trick i was using to 'downgrade' the profdata compat before isnt possible anymore, because previous llvm-profdata versions wont know how to grok its 'new' syntax ?

(In reply to Landry Breuil (:gaston) from comment #3)

thanks for the explanation, just to make sure i get this right:

  • until 123, the llvm 17 that was used for mozilla builds had patches because the rust version used internally was built with llvm 16, which were removed (where? bug# ?) so it's not technically a regression from bug #1939832 ?

bug 1867867

  • that means one has now to use llvm 17 to reuse the profdata files, and using the merge --text trick i was using to 'downgrade' the profdata compat before isnt possible anymore, because previous llvm-profdata versions wont know how to grok its 'new' syntax ?

Yes.

ok, so bug #1867867 removed the patches, restoring the temporal instrumentation support within llvm for 122, and bug #1845071 enabled its usage in 123. got it.

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