Closed Bug 932618 Opened 11 years ago Closed 11 years ago

Don't override C*FLAGS to disable PGO for single files

Categories

(Firefox Build System :: General, defect)

All
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla28

People

(Reporter: glandium, Assigned: glandium)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

We have a bunch of things like:
MonoIC.$(OBJ_SUFFIX): CXXFLAGS += -GL-

We should stop doing that. My proposal is to define a list of files that shouldn't be PGOed. My current attempt does that by defining that list in NO_PROFILE_GUIDED_OPTIMIZE which is already what we use to disable in a directory. So that variable takes either 1 in which case it's the whole directory, or a list of source files.
I'm testing this on try.
This seems to work. The next step I'm planning from here is to move NO_PROFILE_GUIDED_OPTIMIZE to moz.build, and make it a list eveywhere: in moz.build, we can do NO_PROFILE_GUIDED_OPTIMIZE = SOURCES when we don't want anything optimized in the corresponding directory.
Attachment #824578 - Flags: review?(gps)
Attachment #824392 - Attachment is obsolete: true
The "list sources that don't get optimized" behavior seems useful, but the "NO_PROFILE_GUIDED_OPTIMIZE = SOURCES" bit seems kind of gross.
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #3)
> The "list sources that don't get optimized" behavior seems useful, but the
> "NO_PROFILE_GUIDED_OPTIMIZE = SOURCES" bit seems kind of gross.

It's not more gross than having either two variables or having one variable with two possible types.
MonoIC.cpp and Compiler.cpp in js/src were for JaegerMonkey.  These files were removed when removing JaegerMonkey.
Comment on attachment 824578 [details] [diff] [review]
Use NO_PROFILE_GUIDED_OPTIMIZE to disable PGO for individual files

Review of attachment 824578 [details] [diff] [review]:
-----------------------------------------------------------------

Lazy evaluated behavior is the worst. This is going to make converting parts of config.mk to Python pretty gnarly.
Attachment #824578 - Flags: review?(gps) → review+
(In reply to Gregory Szorc [:gps] from comment #6)
> Lazy evaluated behavior is the worst. This is going to make converting parts
> of config.mk to Python pretty gnarly.

Parts related to pgo can't be converted, as they are dynamic by nature.
https://hg.mozilla.org/mozilla-central/rev/0fc3f0660258
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Blocks: 945042
Whiteboard: [qa-]
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: