Changeset 200060 in webkit
- Timestamp:
- Apr 25, 2016 4:50:25 PM (8 years ago)
- Location:
- trunk/PerformanceTests
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/ChangeLog
r200049 r200060 1 2016-04-25 Geoffrey Garen <ggaren@apple.com> 2 3 bmalloc: Misc improvements to MallocBench 4 https://bugs.webkit.org/show_bug.cgi?id=157004 5 6 Reviewed by Darin Adler. 7 8 * MallocBench/run-malloc-benchmarks: Added --memory and --memory_warning 9 modes for focused memory testing. 10 11 * MallocBench/MallocBench/Benchmark.cpp: 12 (Benchmark::printReport): Clarified output. 13 14 (Benchmark::currentMemoryBytes): Added compressed memory because top 15 does the same. (It always happens to zero in the benchmarks we run. But 16 this is good for sanity.) 17 18 * MallocBench/MallocBench/CommandLine.cpp: Moved up to 8 runs to reduce 19 variance. 20 21 * MallocBench/MallocBench/alloc_free.cpp: 22 (benchmark_alloc_free): Cycle a single allocation in order to stress 23 the effect of merging on calls to madvise. 24 25 * MallocBench/MallocBench/big.cpp: 26 (benchmark_big): Graduated to 8kB-128kB because medium tests up to 8 and 27 our large allocator doesn't kick in until 64kB. 28 29 * MallocBench/MallocBench/medium.cpp: 30 (benchmark_medium): Test all the way down to 1kB because our large 31 allocator used to service 1kB allocations and 1kB is an interesting 32 middle size where memory is unusually large but allocation throughput 33 still matters. 34 35 * MallocBench/MallocBench/stress.cpp: 36 (benchmark_stress): Reduced the churn count to match stress_aligned 37 because this test was taking too long to complete. 38 39 * MallocBench/MallocBench/stress_aligned.cpp: 40 (benchmark_stress_aligned): Our new large allocator can handle even 41 more absurdly large values. 42 1 43 2016-04-25 Simon Fraser <simon.fraser@apple.com> 2 44 -
trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.cpp
r198546 r200060 202 202 203 203 cout << "Time: \t" << m_elapsedTime << "ms" << endl; 204 cout << "Memory: \t" << m_memory.resident / kB << "kB" << endl;205 204 cout << "Peak Memory:\t" << m_memory.residentMax / kB << "kB" << endl; 205 cout << "Memory at End: \t" << m_memory.resident / kB << "kB" << endl; 206 206 } 207 207 … … 224 224 } 225 225 226 memory.resident = vm_info.internal - vm_info.purgeable_volatile_pmap;226 memory.resident = vm_info.internal + vm_info.compressed - vm_info.purgeable_volatile_pmap; 227 227 memory.residentMax = vm_info.resident_size_peak; 228 228 return memory; -
trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.cpp
r196955 r200060 48 48 , m_warmUp(true) 49 49 , m_heapSize(0) 50 , m_runs( 4)50 , m_runs(8) 51 51 { 52 52 int optionIndex = 0; -
trunk/PerformanceTests/MallocBench/MallocBench/alloc_free.cpp
r196955 r200060 31 31 void benchmark_alloc_free(CommandLine&) 32 32 { 33 size_t loops = 1000000;33 size_t loops = 40000; 34 34 35 size_t allocSize = 1 030;35 size_t allocSize = 128 * 1024; 36 36 37 char* dummy1 = (char*)mbmalloc(allocSize);38 char* dummy2 = (char*)mbmalloc(allocSize);39 dummy2[0] = 'a';40 mbfree(dummy1, allocSize);41 42 37 while (--loops) { 43 38 char* object = (char*)mbmalloc(allocSize); -
trunk/PerformanceTests/MallocBench/MallocBench/big.cpp
r196955 r200060 45 45 46 46 size_t vmSize = 1ul * 1024 * 1024 * 1024; 47 size_t objectSizeMin = 4* 1024;48 size_t objectSizeMax = 64* 1024;47 size_t objectSizeMin = 8 * 1024; 48 size_t objectSizeMax = 128 * 1024; 49 49 if (commandLine.isParallel()) 50 50 vmSize /= cpuCount(); -
trunk/PerformanceTests/MallocBench/MallocBench/medium.cpp
r196955 r200060 45 45 46 46 size_t vmSize = 1ul * 1024 * 1024 * 1024; 47 size_t objectSizeMin = 2* 1024;47 size_t objectSizeMin = 1 * 1024; 48 48 size_t objectSizeMax = 8 * 1024; 49 49 if (commandLine.isParallel()) -
trunk/PerformanceTests/MallocBench/MallocBench/stress.cpp
r197175 r200060 125 125 const size_t heapSize = 100 * MB; 126 126 const size_t churnSize = .05 * heapSize; 127 const size_t churnCount = 100 0;127 const size_t churnCount = 100; 128 128 129 129 srandom(1); // For consistency between runs. -
trunk/PerformanceTests/MallocBench/MallocBench/stress_aligned.cpp
r198546 r200060 146 146 srandom(1); // For consistency between runs. 147 147 148 size_t limit = 0x0000 07fffffffffful;148 size_t limit = 0x00001ffffffffffful; 149 149 150 150 for (size_t size = 0; size < limit; size = std::max(size, sizeof(void*)) * 2) { … … 156 156 } 157 157 158 for (size_t alignment = sizeof(void*); alignment < limit / 4; alignment *= 2) {158 for (size_t alignment = sizeof(void*); alignment < limit; alignment *= 2) { 159 159 void* object = mbmemalign(alignment, size + 128); 160 160 if (reinterpret_cast<uintptr_t>(object) & (alignment - 1)) -
trunk/PerformanceTests/MallocBench/run-malloc-benchmarks
r196955 r200060 7 7 $productDir = `perl -e 'use lib \"#{$binDir}/../../Tools/Scripts\"; use webkitdirs; print productDir()'` 8 8 9 $benchmarks = [9 $benchmarks_all = [ 10 10 # Single-threaded benchmarks. 11 11 "churn", … … 55 55 ] 56 56 57 $benchmarks_memory = [ 58 "facebook", 59 "reddit", 60 "flickr", 61 "theverge", 62 "nimlang" 63 ] 64 65 $benchmarks_memory_warning = [ 66 "reddit_memory_warning --runs 0", 67 "flickr_memory_warning --runs 0", 68 "theverge_memory_warning --runs 0", 69 ] 70 71 $benchmarks = $benchmarks_all 57 72 $heap = 0 58 73 … … 199 214 GetoptLong.new( 200 215 ['--benchmark', GetoptLong::REQUIRED_ARGUMENT], 216 ['--memory', GetoptLong::NO_ARGUMENT], 217 ['--memory_warning', GetoptLong::NO_ARGUMENT], 201 218 ['--heap', GetoptLong::REQUIRED_ARGUMENT], 202 219 ['--help', GetoptLong::NO_ARGUMENT], … … 206 223 when '--benchmark' 207 224 $benchmarks = [ arg ] 225 when '--memory' 226 $benchmarks = $benchmarks_memory 227 when '--memory_warning' 228 $benchmarks = $benchmarks_memory_warning 208 229 when '--heap' 209 230 $heap = arg … … 275 296 276 297 executionTime[-1].push(TimeStat.new(benchmark, splitOutput[1])) 277 peakMemory[-1].push(PeakMemoryStat.new(benchmark, splitOutput.length > 3 ? splitOutput[ 3] : "0"))278 memoryAtEnd[-1].push(MemoryStat.new(benchmark, splitOutput.length > 2 ? splitOutput[ 2] : "0"))298 peakMemory[-1].push(PeakMemoryStat.new(benchmark, splitOutput.length > 3 ? splitOutput[2] : "0")) 299 memoryAtEnd[-1].push(MemoryStat.new(benchmark, splitOutput.length > 2 ? splitOutput[3] : "0")) 279 300 } 280 301 }
Note: See TracChangeset
for help on using the changeset viewer.