Need to enable relocations when linking the binary for profiling

RESOLVED WORKSFORME

Status

()

Core
Build Config
RESOLVED WORKSFORME
11 years ago
2 years ago

People

(Reporter: Stuart Parmenter, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
Most profilers (VTune and Quantify) are much happier if we pass /FIXED:NO to LDFLAGS in browser/app/Makefile.in.

Should we do it with a new config flag or just always do it with --enable-debugger-info-modules set?
Test _DEBUG_CFLAGS, and if that is set add the flag.
(Reporter)

Comment 2

11 years ago
Does that work with:  --enable-optimize --disable-debug --enable-debugger-info-modules
?
yes, see http://lxr.mozilla.org/mozilla/source/config/config.mk#193

Comment 4

11 years ago
Will this help in the case of a static executable as well?  It's tough to make sense of Quantify results when I profile a static build.
If the static build has --enable-debugger-info-modules=all, yes

Comment 6

2 years ago
Hey, this is a very old bug, and I wonder if this is still needed, or if we can close this?

I am looking at this documentation on VTune support for Firefox: https://developer.mozilla.org/en-US/docs/Profiling_with_VTune , and I was able to build a VTune-enabled build of Firefox on Windows with the following .mozconfig (not all flags below are relevant, but pasting it in full to be exact):

ac_add_options --enable-debug-symbols
ac_add_options --enable-vtune
ac_add_options --enable-profiling    # This is implied by --enable-vtune, so was redundant.
ac_add_options --disable-tests

ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32

Looking at the generated VTune profile, I am seeing JS code interleaved with C++ code, which is nice (although there's something that looks a bit fishy, but that's probably story for another bug).

The reason I am asking is that I want to bring the VTune MDN page up to date with new flags, and I am wondering whether I can remove the reference on that page to this bug? I'm thinking yes, but just wanted to confirm.
If VTune works for you then that seems fine.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.