Closed Bug 111651 Opened 23 years ago Closed 23 years ago

trace-malloc blocks low-priority timers

Categories

(Core :: XPCOM, defect, P1)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.8

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(1 file)

I was *sure* I tested this before when investigating this problem, but
apparently I didn't do it correctly.

Anyway, the gtk_idle_add that's |#ifdef NS_TRACE_MALLOC| in nsAppShell::Run
prevents low or lowest priority timers from being processed since g_main_pending
in nsTimerGtk's TimerCallbackFunc always returns true.  This prevents a bunch of
things from working when trace-malloc is being used.
What's the purpose of flushing the log files, anyway?
Summary: trace-malloc blocks low-priority events → trace-malloc blocks low-priority timers
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla0.9.7
The purpose was to keep real-time tmreaders happy (I didn't want to assume that
Mozilla malloc'd regularly enough to flush important data in a timely fashion!).
 Can't we fix the GTK-based code here so that we flush, yet nothing starves?

Anyway, r/sr=brendan@mozilla.org if you need to remove the flushing for now.  We
can add it back if a real-time tmreader needs it.

/be
Maybe we could put the flushing on a low-priority timer instead? :-)  Would it
be bad for xpcom to depend on timer |#ifdef NS_TRACE_MALLOC|?
Blizzard - any ideas on an easy way to fix this?
You should put that function elsewhere.  Maybe in the code that wakes up on X
events?  And on exit maybe?  There are lots of options.
Comment on attachment 59003 [details] [diff] [review]
remove the code in nsAppShell (GTK)

sr=waterson
Attachment #59003 - Flags: superreview+
Removal checked in 2001-11-27 20:48 PDT.  We still need to figure out a
replacement, but I wanted our leak / bloat stats to be accurate in the meantime.
Target Milestone: mozilla0.9.7 → mozilla0.9.8
If we turn on trace-malloc for DEBUG builds, don't we need this fix?  Marking a
dependency on bug 112470, which I note is targeted at 0.9.7 still.

/be
Blocks: 112470
I checked in the fix so that it doesn't block the timers anymore.  I just
haven't replaced the code that I removed.
No longer blocks: 112470
Hrm, I could probably back out the removal now that pavlov's new timer patch landed.
rs=brendan@mozilla.org on backing out now that we have xp timers.

/be
OK, marking FIXED since this was fixed by pav's timer checkin, or something like
that.  I undid the backout 2002-01-15 16:40 PST.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: