Commit 6b6b89ac authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[tools/perf] Add CodeAndMetadata metrics to v8_browsing benchmarks and add Ignition variants

Adds CodeAndMetadata measurements to the v8_browsing telemetry benchmarks.
Modifes the memory dumper to dump these stats on light dumps, if requested.
Also adds an Ignition variant for v8_browsing benchmarks.

BUG=v8:4280,v8:5019
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.perf:android_s5_perf_cq;master.tryserver.chromium.perf:linux_perf_cq;master.tryserver.chromium.perf:mac_retina_perf_cq;

Review-Url: https://codereview.chromium.org/2257173003
Cr-Commit-Position: refs/heads/master@{#414439}
parent a0b90fd7
......@@ -180,6 +180,9 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics(
auto* heap_spaces_dump =
process_memory_dump->CreateAllocatorDump(space_name_prefix);
// Dump statistics related to code and bytecode if requested.
DumpCodeStatistics(heap_spaces_dump, isolate_holder_);
// Dump object statistics only for detailed dumps.
if (args.level_of_detail !=
base::trace_event::MemoryDumpLevelOfDetail::DETAILED) {
......@@ -230,9 +233,6 @@ void V8IsolateMemoryDumpProvider::DumpHeapStatistics(
process_memory_dump->CreateAllocatorDump(object_name_prefix)->guid(),
heap_spaces_dump->guid());
}
// Dump statistics related to code and bytecode if requested.
DumpCodeStatistics(heap_spaces_dump, isolate_holder_);
}
} // namespace gin
......@@ -4,6 +4,7 @@
import re
from benchmarks import v8_helper
from core import perf_benchmark
from telemetry import benchmark
from telemetry.timeline import chrome_trace_config
......@@ -47,6 +48,10 @@ class _V8BrowsingBenchmark(perf_benchmark.PerfBenchmark):
'renderer.scheduler',
'v8',
'webkit.console',
# TODO(crbug.com/616441, primiano): Remove this temporary workaround,
# which enables memory-infra V8 code stats in V8 code size benchmarks
# only (to not slow down detailed memory dumps in other benchmarks).
'disabled-by-default-memory-infra.v8.code_stats',
]
options = timeline_based_measurement.Options(
chrome_trace_category_filter.ChromeTraceCategoryFilter(
......@@ -64,7 +69,7 @@ class _V8BrowsingBenchmark(perf_benchmark.PerfBenchmark):
@classmethod
def Name(cls):
return 'v8.browsing_%s' % cls.PLATFORM
return 'v8.browsing_%s%s' % (cls.PLATFORM, cls.TEST_SUFFIX)
@classmethod
def ValueCanBeAddedPredicate(cls, value, is_first_result):
......@@ -81,8 +86,7 @@ class _V8BrowsingBenchmark(perf_benchmark.PerfBenchmark):
return True
class V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark):
PLATFORM = 'desktop'
class _V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark):
@classmethod
def ShouldDisable(cls, possible_browser):
......@@ -93,10 +97,41 @@ class V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark):
return possible_browser.platform.GetDeviceTypeName() != 'Desktop'
@benchmark.Disabled('reference') # http://crbug.com/628631
class V8MobileBrowsingBenchmark(_V8BrowsingBenchmark):
PLATFORM = 'mobile'
class _V8MobileBrowsingBenchmark(_V8BrowsingBenchmark):
@classmethod
def ShouldDisable(cls, possible_browser):
return possible_browser.platform.GetDeviceTypeName() == 'Desktop'
class V8DesktopBrowsingBenchmark(_V8DesktopBrowsingBenchmark):
PLATFORM = 'desktop'
TEST_SUFFIX = ''
@benchmark.Disabled('reference') # http://crbug.com/628631
class V8MobileBrowsingBenchmark(_V8MobileBrowsingBenchmark):
PLATFORM = 'mobile'
TEST_SUFFIX = ''
class V8DesktopIgnitionBrowsingBenchmark(_V8DesktopBrowsingBenchmark):
PLATFORM = 'desktop'
TEST_SUFFIX = '_ignition'
def SetExtraBrowserOptions(self, options):
super(V8DesktopIgnitionBrowsingBenchmark, self).SetExtraBrowserOptions(
options)
v8_helper.EnableIgnition(options)
@benchmark.Disabled('reference') # http://crbug.com/628631
class V8MobileIgnitionBrowsingBenchmark(_V8MobileBrowsingBenchmark):
PLATFORM = 'mobile'
TEST_SUFFIX = '_ignition'
def SetExtraBrowserOptions(self, options):
super(V8MobileIgnitionBrowsingBenchmark, self).SetExtraBrowserOptions(
options)
v8_helper.EnableIgnition(options)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment