2020-06-29 19:21:56 +00:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<!-- Copyright 2020 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>Indicium</title>
|
|
|
|
|
<!-- <link rel="icon" type="image/png" href="/images/favicon.png"/> -->
|
2020-10-23 11:21:18 +00:00
|
|
|
|
|
|
|
|
|
<link rel="modulepreload" href="./helper.mjs" >
|
2020-11-18 15:51:07 +00:00
|
|
|
|
<link rel="modulepreload" href="./view/log-file-reader.mjs" >
|
|
|
|
|
<link rel="modulepreload" href="./view/helper.mjs" >
|
|
|
|
|
<link rel="preload" href="./view/log-file-reader-template.html" as="fetch" crossorigin="anonymous">
|
2020-10-23 11:21:18 +00:00
|
|
|
|
<script type="module">
|
|
|
|
|
// Force instatiating the log-reader before anything else.
|
2020-11-18 15:51:07 +00:00
|
|
|
|
import "./view/log-file-reader.mjs";
|
2020-10-23 11:21:18 +00:00
|
|
|
|
// Delay loading of the main App
|
|
|
|
|
(async function() {
|
|
|
|
|
let module = await import('./index.mjs');
|
2020-12-03 17:48:45 +00:00
|
|
|
|
globalThis.app = new module.App();
|
2020-10-23 11:21:18 +00:00
|
|
|
|
})();
|
|
|
|
|
</script>
|
|
|
|
|
|
2020-07-13 18:02:52 +00:00
|
|
|
|
<link rel="stylesheet" type="text/css" href="./index.css">
|
2020-08-13 12:55:19 +00:00
|
|
|
|
<style>
|
|
|
|
|
.theme-switch-wrapper {
|
2020-08-28 04:18:59 +00:00
|
|
|
|
display: inline-block;
|
2020-08-13 12:55:19 +00:00
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.theme-switch {
|
|
|
|
|
display: inline-block;
|
2020-10-10 18:02:26 +00:00
|
|
|
|
height: 16px;
|
2020-08-13 12:55:19 +00:00
|
|
|
|
position: relative;
|
2020-10-10 18:02:26 +00:00
|
|
|
|
width: 38px;
|
2020-08-13 12:55:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.theme-switch input {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.slider {
|
|
|
|
|
background-color: var(--primary-color);
|
|
|
|
|
bottom: 0;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
left: 0;
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 0;
|
2020-10-10 18:02:26 +00:00
|
|
|
|
border-radius: 34px;
|
2020-08-13 12:55:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.slider:before {
|
|
|
|
|
background-color: var(--surface-color);
|
2020-10-10 18:02:26 +00:00
|
|
|
|
position: absolute;
|
|
|
|
|
height: 10px;
|
|
|
|
|
width: 10px;
|
|
|
|
|
bottom: 3px;
|
2020-08-13 12:55:19 +00:00
|
|
|
|
content: "";
|
|
|
|
|
left: 4px;
|
2020-10-10 18:02:26 +00:00
|
|
|
|
border-radius: 50%;
|
2020-08-13 12:55:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input:checked+.slider:before {
|
2020-10-10 18:02:26 +00:00
|
|
|
|
transform: translateX(20px);
|
2020-08-13 12:55:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#container.initial {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-19 16:48:36 +00:00
|
|
|
|
#timeline-panel {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-07 08:44:54 +00:00
|
|
|
|
.panels {
|
2020-08-13 12:55:19 +00:00
|
|
|
|
display: grid;
|
2020-08-14 16:00:55 +00:00
|
|
|
|
align-content: center;
|
2020-10-19 16:48:36 +00:00
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
|
|
|
|
|
grid-auto-flow: row dense;
|
|
|
|
|
grid-gap: 10px;
|
|
|
|
|
margin-top: 10px;
|
2020-08-13 12:55:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-10-10 18:02:26 +00:00
|
|
|
|
dt::after {
|
|
|
|
|
content: ":";
|
2020-09-16 17:47:01 +00:00
|
|
|
|
}
|
2020-08-13 12:55:19 +00:00
|
|
|
|
</style>
|
2020-06-29 19:21:56 +00:00
|
|
|
|
</head>
|
2020-08-13 12:55:19 +00:00
|
|
|
|
|
2020-06-29 19:21:56 +00:00
|
|
|
|
<body>
|
2020-11-26 14:07:19 +00:00
|
|
|
|
<tool-tip id="tool-tip"></tool-tip>
|
|
|
|
|
|
2020-10-10 18:02:26 +00:00
|
|
|
|
<section id="file-reader">
|
|
|
|
|
<log-file-reader id="log-file-reader"></log-file-reader>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section id="container" class="initial">
|
|
|
|
|
<timeline-panel id="timeline-panel">
|
2020-12-07 08:44:54 +00:00
|
|
|
|
<timeline-track id="map-track" title="Map"></timeline-track>
|
|
|
|
|
<timeline-track id="ic-track" title="IC"></timeline-track>
|
|
|
|
|
<timeline-track id="deopt-track" title="Deopt"></timeline-track>
|
|
|
|
|
<timeline-track id="code-track" title="Code"></timeline-track>
|
|
|
|
|
<timeline-track id="api-track" title="API"></timeline-track>
|
2020-10-10 18:02:26 +00:00
|
|
|
|
</timeline-panel>
|
2020-12-07 08:44:54 +00:00
|
|
|
|
|
2020-10-19 16:48:36 +00:00
|
|
|
|
<div class="panels">
|
|
|
|
|
<map-panel id="map-panel"></map-panel>
|
2020-12-07 08:44:54 +00:00
|
|
|
|
<list-panel id="ic-list" title="ICs">
|
|
|
|
|
<div id="legend">
|
|
|
|
|
<h3>Legend</h3>
|
|
|
|
|
<dl>
|
|
|
|
|
<dt>0</dt>
|
|
|
|
|
<dd>uninitialized</dd>
|
|
|
|
|
<dt>X</dt>
|
|
|
|
|
<dd>no feedback</dd>
|
|
|
|
|
<dt>1</dt>
|
|
|
|
|
<dd>monomorphic</dd>
|
|
|
|
|
<dt>^</dt>
|
|
|
|
|
<dd>recompute handler</dd>
|
|
|
|
|
<dt>P</dt>
|
|
|
|
|
<dd>polymorphic</dd>
|
|
|
|
|
<dt>N</dt>
|
|
|
|
|
<dd>megamorphic</dd>
|
|
|
|
|
<dt>G</dt>
|
|
|
|
|
<dd>generic</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</div>
|
|
|
|
|
</list-panel>
|
|
|
|
|
<list-panel id="map-list" title="Maps"></list-panel>
|
|
|
|
|
<list-panel id="deopt-list" title="Deopts"></list-panel>
|
|
|
|
|
<list-panel id="code-list" title="Code"></list-panel>
|
|
|
|
|
<list-panel id="api-list" title="API"></list-panel>
|
2020-10-19 16:48:36 +00:00
|
|
|
|
<source-panel id="source-panel"></source-panel>
|
2020-12-01 19:37:17 +00:00
|
|
|
|
<code-panel id="code-panel"></code-panel>
|
2020-08-28 04:18:59 +00:00
|
|
|
|
</div>
|
2020-10-10 18:02:26 +00:00
|
|
|
|
</section>
|
|
|
|
|
|
2020-10-19 16:48:36 +00:00
|
|
|
|
<div class="panels">
|
|
|
|
|
<section id="settings" class="panel">
|
|
|
|
|
<h2>Settings</h2>
|
|
|
|
|
<span>Theme:</span>
|
|
|
|
|
<div class="theme-switch-wrapper">
|
|
|
|
|
<label class="theme-switch" for="theme-switch-input">
|
|
|
|
|
<input type="checkbox" id="theme-switch-input" />
|
|
|
|
|
<div class="slider"></div>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section id="instructions" class="panel">
|
|
|
|
|
<h2>Instructions</h2>
|
|
|
|
|
<p>
|
|
|
|
|
Unified web interface to analyse runtime information stored in the v8 log.
|
|
|
|
|
</p>
|
|
|
|
|
For generating a v8.log file from <a href="https://v8.dev/docs/build">d8</a>:
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
2020-12-01 19:37:17 +00:00
|
|
|
|
<code>/path/do/d8 $LOG_FLAGS $FILE</code>
|
2020-10-19 16:48:36 +00:00
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
For generating a v8.log file from Chrome:
|
|
|
|
|
<ul>
|
|
|
|
|
<li>
|
|
|
|
|
<code>/path/to/chrome --user-data-dir=/var/tmp/chr$RANDOM --no-sandbox
|
2020-12-01 19:37:17 +00:00
|
|
|
|
--js-flags='$LOG_FLAGS’
|
2020-10-19 16:48:36 +00:00
|
|
|
|
$WEBSITE_URL</code>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
2020-12-01 19:37:17 +00:00
|
|
|
|
<h3><code>LOG_FLAGS</code>:</h3>
|
2020-10-19 16:48:36 +00:00
|
|
|
|
<dl class="d8-options">
|
2020-12-01 19:37:17 +00:00
|
|
|
|
<dt>
|
|
|
|
|
<a href="https://source.chromium.org/search?q=FLAG_log_all">
|
|
|
|
|
<code>--log-all</code>
|
|
|
|
|
</a>
|
|
|
|
|
</dt>
|
|
|
|
|
<dd>Enable all V8 logging options.</dd>
|
|
|
|
|
<dt>
|
|
|
|
|
<a href="https://source.chromium.org/search?q=FLAG_trace_maps">
|
|
|
|
|
<code>--trace-maps</code>
|
|
|
|
|
</a>
|
|
|
|
|
</dt>
|
2020-12-03 17:48:45 +00:00
|
|
|
|
<dd>
|
|
|
|
|
Log<a href="https://v8.dev/blog/fast-properties">Maps</a>
|
|
|
|
|
</dd>
|
2020-12-01 19:37:17 +00:00
|
|
|
|
<dt>
|
|
|
|
|
<a href="https://source.chromium.org/search?q=FLAG_trace_ic">
|
|
|
|
|
<code>--trace-ic</code>
|
|
|
|
|
</a>
|
|
|
|
|
</dt>
|
2020-12-03 17:48:45 +00:00
|
|
|
|
<dd>
|
|
|
|
|
Log <a href="https://mathiasbynens.be/notes/shapes-ics">ICs</a>
|
|
|
|
|
</dd>
|
2020-12-01 19:37:17 +00:00
|
|
|
|
<dt>
|
|
|
|
|
<a href="https://source.chromium.org/search?q=FLAG_log_source_code">
|
|
|
|
|
<code>--log-source-code</code>
|
|
|
|
|
</a>
|
|
|
|
|
</dt>
|
2020-10-19 16:48:36 +00:00
|
|
|
|
<dd>Log source code</dd>
|
2020-12-01 19:37:17 +00:00
|
|
|
|
<dt>
|
|
|
|
|
<a href="https://source.chromium.org/search?q=FLAG_log_code_disassemble">
|
|
|
|
|
<code>--log-code-disassemble</code>
|
|
|
|
|
</a>
|
|
|
|
|
</dt>
|
|
|
|
|
<dd>Log detailed generated generated code</dd>
|
2020-12-03 17:48:45 +00:00
|
|
|
|
<dt>
|
|
|
|
|
<a href="https://source.chromium.org/search?q=FLAG_log_api">
|
|
|
|
|
<code>--log-api</code>
|
|
|
|
|
</a>
|
|
|
|
|
</dt>
|
|
|
|
|
<dd>Log various API uses.</dd>
|
2020-10-19 16:48:36 +00:00
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h3>Keyboard Shortcuts for Navigation</h3>
|
|
|
|
|
<dl>
|
|
|
|
|
<dt><kbd>SHIFT</kbd> + <kbd>Arrow Up</kbd></dt>
|
|
|
|
|
<dd>Follow Map transition forward (first child)</dd>
|
|
|
|
|
|
|
|
|
|
<dt><kbd>SHIFT</kbd> + <kbd>Arrow Down</kbd></dt>
|
|
|
|
|
<dd>Follow Map transition backwards</dd>
|
|
|
|
|
|
|
|
|
|
<dt><kbd>Arrow Up</kbd></dt>
|
|
|
|
|
<dd>Go to previous Map chunk</dd>
|
|
|
|
|
|
|
|
|
|
<dt><kbd>Arrow Down</kbd></dt>
|
|
|
|
|
<dd>Go to next Map in chunk</dd>
|
|
|
|
|
|
|
|
|
|
<dt><kbd>Arrow Left</kbd></dt>
|
|
|
|
|
<dd>Go to previous chunk</dd>
|
|
|
|
|
|
|
|
|
|
<dt><kbd>Arrow Right</kbd></dt>
|
|
|
|
|
<dd>Go to next chunk</dd>
|
|
|
|
|
|
|
|
|
|
<dt><kbd>+</kbd></dt>
|
|
|
|
|
<dd>Timeline zoom in</dd>
|
|
|
|
|
|
|
|
|
|
<dt><kbd>-</kbd></dt>
|
|
|
|
|
<dd>Timeline zoom out</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
2020-06-29 19:21:56 +00:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|