Closed Bug 1337072 Opened 8 years ago Closed 8 years ago

Implement helper routines for inspecting and breaking on mark bits

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: sfink, Assigned: sfink)

Details

Attachments

(1 file)

Whenever I've been working with marking, it seems like I've wanted these.
I'm not sure about the best namespace. js::gc::debug? js::gc::detail? I went for something short. The help message should perhaps mention that it's breaking on setting a mark in that case; clearing a mark would be cond 7 !(*$100 & $101)
Attachment #8834080 - Flags: review?(jcoppeard)
Comment on attachment 8834080 [details] [diff] [review] Implement helper routines for inspecting and breaking on mark bits Review of attachment 8834080 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, and I'm fine with the namespace. ::: js/src/gc/Heap.h @@ +1396,5 @@ > + > +namespace debug { > + > +// Utility functions meant to be called from an interactive debugger. > +enum class MarkColor : int { Suggestion: this has more information than just the mark color so maybe it could be called MarkInfo or something. @@ +1415,5 @@ > +// $101 = 0x200000000 > +// (gdb) watch *$100 > +// Hardware watchpoint 7: *$100 > +// (gdb) cond 7 *$100 & $101 > +// (gdb) cont Nice!
Attachment #8834080 - Flags: review?(jcoppeard) → review+
This is very handy. I was able to easily figure out two different sources of excessive unmark gray calls in bug 1336811 using it.
The only reason I haven't landed it is because I'm hitting a test failure with Promises where it's accessing a dead object, and I was blaming something in the stack of patches I was trying to land along with this. It's looking like it may not have been my changes in the first place, though.
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/96b7a5189c50 Implement helper routines for inspecting and breaking on mark bits, r=jonco
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: