Changeset 118847 in webkit
- Timestamp:
- May 29, 2012 3:59:15 PM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/ChangeLog
r118805 r118847 1 2012-05-29 Yong Li <yoli@rim.com> 2 3 [BlackBerry] Add malloc info to about:memory page 4 https://bugs.webkit.org/show_bug.cgi?id=87676 5 6 Reviewed by Rob Buis. 7 8 Detailed malloc info can tell us how much memory 9 in the heaps is being in use. 10 11 * WebCoreSupport/AboutData.cpp: 12 (WebCore::memoryPage): 13 1 14 2012-05-29 Arvid Nilsson <anilsson@rim.com> 2 15 -
trunk/Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp
r113672 r118847 20 20 #include "AboutData.h" 21 21 22 #include "CString.h" 22 23 #include "MemoryCache.h" 23 24 #include "SurfacePool.h" 24 25 #include "WebKitVersion.h" 25 26 27 #include <process.h> 26 28 #include <BlackBerryPlatformSettings.h> 29 #include <sys/stat.h> 27 30 #include <sys/utsname.h> 28 #include <wtf/Platform.h>29 31 30 32 namespace WebCore { … … 196 198 // generate cache information 197 199 MemoryCache* cacheInc = memoryCache(); 198 MemoryCache::Statistics stat = cacheInc->getStatistics();200 MemoryCache::Statistics cacheStat = cacheInc->getStatistics(); 199 201 200 202 page += String("<h2>Cache Information</h2>") … … 202 204 203 205 MemoryCache::TypeStatistic total; 204 total.count = stat.images.count + stat.cssStyleSheets.count205 + stat.scripts.count + stat.xslStyleSheets.count + stat.fonts.count;206 total.count = cacheStat.images.count + cacheStat.cssStyleSheets.count 207 + cacheStat.scripts.count + cacheStat.xslStyleSheets.count + cacheStat.fonts.count; 206 208 total.size = cacheInc->totalSize(); 207 total.liveSize = stat.images.liveSize + stat.cssStyleSheets.liveSize208 + stat.scripts.liveSize + stat.xslStyleSheets.liveSize + stat.fonts.liveSize;209 total.decodedSize = stat.images.decodedSize210 + stat.cssStyleSheets.decodedSize + stat.scripts.decodedSize211 + stat.xslStyleSheets.decodedSize + stat.fonts.decodedSize;209 total.liveSize = cacheStat.images.liveSize + cacheStat.cssStyleSheets.liveSize 210 + cacheStat.scripts.liveSize + cacheStat.xslStyleSheets.liveSize + cacheStat.fonts.liveSize; 211 total.decodedSize = cacheStat.images.decodedSize 212 + cacheStat.cssStyleSheets.decodedSize + cacheStat.scripts.decodedSize 213 + cacheStat.xslStyleSheets.decodedSize + cacheStat.fonts.decodedSize; 212 214 213 215 page += cacheTypeStatisticToHTMLTr("Total", total); 214 page += cacheTypeStatisticToHTMLTr("Images", stat.images);215 page += cacheTypeStatisticToHTMLTr("CSS Style Sheets", stat.cssStyleSheets);216 page += cacheTypeStatisticToHTMLTr("Scripts", stat.scripts);216 page += cacheTypeStatisticToHTMLTr("Images", cacheStat.images); 217 page += cacheTypeStatisticToHTMLTr("CSS Style Sheets", cacheStat.cssStyleSheets); 218 page += cacheTypeStatisticToHTMLTr("Scripts", cacheStat.scripts); 217 219 #if ENABLE(XSLT) 218 page += cacheTypeStatisticToHTMLTr("XSL Style Sheets", stat.xslStyleSheets); 219 #endif 220 page += cacheTypeStatisticToHTMLTr("Fonts", stat.fonts); 221 222 page += "</table></body></html>"; 220 page += cacheTypeStatisticToHTMLTr("XSL Style Sheets", cacheStat.xslStyleSheets); 221 #endif 222 page += cacheTypeStatisticToHTMLTr("Fonts", cacheStat.fonts); 223 224 page += "</table>"; 225 226 #if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD 227 struct mallinfo mallocInfo = mallinfo(); 228 229 page += String("<h2>Malloc Information</h2>") + "<table align=\"center\" rules=\"all\">"; 230 231 page += numberToHTMLTr("Total space in use", mallocInfo.usmblks + mallocInfo.uordblks); 232 page += numberToHTMLTr("Total space in free blocks", mallocInfo.fsmblks + mallocInfo.fordblks); 233 page += numberToHTMLTr("Size of the arena", mallocInfo.arena); 234 page += numberToHTMLTr("Number of big blocks in use", mallocInfo.ordblks); 235 page += numberToHTMLTr("Number of small blocks in use", mallocInfo.smblks); 236 page += numberToHTMLTr("Number of header blocks in use", mallocInfo.hblks); 237 page += numberToHTMLTr("Space in header block headers", mallocInfo.hblkhd); 238 page += numberToHTMLTr("Space in small blocks in use", mallocInfo.usmblks); 239 page += numberToHTMLTr("Memory in free small blocks", mallocInfo.fsmblks); 240 page += numberToHTMLTr("Space in big blocks in use", mallocInfo.uordblks); 241 page += numberToHTMLTr("Memory in free big blocks", mallocInfo.fordblks); 242 243 struct stat processInfo; 244 if (!stat(String::format("/proc/%u/as", getpid()).latin1().data(), &processInfo)) 245 page += numberToHTMLTr("Process total mapped memory", processInfo.st_size); 246 247 page += "</table>"; 248 #endif 249 250 page += "</body></html>"; 223 251 return page; 224 252 }
Note: See TracChangeset
for help on using the changeset viewer.