1<!doctype html>
2<!--
3  -- Copyright 2014 The Chromium Authors. All rights reserved.
4  -- Use of this source code is governed by a BSD-style license that can be
5  -- found in the LICENSE file.
6  -->
7<html lang="en-us">
8<head>
9  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
10  <title>Memory Inspector</title>
11  <link href='//fonts.googleapis.com/css?family=Coda' rel='stylesheet' type='text/css'>
12  <link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/flick/jquery-ui.css" rel="stylesheet">
13  <link href="/css/mmap.css" rel="stylesheet" type="text/css">
14  <link href="/css/nheap.css" rel="stylesheet" type="text/css">
15  <link href="/css/processes.css" rel="stylesheet" type="text/css">
16  <link href="/css/profiler.css" rel="stylesheet" type="text/css">
17  <link href="/css/rootUi.css" rel="stylesheet" type="text/css">
18  <link href="/css/settings.css" rel="stylesheet" type="text/css">
19  <link href="/css/storage.css" rel="stylesheet" type="text/css">
20  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
21  <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
22  <script src="//www.google.com/jsapi"></script>
23  <script type="text/javascript">
24    google.load('visualization', '1',
25                { packages: ['corechart', 'table', 'orgchart', 'treemap'] });
26  </script>
27  <script src="/js/devices.js"></script>
28  <script src="/js/mmap.js"></script>
29  <script src="/js/nheap.js"></script>
30  <script src="/js/processes.js"></script>
31  <script src="/js/profiler.js"></script>
32  <script src="/js/rootUi.js"></script>
33  <script src="/js/settings.js"></script>
34  <script src="/js/storage.js"></script>
35  <script src="/js/timers.js"></script>
36  <script src="/js/webservice.js"></script>
37</head>
38<body>
39  <div id="wrapper">
40    <h1>Memory Inspector</h1>
41    <div id="tabs">
42      <ul>
43        <li><a href="#tabs-ps">Processes</a></li>
44        <li><a href="#tabs-prof">Profiler</a></li>
45        <li><a href="#tabs-mm">Memory maps table</a></li>
46        <li><a href="#tabs-nheap">Native S.Traces</a></li>
47        <li><a href="#tabs-storage">Archived traces</a></li>
48        <li><a href="#tabs-settings">Settings</a></li>
49      </ul>
50
51      <div id="tabs-ps">
52        <div>
53          Device:
54          <select id="devices"></select>
55          <input type="button" id="refresh-devices" value="&#10226;">
56        </div>
57        <div id="device_tabs">
58          <ul>
59            <li><a href="#device_tabs-osstats">Device stats</a></li>
60            <li><a href="#device_tabs-procstats">Selected process stats</a></li>
61          </ul>
62          <div id="device_tabs-osstats">
63            <div id="os-mem_chart"></div>
64            <div id="os-cpu_chart"></div>
65          </div>
66          <div id="device_tabs-procstats">
67            <div id="proc-cpu_chart"></div>
68            <div id="proc-mem_chart"></div>
69          </div>
70        </div>
71
72        <div id="ps-table-wrapper">
73          <div id="ps-toolbar" class="ui-widget-header ui-corner-all">
74            <button id="ps-quick_snapshot">Quick snapshot</button>
75            <button id="ps-dump_mmaps">Dump mmaps</button>
76            <button id="ps-full_profile">Full profile</button>
77            <input type="checkbox" id="ps-show_all">
78            <label for="ps-show_all">Show all processes</label>
79          </div>
80          <div id="ps-table"></div>
81        </div>
82
83        <div id="ps-tracer-dialog" title="Trace process">
84          <div>
85            <label for="ps-tracer-process">Process</label>
86            <input type="text" id="ps-tracer-process" readonly class="text ui-widget-content">
87          </div>
88          <div>
89            <label for="ps-tracer-period">Period [s.]</label>
90            <input type="text" id="ps-tracer-period" value="20">
91          </div>
92          <div>
93            <label for="ps-tracer-snapshots">Num snapshots</label>
94            <input type="text" id="ps-tracer-snapshots" value="1">
95          </div>
96          <div>
97            <input type="checkbox" id="ps-tracer-bt" class="ui-widget-content">
98            <label for="ps-tracer-bt">Detailed (w/ backtraces)</label>
99          </div>
100        </div>
101      </div>
102
103      <div id="tabs-prof">
104        <header id="prof-options">
105          <span>
106            Metric:
107            <select id="prof-metric"></select>
108          </span>
109          <span>
110            Snapshot:
111            <div id="prof-time"></div>
112            T = <span id="prof-time_label">0</span> s.
113          </span>
114          <span>
115            Rules:
116            <label id="prof-ruleset"></label>
117          </span>
118        </header>
119        <div id="prof-tree_chart"></div>
120        <div id="prof-time_chart"></div>
121      </div>
122
123      <div id="tabs-mm">
124        <header>
125          <table id="mm-tools">
126            <tr>
127              <th colspan="3">
128                Data filters
129                <input type="button" id="mm-filter-clear" value="&#10226;">
130              </th>
131            </tr>
132            <tr>
133              <th>Filter</th>
134              <td>Prot: <input type="text" id="mm-filter-prot"></td>
135              <td>File: <input type="text" id="mm-filter-file"></td>
136            </tr>
137            <tr>
138              <th>Lookup</th>
139              <td>Addr: <input type="text" id="mm-lookup-addr"></td>
140              <td>Offset: <input type="text" id="mm-lookup-offset" readonly=""></td>
141            </tr>
142          </table>
143          <table id="mm-stats">
144            <tr>
145              <th>Totals</th>
146              <th>Priv Dirty [KB]</th>
147              <th>Priv Clean [KB]</th>
148              <th>Shared Dirty [KB]</th>
149              <th>Shared Clean [KB]</th>
150            </tr>
151            <tr>
152              <th>Shown</th>
153              <td><span id="mm-totals-priv-dirty">0</span></td>
154              <td><span id="mm-totals-priv-clean">0</span></td>
155              <td><span id="mm-totals-shared-dirty">0</span></td>
156              <td><span id="mm-totals-shared-clean">0</span></td>
157            </tr>
158            <tr>
159              <th>Selected</th>
160              <td><span id="mm-selected-priv-dirty">0</span></td>
161              <td><span id="mm-selected-priv-clean">0</span></td>
162              <td><span id="mm-selected-shared-dirty">0</span></td>
163              <td><span id="mm-selected-shared-clean">0</span></td>
164            </tr>
165          </table>
166        </header>
167        <div id="mm-table"></div>
168      </div>
169
170      <div id="tabs-nheap">
171        <div id="nheap-toolbar" class="ui-widget-header ui-corner-all">
172          <label>Total (allocated): </label>
173          <input type="text" id="nheap-total-allocated" values="0 KB" readonly>
174          <label>Total (resident): </label>
175          <input type="text" id="nheap-total-resident" values="0 KB" readonly>
176          <label>Selected (allocated): </label>
177          <input type="text" id="nheap-selected-allocated" values="0 KB" readonly>
178          <label>Selected (resident): </label>
179          <input type="text" id="nheap-selected-resident" values="0 KB" readonly>
180          <label>Filter: </label>
181          <input type="text" id="nheap-filter">
182        </div>
183        <div id="nheap-table"></div>
184      </div>
185
186      <div id="tabs-storage">
187        <div id="storage-toolbar" class="ui-widget-header ui-corner-all">
188          <label>Group:</label>
189          <button id="storage-profile">Profile</button>
190          <ul id="storage-profile-menu"></ul>
191          <label>Single snapshot:</label>
192          <button id="storage-dump-mmaps">Show memory maps</button>
193          <button id="storage-dump-nheap">Show native heap</button>
194        </div>
195        <div id="storage-table"></div>
196      </div>
197
198      <div id="tabs-settings">
199        <div id="settings-container">
200        </div>
201        <button id="settings-store">Save settings</button>
202      </div>
203    </div>
204  </div>
205
206  <div id="status_bar">
207    <div id="status_messages"></div>
208    <div id="progress_bar"><div id="progress_bar-label">Progress...</div></div>
209  </div>
210
211  <div id="android_provision_dialog" title="Warning: this might brick your device">
212    <p>
213      <span class="ui-icon ui-icon-alert" style="float:left;"></span>
214      Full heap profiling requires some modifications to the Android system
215      (preload a library into the Android Zygote).
216      <br>
217      This feature has currently been tested on Nexus devices running Android K
218      and L. On some other untested devices / Android releases this might end up
219      bricking the device.
220      <br>
221      <b>Use this feature only on development rooted phones.</b>
222      <br><br>
223      If something goes wrong these are the steps to restore your device:
224      <code>
225        $ adb root && adb wait-for-device && adb remount
226        $ adb shell mv /system/bin/app_process.real /system/bin/app_process
227        $ adb reboot
228      </code>
229    </p>
230  </div>
231
232  <div id="js_loading_banner">
233  Loading JavaScript content. If you see this message something has probably gone wrong. Check JS console.
234  </div>
235
236</body>
237</html>