Closed Bug 1520104 Opened 2 years ago Closed 2 years ago

Use non-XPCOM/libxul data structures in profiler core

Categories

(Core :: Gecko Profiler, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: gerald, Assigned: gerald)

References

Details

Attachments

(3 files)

The profiler makes heavy use of nsTArrays and nsXHashtables, which come in the XUL library.
In order to implement bug 1492121 (start profiler before XUL) we need to use data structures that are no dependent on XUL.

nsTArrays could be replaced with Vector and nsXHashtables with Hashmap, both are in mfbt in the mozglue library, which is the very first one to be fully loaded at startup. (Or should I use std:: structs?)

There may be more changes needed, as I progress through this, e.g., ns[C]Strings will probably have to go too.

By "XUL" I really meant "libxul".

Summary: Use non-XPCOM/XUL data structures in profiler core → Use non-XPCOM/libxul data structures in profiler core

Moving to non-XPCOM data structures, to help with upcoming transfer to mozglue.

Depends on D24696

Moving to non-XPCOM data structures, to help with upcoming transfer to mozglue.

Depends on D24697

Depends on: 1539322

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:gerald, could you have a look please?

Flags: needinfo?(gsquelart)

I want to make sure some follow-up work will in fact happen (working on some roadblocks at the moment) before landing this first piece, as it wouldn't be useful on its own.

Flags: needinfo?(gsquelart)
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/37ac8c86f3c7
Fix profiler non-unified build - r=mstange
https://hg.mozilla.org/integration/autoland/rev/97e259a4216f
Using Vector instead of nsTArray - r=mstange
https://hg.mozilla.org/integration/autoland/rev/85c36e78141e
Using Hashmap instead of nsXHashTable - r=mstange
Regressions: 1548371
Regressions: 1674968
You need to log in before you can comment on or make changes to this bug.