Closed Bug 1112828 Opened 10 years ago Closed 9 years ago

Unify gfxCriticalError and gfxInfo->LogFailure()

Categories

(Core :: Graphics, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: jrmuizel, Assigned: milan)

References

Details

Attachments

(2 files, 6 obsolete files)

105.09 KB, image/png
Details
14.88 KB, patch
milan
: review+
Details | Diff | Splinter Review
LogFailure() has the advantage that its messages are exposed to about:support. Otherwise, these are mostly the same.
Depends on: 1101685
OS: Mac OS X → All
Attachment #8538779 - Attachment description: Move functionality from CrashStatsLogForwarder (derived from LogForwarder) into a new class SpecialCircularBuffer (a base class for LogForwarder). → Part 1. Move functionality from CrashStatsLogForwarder (derived from LogForwarder) into a new class SpecialCircularBuffer (a base class for LogForwarder).
Attachment #8538779 - Flags: review?(dvander)
Attachment #8538779 - Flags: review?(dvander) → review+
Comment on attachment 8538783 [details] [diff] [review]
Part 2: Have GfxInfo::LogFailure use gfxCriticalLog and entries from gfxCriticalLog be available in about:support graphics section. r=jmuizelaar

Review of attachment 8538783 [details] [diff] [review]:
-----------------------------------------------------------------

Is gfxCriticalLog threadsafe?
(In reply to Jeff Muizelaar [:jrmuizel] from comment #3)
> ...
> Is gfxCriticalLog threadsafe?

Not really.  There are a few aspect to it, the main ones being the std::vector that we use for circular buffer (not thread safe), and the nsDataHashtable we use for the crash reporter annotation table (not sure, but I don't think so), and then there is the copying into the char*** for the about:support (was thread safe, now is not.)
Attachment #8538783 - Flags: review?(jmuizelaar)
I think the current version of GfxInfoBase "log failure related" code isn't thread safe - the LogFailure() method itself is, but GetFailures() method is looking at the data that LogFailure() is modifying, without locking.
Note this needs the patch from bug 1113695 to be thread safe.
Attachment #8538779 - Attachment is obsolete: true
Attachment #8538783 - Attachment is obsolete: true
Attachment #8539407 - Flags: review?(jmuizelaar)
(In reply to Milan Sreckovic [:milan] from comment #1)
> Created attachment 8538779 [details] [diff] [review]
> Part 1. Move functionality from CrashStatsLogForwarder (derived from
> LogForwarder) into a new class SpecialCircularBuffer (a base class for
> LogForwarder).

Skipped this change (for now), the thread safety trumped it and we can't use Mutex inside of gfx/2d, it's XPCOM...
Make the critical error not assert for LogFailure case.
Attachment #8539407 - Attachment is obsolete: true
Attachment #8539407 - Flags: review?(jmuizelaar)
Attachment #8539417 - Flags: review?(jmuizelaar)
Change the formatting in about:support to group these entries.
Attachment #8539417 - Attachment is obsolete: true
Attachment #8539417 - Flags: review?(jmuizelaar)
Attachment #8539497 - Flags: review?(jmuizelaar)
I'll attach what about:support looks like with this change.
Attachment #8539497 - Attachment is obsolete: true
Attachment #8539497 - Flags: review?(jmuizelaar)
Attachment #8544255 - Flags: review?(jmuizelaar)
Attachment #8544255 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/09c23f8dea86
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: