Commit 1074e1f5 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix the xrange calculation of the V8 timeline plot

Currently an xrange is calculated by V8.Execution. This would be fine for JavaScript benchmarks in which everything happens inside of V8.Execution. On the other hand, in Chrome profiling, events can happen outside of V8.Execution. To visualize such outside events, we need to calculate an xrange so that the xrange covers all events.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11973028
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 84ae8d31
......@@ -276,13 +276,15 @@ function FindPlotRange() {
if (start_found && end_found) return;
var execution_ranges = kExecutionEvent.ranges;
for (var i = 0; i < execution_ranges.length; i++) {
if (execution_ranges[i].start < xrange_start && !start_found) {
xrange_start = execution_ranges[i].start;
}
if (execution_ranges[i].end > xrange_end && !end_found) {
xrange_end = execution_ranges[i].end;
for (name in TimerEvents) {
var ranges = TimerEvents[name].ranges;
for (var i = 0; i < ranges.length; i++) {
if (ranges[i].start < xrange_start && !start_found) {
xrange_start = ranges[i].start;
}
if (ranges[i].end > xrange_end && !end_found) {
xrange_end = ranges[i].end;
}
}
}
......
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