Closed Bug 1838724 Opened 2 years ago Closed 2 years ago

Very frequent "XPCOM_MEM_BLOAT_LOG is set, disabling native allocations" warning in debug builds

Categories

(Core :: Gecko Profiler, defect)

defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: mccr8, Assigned: canova)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This warning is extremely common:

WARNING: XPCOM_MEM_BLOAT_LOG is set, disabling native allocations.: file tools/profiler/core/platform.cpp:345

In a recent Linux64 debug run I looked at, after 2 other frequent causes of warning spam are fixed, this is the second most common warning, with 189,591 occurrences (only slightly behind the 189,672 most common warning).

XPCOM_MEM_BLOAT_LOG is always set when we're running debug tests. I suspect this is effectively happening every time we create a Gecko process, which is quite frequent.

Is this warning useful? Can it made to be more selective somehow?

It looks like it was added in bug 1596761.

It should probably be removed, there aren't many users of the feature anyway.

Or it could be useful it was made to only be shown when the profiler is started, native allocations is turned on, and the bloat log is activated, but I don't think it's worth it.

Yeah, I think it might be useful if someone really wants to profile with native allocations feature but fails to do so because of the mem bloat log. But that sounds like it needs some changes on how we handle the features because can't handle it easily with the current way.

Greg, currently this a WARNING level log. How about demoting it to DEBUG_LOG, so it only appers when we enable profiler logs + set the log level to debug?

Sure that would probably be fine. I guess that would only be profiler core folks who have that turned on.

Thanks for your input! I will submit a patch in a bit.

Assignee: nobody → canaltinova
Status: NEW → ASSIGNED

Thanks for the quick fix!

Pushed by canaltinova@gmail.com: https://hg.mozilla.org/integration/autoland/rev/569ee35398db Convert native allocations warning to a debug log r=gregtatum
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: