From c0593a1fc8519a8e0eaf3627fa12bcf4ba80e8a8 Mon Sep 17 00:00:00 2001 From: yangguo Date: Fri, 10 Apr 2015 02:48:54 -0700 Subject: [PATCH] Add perf test configuration to track memory use of context and isolate. R=machenbach@chromium.org Review URL: https://codereview.chromium.org/1075143002 Cr-Commit-Position: refs/heads/master@{#27738} --- .gitignore | 1 + test/memory/Memory.json | 27 +++++++++++++++++++++++++++ tools/run_perf.py | 4 ++-- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 test/memory/Memory.json diff --git a/.gitignore b/.gitignore index cc42433..12dfbe8 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,7 @@ shell_g /test/benchmarks/kraken /test/benchmarks/octane /test/benchmarks/sunspider +/test/memory/snapshot.cc /test/mozilla/CHECKED_OUT_VERSION /test/mozilla/data /test/mozilla/data.old diff --git a/test/memory/Memory.json b/test/memory/Memory.json new file mode 100644 index 0000000..addaf73 --- /dev/null +++ b/test/memory/Memory.json @@ -0,0 +1,27 @@ +{ + "name": "Memory", + "run_count": 5, + "units": "bytes", + "path" : ["."], + "binary": "mksnapshot", + "flags": ["snapshot.cc", "--profile-deserialization"], + "main": "", + "tests": [ + { + "name": "ReservedMemoryIsolate", + "results_regexp": "(\\d+) bytes per isolate$" + }, + { + "name": "ReservedMemoryContext", + "results_regexp": "(\\d+) bytes per context$" + }, + { + "name": "SnapshotSizeStartup", + "results_regexp": "(\\d+) bytes for startup$" + }, + { + "name": "SnapshotSizeStartup", + "results_regexp": "(\\d+) bytes for context$" + } + ] +} diff --git a/tools/run_perf.py b/tools/run_perf.py index f771079..84cc712 100755 --- a/tools/run_perf.py +++ b/tools/run_perf.py @@ -411,8 +411,8 @@ def MakeGraph(suite, arch, parent): if isinstance(parent, Runnable): # Below a runnable can only be traces. return Trace(suite, parent, arch) - elif suite.get("main"): - # A main file makes this graph runnable. + elif suite.get("main") is not None: + # A main file makes this graph runnable. Empty strings are accepted. if suite.get("tests"): # This graph has subgraphs (traces). return Runnable(suite, parent, arch) -- 2.7.4