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-87830-20120530120324.patch (text/plain), 8.63 KB, created by
Yury Semikhatsky
on 2012-05-30 01:03:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yury Semikhatsky
Created:
2012-05-30 01:03:25 PDT
Size:
8.63 KB
patch
obsolete
>Subversion Revision: 118894 >diff --git a/Source/Platform/ChangeLog b/Source/Platform/ChangeLog >index 715d4de26bad48f445fad39f47f3c361cf5d0105..4fb15d9e9d46ee7016a61d23d25d0c82457730fd 100644 >--- a/Source/Platform/ChangeLog >+++ b/Source/Platform/ChangeLog >@@ -1,3 +1,16 @@ >+2012-05-30 Yury Semikhatsky <yurys@chromium.org> >+ >+ Web Inspector: add MemoryUsageSupport::processMemorySizesInBytes >+ https://bugs.webkit.org/show_bug.cgi?id=87830 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * chromium/public/Platform.h: >+ (Platform): >+ (WebKit::Platform::processMemorySizesInBytes): moved this method from >+ Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h, also >+ removed 'get' prefix. >+ > 2012-05-29 Mark Pilgrim <pilgrim@chromium.org> > > [Chromium] Move fileExists to Platform.h >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index fb7cb313405a16502764c75a349a8eeca1c2200e..10d88704bb86755c9ec0904acd3c55a0e4f12ba7 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,26 @@ >+2012-05-30 Yury Semikhatsky <yurys@chromium.org> >+ >+ Web Inspector: add MemoryUsageSupport::processMemorySizesInBytes >+ https://bugs.webkit.org/show_bug.cgi?id=87830 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added a method for getting process memory usage in bytes. It is >+ used in the inspector memory instrumentation to get process total >+ memory usage. >+ >+ * inspector/InspectorMemoryAgent.cpp: >+ (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): >+ * platform/MemoryUsageSupport.cpp: >+ (WebCore::MemoryUsageSupport::processMemorySizesInBytes): >+ (WebCore): >+ * platform/MemoryUsageSupport.h: >+ (MemoryUsageSupport): provided embedders with a way to report WebKit process >+ memory usage. >+ * platform/chromium/MemoryUsageSupportChromium.cpp: >+ (WebCore::MemoryUsageSupport::processMemorySizesInBytes): >+ (WebCore): >+ > 2012-05-29 Mark Pilgrim <pilgrim@chromium.org> > > [Chromium] Move fileExists to Platform.h >diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog >index deac7209a111710d738f862785d90f9c6347441f..1b1b8fd94481c8ab3e87907926d1e67f1b6a225d 100644 >--- a/Source/WebKit/chromium/ChangeLog >+++ b/Source/WebKit/chromium/ChangeLog >@@ -1,3 +1,14 @@ >+2012-05-30 Yury Semikhatsky <yurys@chromium.org> >+ >+ Web Inspector: add MemoryUsageSupport::processMemorySizesInBytes >+ https://bugs.webkit.org/show_bug.cgi?id=87830 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * public/platform/WebKitPlatformSupport.h: pulled getProcessMemorySize up >+ to the Source/Platform/chromium/public/Platform.h >+ * src/PlatformSupport.cpp: >+ > 2012-05-29 Mark Pilgrim <pilgrim@chromium.org> > > [Chromium] Move fileExists to Platform.h >diff --git a/Source/Platform/chromium/public/Platform.h b/Source/Platform/chromium/public/Platform.h >index 9439cebf6f7a1dee66260783937a37d9b04bf042..5dabb9432ae38078973a636eff7ca78a595becad 100644 >--- a/Source/Platform/chromium/public/Platform.h >+++ b/Source/Platform/chromium/public/Platform.h >@@ -153,6 +153,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 processMemorySizesInBytes(size_t* privateBytes, size_t* sharedBytes) { return false; } > > // Network ------------------------------------------------------------- > >diff --git a/Source/WebCore/inspector/InspectorMemoryAgent.cpp b/Source/WebCore/inspector/InspectorMemoryAgent.cpp >index 290077589b9bcf5c0bb078aab9ae53dc7a8fbff5..97bc097dad2b9b34fd10ae623927c2362fc58c44 100644 >--- a/Source/WebCore/inspector/InspectorMemoryAgent.cpp >+++ b/Source/WebCore/inspector/InspectorMemoryAgent.cpp >@@ -43,11 +43,9 @@ > #include "InspectorState.h" > #include "InspectorValues.h" > #include "InstrumentingAgents.h" >+#include "MemoryUsageSupport.h" > #include "Node.h" > #include "Page.h" >-#if PLATFORM(CHROMIUM) >-#include "PlatformSupport.h" >-#endif > #include "ScriptGCEvent.h" > #include "ScriptProfiler.h" > #include "StyledElement.h" >@@ -339,10 +337,8 @@ static PassRefPtr<WebCore::TypeBuilder::Memory::MemoryBlock> jsHeapInfo() > void InspectorMemoryAgent::getProcessMemoryDistribution(ErrorString*, RefPtr<WebCore::TypeBuilder::Memory::MemoryBlock>& processMemory) > { > size_t privateBytes = 0; >-#if PLATFORM(CHROMIUM) > size_t sharedBytes = 0; >- PlatformSupport::getProcessMemorySize(&privateBytes, &sharedBytes); >-#endif >+ MemoryUsageSupport::processMemorySizesInBytes(&privateBytes, &sharedBytes); > processMemory = WebCore::TypeBuilder::Memory::MemoryBlock::create().setName(MemoryBlockName::processPrivateMemory); > processMemory->setSize(static_cast<int>(privateBytes)); > >diff --git a/Source/WebCore/platform/MemoryUsageSupport.cpp b/Source/WebCore/platform/MemoryUsageSupport.cpp >index 2f06c763936b5f9eb25e9abd30fab167f970c992..0eb40e52a7c4eea129f5ce813db8fd6544bde46b 100644 >--- a/Source/WebCore/platform/MemoryUsageSupport.cpp >+++ b/Source/WebCore/platform/MemoryUsageSupport.cpp >@@ -58,4 +58,9 @@ int MemoryUsageSupport::highUsageDeltaMB() > return 0; > } > >+bool MemoryUsageSupport::processMemorySizesInBytes(size_t* privateBytes, size_t* sharedBytes) >+{ >+ return false; >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/platform/MemoryUsageSupport.h b/Source/WebCore/platform/MemoryUsageSupport.h >index 9d12e3740c3ebcfd24aec16cdeb4ed92848cb6b1..4f1a0bdd7ddd7aba1de6e5dda02282eef2c06a2f 100644 >--- a/Source/WebCore/platform/MemoryUsageSupport.h >+++ b/Source/WebCore/platform/MemoryUsageSupport.h >@@ -52,6 +52,11 @@ public: > // 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 processMemorySizesInBytes(size_t* privateBytes, size_t* sharedBytes); > }; > > } // namespace WebCore >diff --git a/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp b/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp >index 0c3553eae77bf2d2709194ac8a767c82267c5a4f..d21dece90a28ad488cfccf8272f810ea9c064218 100644 >--- a/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp >+++ b/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp >@@ -60,4 +60,9 @@ int MemoryUsageSupport::highUsageDeltaMB() > return WebKit::Platform::current()->highUsageDeltaMB(); > } > >+bool MemoryUsageSupport::processMemorySizesInBytes(size_t* privateBytes, size_t* sharedBytes) >+{ >+ return WebKit::Platform::current()->processMemorySizesInBytes(privateBytes, sharedBytes); >+} >+ > } // namespace WebCore >diff --git a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h >index 9081521499c514c3bb436aab6953c93795a29a80..f69c62ff280bbd2a3d9731a4f8585273f22f9e25 100644 >--- a/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h >+++ b/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h >@@ -115,11 +115,6 @@ public: > > virtual WebSharedWorkerRepository* sharedWorkerRepository() { return 0; } > >- // 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; } >- > protected: > ~WebKitPlatformSupport() { } > }; >diff --git a/Source/WebKit/chromium/src/PlatformSupport.cpp b/Source/WebKit/chromium/src/PlatformSupport.cpp >index dd7cc82887773456d298e58edf1c447175041ad2..18c640679f420d8ddcae48bafc1a5004a86cc114 100644 >--- a/Source/WebKit/chromium/src/PlatformSupport.cpp >+++ b/Source/WebKit/chromium/src/PlatformSupport.cpp >@@ -831,11 +831,6 @@ void PlatformSupport::notifyJSOutOfMemory(Frame* frame) > webFrame->client()->didExhaustMemoryAvailableForScript(webFrame); > } > >-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 87830
:
144735
|
144736
|
144742
|
144759