Closed Bug 1639385 Opened 4 years ago Closed 4 years ago

memory report mozilla::gfx::NativeFontResourceMac::Create

Categories

(Core :: Graphics: Text, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: tnikkel, Assigned: lsalzman)

References

Details

Attachments

(1 file)

From https://bugzilla.mozilla.org/show_bug.cgi?id=1625590#c27

Several users seeing lots of heap-unclassified here.

Lee, how much work would it be to get such a memory reporter implemented? How would it look like? As Timothy said it would be great to have it for normal builds, which would allow me too to stop building/running DMD builds all the time. Thanks a lot!

Blocks: 1625590
Flags: needinfo?(lsalzman)
Severity: -- → S3

(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #1)

Lee, how much work would it be to get such a memory reporter implemented? How would it look like? As Timothy said it would be great to have it for normal builds, which would allow me too to stop building/running DMD builds all the time. Thanks a lot!

It could be quite difficult, since native font resources are used in many different processes for a lot of different reasons, and even at best, I could just do some generic byte counter of allocated resources, and I am not sure that would do anything to help with DMD's heap-unclassified number?

Flags: needinfo?(lsalzman)

If reporting these is hard do you have suggestions for how to make progress on the leak that seems to be happening in them?

Flags: needinfo?(lsalzman)

(In reply to Timothy Nikkel (:tnikkel) from comment #3)

If reporting these is hard do you have suggestions for how to make progress on the leak that seems to be happening in them?

There is no leak as far as font resources we could ever discern. CrossProcessPaint is keeping draw target recordings alive, which keep the font resources alive. The fonts are alive because the recordings are alive.

Flags: needinfo?(lsalzman)

Does CrossProcessPaint show up in about:memory? So people who see this can try to narrow down steps to reproduce.

(In reply to Timothy Nikkel (:tnikkel) from comment #5)

Does CrossProcessPaint show up in about:memory? So people who see this can try to narrow down steps to reproduce.

In Henrik's case it's because he uses an extension that explicitly holds canvases around that do that. There was another bug already set up for that.

And for the other people that don't use that extension?

(In reply to Timothy Nikkel (:tnikkel) from comment #7)

And for the other people that don't use that extension?

Fission also used CrossProcessPaint, which I believe is the other main user.

I don't use Fission and I still see large heap-unclassified. I haven't used DMD to confirm that it is the font issue because of the general inconvenience of using DMD builds for my main profile.

And we also do need to ship Fission so that leak will need to be fixed.

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED

(In reply to Timothy Nikkel (:tnikkel) from comment #9)

I don't use Fission and I still see large heap-unclassified. I haven't used DMD to confirm that it is the font issue because of the general inconvenience of using DMD builds for my main profile.

You can actually run DMD on the normal Nightly build, by starting it from the command line with the env var DMD set to 1. There's not enough symbol information, but it does give you some function names.

Good to know! Unfortunately my main profile is on beta and I would rather not "upgrade" it to be nightly only. I tried reproducing by copying my main profile dir and running it in a DMD build and leaving it over night but it didn't reproduce, I guess I need to interact with it more. I also tried making a DMD beta build but it errored out compiling with a message about the memory allocator and I gave up.

(In reply to Lee Salzman [:lsalzman] from comment #6)

In Henrik's case it's because he uses an extension that explicitly holds canvases around that do that. There was another bug already set up for that.

No, this is not an extension. It's a public facing setting in about:preferences under the Tab section. But meanwhile I'm not sure even if that is really the underlying issue.

Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2f986e133acc add memory reporter for NativeFontResource data. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78

Lee, under which name would that memory usage appear in about:memory?

Flags: needinfo?(lsalzman)

The patch shows that it is being reported under "explicit/gfx/native-font-resource-data".

Ah, you need verbose logging turned on! Thanks.

Flags: needinfo?(lsalzman)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: