trace-malloc blocks low-priority timers

RESOLVED FIXED in mozilla0.9.8

Status

()

Core
XPCOM
P1
normal
RESOLVED FIXED
17 years ago
17 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

Trunk
mozilla0.9.8
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

17 years ago
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.
(Assignee)

Comment 1

17 years ago
What's the purpose of flushing the log files, anyway?
(Assignee)

Comment 2

17 years ago
Created attachment 59003 [details] [diff] [review]
remove the code in nsAppShell (GTK)
(Assignee)

Updated

17 years ago
Summary: trace-malloc blocks low-priority events → trace-malloc blocks low-priority timers
(Assignee)

Updated

17 years ago
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
(Assignee)

Comment 4

17 years ago
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|?
(Assignee)

Comment 5

17 years ago
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 7

17 years ago
Comment on attachment 59003 [details] [diff] [review]
remove the code in nsAppShell (GTK)

sr=waterson
Attachment #59003 - Flags: superreview+
(Assignee)

Comment 8

17 years ago
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.
(Assignee)

Updated

17 years ago
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
(Assignee)

Comment 10

17 years ago
I checked in the fix so that it doesn't block the timers anymore.  I just
haven't replaced the code that I removed.

Updated

17 years ago
No longer blocks: 112470
(Assignee)

Comment 11

17 years ago
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
(Assignee)

Comment 13

17 years ago
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
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.