JS_DumpHeap

この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。

This article covers features introduced in SpiderMonkey 1.8

DEBUG only. Dump the object graph of heap-allocated things.

Syntax

JSBool JS_DumpHeap(JSContext *cx, FILE *fp, void *startThing, uint32 startKind,
                   void *thingToFind, size_t maxDepth, void *thingToIgnore);
Name Type Description
cx JSContext * Pointer to a JS context. Every JSContext is permanently associated with a JSRuntime; each JSRuntime contains a GC heap.
fp FILE * File for the dump output.
startThing void * NULL or a pointer to a GC thing (use JSVAL_TO_GCTHING to obtain a pointer to pass here). When null, dump all things reachable from the runtime roots. When non-null, dump only things reachable from the object indicated.
startKind uint32 Trace kind of startThing, if startThing is not null. Must be 0 when startThing is null.
thingToFind void * NULL or a pointer to a GC thing. If this is non-null, JS_DumpHeap only dumps paths in the object graph leading to the specified thing.
maxDepth size_t The upper bound on the number of edges to descend from the graph roots.
thingToIgnore void * NULL or a pointer to a GC thing that will be ignored during graph traversal.

Description

See bug 378261.

Document Tags and Contributors

Contributors to this page: Jorend
最終更新者: Jorend,