[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

mrowe at apple.com mrowe at apple.com
Thu Apr 8 02:08:31 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 2b0fad29eaea98ad101e8f18c8cce7507545cff5
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Mar 4 00:22:16 2010 +0000

    Add virtual memory tags for TCMalloc and WebCore's purgeable buffers.
    
    Reviewed by Geoff Garen.
    
    JavaScriptCore:
    
    * wtf/TCSystemAlloc.cpp:
    (TryMmap): Use the VM tag.
    * wtf/VMTags.h: Make use of VM_MEMORY_TCMALLOC and VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS.
    
    WebCore:
    
    * platform/mac/PurgeableBufferMac.cpp:
    (WebCore::PurgeableBuffer::create):  Use the VM tag.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55483 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index a35e6fc..28a9532 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-03-03  Mark Rowe  <mrowe at apple.com>
+
+        Reviewed by Geoff Garen.
+
+        Add virtual memory tags for TCMalloc and WebCore's purgeable buffers.
+
+        * wtf/TCSystemAlloc.cpp:
+        (TryMmap): Use the VM tag.
+        * wtf/VMTags.h: Make use of VM_MEMORY_TCMALLOC and VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS.
+
 2010-03-03  Steve Falkenburg  <sfalken at apple.com>
 
         Rubber stamped by Adam Roben.
diff --git a/JavaScriptCore/wtf/TCSystemAlloc.cpp b/JavaScriptCore/wtf/TCSystemAlloc.cpp
index 4d02919..c46ff31 100644
--- a/JavaScriptCore/wtf/TCSystemAlloc.cpp
+++ b/JavaScriptCore/wtf/TCSystemAlloc.cpp
@@ -38,6 +38,7 @@
 #include "Assertions.h"
 #include "TCSpinLock.h"
 #include "UnusedParam.h"
+#include "VMTags.h"
 
 #if HAVE(STDINT_H)
 #include <stdint.h>
@@ -178,7 +179,7 @@ static void* TryMmap(size_t size, size_t *actual_size, size_t alignment) {
   void* result = mmap(NULL, size + extra,
                       PROT_READ | PROT_WRITE,
                       MAP_PRIVATE|MAP_ANONYMOUS,
-                      -1, 0);
+                      VM_TAG_FOR_TCMALLOC_MEMORY, 0);
   if (result == reinterpret_cast<void*>(MAP_FAILED)) {
     mmap_failure = true;
     return NULL;
diff --git a/JavaScriptCore/wtf/VMTags.h b/JavaScriptCore/wtf/VMTags.h
index 1ec79d9..34e2494 100644
--- a/JavaScriptCore/wtf/VMTags.h
+++ b/JavaScriptCore/wtf/VMTags.h
@@ -34,6 +34,12 @@
 
 #include <mach/vm_statistics.h>
 
+#if defined(VM_MEMORY_TCMALLOC)
+#define VM_TAG_FOR_TCMALLOC_MEMORY VM_MAKE_TAG(VM_MEMORY_TCMALLOC)
+#else
+#define VM_TAG_FOR_TCMALLOC_MEMORY VM_MAKE_TAG(53)
+#endif // defined(VM_MEMORY_TCMALLOC)
+
 #if defined(VM_MEMORY_JAVASCRIPT_CORE) && defined(VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE) && defined(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR) && defined(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR)
 #define VM_TAG_FOR_COLLECTOR_MEMORY VM_MAKE_TAG(VM_MEMORY_JAVASCRIPT_CORE)
 #define VM_TAG_FOR_REGISTERFILE_MEMORY VM_MAKE_TAG(VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE)
@@ -44,11 +50,19 @@
 #define VM_TAG_FOR_REGISTERFILE_MEMORY VM_MAKE_TAG(65)
 #endif // defined(VM_MEMORY_JAVASCRIPT_CORE) && defined(VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE) && defined(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR) && defined(VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR)
 
+#if defined(VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS)
+#define VM_TAG_FOR_WEBCORE_PURGEABLE_MEMORY VM_MAKE_TAG(VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS)
+#else
+#define VM_TAG_FOR_WEBCORE_PURGEABLE_MEMORY VM_MAKE_TAG(69)
+#endif // defined(VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS)
+
 #else // OS(DARWIN) && !defined(BUILDING_ON_TIGER)
 
+#define VM_TAG_FOR_TCMALLOC_MEMORY -1
 #define VM_TAG_FOR_COLLECTOR_MEMORY -1
 #define VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY -1
 #define VM_TAG_FOR_REGISTERFILE_MEMORY -1
+#define VM_TAG_FOR_WEBCORE_PURGEABLE_MEMORY -1
 
 #endif // OS(DARWIN) && !defined(BUILDING_ON_TIGER)
 
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9e0cfc1..768985b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,12 @@
+2010-03-03  Mark Rowe  <mrowe at apple.com>
+
+        Reviewed by Geoff Garen.
+
+        Add virtual memory tags for TCMalloc and WebCore's purgeable buffers.
+
+        * platform/mac/PurgeableBufferMac.cpp:
+        (WebCore::PurgeableBuffer::create):  Use the VM tag.
+
 2010-03-03  Dumitru Daniliuc  <dumi at chromium.org>
 
         Reviewed by nobody, build fix.
diff --git a/WebCore/platform/mac/PurgeableBufferMac.cpp b/WebCore/platform/mac/PurgeableBufferMac.cpp
index 1b49de0..9902f77 100644
--- a/WebCore/platform/mac/PurgeableBufferMac.cpp
+++ b/WebCore/platform/mac/PurgeableBufferMac.cpp
@@ -31,11 +31,12 @@
 
 #include <mach/mach.h>
 #include <wtf/Assertions.h>
+#include <wtf/VMTags.h>
 
 namespace WebCore {
-    
+
 static const size_t minPurgeableBufferSize = 4096; // one page
-    
+
 PurgeableBuffer::PurgeableBuffer(char* data, size_t size)
     : m_data(data)
     , m_size(size)
@@ -43,7 +44,7 @@ PurgeableBuffer::PurgeableBuffer(char* data, size_t size)
     , m_state(NonVolatile)
 {
 }
-    
+
 PurgeableBuffer::~PurgeableBuffer()
 {
     vm_deallocate(mach_task_self(), reinterpret_cast<vm_address_t>(m_data), m_size);
@@ -53,9 +54,9 @@ PurgeableBuffer* PurgeableBuffer::create(const char* data, size_t size)
 {
     if (size < minPurgeableBufferSize)
         return 0;
-    
+
     vm_address_t buffer = 0;
-    kern_return_t ret = vm_allocate(mach_task_self(), &buffer, size, VM_FLAGS_PURGABLE | VM_FLAGS_ANYWHERE);
+    kern_return_t ret = vm_allocate(mach_task_self(), &buffer, size, VM_FLAGS_PURGABLE | VM_FLAGS_ANYWHERE | VM_TAG_FOR_WEBCORE_PURGEABLE_MEMORY);
 
     ASSERT(ret == KERN_SUCCESS);
     if (ret != KERN_SUCCESS)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list