Closed Bug 1645464 Opened 4 years ago Closed 4 years ago

Use a single set of ProfilerCategory definitions

Categories

(Core :: Gecko Profiler, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Right now we duplicate profiler categories in js/public/ProfilingCategory.h and mozglue/baseprofiler/public/BaseProfilingCategory.h. I think we can reasonably share the definition without disturbing too much.

Proposal:

  • Move the list to mozglue/baseprofiler/public/ProfilingCategoryList.h
  • Add this to the moz.build EXPORTS list for both js/src and mozglue/baseprofiler.
  • Rename the macro to MOZ_PROFILING_CATEGORY_LIST

This generates two copies in the build output, but there is only the single macro in it and header guards do the right thing.

Note that standalone SpiderMonkey bundles already include the baseprofiler source in their tarball.

Replace the duplicate lists in mozglue/baseprofiler/public and js/public with
a shared list. Add this list to both moz.build files so it is published twice
which simplifies supporting different standalone configurations.

Blocks: 1645469

Thank you so much for doing this (I wouldn't have known about the EXPORTS thing!)

Blocks: 1557566
Severity: -- → N/A
Priority: -- → P3
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7c59c362decc
Use a shared ProfilingCategoryList.h r=gerald,froydnj
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: