WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-80787-20120311191419.patch (text/plain), 7.72 KB, created by
Yury Semikhatsky
on 2012-03-11 08:14:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yury Semikhatsky
Created:
2012-03-11 08:14:21 PDT
Size:
7.72 KB
patch
obsolete
>Subversion Revision: 110387 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6503b3ee415ee7a315b03026cf4ced49811d1e71..5f372aad6b75b88913c12e7cae3236a988b390eb 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,27 @@ >+2012-03-11 Yury Semikhatsky <yurys@chromium.org> >+ >+ Web Inspector: provide access to process private and shared memory size >+ https://bugs.webkit.org/show_bug.cgi?id=80787 >+ >+ Exposed process private and shared memory sizes on console.memory object. >+ Visibility of this functionality like the rest console.memory is controlled >+ by the browser setting. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * page/MemoryInfo.cpp: >+ (WebCore::MemoryInfo::create): >+ (WebCore): >+ (WebCore::MemoryInfo::MemoryInfo): >+ (WebCore::MemoryInfo::processPrivateMemorySize): >+ (WebCore::MemoryInfo::processSharedMemorySize): >+ (WebCore::MemoryInfo::memoryInfoEnabled): >+ * page/MemoryInfo.h: >+ (MemoryInfo): >+ * page/MemoryInfo.idl: >+ * platform/chromium/PlatformSupport.h: >+ (PlatformSupport): >+ > 2012-03-09 Jon Lee <jonlee@apple.com> > > Rename NotificationPresenter to NotificationClient >diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog >index be483cc39f9ddca5ed1b7cd6d5ec00e15477d32b..00f362bd3a76319622f3a3e97b7bb668d2734a5c 100644 >--- a/Source/WebKit/chromium/ChangeLog >+++ b/Source/WebKit/chromium/ChangeLog >@@ -1,3 +1,21 @@ >+2012-03-11 Yury Semikhatsky <yurys@chromium.org> >+ >+ Web Inspector: provide access to process private and shared memory size >+ https://bugs.webkit.org/show_bug.cgi?id=80787 >+ >+ Extended WebKitPlatformSupport with getter for render process private and >+ shared memory. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * public/platform/WebKitPlatformSupport.h: >+ (WebKit::WebKitPlatformSupport::processPrivateMemorySize): >+ (WebKit::WebKitPlatformSupport::processSharedMemorySize): >+ * src/PlatformSupport.cpp: >+ (WebCore::PlatformSupport::processPrivateMemorySize): >+ (WebCore): >+ (WebCore::PlatformSupport::processSharedMemorySize): >+ > 2012-03-10 Sheriff Bot <webkit.review.bot@gmail.com> > > Unreviewed, rolling out r110384. >diff --git a/Source/WebCore/page/MemoryInfo.cpp b/Source/WebCore/page/MemoryInfo.cpp >index 57dae2b4074ec305ca4610526460e3e32aaf98e3..a1e80c61377dae71719e00dc83984a5286c94ee2 100644 >--- a/Source/WebCore/page/MemoryInfo.cpp >+++ b/Source/WebCore/page/MemoryInfo.cpp >@@ -32,20 +32,31 @@ > #include "MemoryInfo.h" > > #include "Frame.h" >+#include "PlatformSupport.h" > #include "ScriptGCEvent.h" > #include "Settings.h" > > namespace WebCore { > >+PassRefPtr<MemoryInfo> MemoryInfo::create(Frame* frame) >+{ >+ return adoptRef(new MemoryInfo(frame)); >+} >+ > MemoryInfo::MemoryInfo(Frame* frame) > : m_totalJSHeapSize(0), > m_usedJSHeapSize(0), >- m_jsHeapSizeLimit(0) >+ m_jsHeapSizeLimit(0), >+ m_processPrivateMemorySize(0), >+ m_processSharedMemorySize(0) > { > if (frame && frame->settings() && frame->settings()->memoryInfoEnabled()) { > #if ENABLE(INSPECTOR) > ScriptGCEvent::getHeapSize(m_usedJSHeapSize, m_totalJSHeapSize, m_jsHeapSizeLimit); > #endif >+#if PLATFORM(CHROMIUM) >+ PlatformSupport::getProcessMemorySize(&m_processPrivateMemorySize, &m_processSharedMemorySize); >+#endif > } > } > >diff --git a/Source/WebCore/page/MemoryInfo.h b/Source/WebCore/page/MemoryInfo.h >index 27a7344b8ff33939465ae8516382c5a9305a2292..87a0fd85da1c6843ca02c8b5003d2e6e38ae4ad5 100644 >--- a/Source/WebCore/page/MemoryInfo.h >+++ b/Source/WebCore/page/MemoryInfo.h >@@ -40,18 +40,23 @@ class Frame; > > class MemoryInfo : public RefCounted<MemoryInfo> { > public: >- static PassRefPtr<MemoryInfo> create(Frame* frame) { return adoptRef(new MemoryInfo(frame)); } >+ static PassRefPtr<MemoryInfo> create(Frame*); > > size_t totalJSHeapSize() const { return m_totalJSHeapSize; } > size_t usedJSHeapSize() const { return m_usedJSHeapSize; } > size_t jsHeapSizeLimit() const { return m_jsHeapSizeLimit; } > >+ size_t processPrivateMemorySize() const { return m_processPrivateMemorySize; } >+ size_t processSharedMemorySize() const { return m_processSharedMemorySize; } >+ > private: > MemoryInfo(Frame*); > > size_t m_totalJSHeapSize; > size_t m_usedJSHeapSize; > size_t m_jsHeapSizeLimit; >+ size_t m_processPrivateMemorySize; >+ size_t m_processSharedMemorySize; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/page/MemoryInfo.idl b/Source/WebCore/page/MemoryInfo.idl >index b9149d54d45f930174f3426e5bb33eb7f9d00249..c570b36d938bcf67dd1019baeac0a2b503ca7f8d 100644 >--- a/Source/WebCore/page/MemoryInfo.idl >+++ b/Source/WebCore/page/MemoryInfo.idl >@@ -38,6 +38,8 @@ module window { > readonly attribute unsigned long usedJSHeapSize; > readonly attribute [JSCustomGetter] unsigned long jsHeapSizeLimit; > >+ readonly attribute unsigned long long processPrivateMemorySize; >+ readonly attribute unsigned long long processSharedMemorySize; > }; > > } >diff --git a/Source/WebCore/platform/chromium/PlatformSupport.h b/Source/WebCore/platform/chromium/PlatformSupport.h >index 128d2a3e9883cd2ab6b84580c06e2dafc0e6032e..e306bd30af1751e21be82683f063ab24790aee97 100644 >--- a/Source/WebCore/platform/chromium/PlatformSupport.h >+++ b/Source/WebCore/platform/chromium/PlatformSupport.h >@@ -213,6 +213,10 @@ public: > static int highMemoryUsageMB(); > // Delta of memory usage growth (vs. last actualMemoryUsageMB()) to force GC when memory usage is high. > static int highUsageDeltaMB(); >+ // Returns private and shared usage, in bytes. Private bytes is the amount of >+ // memory currently allocated to this process that cannot be shared. Returns >+ // false on platform specific error conditions. >+ static bool getProcessMemorySize(size_t* privateBytes, size_t* sharedBytes); > > // MimeType ----------------------------------------------------------- > static bool isSupportedImageMIMEType(const String& mimeType); >diff --git a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h >index d2c1fd8145d21c6d2804ef16d3afce320d31e5ef..9e3d5579ff298baaf8d832df60563aaf277ed2bf 100644 >--- a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h >+++ b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h >@@ -191,6 +191,10 @@ public: > // Delta of memory usage growth (vs. last actualMemoryUsageMB()) to force GC when memory usage is high. > virtual size_t highUsageDeltaMB() { return 128; } > >+ // Returns private and shared usage, in bytes. Private bytes is the amount of >+ // memory currently allocated to this process that cannot be shared. Returns >+ // false on platform specific error conditions. >+ virtual bool getProcessMemorySize(size_t* privateBytes, size_t* sharedBytes) { return false; } > > // Threads ------------------------------------------------------- > >diff --git a/Source/WebKit/chromium/src/PlatformSupport.cpp b/Source/WebKit/chromium/src/PlatformSupport.cpp >index 63be0245cc35d490fcf68da2be39bda8a6ddb3aa..7e3e120764312f48e5de802beff429714543f26a 100644 >--- a/Source/WebKit/chromium/src/PlatformSupport.cpp >+++ b/Source/WebKit/chromium/src/PlatformSupport.cpp >@@ -1057,6 +1057,11 @@ int PlatformSupport::highUsageDeltaMB() > return static_cast<int>(webKitPlatformSupport()->highUsageDeltaMB()); > } > >+bool PlatformSupport::getProcessMemorySize(size_t* privateBytes, size_t* sharedBytes) >+{ >+ return webKitPlatformSupport()->getProcessMemorySize(privateBytes, sharedBytes); >+} >+ > int PlatformSupport::screenHorizontalDPI(Widget* widget) > { > WebWidgetClient* client = toWebWidgetClient(widget);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 80787
:
131224
|
131225
|
131226
|
131289