Closed Bug 1634784 Opened 4 years ago Closed 4 years ago

Unify MOZ_GECKO_PROFILER and MOZ_BASE_PROFILER ifdefs

Categories

(Core :: Gecko Profiler, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 3 open bugs)

Details

Attachments

(2 files)

Once all platforms with MOZ_GECKO_PROFILER also have MOZ_BASE_PROFILER defined, we should unify the two defines into one.

Then we can start depending on BaseProfiler headers / code in the Gecko Profiler code and reduce some code duplication.

Blocks: 1634785
Assignee: nobody → mstange
Status: NEW → ASSIGNED

I apologize for mixing multiple types of changes in this patch. The mix is probably harder to review than necessary.

Because of the way these .cpp files are listed in mozglue/baseprofiler/moz.build,
they are only built when MOZ_GECKO_PROFILER is set. So the #ifdef MOZ_GECKO_PROFILER
wrapper is now unnecessary.
Removing this wrapper has many knock-on effects on other lines in these files
due to preprocessor line indentation.

As I was removing the #ifdefs, I was reordering includes as well, to follow the
include order laid out on https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes ;
namely, system headers should go before "your project's" .h files.

I also removed the BaseProfiler.h include from some files but not from all.
In the past, the BaseProfiler.h include served the purpose of picking up the
MOZ_BASE_PROFILER #define, and it's no longer needed for that reason.
There are probably lots of now-unnecessary BaseProfiler.h includes left.

Depends on D73526

Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/83bf4959aa4a
Remove MOZ_BASE_PROFILER and replace it with MOZ_GECKO_PROFILER everywhere. r=gerald
https://hg.mozilla.org/integration/autoland/rev/aea741f601bd
Remove #ifdef MOZ_GECKO_PROFILER wrappers in mozglue/baseprofiler cpp files, and reorder includes. r=gerald
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Regressions: 1635803
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: