Closed Bug 1987761 Opened 11 months ago Closed 9 months ago

symbolstore.py should put git paths instead of hg paths into the .sym file

Categories

(Toolkit :: Crash Reporting, task)

task

Tracking

()

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(1 file)

https://searchfox.org/firefox-main/rev/4a1256a814d330833bb9ff484f069ec65f070969/toolkit/crashreporter/tools/symbolstore.py#357

GetVCSFilenameFromSrcdir(file, srcdir) currently returns paths like of the following form:
hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsEmbedFunctions.cpp:579608f7cabf04ee2c5e4acd60dca9929a5a8b52

It would be nice to return the git equivalent instead, e.g.:
git:github.com/mozilla/firefox:toolkit/xre/nsEmbedFunctions.cpp:cd6acbe9eaa55fb4da4fbdec275db6eddd4833b8

Fixing this will improve the source view in the Firefox Profiler because github can serve raw files faster than hg.mozilla.org can.
Example profile with source view: https://share.firefox.dev/4m4LR1H

symbolstore.py already has a GitRepoInfo class, it just needs the right path and revision. This script executes on our build machines at the end of the build. Do our build machines know the corresponding git revision of the source tree?

It's not in the build tasks' payload at the moment, only the hg revision is AFAIK. I wonder if it could be retrieved through another channel before we switch over the builds too.

Julien, do you know how much work it would be to tell the build tasks about the git revision?

Flags: needinfo?(jcristau)

If there's a corresponding git commit we can get it with hg log -r $MOZ_SOURCE_CHANGESET -T '{extras.git_commit}' (there may not be, e.g. on try or comm-* or project branches). Something would then have to "know" the corresponding repo, which right now is probably only ever github.com/mozilla-firefox/firefox, but I expect that won't last long.

Flags: needinfo?(jcristau)

I have a patch which may work but I'm not sure I can fully test it without pushing it to autoland.

Try push: https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=162659

This should speed up the source view in the Firefox Profiler, since github appears
to be faster at serving raw files than our hg server.

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED
Pushed by mstange@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/63383fd1ab7f https://hg.mozilla.org/integration/autoland/rev/728f82ebb6e5 In Firefox symbol files, use github source file paths instead of hg.mozilla.org paths when possible. r=gsvelto

It appears to have worked! Here's an excerpt from the libxul.sym file from a Linux opt build on the autoland push:

FILE 106 git:github.com/mozilla/firefox:mfbt/tests/gtest/TestLinkedList.cpp:63383fd1ab7f139f196de49f050520da1eae6536
FILE 107 git:github.com/mozilla/firefox:mfbt/ReverseIterator.h:63383fd1ab7f139f196de49f050520da1eae6536
FILE 108 git:github.com/mozilla/firefox:mfbt/tests/gtest/TestReverseIterator.cpp:63383fd1ab7f139f196de49f050520da1eae6536
FILE 109 git:github.com/mozilla/firefox:mfbt/CheckedArithmetic.h:63383fd1ab7f139f196de49f050520da1eae6536
FILE 110 git:github.com/mozilla/firefox:mfbt/CheckedInt.h:63383fd1ab7f139f196de49f050520da1eae6536
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: