diff options
author | ernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-05 22:03:06 +0000 |
---|---|---|
committer | ernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-05 22:03:06 +0000 |
commit | 8758b27b6da1c7752efc3c66146dd70ed48c338c (patch) | |
tree | edc5d3df6e5fad255a2269f849fddc6a85852e3e /tools/perf | |
parent | 4e8c49a8a0f513c8a35040d0f2b7d7420892141e (diff) | |
download | chromium_src-8758b27b6da1c7752efc3c66146dd70ed48c338c.zip chromium_src-8758b27b6da1c7752efc3c66146dd70ed48c338c.tar.gz chromium_src-8758b27b6da1c7752efc3c66146dd70ed48c338c.tar.bz2 |
telemetry: Analyze events only from Renderer process in rasterize_and_record.
- rasterize_and_record got confused on Android because of UpdateLayer events
from the browser compositor.
- Fixed by analyzing events only from the Renderer process in the benchmark.
R=tengs@chromium.org,tomhudson@chromium.org
BUG=265907
Review URL: https://chromiumcodereview.appspot.com/21938005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215701 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/measurements/rasterize_and_record.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/tools/perf/measurements/rasterize_and_record.py b/tools/perf/measurements/rasterize_and_record.py index 600774e..0cab742e 100644 --- a/tools/perf/measurements/rasterize_and_record.py +++ b/tools/perf/measurements/rasterize_and_record.py @@ -19,17 +19,21 @@ class StatsCollector(object): self.total_best_record_time = 0 self.total_pixels_rasterized = 0 self.total_pixels_recorded = 0 - - def FindTriggerTime(self): - measure_next_frame_event = self.timeline.GetAllEventsOfName( - "measureNextFrame") - if len(measure_next_frame_event) == 0: + self.trigger_event = self.FindTriggerEvent() + self.renderer_process = self.trigger_event.start_thread.parent + + def FindTriggerEvent(self): + events = [s for + s in self.timeline.GetAllEventsOfName( + 'measureNextFrame') + if s.parent_slice == None] + if len(events) != 1: raise LookupError, 'no measureNextFrame event found' - return measure_next_frame_event[0].start + return events[0] def FindFrameNumber(self, trigger_time): start_event = None - for event in self.timeline.GetAllEventsOfName( + for event in self.renderer_process.IterAllSlicesOfName( "LayerTreeHost::UpdateLayers"): if event.start > trigger_time: if start_event == None: @@ -42,7 +46,7 @@ class StatsCollector(object): return start_event.args["source_frame_number"] def GatherRasterizeStats(self, frame_number): - for event in self.timeline.GetAllEventsOfName( + for event in self.renderer_process.IterAllSlicesOfName( "RasterWorkerPoolTaskImpl::RunRasterOnThread"): if event.args["data"]["source_frame_number"] == frame_number: for raster_loop_event in event.GetAllSubSlicesOfName("RasterLoop"): @@ -59,7 +63,8 @@ class StatsCollector(object): self.total_best_rasterize_time += best_rasterize_time def GatherRecordStats(self, frame_number): - for event in self.timeline.GetAllEventsOfName("PictureLayer::Update"): + for event in self.renderer_process.IterAllSlicesOfName( + "PictureLayer::Update"): if event.args["source_frame_number"] == frame_number: for record_loop_event in event.GetAllSubSlicesOfName("RecordLoop"): best_record_time = float('inf') @@ -74,7 +79,7 @@ class StatsCollector(object): self.total_best_record_time += best_record_time def GatherRenderingStats(self): - trigger_time = self.FindTriggerTime() + trigger_time = self.trigger_event.start frame_number = self.FindFrameNumber(trigger_time) self.GatherRasterizeStats(frame_number) self.GatherRecordStats(frame_number) |