Changeset 216911 in webkit


Ignore:
Timestamp:
May 16, 2017 12:09:56 AM (7 years ago)
Author:
jfbastien@apple.com
Message:

WebAssembly: report Memory usage to GC
https://bugs.webkit.org/show_bug.cgi?id=170690
<rdar://problem/31965310>

Reviewed by Keith Miller.

  • wasm/js/JSWebAssemblyMemory.cpp:

(JSC::JSWebAssemblyMemory::grow):
(JSC::JSWebAssemblyMemory::finishCreation):
(JSC::JSWebAssemblyMemory::visitChildren):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r216908 r216911  
     12017-05-16  JF Bastien  <jfbastien@apple.com>
     2
     3        WebAssembly: report Memory usage to GC
     4        https://bugs.webkit.org/show_bug.cgi?id=170690
     5        <rdar://problem/31965310>
     6
     7        Reviewed by Keith Miller.
     8
     9        * wasm/js/JSWebAssemblyMemory.cpp:
     10        (JSC::JSWebAssemblyMemory::grow):
     11        (JSC::JSWebAssemblyMemory::finishCreation):
     12        (JSC::JSWebAssemblyMemory::visitChildren):
     13
    1142017-05-16  JF Bastien  <jfbastien@apple.com>
    215
  • trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp

    r215340 r216911  
    11/*
    2  * Copyright (C) 2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    118118
    119119    memory().check();
    120     // FIXME Should we report extra memory to the GC on allocation / grow / visit? https://bugs.webkit.org/show_bug.cgi?id=170690
     120
     121    vm.heap.reportExtraMemoryAllocated(Wasm::PageCount(delta).bytes());
    121122    return oldPageCount;
    122123}
     
    126127    Base::finishCreation(vm);
    127128    ASSERT(inherits(vm, info()));
    128     // FIXME Should we report extra memory to the GC on allocation / grow / visit? https://bugs.webkit.org/show_bug.cgi?id=170690
     129    heap()->reportExtraMemoryAllocated(memory().size());
    129130    vm.heap.reportWebAssemblyFastMemoriesAllocated(1);
    130131}
     
    145146    Base::visitChildren(thisObject, visitor);
    146147    visitor.append(thisObject->m_bufferWrapper);
    147     // FIXME Should we report extra memory to the GC on allocation / grow / visit? https://bugs.webkit.org/show_bug.cgi?id=170690
     148    visitor.reportExtraMemoryVisited(thisObject->memory().size());
    148149}
    149150
Note: See TracChangeset for help on using the changeset viewer.