> On 11. Nov 2018, at 20:19, Nathan Froyd <nfr...@mozilla.com> wrote: > > On Sun, Nov 11, 2018 at 1:25 AM Victor Porof <vpo...@mozilla.com> wrote: >> 1. Built this simple trace.cpp: >> https://gist.github.com/victorporof/e9809e33c4dc67ef388672791c4c80cd >> - Used `clang++ trace.cpp -mmacosx-version-min=10.9 -c -o trace.o` >> - I’m building this without `-finstrument-functions`, obviously. >> >> 2. Added the following to my mozconfig: >> CFLAGS="-finstrument-functions" >> CXXFLAGS="-finstrument-functions" >> LDFLAGS="-L[path/to/object] -ltrace.o” > > I'll note here that our clang-cl PGO uses > -finstrument-functions-after-inlining instead and that comments around > the tree suggest that bare -finstrument-functions needs some > encouragement to not do bad things: > > https://searchfox.org/mozilla-central/source/build/gyp_includes/common.gypi#2616-2619 > https://searchfox.org/mozilla-central/source/media/webrtc/trunk/webrtc/build/config/android/BUILD.gn#228-233 > > I'd try the after-inlining variant and see if that addresses any of > your issues. A lot of the symbols that are missing look like things > that are probably trivially inlinable.
Interestingly enough, `-finstrument-functions-after-inlining` did successfully compile, however when running I’m getting a "Couldn't load XPCOM” after a few seconds, no other output other than my printfs. Not sure how I would go about fixing that, any hints? Besides this, would instrumentation after inlining still notify about the original functions being called, or just about the larger function that they were inlined in? My understanding is the latter, which seems at odds with what I’m after here (unless maybe if I compile without optimizations). Is there a way of getting `__cyg_profile_func_enter` and `__cyg_profile_func_exit` calls regardless of inlining? > >> 3. `./mach build` >> Linker errors galore! >> >> Anything I’m doing wrong? > > Nothing obvious; it looks like you're failing to pick up a bunch of > libc++ symbols, which seems a little peculiar. I'd suggest diffing: > > - config.status from a "clean" objdir and an objdir using your > modified mozconfig, above; and > - backend.mk from dom/media/fake-cdm/ from the same objdirs > > (note that you should only need to do `mach configure` to get these > files; there's no need to do a full build) > > Those diffs should show if there's anything that might suggest C++ > libraries suddenly not getting linked. Here’s the diff for config.status: https://gist.github.com/victorporof/ff4e25b85358d264a06e0372e1d535fd Here’s the diff for backend.mk: https://gist.github.com/victorporof/9698bd900b4445b73fdaaaeb88250dcd They don’t look very telling to me, but I also don’t know what to look for :) Do you see anything? Thanks for all the tips. Victor _______________________________________________ dev-builds mailing list dev-builds@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-builds