Changeset 187389 in webkit
- Timestamp:
- Jul 25, 2015 7:46:20 AM (9 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r187339 r187389 1 2015-07-25 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 3 REGRESSION (bmalloc): WebKit performance tests don't report memory stats. 4 https://bugs.webkit.org/show_bug.cgi?id=141247 5 6 Reviewed by Geoffrey Garen. 7 8 Meanwhile a better way of getting memory stats with bmalloc is not found 9 (see bug 136592), we can report as memory stats the resident set size 10 information that the operating system provides to us. 11 12 This at least should be good enough to get back the memory stats on the 13 performance tests and being able to track down memory usage regressions 14 at https://perf.webkit.org 15 16 * wtf/FastMalloc.cpp: 17 (WTF::fastMallocStatistics): Report maxrss data as committedVMBytes. 18 1 19 2015-07-24 Csaba Osztrogonác <ossy@webkit.org> 2 20 -
trunk/Source/WTF/wtf/FastMalloc.cpp
r184448 r187389 38 38 #else 39 39 #include <pthread.h> 40 #include <sys/resource.h> 40 41 #endif 41 42 … … 262 263 FastMallocStatistics fastMallocStatistics() 263 264 { 264 // FIXME: This is incorrect; needs an implementation or to be removed. 265 FastMallocStatistics statistics = { 0, 0, 0 }; 265 266 // FIXME: Can bmalloc itself report the stats instead of relying on the OS? 267 FastMallocStatistics statistics; 268 statistics.freeListBytes = 0; 269 statistics.reservedVMBytes = 0; 270 271 #if OS(WINDOWS) 272 PROCESS_MEMORY_COUNTERS resourceUsage; 273 GetProcessMemoryInfo(GetCurrentProcess(), &resourceUsage, sizeof(resourceUsage)); 274 statistics.committedVMBytes = resourceUsage.PeakWorkingSetSize; 275 #else 276 struct rusage resourceUsage; 277 getrusage(RUSAGE_SELF, &resourceUsage); 278 279 #if OS(DARWIN) 280 statistics.committedVMBytes = resourceUsage.ru_maxrss; 281 #else 282 statistics.committedVMBytes = resourceUsage.ru_maxrss * 1024; 283 #endif // OS(DARWIN) 284 285 #endif // OS(WINDOWS) 266 286 return statistics; 267 287 }
Note: See TracChangeset
for help on using the changeset viewer.