1<!DOCTYPE html>
2<!-- Copyright 2013 the V8 project authors. All rights reserved.
3
4Redistribution and use in source and binary forms, with or without
5modification, are permitted provided that the following conditions are
6met:
7    * Redistributions of source code must retain the above copyright
8      notice, this list of conditions and the following disclaimer.
9    * Redistributions in binary form must reproduce the above
10      copyright notice, this list of conditions and the following
11      disclaimer in the documentation and/or other materials provided
12      with the distribution.
13    * Neither the name of Google Inc. nor the names of its
14      contributors may be used to endorse or promote products derived
15      from this software without specific prior written permission.
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
27
28<html lang="en-us">
29<head>
30  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
31  <title>V8 profile log plotter</title>
32  <link rel="stylesheet" type="text/css" href="profviz.css">
33  <script src="profviz.js"></script>
34</head>
35
36<body onload="onload()">
37  <div id="content">
38
39  <img src="" id="plot" type="image/svg+xml" class="display"
40      width="1200" height="600" class="float-right"/>
41
42  <textarea id="prof" class="display" disabled=true></textarea>
43  <br/>
44
45  <table width="1200">
46    <tr>
47      <td width="330">
48        <button id="start" onclick="start()">
49          Start
50        </button>
51        <button id="reset" onclick="ui.reset(); worker.reset();">
52          Reset
53        </button>
54        <button id="toggledisplay" onclick="ui.toggle();">
55          Show profile
56        </button>
57      </td>
58      <td width="220">
59        <input type="file" id="file" onchange="ui.reset();"/>
60      </td>
61      <td width="300">
62      <label title="You can manually choose the range
63to plot only part of the log file.">
64        <span class="tooltip">Range</span>:
65      </label>
66      <input type="text" id="range_start" class="range"/>
67      <label>to</label>
68      <input type="text" id="range_end" class="range"/>
69      </td>
70      <td width="350">
71        <label title="We model profiling overhead by accounting a constant
72execution delay to each log entry. Adjust to better suit
73your computer's performance.">
74          <span class="tooltip">Delay per log entry</span>:
75        </label>
76        <input type="text" id="distortion" class="range" value="4500"/>
77        <label>picoseconds</label>
78      </td>
79    </tr>
80  </table>
81
82  <br/>
83  <textarea class="log" id="log" rows="8" disabled=true></textarea>
84
85  <div class="text">
86    <h1>
87      <a href="javascript:ui.info('instructions');" class="unroll">
88        Instructions
89      </a>
90    </h1>
91    <div id="instructions">
92    <ol>
93      <li>
94        Run V8 with
95        <span class="tt">--prof --log-timer-events</span>,
96        or alternatively,<br/>
97        Chrome with
98        <span class="tt">
99          --no-sandbox --js-flags="--prof --log-timer-events"
100        </span> to produce <span class="tt">v8.log</span>.
101      </li>
102      <li>
103        Open
104        <span class="tt">v8.log</span>
105        on this page. Don't worry, it won't be uploaded anywhere.
106      </li>
107      <li>
108        Click "Start" to start number crunching. This will take a while.
109      </li>
110      <li>
111        Click "Show plot/profile" to switch between the statistical profile and
112        the timeline plot.<br/>
113        C++ items are missing in the statistical profile because symbol
114        information is not available.<br>
115        Consider using the
116        <a href="https://code.google.com/p/v8/wiki/V8Profiler">
117          command-line utility
118        </a> instead.
119      </li>
120    </ol>
121    If you expect multiple V8 instances to run concurrently, for example
122    with several tabs in Chrome,<br/>
123    add the V8 flag <span class="tt">--logfile=v8.%p.log</span>
124    so that each instance writes to its own log file.
125    </div>
126  </div>
127
128  <div class="text">
129    <h1>
130      <a href="javascript:ui.info('credits');" class="unroll">
131        Credits
132      </a>
133    </h1>
134    <div id="credits">
135    <ul>
136      <li>
137        Christian Huettig for the
138        <a href="http://gnuplot.respawned.com/">Javascript port</a>
139        of Gnuplot 4.6.3.
140      </li>
141      <li>
142        The
143        <a href="https://github.com/kripken/emscripten">Emscripten compiler</a>
144        that made the port possible.
145      </li>
146      <li>
147        The <a href="http://www.gnuplot.info/">Gnuplot project</a>.
148      </li>
149      <li>
150        The <a href="https://developers.google.com/v8/">V8 project</a>.
151      </li>
152    </ul>
153    </div>
154  </div>
155
156</div>
157</body>
158</html>
159