Commit Graph
20 Commits
Author SHA1 Message Date
Nick Fitzgerald deecaa1ebf Bug 1231883 - Implement HeapSnapshot.describeNode; r=mrbkap
This commit implements the HeapSnapshot.describeNode method which allows chrome
JS code to request a description of a given node as specified by our existing
"breakdown" language. This description can be used to generate a human-readable
label for the node.
2015-12-18 12:05:14 -08:00
Nick Fitzgerald f27c858435 Bug 1231763 - Extract breakdown parsing from JS::ubi::Census. r=jimb 2015-12-16 09:19:00 +01:00
Nick Fitzgerald 79d5400df7 Bug 1226217 - Use less verbose cycle collection macros for mozilla::devtools::HeapSnapshot; r=bz 2015-11-19 07:45:00 +01:00
Jan Varga 86cf1daebe Bug 961049 - Part 3: Move PersistenceType serializer from indexedDB to quota module; r=baku 2015-11-22 10:43:34 +01:00
Nick Fitzgerald 526bf1ab61 Bug 1226176 - Compute retained sizes in dominator trees and expose them to JavaScript; r=bz,sfink 2015-11-20 09:08:15 -08:00
Nick Fitzgerald fe902708b3 Bug 1225588 - Expose DominatorTree to JavaScript; r=sfink,bz
This commit adds the DominatorTree.webidl interface, which is only exposed to
chrome JS. The interface is implemented by mozilla::devtools::DominatorTree,
which is a thin wrapper around JS::ubi::DominatorTree. This does not expose any
methods on the DominatorTree interface, those will come as follow up changesets.
2015-11-18 14:12:23 -08:00
Tom Tromey 38351dc381 Bug 1223954 - don't use implicitJSContext for readHeapSnapshot and saveHeapSnapshot; r=bz 2015-11-12 08:51:00 +01:00
Nick Fitzgerald 503d3406a7 Bug 1223512 - Validate that every edge referent is in the heap snapshot; r=shu 2015-11-13 11:11:09 -08:00
Nick Fitzgerald 65a4685cc8 Bug 1220918 - Serialize and deseriliaze JS::ubi::Node's script filenames in heap snapshots; r=sfink 2015-11-04 05:49:33 -08:00
Nick Fitzgerald d36eb54a78 Bug 1219066 - Make sure to traverse and unlink HeapSnapshot::mParent in cycle collection; r=mccr8 2015-10-28 22:46:25 -07:00
Carsten "Tomcat" Book 958995e6a3 Backed out changeset 2e4f2de05673 (bug 1219066) 2015-10-28 13:09:40 +01:00
Nick Fitzgerald 7bfa8ce35e Bug 1219066 - Make sure to traverse and unlink HeapSnapshot::mParent in cycle collection; r=mccr8 2015-10-28 02:11:06 -07:00
Nick Fitzgerald 675c05f5de Bug 1218597 - Limit the number of stack frames serialized in core dumps; r=froydnj 2015-10-27 14:13:39 -07:00
Nathan Froyd 4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Nick Fitzgerald 1784a308ee Bug 1213436 - Reject core dumps with node IDs that don't fit in an IEEE 754 double; r=sfink 2015-10-13 11:59:00 +02:00
Nick Fitzgerald 1d821c15c6 Bug 1196461 - De-duplicate strings in heap snapshot core dumps; r=shu,jimb
This changeset replaces all of the

    // char16_t[]
    optional bytes someProperty = 1;

one- and two-byte string properties in the CoreDump.proto protobuf definition
file with:

    oneof {
        // char16_t[]
        bytes  someProperty    = 1;
        uint64 somePropertyRef = 2;
    }

The first time the N^th unique string is serialized, then someProperty is used
and the full string is serialized in the protobuf message. All following times
that string is serialized, somePropertyRef is used and its value is N.

Among the other things, this also changes JS::ubi::Edge::name from a raw pointer
with commented rules about who does or doesn't own and should and shouldn't free
the raw pointer to a UniquePtr that enforces those rules rather than relying on
developers reading and obeying the rules in the comments.
2015-09-30 16:03:31 -07:00
Nick Fitzgerald af011b3ca2 Bug 1206290 - Part 0: Move js/UbiNodeTraverse.h to js/UbiNodeBreadthFirst.h; r=sfink 2015-09-24 14:01:22 -07:00
Nick Fitzgerald 963dd4d79a Bug 1182653 - Use JSRuntime* instead of JSContext* in ubi::Node infrastructure; r=sfink
This enables the use of ubi::Node in situations where a JSContext* is not
available, and paves the way for debugging utilities to dump shortest paths from
GC roots to a given ubi::Node that can be used while paused in a debugger.
2015-09-23 09:39:56 -07:00
Nick Fitzgerald 935452bc55 Bug 1201597 - Part 2: Add an IPDL subprotocol for opening core dump files to
save heap snapsots into; r=mrbkap
2015-09-22 12:09:42 -07:00
J. Ryan Stinnett a3073e0420 Bug 912121 - Migrate major DevTools directories. rs=devtools
Move major DevTools files to new directories using the following steps:

hg mv browser/devtools devtools/client
hg mv toolkit/devtools/server devtools/server
hg mv toolkit/devtools devtools/shared

No other changes are made.
2015-09-21 12:02:24 -05:00