• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html>
2<html>
3<head>
4  <meta charset="utf-8">
5  <title>{{.Title}}</title>
6  {{if not .Standalone}}{{template "css" .}}{{end}}
7  {{template "weblistcss" .}}
8  {{template "weblistjs" .}}
9</head>
10<body>{{"\n" -}}
11  {{/* emit different header in standalone mode */ -}}
12  {{if .Standalone}}{{"\n" -}}
13    <div class="legend">{{"" -}}
14      {{range $i, $e := .Legend -}}
15        {{if $i}}<br>{{"\n"}}{{end}}{{. -}}
16      {{end}}<br>Total: {{.Listing.Total -}}
17    </div>{{"" -}}
18  {{else -}}
19    {{template "header" .}}
20    <div id="content" class="source">{{"" -}}
21  {{end -}}
22
23  {{range .Listing.Files -}}
24    {{range .Funcs -}}
25      <h2>{{.Name}}</h2>{{"" -}}
26      <p class="filename">{{.File}}</p>{{"\n" -}}
27      <pre onClick="pprof_toggle_asm(event)">{{"\n" -}}
28        {{printf "  Total:  %10s %10s (flat, cum) %s" .Flat .Cumulative .Percent -}}
29        {{range .Lines -}}{{"\n" -}}
30          {{/* source line */ -}}
31          <span class=line>{{printf " %6d" .Line}}</span>{{" " -}}
32          <span class={{.HTMLClass}}>
33            {{- printf "  %10s %10s %8s  %s " .Flat .Cumulative "" .SrcLine -}}
34          </span>{{"" -}}
35
36          {{if .Instructions -}}
37            {{/* instructions for this source line */ -}}
38            <span class=asm>{{"" -}}
39            {{range .Instructions -}}
40              {{/* separate when we hit a new basic block */ -}}
41              {{if .NewBlock -}}{{printf " %8s %28s\n" "" "⋮"}}{{end -}}
42
43              {{/* inlined calls leading to this instruction */ -}}
44              {{range .InlinedCalls -}}
45                {{printf " %8s %10s %10s %8s  " "" "" "" "" -}}
46                <span class=inlinesrc>{{.SrcLine}}</span>{{" " -}}
47                <span class=unimportant>{{.FileBase}}:{{.Line}}</span>{{"\n" -}}
48              {{end -}}
49
50              {{if not .Synthetic -}}
51                {{/* disassembled instruction */ -}}
52                {{printf " %8s %10s %10s %8x: %s " "" .Flat .Cumulative .Address .Disasm -}}
53                <span class=unimportant>{{.FileLine}}</span>{{"\n" -}}
54              {{end -}}
55            {{end -}}
56            </span>{{"" -}}
57          {{end -}}
58          {{/* end of line */ -}}
59        {{end}}{{"\n" -}}
60      </pre>{{"\n" -}}
61      {{/* end of function */ -}}
62    {{end -}}
63    {{/* end of file */ -}}
64  {{end -}}
65
66  {{if not .Standalone}}{{"\n  " -}}
67    </div>{{"\n" -}}
68    {{template "script" .}}{{"\n" -}}
69    <script>viewer(new URL(window.location.href), null);</script>{{"" -}}
70  {{end}}
71</body>
72</html>
73