[Webkit-unassigned] [Bug 143809] New: Add $vm debugging tool.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 15 19:05:22 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=143809

            Bug ID: 143809
           Summary: Add $vm debugging tool.
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mark.lam at apple.com

For debugging VM bugs, it would be useful to be able to dump VM data structures from JS code that we instrument.  To this end, let's introduce a JS_enableDollarVM option that, if true, installs an $vm property into each JS global object at creation time.  The $vm property refers to an object that provides a collection of useful utility functions.  For this initial implementation, $vm will have the following:

    dfgTrue() - returns true if the current function is DFG compiled, else returns false.
    jitTrue() - returns true if the current function is compiled by the baseline JIT, else returns false.
    llintTrue() - returns true if the current function is interpreted by the LLINT, else returns false.

    gc() - runs a full GC and sweep all dead objects.
    fullGC() - runs a full GC but does not sweep dead objects. 
    edenGC() - runs an eden GC but does not sweep dead objects.

    codeBlockForFrame(frameNumber) - gets the codeBlock at the specified frame (0 = current, 1 = caller, etc).
    printSourceFor(codeBlock) - prints the source code for the codeBlock.
    printByteCodeFor(codeBlock) - prints the bytecode for the codeBlock.

    print(str) - prints a string to dataLog output.
    printCallFrame() - prints the current CallFrame.
    printStack() - prints the JS stack.
    printInternal(value) - prints the JSC internal info for the specified value.

With JS_enableDollarVM=true, JS code can use the above functions like so:

    $vm.print("Using $vm features\n");

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150416/f5684537/attachment.html>


More information about the webkit-unassigned mailing list