Skip to content

Commit

Permalink
[tools/perf] Add CodeAndMetadata metrics to v8_browsing benchmarks an…
Browse files Browse the repository at this point in the history
…d 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}
  • Loading branch information
rmcilroy authored and Commit bot committed Aug 25, 2016
1 parent a0b90fd commit 6b6b89a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 9 deletions.
6 changes: 3 additions & 3 deletions gin/v8_isolate_memory_dump_provider.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
47 changes: 41 additions & 6 deletions tools/perf/benchmarks/v8_browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -47,6 +48,10 @@ def CreateTimelineBasedMeasurementOptions(self):
'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(
Expand All @@ -64,7 +69,7 @@ def CreateStorySet(self, options):

@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):
Expand All @@ -81,8 +86,7 @@ def ShouldTearDownStateAfterEachStoryRun(cls):
return True


class V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark):
PLATFORM = 'desktop'
class _V8DesktopBrowsingBenchmark(_V8BrowsingBenchmark):

@classmethod
def ShouldDisable(cls, possible_browser):
Expand All @@ -93,10 +97,41 @@ def ShouldDisable(cls, possible_browser):

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)

0 comments on commit 6b6b89a

Please sign in to comment.