Changeset 167505 in webkit


Ignore:
Timestamp:
Apr 18, 2014 1:46:18 PM (10 years ago)
Author:
ggaren@apple.com
Message:

MallocBench: removed the --measure-heap option
https://bugs.webkit.org/show_bug.cgi?id=131854

Reviewed by Sam Weinig.

As of <https://bugs.webkit.org/show_bug.cgi?id=131661>, measuring the
heap is fast, so there's no reason to disable it.

  • MallocBench/MallocBench/Benchmark.cpp:

(Benchmark::Benchmark):
(Benchmark::run):
(Benchmark::printReport):

  • MallocBench/MallocBench/Benchmark.h:
  • MallocBench/MallocBench/CommandLine.cpp:

(CommandLine::printUsage):

  • MallocBench/MallocBench/CommandLine.h:

(CommandLine::heapSize):
(CommandLine::measureHeap): Deleted.

  • MallocBench/MallocBench/main.cpp:

(main):

Location:
trunk/PerformanceTests
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r167407 r167505  
     12014-04-18  Geoffrey Garen  <ggaren@apple.com>
     2
     3        MallocBench: removed the --measure-heap option
     4        https://bugs.webkit.org/show_bug.cgi?id=131854
     5
     6        Reviewed by Sam Weinig.
     7
     8        As of <https://bugs.webkit.org/show_bug.cgi?id=131661>, measuring the
     9        heap is fast, so there's no reason to disable it.
     10
     11        * MallocBench/MallocBench/Benchmark.cpp:
     12        (Benchmark::Benchmark):
     13        (Benchmark::run):
     14        (Benchmark::printReport):
     15        * MallocBench/MallocBench/Benchmark.h:
     16        * MallocBench/MallocBench/CommandLine.cpp:
     17        (CommandLine::printUsage):
     18        * MallocBench/MallocBench/CommandLine.h:
     19        (CommandLine::heapSize):
     20        (CommandLine::measureHeap): Deleted.
     21        * MallocBench/MallocBench/main.cpp:
     22        (main):
     23
    1242014-04-16  Alexandru Chiculita  <achicu@adobe.com>
    225
  • trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.cpp

    r167292 r167505  
    120120}
    121121
    122 Benchmark::Benchmark(const string& benchmarkName, bool isParallel, bool measureHeap, size_t heapSize)
     122Benchmark::Benchmark(const string& benchmarkName, bool isParallel, size_t heapSize)
    123123    : m_benchmarkPair()
    124124    , m_elapsedTime()
    125125    , m_isParallel(isParallel)
    126126    , m_heapSize(heapSize)
    127     , m_measureHeap(measureHeap)
    128127{
    129128    const BenchmarkPair* benchmarkPair = std::find(
     
    183182    deallocateHeap(heap, m_heapSize, chunkSize, objectSize);
    184183   
    185     if (!m_measureHeap)
    186         return;
    187    
    188184    mbscavenge();
    189185    m_memory = currentMemoryBytes();
     
    195191
    196192    cout << "Time:       \t" << m_elapsedTime << "ms" << endl;
    197     if (!m_measureHeap)
    198         return;
    199 
    200193    cout << "Memory:     \t" << m_memory.resident / kB << "kB" << endl;
    201194    cout << "Peak Memory:\t" << m_memory.residentMax / kB << "kB" << endl;
  • trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.h

    r166667 r167505  
    6060    static Memory currentMemoryBytes();
    6161
    62     Benchmark(const std::string&, bool isParallel, bool measureHeap, size_t heapSize);
     62    Benchmark(const std::string&, bool isParallel, size_t heapSize);
    6363   
    6464    bool isValid() { return m_benchmarkPair; }
     
    7777    const BenchmarkPair* m_benchmarkPair;
    7878    bool m_isParallel;
    79     bool m_measureHeap;
    8079    size_t m_heapSize;
    8180
  • trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.cpp

    r166667 r167505  
    3333    {"parallel", no_argument, 0, 'p'},
    3434    {"heap", required_argument, 0, 'h'},
    35     {"measure-heap", no_argument, 0, 'm'},
    3635    {0, 0, 0, 0}
    3736};
     
    4241    , m_isParallel()
    4342    , m_heapSize()
    44     , m_measureHeap()
    4543{
    4644    int optionIndex = 0;
     
    6159                break;
    6260
    63             case 'm':
    64                 m_measureHeap = true;
    65                 break;
    66 
    6761            default:
    6862                break;
     
    7670    size_t pos = fullPath.find_last_of("/") + 1;
    7771    std::string program = fullPath.substr(pos);
    78     std::cout << "Usage: " << program << " --benchmark benchmark_name [ --parallel ] [ --measure-heap ] [ --heap MB ]" << std::endl;
     72    std::cout << "Usage: " << program << " --benchmark benchmark_name [ --parallel ] [ --heap MB ]" << std::endl;
    7973}
  • trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.h

    r166667 r167505  
    3434    bool isParallel() { return m_isParallel; }
    3535    size_t heapSize() { return m_heapSize; }
    36     bool measureHeap() { return m_measureHeap; }
    3736
    3837    void printUsage();
     
    4645    bool m_isParallel;
    4746    size_t m_heapSize;
    48     bool m_measureHeap;
    4947};
  • trunk/PerformanceTests/MallocBench/MallocBench/main.cpp

    r166667 r167505  
    4141    }
    4242
    43     Benchmark benchmark(commandLine.benchmarkName(), commandLine.isParallel(), commandLine.measureHeap(), commandLine.heapSize());
     43    Benchmark benchmark(commandLine.benchmarkName(), commandLine.isParallel(), commandLine.heapSize());
    4444    if (!benchmark.isValid()) {
    4545        cout << "Invalid benchmark: " << commandLine.benchmarkName() << endl << endl;
Note: See TracChangeset for help on using the changeset viewer.