v8/tools/profview/index.html
Bret Sepulveda b9cb78a705 profview: View source code of functions with samples inline.
If profiling is done with --log-source-code profview will now display
a "View source" link for each function in the tree view. Clicking this
will show a new source viewer, with sampled lines highlighted. See the
associated bug for screenshots.

This patch also fixes a bug in the profiler where the source info of
only the first code object for each function would be logged, and
includes some refactoring.

Bug: v8:6240
Change-Id: Ib96a9cfc54543d0dc9bef4657cdeb96ce28b223c
Reviewed-on: https://chromium-review.googlesource.com/1194231
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55542}
2018-08-31 11:32:33 +00:00

120 lines
2.5 KiB
HTML

<!DOCTYPE html>
<!-- Copyright 2017 the V8 project authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>V8 Tick Processor</title>
<link rel="stylesheet" href="profview.css">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<script src="profview.js"></script>
<script src="profile-utils.js"></script>
</head>
<body onLoad="main.onLoad();" onResize="main.onResize();">
<h3 style="margin-top: 2px;">
Chrome V8 profiling log processor
</h3>
<input type="file" id="fileinput" /><div id="source-status"></div>
<br>
<hr>
<div id="help">
Usage:
<br>
<br>
Record the profile:
<pre>
d8 --prof your-file.js
</pre>
Then process the file (this resolves C++ symbols and produces
a JSON file with the profile data):
<pre>
&lt;v8-dir>/tools/linux-tick-processor --preprocess v8.log > v8.json
</pre>
To view the profile, click the <i>Choose file</i> button above and choose
the file in the dialog box.
</div>
<div id="timeline" style="display : none">
<div>
<canvas id="timeline-canvas"/>
</div>
<table>
<tr id="timeline-legend">
</tr>
</table>
<div>
Current code object: <span id="timeline-currentCode"></span>
<button id="source-viewer-hide-button">Hide source</button>
</div>
<div>
<table id="source-viewer"> </table>
</div>
</div>
<br>
<div id="mode-bar" style="display : none">
</div>
<div id="calltree" style="display : none">
<br>
Attribution:
<select id="calltree-attribution">
</select>
Top-level tree buckets:
<select id="calltree-categories">
</select>
Sort by:
<select id="calltree-sort">
</select>
<br>
<br>
<table id="calltree-table" class="calltree">
<thead>
<tr>
<th class="numeric">Time (incl)</th>
<th class="numeric">% of parent</th>
<th id="calltree-table-own-time-header" class="numeric">Own time</th>
<th>Function/category</th>
<th class="numeric">Ticks</th>
<th id="calltree-table-own-ticks-header" class="numeric">Own ticks</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div id="summary" style="display : none">
</div>
<div id="function-details" style="display : none">
</div>
<p style="font-style:italic;">
<br>
<br>
<br>
Copyright the V8 Authors - Last change to this page: 2018/08/13
</p>
</body>
</html>