Showing preview only (1,105K chars total). Download the full file or copy to clipboard to get everything.
Repository: aclements/go-perf
Branch: master
Commit: 7b712e5ff658
Files: 130
Total size: 1.0 MB
Directory structure:
gitextract_kmdeuzjx/
├── .github/
│ └── workflows/
│ └── test.yml
├── .gitignore
├── LICENSE
├── README.md
├── cmd/
│ ├── bitstringer/
│ │ └── main.go
│ ├── branchstats/
│ │ └── main.go
│ ├── memanim/
│ │ ├── .gitignore
│ │ ├── hilbert_test.go
│ │ └── main.go
│ ├── memheat/
│ │ ├── draw.go
│ │ ├── main.go
│ │ └── svg.go
│ ├── memlat/
│ │ ├── database.go
│ │ ├── main.go
│ │ └── static/
│ │ ├── bower.json
│ │ ├── bower_components/
│ │ │ ├── font-roboto/
│ │ │ │ ├── .bower.json
│ │ │ │ ├── README.md
│ │ │ │ ├── bower.json
│ │ │ │ └── roboto.html
│ │ │ ├── paper-styles/
│ │ │ │ ├── .bower.json
│ │ │ │ ├── README.md
│ │ │ │ ├── bower.json
│ │ │ │ ├── classes/
│ │ │ │ │ ├── global.html
│ │ │ │ │ ├── shadow-layout.html
│ │ │ │ │ ├── shadow.html
│ │ │ │ │ └── typography.html
│ │ │ │ ├── color.html
│ │ │ │ ├── default-theme.html
│ │ │ │ ├── demo/
│ │ │ │ │ └── index.html
│ │ │ │ ├── demo-pages.html
│ │ │ │ ├── demo.css
│ │ │ │ ├── paper-styles-classes.html
│ │ │ │ ├── paper-styles.html
│ │ │ │ ├── shadow.html
│ │ │ │ └── typography.html
│ │ │ ├── polymer/
│ │ │ │ ├── .bower.json
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── bower.json
│ │ │ │ ├── build.log
│ │ │ │ ├── polymer-micro.html
│ │ │ │ ├── polymer-mini.html
│ │ │ │ └── polymer.html
│ │ │ ├── promise-polyfill/
│ │ │ │ ├── .bower.json
│ │ │ │ ├── Gruntfile.js
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Promise-Statics.js
│ │ │ │ ├── Promise.js
│ │ │ │ ├── README.md
│ │ │ │ ├── bower.json
│ │ │ │ ├── package.json
│ │ │ │ ├── promise-polyfill-lite.html
│ │ │ │ └── promise-polyfill.html
│ │ │ └── webcomponentsjs/
│ │ │ ├── .bower.json
│ │ │ ├── CustomElements.js
│ │ │ ├── HTMLImports.js
│ │ │ ├── MutationObserver.js
│ │ │ ├── README.md
│ │ │ ├── ShadowDOM.js
│ │ │ ├── bower.json
│ │ │ ├── build.log
│ │ │ ├── package.json
│ │ │ ├── webcomponents-lite.js
│ │ │ └── webcomponents.js
│ │ ├── index.html
│ │ └── memlat-browser.html
│ ├── perfdump/
│ │ └── main.go
│ └── prologuer/
│ └── main.go
├── fmt_test.go
├── go.mod
├── go.sum
├── internal/
│ ├── cparse/
│ │ ├── enums.go
│ │ ├── enums_test.go
│ │ ├── lex.go
│ │ ├── lex_test.go
│ │ ├── pp.go
│ │ ├── pp_test.go
│ │ └── vals.go
│ └── gendefs/
│ ├── edit.go
│ └── main.go
├── perffile/
│ ├── auxflags_string.go
│ ├── auxpmuformat_string.go
│ ├── bpfeventtype_string.go
│ ├── branchflags_string.go
│ ├── branchsampletype_string.go
│ ├── breakpointop_string.go
│ ├── buf.go
│ ├── bufdecoder.go
│ ├── cpumode_string.go
│ ├── cpuset.go
│ ├── datasrcblock_string.go
│ ├── datasrchops_string.go
│ ├── datasrclevel_string.go
│ ├── datasrclevelnum_string.go
│ ├── datasrclock_string.go
│ ├── datasrcop_string.go
│ ├── datasrcsnoop_string.go
│ ├── datasrctlb_string.go
│ ├── doc_test.go
│ ├── eventflags_string.go
│ ├── eventhardwareid_string.go
│ ├── eventprecision_string.go
│ ├── events.go
│ ├── eventtype_string.go
│ ├── format.go
│ ├── gendefs.sh
│ ├── ksymbolflags_string.go
│ ├── ksymboltype_string.go
│ ├── meta.go
│ ├── package.go
│ ├── reader.go
│ ├── readformat_string.go
│ ├── records.go
│ ├── recordsorder_string.go
│ ├── recordtype_string.go
│ ├── sampleformat_string.go
│ ├── sampleregsabi_string.go
│ └── transaction_string.go
├── perfsession/
│ ├── package.go
│ ├── ranges.go
│ ├── session.go
│ └── symbolize.go
├── scale/
│ ├── interface.go
│ ├── linear.go
│ ├── log.go
│ ├── output.go
│ ├── power.go
│ └── util.go
└── scripts/
├── membw
├── memload.py
└── topdown.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/test.yml
================================================
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.17.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: go install golang.org/x/tools/cmd/stringer@latest
- run: go test ./...
================================================
FILE: .gitignore
================================================
/cmd/bitstringer/bitstringer
/cmd/branchstats/branchstats
/cmd/memanim/memanim
/cmd/memheat/memheat
/cmd/memlat/memlat
/cmd/perfdump/perfdump
/cmd/prologuer/prologuer
================================================
FILE: LICENSE
================================================
Copyright (c) 2015 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: README.md
================================================
go-perf is a set of tools for working with Linux perf.data profiles,
as well as a set of Go packages for parsing and interpreting such
profiles.
memlat
------
memlat is a web-based interactive browser for memory load latency
profiles. Such profiles give deep and detailed insight in to the
sources of memory stalls and conflicts, but are difficult to interpret
using traditional profiling tools. See the
[detailed documentation on godoc](http://godoc.org/github.com/aclements/go-perf/cmd/memlat).
There is also a predecessor of memlat in `cmd/memheat`. This tool
generates static SVG files summarizing memory load latency
distributions by function and source line. This may be removed in the
future.
dump
----
dump prints the detailed decoded contents of a perf.data profile. It's
similar to `perf report -D`, but is somewhat less mysterious. It's
particularly useful when developing with the perffile library because
it prints everything in terms of perffile structures.
Libraries
---------
This repository also contains two Go packages for parsing and
interpreting perf.data files.
[perffile](http://godoc.org/github.com/aclements/go-perf/perffile)
provides a parser for perf.data files. It can interpret all current
record types and almost all metadata fields.
[perfsession](http://godoc.org/github.com/aclements/go-perf/perfsession)
provides utilities for tracking session state while processing a
perf.data file. Its API is still evolving and should be considered
unstable.
================================================
FILE: cmd/bitstringer/main.go
================================================
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Command bitstringer generates String methods for bit-mask types.
//
// bitstringer is like the stringer tool, but for bit-mask types. See
// go doc stringer for details.
//
// bitstringer adds one flag, -strip, which specifies a prefix to
// strip from stringified-constants. For bit-mask types in particular,
// this can make the string representation much shorter, at the
// expense of not being unambiguous and syntactically valid Go code.
package main
import (
"flag"
"fmt"
"go/ast"
"go/build"
"go/constant"
"go/importer"
"go/parser"
"go/token"
"go/types"
"io"
"log"
"os"
"path/filepath"
"strings"
)
func main() {
flagTypes := flag.String("type", "", "comma-separated list of `types` to generate Stringers for")
flagStrip := flag.String("strip", "", "strip `prefix` from constant names")
flag.Parse()
if flag.NArg() != 0 {
flag.PrintDefaults()
os.Exit(2)
}
// Find source files.
wd, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
pkg, err := build.ImportDir(wd, 0)
if err != nil {
log.Fatalf("importing %s: %v", wd, err)
}
paths := prefixDirectory(pkg.Dir, pkg.GoFiles)
// Parse source files.
fset := token.NewFileSet()
var files []*ast.File
for _, path := range paths {
f, err := parser.ParseFile(fset, path, nil, 0)
if err != nil {
log.Fatalf("parsing file %s: %v", path, err)
}
files = append(files, f)
}
// Type check.
conf := types.Config{Importer: importer.Default(), FakeImportC: true}
info := &types.Info{
Defs: make(map[*ast.Ident]types.Object),
}
typesPkg, err := conf.Check(pkg.ImportPath, fset, files, info)
if err != nil {
log.Fatalf("checking package: %v", err)
}
scope := typesPkg.Scope()
// Find the requested Types.
names := strings.Split(*flagTypes, ",")
name2Type := map[string]types.Type{}
consts := map[types.Type][]*types.Const{}
for _, name := range names {
tname, ok := scope.Lookup(name).(*types.TypeName)
if !ok {
log.Fatalf("unknown type %q", name)
}
// Check that it's integral.
utype := tname.Type().Underlying()
if utype, ok := utype.(*types.Basic); !ok || utype.Info()&types.IsInteger == 0 {
log.Fatalf("type %q is not an integer type", name)
}
name2Type[name] = tname.Type()
consts[tname.Type()] = nil
}
// Find all constants with each Type.
for _, name := range scope.Names() {
obj := scope.Lookup(name)
cobj, ok := obj.(*types.Const)
if !ok {
continue
}
constList, ok := consts[cobj.Type()]
if !ok {
continue
}
constList = append(constList, cobj)
consts[cobj.Type()] = constList
}
// Construct String methods.
for _, name := range names {
fname := strings.ToLower(name) + "_string.go"
f, err := os.Create(fname)
if err != nil {
log.Fatalf("error creating %s: %v", fname, err)
}
typ := name2Type[name]
writeStringer(f, pkg.Name, name, *flagStrip, consts[typ])
if err := f.Close(); err != nil {
log.Fatalf("error writing %s: %v", fname, err)
}
}
}
func prefixDirectory(dir string, names []string) []string {
if dir == "." {
return names
}
out := make([]string, len(names))
for i, name := range names {
out[i] = filepath.Join(dir, name)
}
return out
}
func writeStringer(w io.Writer, pkg, tname, prefix string, consts []*types.Const) {
if len(consts) == 0 {
fmt.Fprintf(os.Stderr, "warning: no consts for type %q\n", tname)
}
fmt.Fprintf(w, `// Code generated by "bitstringer -type=%s"; DO NOT EDIT
package %s
import "strconv"
func (i %s) String() string {
`, tname, pkg, tname)
strip := func(s string) string {
return strings.TrimPrefix(s, prefix)
}
// Find and format any zero value.
zero := constant.MakeInt64(0)
zlabel := "0"
for _, c := range consts {
val := c.Val()
if constant.Compare(val, token.EQL, zero) {
// Format it.
zlabel = strip(c.Name())
break
}
}
fmt.Fprintf(w, "\tif i == 0 {\n\t\treturn %q\n\t}\n", zlabel)
// Create bit value formatters.
fmt.Fprintf(w, "\ts := \"\"\n")
have := constant.MakeInt64(0)
for _, c := range consts {
// Does this contribute to the bit set?
have2 := constant.BinaryOp(have, token.OR, c.Val())
if constant.Compare(have, token.EQL, have2) {
// Nope.
continue
}
have = have2
// Format it.
fmt.Fprintf(w, "\tif i&%s != 0 {\n\t\ts += %q\n\t}\n", c.Name(), strip(c.Name())+"|")
}
// Handle any left-over bits.
fmt.Fprintf(w, ` i &^= %s
if i == 0 {
return s[:len(s)-1]
}
return s + "0x" + strconv.FormatUint(uint64(i), 16)
}
`, have.ExactString())
}
================================================
FILE: cmd/branchstats/main.go
================================================
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Command branchstats analyzes branch profiles for branch mispredict
// rates.
//
// branchstats expects a perf.data collected with
//
// perf record -e branches -j any -c 400009
//
// To collect only branches in user-space code, use
//
// perf record -e branches:u -j any,u -c 400009
//
// The output is a table like
//
// comm PC branches mispredicts
// bench scanner.go:258 419609441 309206957 (73.7%)
// 257 func isLetter(ch rune) bool {
// 258 return 'a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '_' || ch >= 0x80 && unicode.IsLetter(ch)
// 259 }
//
// bench mgcmark.go:1000 1967244262 236405319 (12.0%)
// 999 }
// 1000 if bits&bitPointer == 0 {
// 1001 continue // not a pointer
//
// Each row shows a branch at a particular location and gives the
// estimated number of times that branch executed, the estimated
// number of mispredicts, and the mispredict rate. The table is sorted
// by the number of mispredicts.
package main
import (
"bufio"
"flag"
"fmt"
"log"
"os"
"path/filepath"
"sort"
"github.com/aclements/go-perf/perffile"
"github.com/aclements/go-perf/perfsession"
)
type PC struct {
PC uint64
Comm string
}
type Agg struct {
Mmap *perfsession.Mmap
Events uint64
Predicted int64
Mispredicted int64
}
type pair struct {
PC
Agg
rate float64
}
func main() {
var (
flagInput = flag.String("i", "perf.data", "input perf.data `file`")
)
flag.Parse()
if flag.NArg() > 0 {
flag.Usage()
os.Exit(1)
}
f, err := perffile.Open(*flagInput)
if err != nil {
log.Fatal(err)
}
defer f.Close()
s := perfsession.New(f)
agg := make(map[PC]Agg)
const requiredFormat = perffile.SampleFormatTID | perffile.SampleFormatBranchStack
rs := f.Records(perffile.RecordsCausalOrder)
for rs.Next() {
r := rs.Record
s.Update(r)
switch r := r.(type) {
case *perffile.RecordSample:
if r.Format&requiredFormat != requiredFormat {
break
}
pidinfo := s.LookupPID(r.PID)
comm := "<unknown>"
var mmap *perfsession.Mmap
if pidinfo != nil {
comm = pidinfo.Comm
mmap = pidinfo.LookupMmap(r.BranchStack[0].From)
}
// We ignore the location of the sample
// because it's often not a branch (even in
// precise mode). Instead, we take the most
// recent branch record as an unbiased,
// precise sampling of branches. Similarly, we
// only take the prediction information from
// the most recent branch. (Too bad there's no
// way to tell perf we only want one branch
// record.)
br := r.BranchStack[0]
pc := PC{br.From, comm}
var events uint64
if r.Format&perffile.SampleFormatPeriod != 0 {
events = r.Period
} else if r.EventAttr.Flags&perffile.EventFlagFreq == 0 {
events = r.EventAttr.SamplePeriod
} else {
log.Fatalf("sample %+v has no period", r)
}
a := agg[pc]
a.Events += events
a.Mmap = mmap
if br.Flags&perffile.BranchFlagMispredicted != 0 {
a.Mispredicted++
}
if br.Flags&perffile.BranchFlagPredicted != 0 {
a.Predicted++
}
agg[pc] = a
}
}
if err := rs.Err(); err != nil {
log.Fatal(err)
}
// Rescale and sort records.
pairs := make([]pair, 0)
for pc, a := range agg {
if a.Events == 0 {
continue
}
rate := float64(a.Mispredicted) / float64(a.Predicted+a.Mispredicted)
a.Mispredicted = int64(rate * float64(a.Events))
a.Predicted = int64(a.Events) - a.Mispredicted
pairs = append(pairs, pair{pc, a, rate})
}
sort.Sort(sort.Reverse(pairSorter(pairs)))
// Print summary information.
var total Agg
for _, a := range pairs {
total.Events += a.Events
total.Mispredicted += a.Mispredicted
total.Predicted += a.Predicted
}
fmt.Printf("# Total branches: %d\n", total.Events)
fmt.Printf("# Total mispredicts: %d (%2.1f%% of all branches)\n", total.Mispredicted, 100*float64(total.Mispredicted)/float64(total.Events))
fmt.Printf("\n")
// Print branch details.
var sym perfsession.Symbolic
fmt.Printf("%-8s %-24s %16s %s\n", "comm", "PC", "branches", "mispredicts")
for _, pair := range pairs {
var pos string
var lines []string
if pair.Mmap != nil && perfsession.Symbolize(s, pair.Mmap, pair.PC.PC, &sym) && sym.Line.File != nil {
pos = fmt.Sprintf("%s:%d", filepath.Base(sym.Line.File.Name), sym.Line.Line)
lines, _ = getLines(sym.Line.File.Name, sym.Line.Line-1, sym.Line.Line+1)
} else {
pos = fmt.Sprintf("%#-24x", pair.PC.PC)
lines = nil
}
fmt.Printf("%-8.8s %-24s %16d %d (%2.1f%%)\n", pair.Comm, pos, pair.Events, pair.Mispredicted, 100*pair.rate)
trim := stringCommon(lines)
for i, line := range lines {
fmt.Printf("%7d %s\n", i+sym.Line.Line-1, line[trim:])
}
fmt.Printf("\n")
}
}
type pairSorter []pair
func (p pairSorter) Len() int {
return len(p)
}
func (p pairSorter) Swap(i, j int) {
p[i], p[j] = p[j], p[i]
}
func (p pairSorter) Less(i, j int) bool {
if p[i].Mispredicted != p[j].Mispredicted {
return p[i].Mispredicted < p[j].Mispredicted
}
if p[i].Events != p[j].Events {
return p[i].Events < p[j].Events
}
if p[i].Comm != p[j].Comm {
return p[i].Comm < p[j].Comm
}
return p[i].PC.PC < p[j].PC.PC
}
func getLines(path string, minLine, maxLine int) ([]string, error) {
// TODO: Make a nice line cache API. This isn't the only place
// I've needed this.
lines := make([]string, maxLine-minLine+1)
file, err := os.Open(path)
if err != nil {
return nil, err
}
defer file.Close()
// Skip to minLine.
scanner := bufio.NewScanner(file)
for i := 0; i < minLine && scanner.Scan(); i++ {
// Do nothing
}
for line := minLine; line <= maxLine && scanner.Err() == nil; line++ {
lines[line-minLine] = scanner.Text()
scanner.Scan()
}
if err := scanner.Err(); err != nil {
return nil, err
}
return lines, nil
}
func stringCommon(strs []string) int {
if len(strs) == 0 {
return 0
}
for i := 0; i < len(strs[0]); i++ {
c := strs[0][i]
for _, s := range strs {
if i == len(s) || s[i] != c {
return i
}
}
}
return len(strs[0])
}
================================================
FILE: cmd/memanim/.gitignore
================================================
/addr.png
/f*.png
/out.mp4
/memanim
================================================
FILE: cmd/memanim/hilbert_test.go
================================================
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import "testing"
func TestHilbert(t *testing.T) {
const n = 64
x0, y0 := hilbert(n, 0)
have := make([]bool, n*n)
have[x0+y0*n] = true
for d := 1; d < n*n; d++ {
x1, y1 := hilbert(n, d)
if !(x0 == x1 && abs(y0-y1) == 1 ||
y0 == y1 && abs(x0-x1) == 1) {
t.Fatalf("moved by more than 1: (%d,%d) -> (%d,%d)", x0, y0, x1, y1)
}
if have[x1+y1*n] {
t.Fatalf("repeated point (%d,%d)", x1, y1)
}
have[x1+y1*n] = true
x0, y0 = x1, y1
}
}
func abs(n int) int {
if n < 0 {
return -n
}
return n
}
================================================
FILE: cmd/memanim/main.go
================================================
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Command memanim creates an animation of memory accesses over time
// from a "perf mem record" profile. In the animation, the address
// space is compacted to remove pages that have no recorded references
// and then mapped on to Hilbert curve so that nearby accesses appear
// nearby in 2-D space. It is then broken in to panels showing all
// accesses, L2-and-up accesses, etc.
//
// The simplest way to record a memory load profile is "perf mem
// record <cmd>".
//
// To record only load latency events over a threshold number of
// cycles, use the following command on Sandy Bridge or later:
//
// perf record -W -d -e cpu/event=0xcd,umask=0x1,ldlat=<thresh>/pp <cmd>
//
// The minimum (and default) latency threshold is 3 cycles.
//
// At a reasonably high latency threshold, such as 50 cycles, it's
// possible to crank up to recording every single load with, e.g.,
// --count 1 -m 1024.
//
// To collect only user-space loads, change pp to ppu.
package main
import (
"flag"
"fmt"
"image"
"image/color"
"image/draw"
"image/png"
"io/ioutil"
"log"
"math"
"os"
"runtime/pprof"
"sort"
"github.com/aclements/go-perf/perffile"
"github.com/golang/freetype"
)
const pageBytes = 4096
func main() {
var (
flagInput = flag.String("i", "perf.data", "read memory latency profile from `file`")
flagBy = flag.String("by", "address", "`layout` by \"address\" or \"pc\"")
flagFPS = flag.Int("fps", 24, "frames per second")
flagDilation = flag.Float64("dilation", 1, "time dilation factor")
flagWidth = flag.Int("w", 512, "output width/height; must be a power of 2")
flagCpuProfile = flag.String("cpuprofile", "", "write cpu profile to file")
)
flag.Parse()
if flag.NArg() > 0 {
flag.Usage()
os.Exit(1)
}
if *flagWidth <= 0 || *flagWidth&(*flagWidth-1) != 0 {
fmt.Fprintln(os.Stderr, "width must be a power of two")
os.Exit(1)
}
if !(*flagBy == "address" || *flagBy == "pc") {
fmt.Fprintln(os.Stderr, "-by must be address or pc")
os.Exit(1)
}
if *flagCpuProfile != "" {
f, err := os.Create(*flagCpuProfile)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
}
// TODO: Do something better with weight? I tried blue/red
// coloring, but it really isn't obvious. Fade it out at a
// certain rate? Shade? Ripples?
events := parsePerf(*flagInput, *flagBy)
// Canonicalize the events.
imgSize := *flagWidth
mapper := newAddrMapper(events, uint64(imgSize*imgSize-1))
normalizeWeight(events)
zeroTime(events)
lastTime := events[len(events)-1].time
// Load font.
//
// TODO Don't hard-code it's location. Unfortunately, there's
// no fontconfig equivalent for Go that I can find.
fontCtx := freetype.NewContext()
fontData, err := ioutil.ReadFile("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf")
if err != nil {
log.Fatal(err)
}
font, err := freetype.ParseFont(fontData)
if err != nil {
log.Fatal(err)
}
fontCtx.SetFontSize(12)
fontCtx.SetSrc(image.Black)
fontCtx.SetFont(font)
fontBounds := font.Bounds(fontCtx.PointToFixed(12))
labelHeight := int((fontBounds.Max.Y - fontBounds.Min.Y) >> 6)
// Create image.
img := image.NewNRGBA(image.Rect(0, 0, (imgSize+1)*numPanels-1, imgSize+labelHeight))
draw.Draw(img, img.Bounds(), image.White, image.ZP, draw.Over)
fontCtx.SetDst(img)
fontCtx.SetClip(img.Bounds())
// Construct sub-images for panels and draw framing elements.
levelImgs := make([]*image.NRGBA, numPanels)
for i := range levelImgs {
left := (imgSize + 1) * i
levelImgs[i] = img.SubImage(image.Rect(left, labelHeight, left+imgSize, imgSize+labelHeight)).(*image.NRGBA)
levelImgs[i].Rect = levelImgs[i].Rect.Sub(levelImgs[i].Rect.Min)
if i > 0 {
for y := img.Rect.Min.Y; y < img.Rect.Max.Y; y++ {
img.Set(left-1, y, color.Black)
}
}
fontCtx.DrawString(">= "+panelLevels[i].String(), freetype.Pt(left+2, 12))
}
// Create address space reference image.
//
// TODO: This isn't very useful, it turns out. I could simply
// print out the map from coordinate to address. Visually, I
// could underlay boundaries between very distinct parts of
// the address space (say, find points that have a >1GB break
// and mark the boundary between all pixels before that break
// and after that break).
if false {
addrStep := int(math.Floor(1 / mapper.normFactor))
for pfn := range mapper.pageBase {
for offset := 0; offset < pageBytes; offset += addrStep {
addr := pfn*pageBytes + uint64(offset)
x, y := hilbert(imgSize, int(mapper.mapAddr(addr)))
naddr := float64(addr%(1<<48)) / (1 << 48) * 2 * math.Pi
cb, cr := math.Cos(naddr), -math.Sin(naddr)
//fmt.Println(fmt.Sprintf("%016x", addr), int(mapper.mapAddr(addr)), naddr, cb, cr)
r, g, b := color.YCbCrToRGB(127, uint8((cb+1)*127), uint8((cr+1)*127))
img.SetNRGBA(x, y, color.NRGBA{r, g, b, 255})
}
}
writePNG("addr.png", img)
}
nsPerFrame := int(1000000000 / (float64(*flagFPS) * *flagDilation))
lastIndex := 0
for frame := 0; ; frame++ {
t0 := uint64(frame * nsPerFrame)
t1 := uint64((frame + 1) * nsPerFrame)
if t0 > lastTime {
break
}
log.Println("frame", frame)
// Fade the frame.
//
// TODO: The fade rate should be proportional to FPS.
for _, levelImg := range levelImgs {
for y := 0; y < levelImg.Rect.Dy(); y++ {
scan := levelImg.Pix[y*levelImg.Stride : y*levelImg.Stride+levelImg.Rect.Dx()*4]
for i, p := range scan {
scan[i] = uint8(255 - (int(255-p) * 3 / 4))
}
}
}
// Draw the events.
for evIndex, ev := range events[lastIndex:] {
if ev.time < t0 {
panic("time went backwards")
}
if t1 <= ev.time {
lastIndex += evIndex
break
}
addr := mapper.mapAddr(ev.addr)
x, y := hilbert(imgSize, int(addr))
//color := color.NRGBA{R: uint8(ev.weight), G: 0, B: 255 - uint8(ev.weight), A: 255}
color := color.NRGBA{0, 0, 0, 255}
for level := 0; level <= ev.level; level++ {
levelImgs[level].SetNRGBA(x, y, color)
}
}
// Write the frame out.
writePNG(fmt.Sprintf("f%08d.png", frame), img)
}
fmt.Printf("%g bytes/pixel\n", 1/mapper.normFactor)
fmt.Printf("%g pixels/page\n", mapper.normFactor*pageBytes)
fmt.Printf("To combine frames:\n mencoder 'mf://f*.png' -mf fps=%d -nosound -of lavf -lavfopts format=mp4 -ovc x264 -o out.mp4\n", *flagFPS)
}
type event struct {
time uint64
addr uint64
weight uint64
level int
}
// parsePerf parses a perf.data profile and returns the cache miss
// events.
func parsePerf(fileName, by string) []event {
f, err := perffile.Open(fileName)
if err != nil {
fmt.Fprintf(os.Stderr, "error loading profile: %s\n", err)
os.Exit(1)
}
defer f.Close()
byPC := by == "pc"
const requiredFormat = perffile.SampleFormatTime | perffile.SampleFormatAddr | perffile.SampleFormatWeight | perffile.SampleFormatDataSrc
events := make([]event, 0)
rs := f.Records(perffile.RecordsTimeOrder)
for rs.Next() {
r := rs.Record
switch r := r.(type) {
case *perffile.RecordSample:
if r.Format&requiredFormat != requiredFormat {
break
}
level := r.DataSrc.Level
if r.DataSrc.Miss {
level <<= 1
}
addr := r.Addr
if byPC {
addr = r.IP
}
events = append(events, event{r.Time, addr, r.Weight, levelToPanel[level]})
}
}
return events
}
type addrMapper struct {
pageBase map[uint64]uint64
normMax uint64
normFactor float64 // pixels/byte
}
// newAddrMapper returns an addrMapper that maps addresses in events
// to a compacted space in the range [0, normMax].
func newAddrMapper(events []event, normMax uint64) *addrMapper {
am := &addrMapper{normMax: normMax}
// Find all distinct pages and max address.
pages := make([]uint64, 0)
pageSet := make(map[uint64]bool)
maxAddr := uint64(0)
for _, ev := range events {
page := ev.addr / pageBytes
if pageSet[page] {
continue
}
pageSet[page] = true
pages = append(pages, page)
if ev.addr > maxAddr {
maxAddr = ev.addr
}
}
sort.Sort(uint64Slice(pages))
// Map pages to a compact sequence.
am.pageBase = make(map[uint64]uint64, len(pages))
for i, page := range pages {
am.pageBase[page] = uint64(i) * pageBytes
}
// Compute normalization factor.
compactMax := am.pageBase[maxAddr/pageBytes] + maxAddr%pageBytes
if compactMax <= normMax {
am.normFactor = 1
} else {
am.normFactor = float64(normMax) / float64(compactMax)
}
return am
}
func (am *addrMapper) mapAddr(addr uint64) uint64 {
compact := am.pageBase[addr/pageBytes] + addr%pageBytes
norm := uint64(float64(compact) * am.normFactor)
if norm > am.normMax {
norm = am.normMax
}
return norm
}
func normalizeWeight(events []event) {
// Find the maximum weight.
maxW := uint64(0)
for _, ev := range events {
if ev.weight > maxW {
maxW = ev.weight
}
}
// TODO: Log scale?
// Normalize [0, maxW] to [0, 255].
factor := float64(255) / float64(maxW)
for i, ev := range events {
w := uint64(float64(ev.weight) * factor)
if w > 255 {
w = 255
}
events[i].weight = w
}
}
func zeroTime(events []event) {
if len(events) == 0 {
return
}
t0 := events[0].time
for i := range events {
events[i].time -= t0
}
}
type uint64Slice []uint64
func (s uint64Slice) Len() int {
return len(s)
}
func (s uint64Slice) Less(i, j int) bool {
return s[i] < s[j]
}
func (s uint64Slice) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}
// hilbert converts a 1-D point d to a coordinate (x, y) in an n×n
// Hilbert space.
func hilbert(n, d int) (x, y int) {
// Based on Wikipedia.
rot := func(s, x, y, rx, ry int) (int, int) {
if ry == 0 {
if rx == 1 {
x = s - 1 - x
y = s - 1 - y
}
x, y = y, x
}
return x, y
}
for s := 1; s < n; s *= 2 {
rx := 1 & (d / 2)
ry := 1 & (d ^ rx)
x, y = rot(s, x, y, rx, ry)
x += s * rx
y += s * ry
d /= 4
}
return
}
func writePNG(path string, img image.Image) {
f, err := os.Create(path)
if err != nil {
log.Fatal(err)
}
enc := png.Encoder{CompressionLevel: png.BestSpeed}
if err := enc.Encode(f, img); err != nil {
log.Fatal(err)
}
if err := f.Close(); err != nil {
log.Fatal(err)
}
}
// panelLevels maps from panel number to data source level.
var panelLevels = [...]perffile.DataSrcLevel{
perffile.DataSrcLevelL1,
perffile.DataSrcLevelL2,
perffile.DataSrcLevelL3,
perffile.DataSrcLevelLocalRAM,
perffile.DataSrcLevelRemoteRAM1,
}
const numPanels = len(panelLevels)
// levelToPanel maps from a data source level to a panel number.
var levelToPanel = map[perffile.DataSrcLevel]int{
perffile.DataSrcLevelNA: 0,
}
func init() {
for panel, level := range panelLevels {
levelToPanel[level] = panel
}
var l int
for i := perffile.DataSrcLevelL1; i <= perffile.DataSrcLevelUncached; i++ {
if l2, ok := levelToPanel[i]; ok {
l = l2
} else {
levelToPanel[i] = l
}
}
}
================================================
FILE: cmd/memheat/draw.go
================================================
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"image/color"
"github.com/aclements/go-perf/scale"
)
type TicksFormat struct {
tickLen, minorTickLen, textSep float64
tickColor, labelColor color.Color
labelFormat string
}
func (f *TicksFormat) HTicks(svg *SVG, scale scale.Interface, x scale.OutputScale, y float64) {
x.Crop()
major, minor := scale.Ticks(5)
// Draw ticks
if f.tickColor == nil {
svg.SetStroke(color.Black)
} else {
svg.SetStroke(f.tickColor)
}
svg.NewPath()
for _, sx := range major {
if x, ok := x.Of(scale.Of(sx)); ok {
svg.MoveTo(x, y)
svg.LineToRel(0, -f.tickLen)
}
}
for _, sx := range minor {
if x, ok := x.Of(scale.Of(sx)); ok {
svg.MoveTo(x, y)
svg.LineToRel(0, -f.minorTickLen)
}
}
svg.Stroke()
svg.SetStroke(nil)
// Draw labels
lOpts := TextOpts{Anchor: AnchorMiddle}
if f.labelFormat != "" {
if f.labelColor == nil {
svg.SetFill(color.Black)
} else {
svg.SetFill(f.labelColor)
}
for _, sx := range major {
if x, ok := x.Of(scale.Of(sx)); ok {
l := fmt.Sprintf(f.labelFormat, sx)
svg.Text(x, y-f.tickLen-f.textSep, lOpts, l)
}
}
svg.SetFill(nil)
}
}
================================================
FILE: cmd/memheat/main.go
================================================
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bufio"
"debug/dwarf"
"flag"
"fmt"
"image/color"
"log"
"os"
"path"
"sort"
"github.com/aclements/go-perf/perffile"
"github.com/aclements/go-perf/perfsession"
"github.com/aclements/go-perf/scale"
)
type lineStat struct {
ip uint64
totalWeight uint64
weights []uint64
fn string
src *dwarf.LineEntry
yCoord float64
histogram []int
}
func main() {
var (
flagInput = flag.String("i", "perf.data", "input perf.data file")
flagLimit = flag.Int("limit", 30, "output top N functions")
)
flag.Parse()
if flag.NArg() > 0 {
flag.Usage()
os.Exit(1)
}
f, err := perffile.Open(*flagInput)
if err != nil {
log.Fatal(err)
}
defer f.Close()
s := perfsession.New(f)
// Collect samples by IP (TODO: by (comm, ip) or something)
ipToInfo := map[uint64]*lineStat{}
rs := f.Records(perffile.RecordsCausalOrder)
for rs.Next() {
r := rs.Record
s.Update(r)
switch r := r.(type) {
case *perffile.RecordSample:
mmap := s.LookupPID(r.PID).LookupMmap(r.IP)
if mmap == nil {
break
}
line, ok := ipToInfo[r.IP]
if !ok {
var symb perfsession.Symbolic
if !perfsession.Symbolize(s, mmap, r.IP, &symb) {
break
}
line = &lineStat{
ip: r.IP,
fn: symb.FuncName,
src: &symb.Line,
}
ipToInfo[r.IP] = line
}
weight := r.Weight
if weight == 0 {
weight = uint64(r.Weights.Var1)
}
line.weights = append(line.weights, weight)
line.totalWeight += weight
}
}
// Compute total function weight
fnWeight := map[string]uint64{}
for _, ls := range ipToInfo {
fnWeight[ls.fn] += ls.totalWeight
}
// Sort stats by function weight, line number
stats := make([]*lineStat, 0, len(ipToInfo))
for _, ls := range ipToInfo {
stats = append(stats, ls)
}
sort.Sort(lineStatSorter{stats, fnWeight})
// Limit to the top N functions
if *flagLimit > 0 {
stats = limitFuncs(stats, *flagLimit)
}
// Find max weight
maxWeight := uint64(0)
for _, stat := range stats {
for _, w := range stat.weights {
if w > maxWeight {
maxWeight = w
}
}
}
wscale := scale.NewPower([]float64{0, float64(maxWeight)}, 1/2.0)
// Compute histograms and find max bar height
const buckets = 50
lscale := scale.NewLog([]float64{1, float64(maxWeight + 1)}, 10)
lscale.Nice(5)
maxHeight := 0
for _, stat := range stats {
stat.histogram = make([]int, buckets)
for _, w := range stat.weights {
bucket := int(lscale.Of(float64(w)) * buckets)
stat.histogram[bucket] += int(w)
}
for _, height := range stat.histogram {
if height > maxHeight {
maxHeight = height
}
}
}
// Assign Y coordinates
const (
marginTop = 45
cellHeight = 10
cellWidth = 10
fnGap = 10
lineLabelWidth = 30
groupWidth = 20
groupGap = 5
marginLeft = groupWidth*2 + groupGap
marginRight = 300
sourceLeft = marginLeft + buckets*cellWidth
)
y := marginTop
// lastLine := -1
for i, stat := range stats {
if i != 0 && (stat.fn != stats[i-1].fn || stat.src.File.Name != stats[i-1].src.File.Name) {
y += fnGap
// lastLine = -1
}
// if lastLine != -1 {
// y += cellHeight * (stat.src.Line - lastLine)
// }
stat.yCoord = float64(y)
// lastLine = stat.src.Line
y += cellHeight
}
// Emit SVG
svg := NewSVG(os.Stdout, sourceLeft+marginRight, y)
var ticks = TicksFormat{
tickLen: 5,
minorTickLen: 3,
textSep: 5,
labelFormat: "%g",
}
// TODO: Show command line and hostname
{
lOpts := TextOpts{Anchor: AnchorMiddle}
svg.SetFill(color.Black)
y := float64(marginTop - ticks.tickLen - ticks.textSep)
svg.Text(marginLeft+cellWidth*buckets/2, y-20, lOpts, "memory load latency (cycles)")
svg.SetFill(nil)
}
// TODO: Draw color key
// Label lines
svg.NewPath()
lastLineY := -1.0
for _, idxs := range sections(len(stats), func(i int) bool {
return stats[i].src.Line != stats[i-1].src.Line
}) {
first, last := stats[idxs[0]], stats[idxs[1]-1]
top := first.yCoord
bot := last.yCoord + cellHeight
if lastLineY != top {
svg.MoveTo(sourceLeft, top)
svg.LineToRel(ticks.tickLen, 0)
}
svg.MoveTo(sourceLeft, bot)
svg.LineToRel(ticks.tickLen, 0)
lastLineY = bot
lOpts := TextOpts{Anchor: AnchorStart, Baseline: BaselineMiddle, FontSize: 10}
svg.Text(sourceLeft+ticks.tickLen, (top+bot)/2, lOpts, fmt.Sprintf("%d", first.src.Line))
svg.Text(sourceLeft+lineLabelWidth, (top+bot)/2, lOpts, getLine(first.src.File.Name, first.src.Line))
}
svg.SetStroke(color.Black)
svg.Stroke()
svg.SetStroke(nil)
groupX := float64(marginLeft)
// Label function groups
for _, idxs := range sections(len(stats), func(i int) bool {
return stats[i].fn != stats[i-1].fn
}) {
first, last := stats[idxs[0]], stats[idxs[1]-1]
top := first.yCoord
bot := last.yCoord + cellHeight
// Ticks at the top of each function
ticks.HTicks(svg, lscale, scale.NewOutputScale(marginLeft, marginLeft+cellWidth*buckets), top)
ticks.labelFormat = ""
// Function label
lOpts := TextOpts{Anchor: AnchorMiddle, Rotate: -90}
svg.SetFill(color.Gray{192})
svg.Rect(groupX-groupWidth, top, groupWidth, bot-top).FillPreserve().Clip()
svg.SetFill(color.Black)
svg.Text(groupX-5, (top+bot)/2, lOpts, first.fn)
svg.ResetClip()
}
groupX -= groupWidth + groupGap
// Label file name groups
for _, idxs := range sections(len(stats), func(i int) bool {
return stats[i].src.File.Name != stats[i-1].src.File.Name
}) {
lOpts := TextOpts{Anchor: AnchorMiddle, Rotate: -90}
svg.SetFill(color.Gray{192})
top := stats[idxs[0]].yCoord
bot := stats[idxs[1]-1].yCoord + cellHeight
svg.Rect(groupX-groupWidth, top, groupWidth, bot-top).FillPreserve().Clip()
svg.SetFill(color.Black)
fileName := path.Base(stats[idxs[0]].src.File.Name)
svg.Text(groupX-5, (top+bot)/2, lOpts, fileName)
svg.ResetClip()
}
groupX -= groupWidth + groupGap
// Draw heat map
for _, stat := range stats {
for x, height := range stat.histogram {
if height == 0 {
continue
}
shade := wscale.Of(float64(height))
svg.SetFill(color.NRGBA{255, 0, 0, uint8(255 * shade)})
svg.Rect(float64(marginLeft+x*cellWidth), stat.yCoord,
cellWidth, cellHeight).Fill()
}
// Tooltip for raw IP
svg.Rect(marginLeft, stat.yCoord, cellWidth*buckets, cellHeight).TooltipHighlight(fmt.Sprintf("IP: %#x", stat.ip))
}
svg.SetFill(nil)
svg.Done()
}
type lineStatSorter struct {
lines []*lineStat
fnWeight map[string]uint64
}
func (s lineStatSorter) Len() int {
return len(s.lines)
}
func (s lineStatSorter) Swap(i, j int) {
s.lines[i], s.lines[j] = s.lines[j], s.lines[i]
}
func (s lineStatSorter) Less(i, j int) bool {
// Sort by function weight first
fni, fnj := s.lines[i].fn, s.lines[j].fn
if s.fnWeight[fni] != s.fnWeight[fnj] {
return s.fnWeight[fni] > s.fnWeight[fnj]
}
// Sort by file:line
li, lj := s.lines[i].src, s.lines[j].src
if li != nil || lj != nil {
if li == nil || lj == nil {
// Unknown line info comes first
return li == nil
}
if li.File.Name != lj.File.Name {
return li.File.Name < lj.File.Name
}
if li.Line != lj.Line {
return li.Line < lj.Line
}
}
// Finally, sort by IP
return s.lines[i].ip < s.lines[j].ip
}
func limitFuncs(stats []*lineStat, limit int) []*lineStat {
seen := 0
for i, stat := range stats {
if i == 0 || stat.fn != stats[i-1].fn {
if seen == limit {
return stats[:i]
}
seen++
}
}
return stats
}
func sections(count int, newGroup func(int) bool) [][2]int {
sections := make([][2]int, 0)
if count == 0 {
return sections
}
start := 0
for i := 1; i < count; i++ {
if newGroup(i) {
sections = append(sections, [2]int{start, i})
start = i
}
}
sections = append(sections, [2]int{start, count})
return sections
}
func getLine(path string, line int) string {
// TODO: Cache parsing
file, err := os.Open(path)
if err != nil {
log.Println(err)
return ""
}
defer file.Close()
scanner := bufio.NewScanner(file)
for i := 0; i < line && scanner.Scan(); i++ {
// Do nothing
}
if err := scanner.Err(); err != nil {
log.Fatal(err)
}
return scanner.Text()
}
================================================
FILE: cmd/memheat/svg.go
================================================
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"encoding/xml"
"fmt"
"image/color"
"io"
"strconv"
"strings"
)
type SVG struct {
w io.Writer
err error
fill, stroke string
lineWidth string
clipPath string
id int
path []string
}
func NewSVG(w io.Writer, width, height int) *SVG {
s := &SVG{w: w}
s.fprintf("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"%d\" height=\"%d\">\n", width, height)
s.fprintf("<style>.hover { fill:rgba(0,0,0,0) } .hover:hover { stroke:#000 }</style>\n")
s.NewPath()
return s
}
type svglen float64
func (v svglen) String() string {
return strconv.FormatFloat(float64(v), 'f', -1, 32)
}
func colorToCSS(c color.Color) string {
cc := color.NRGBAModel.Convert(c).(color.NRGBA)
if cc.A == 0xff {
return fmt.Sprintf("rgb(%d,%d,%d)", cc.R, cc.G, cc.B)
}
return fmt.Sprintf("rgba(%d,%d,%d,%f)", cc.R, cc.G, cc.B, float64(cc.A)/0xff)
}
func (s *SVG) fprintf(format string, a ...interface{}) {
if s.err != nil {
return
}
_, s.err = fmt.Fprintf(s.w, format, a...)
}
func (s *SVG) SetFill(c color.Color) {
if c == nil {
s.fill = ""
} else {
s.fill = "fill:" + colorToCSS(c)
}
}
func (s *SVG) SetStroke(c color.Color) {
if c == nil {
s.stroke = ""
} else {
s.stroke = "stroke:" + colorToCSS(c)
}
}
func (s *SVG) SetLineWidth(lw float64) {
s.lineWidth = fmt.Sprintf("stroke-width:%v", svglen(lw))
}
func (s *SVG) style(parts ...string) string {
val, sep := "", ""
for _, part := range parts {
if part != "" {
val += sep + part
sep = ";"
}
}
if val != "" {
return " style=\"" + val + "\""
} else {
return ""
}
}
func (s *SVG) NewPath() *SVG {
s.path = []string{}
return s
}
func (s *SVG) MoveTo(x, y float64) *SVG {
s.path = append(s.path, fmt.Sprintf("M%v %v", svglen(x), svglen(y)))
return s
}
func (s *SVG) LineToRel(xd, yd float64) *SVG {
var op string
if xd == 0 {
op = fmt.Sprintf("v%v", svglen(yd))
} else if yd == 0 {
op = fmt.Sprintf("h%v", svglen(xd))
} else {
op = fmt.Sprintf("l%v %v", svglen(xd), svglen(yd))
}
s.path = append(s.path, op)
return s
}
func (s *SVG) Rect(x, y, w, h float64) *SVG {
return s.MoveTo(x, y).LineToRel(w, 0).LineToRel(0, h).LineToRel(-w, 0).ClosePath()
}
func (s *SVG) ClosePath() *SVG {
s.path = append(s.path, "z")
return s
}
func (s *SVG) pathData() string {
return strings.Join(s.path, "")
}
func (s *SVG) Stroke() *SVG {
s.fprintf("<path d=\"%s\"%s/>\n", s.pathData(), s.style(s.stroke, s.lineWidth, s.clipPath))
return s.NewPath()
}
func (s *SVG) FillPreserve() *SVG {
s.fprintf("<path d=\"%s\"%s/>\n", s.pathData(), s.style(s.fill, s.clipPath))
return s
}
func (s *SVG) Fill() *SVG {
return s.FillPreserve().NewPath()
}
func (s *SVG) FillStroke() *SVG {
s.fprintf("<path d=\"%s\"%s/>\n", s.pathData(), s.style(s.fill, s.stroke, s.lineWidth, s.clipPath))
return s.NewPath()
}
func (s *SVG) Clip() *SVG {
s.fprintf("<clipPath id=\"i%d\"><path d=\"%s\"/></clipPath>", s.id, s.pathData())
s.clipPath = fmt.Sprintf("clip-path:url(#i%d)", s.id)
s.id++
return s.NewPath()
}
func (s *SVG) ResetClip() *SVG {
s.clipPath = ""
return s
}
func (s *SVG) Tooltip(text string) *SVG {
s.fprintf("<path d=\"%s\" fill=\"rgba(0,0,0,0)\"><title>", s.pathData())
if s.err == nil {
s.err = xml.EscapeText(s.w, []byte(text))
}
s.fprintf("</title></path>\n")
return s.NewPath()
}
func (s *SVG) TooltipHighlight(text string) *SVG {
s.fprintf("<path d=\"%s\" fill=\"rgba(0,0,0,0)\" class=\"hover\"><title>", s.pathData())
if s.err == nil {
s.err = xml.EscapeText(s.w, []byte(text))
}
s.fprintf("</title></path>\n")
return s.NewPath()
}
type Anchor int
const (
AnchorStart Anchor = iota
AnchorMiddle
AnchorEnd
)
type Baseline int
const (
BaselineAuto Baseline = iota
BaselineBaseline
BaselineMiddle
)
type TextOpts struct {
Anchor Anchor
Baseline Baseline
Rotate float64
FontSize float64
}
func (s *SVG) Text(x, y float64, opts TextOpts, text string) {
astr := map[Anchor]string{
AnchorStart: "",
AnchorMiddle: " text-anchor=\"middle\"",
AnchorEnd: " text-anchor=\"end\"",
}[opts.Anchor]
bstr := map[Baseline]string{
BaselineAuto: "",
BaselineBaseline: " dominant-baseline=\"baseline\"",
BaselineMiddle: " dominant-baseline=\"middle\"",
}[opts.Baseline]
rstr := ""
if opts.Rotate != 0 {
rstr = fmt.Sprintf(" transform=\"rotate(%v,%v,%v)\"", svglen(opts.Rotate), svglen(x), svglen(y))
}
fstr := ""
if opts.FontSize != 0 {
fstr = fmt.Sprintf(" font-size=\"%v\"", svglen(opts.FontSize))
}
close := ""
if s.clipPath != "" {
// Don't apply rotation to clip path
s.fprintf("<g%s>", s.style(s.clipPath))
close = "</g>"
}
s.fprintf("<text x=\"%v\" y=\"%v\"%s%s%s%s%s>", svglen(x), svglen(y), astr, bstr, rstr, fstr, s.style(s.fill))
if s.err == nil {
s.err = xml.EscapeText(s.w, []byte(text))
}
s.fprintf("</text>%s\n", close)
}
func (s *SVG) Done() error {
s.fprintf("</svg>")
return s.err
}
================================================
FILE: cmd/memlat/database.go
================================================
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"os"
"github.com/aclements/go-perf/perffile"
"github.com/aclements/go-perf/perfsession"
)
type database struct {
// procs maps from PID to information and records for a
// process.
procs map[int]*proc
// dataSrcs maps dataSrcIDs to full DataSrc information.
// There's a lot of information in a DataSrc, but in practice
// a given architecture will generate a small subset of the
// possibilities. Hence, rather than storing a whole DataSrc
// in every record, we canonicalize it to a small identifier.
dataSrcs []perffile.DataSrc
// maxLatency is the maximum latency value across all records
// in this database.
maxLatency uint32
// metadata records metadata fields from the profile.
metadata Metadata
}
type proc struct {
pid int
comm string
records []record
ipInfo map[uint64]ipInfo
}
type record struct {
ip uint64
address uint64
latency uint32
dataSrc dataSrcID
}
type ipInfo struct {
funcName string
fileName string
line int
}
// dataSrcID is a small integer identifying a perffile.DataSrc.
type dataSrcID uint32
type Metadata struct {
Hostname string
Arch string
CPUDesc string `json:"CPU"`
CmdLine []string `json:"Command line"`
}
// parsePerf parses a perf.data profile into a database.
func parsePerf(fileName string) *database {
f, err := perffile.Open(fileName)
if os.IsNotExist(err) && fileName == "perf.data" {
// Give a friendly error for first-time users.
fmt.Fprintf(os.Stderr, "%s.\nTo record a profile, use\n perf mem record <command>\nor specify an alternate profile path with -i.\n", err)
os.Exit(1)
} else if err != nil {
fmt.Fprintf(os.Stderr, "error loading profile: %s\n", err)
os.Exit(1)
}
defer f.Close()
db := &database{
procs: make(map[int]*proc),
}
db.metadata.Hostname = f.Meta.Hostname
db.metadata.Arch = f.Meta.Arch
db.metadata.CPUDesc = f.Meta.CPUDesc
db.metadata.CmdLine = f.Meta.CmdLine
dataSrc2ID := make(map[perffile.DataSrc]dataSrcID)
s := perfsession.New(f)
numSamples := 0
droppedMmaps := 0
droppedSymbols := 0
const requiredFormat = perffile.SampleFormatIP | perffile.SampleFormatAddr | perffile.SampleFormatDataSrc
rs := f.Records(perffile.RecordsCausalOrder)
for rs.Next() {
r := rs.Record
s.Update(r)
switch r := r.(type) {
case *perffile.RecordComm:
// Comm events usually happen after the first
// few samples from this PID.
p := db.procs[r.PID]
if p != nil {
p.comm = r.Comm
}
case *perffile.RecordSample:
if r.Format&requiredFormat != requiredFormat {
break
}
// Either Weight or WeightStruct is required.
if r.Format&(perffile.SampleFormatWeight|perffile.SampleFormatWeightStruct) == 0 {
break
}
numSamples++
pidInfo := s.LookupPID(r.PID)
mmap := pidInfo.LookupMmap(r.IP)
if mmap == nil {
droppedMmaps++
break
}
// Find proc for r.PID.
p, ok := db.procs[r.PID]
if !ok {
p = &proc{
pid: r.PID,
comm: pidInfo.Comm,
ipInfo: make(map[uint64]ipInfo),
}
db.procs[r.PID] = p
}
// Canonicalize data source.
dsID, ok := dataSrc2ID[r.DataSrc]
if !ok {
dsID = dataSrcID(len(db.dataSrcs))
dataSrc2ID[r.DataSrc] = dsID
db.dataSrcs = append(db.dataSrcs, r.DataSrc)
}
// Create the record.
p.records = append(p.records, record{
ip: r.IP,
address: r.Addr,
latency: uint32(r.Weight),
dataSrc: dsID,
})
// Update database stats.
if uint32(r.Weight) > db.maxLatency {
db.maxLatency = uint32(r.Weight)
}
// Symbolize IP.
if _, ok := p.ipInfo[r.IP]; !ok {
// TODO: Intern strings
var symb perfsession.Symbolic
if !perfsession.Symbolize(s, mmap, r.IP, &symb) {
droppedSymbols++
}
if symb.FuncName == "" {
symb.FuncName = "[unknown]"
}
fileName := "[unknown]"
if symb.Line.File != nil && symb.Line.File.Name != "" {
fileName = symb.Line.File.Name
}
p.ipInfo[r.IP] = ipInfo{
funcName: symb.FuncName,
fileName: fileName,
line: symb.Line.Line,
}
}
}
}
if numSamples == 0 {
fmt.Printf("no memory latency samples in %s (did you use \"perf mem record\"?)\n", fileName)
os.Exit(1)
}
if droppedMmaps > 0 {
fmt.Printf("warning: %d sample IPs (%d%%) occurred in unmapped memory regions\n", droppedMmaps, droppedMmaps*100/numSamples)
}
if droppedSymbols > 0 {
fmt.Printf("warning: failed to symbolize %d samples (%d%%)\n", droppedSymbols, droppedSymbols*100/numSamples)
}
return db
}
// filter specifies a set of field values to filter records on. The
// zero value of each field means not to filter on that field.
type filter struct {
pid int
funcName string
fileName string
line int // Requires fileName.
address uint64
dataSrc perffile.DataSrc
}
// filter invokes cb for every record matching f.
func (db *database) filter(f *filter, cb func(*proc, *record)) {
dsFilter := f.dataSrc != perffile.DataSrc{}
filterProc := func(proc *proc) {
var ds perffile.DataSrc
// TODO: Consider creating indexes for some or all of
// these. Then just do a list merge of the record
// indexes.
for i := range proc.records {
// Avoid heap-allocating for passing rec to cb.
rec := &proc.records[i]
if f.address != 0 && f.address != rec.address {
continue
}
ipi := proc.ipInfo[rec.ip]
if f.funcName != "" && f.funcName != ipi.funcName {
continue
}
if f.fileName != "" && f.fileName != ipi.fileName {
continue
}
if f.line != 0 && f.line != ipi.line {
continue
}
if !dsFilter {
// Short-circuit dataSrc checking.
goto good
}
ds = db.dataSrcs[rec.dataSrc]
if f.dataSrc.Op != 0 && f.dataSrc.Op != ds.Op {
continue
}
if f.dataSrc.Level != 0 && (f.dataSrc.Level != ds.Level || f.dataSrc.Miss != ds.Miss) {
continue
}
if f.dataSrc.Snoop != 0 && f.dataSrc.Snoop != ds.Snoop {
continue
}
if f.dataSrc.Locked != 0 && f.dataSrc.Locked != ds.Locked {
continue
}
if f.dataSrc.TLB != 0 && f.dataSrc.TLB != ds.TLB {
continue
}
good:
cb(proc, rec)
}
}
if f.pid == 0 {
for _, proc := range db.procs {
filterProc(proc)
}
} else {
proc := db.procs[f.pid]
if proc != nil {
filterProc(proc)
}
}
}
================================================
FILE: cmd/memlat/main.go
================================================
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Command memlat is a web-based browser for memory load latency profiles.
//
// Memory stalls and conflicts are increasingly important for software
// performance. Memory load latency profiles can give deep insights in
// to these problems; however, the richness of these profiles makes
// them difficult to interpret using traditional profiling tools and
// techniques.
//
// memlat is a profile browser built for understanding and
// interpreting memory load latency profiles. The central concept is a
// "latency distribution", which is a statistical distribution of the
// number of cycles spent in memory load or store operations. For
// example, if there are 10 loads that take 10 cycles and 2 loads that
// takes 100 cycles, the latency distribution consists of a 100 cycle
// spike at 10 cycles and a 200 cycle spike at 100 cycles. The total
// weight of this distribution accounts for the total cycles spent
// waiting on memory loads or stores.
//
// memlat presents a profile as a multidimensional latency
// distribution and provides a tools for viewing and filtering this
// distribution on each dimension, such as by function, by source
// line, by data source (L1 hit, TLB miss, etc), by address, etc. Each
// tab in the UI browses the profile on a different dimension and
// clicking on a row filters the profile down to just that function,
// source line, etc. An active filters can be removed by clicking on
// it in the filter bar at the top.
//
// For example, suppose we want to understand the primary source of
// memory latency in a profile. Select the "By source line" tab and
// click on the top row to filter to the source line that contributed
// the most total memory latency. You can select the "Source
// annotation" tab to see the text of this line. To drill down to a
// particular memory address, select the "By address" tab to see the
// memory addresses touched by this source line. Click the top one to
// further filter to the hottest address touched by this source line.
// Then, click the source line filter in the filter bar at the top to
// remove the source line filter. Finally, select the "Source
// annotation" tab to see the other source code lines that touch this
// hot address.
//
// Note that the latency reported by the hardware is the time from
// instruction issue to retire. Hence, a "fast load" (say, an L1 hit)
// that happens immediately after a "slow load" (say, an LLC miss),
// will have a high reported latency because it has to wait for the
// slow load, even though the actual memory operation for the fast
// load is fast.
//
// Usage
//
// To download and install memlat, run
//
// go get github.com/aclements/go-perf/cmd/memlat
//
// memlat works with the memory load latency profiles recorded by the
// Linux perf tool. This requires hardware support that has been
// available since Intel Nehalem. To record a memory latency profile,
// use perf's "mem" subcommand. For example,
//
// perf mem record <command> # Record a memory profile for command
// perf mem record -a # Record a system-wide memory profile
//
// This will write the profile to a file called perf.data. Then,
// simply start memlat with
//
// memlat
//
// memlat will parse and symbolize the profile and start a web server
// listening by default on localhost;8001.
package main
import (
"bufio"
"embed"
"encoding/json"
"flag"
"fmt"
"io/fs"
"log"
"net/http"
"net/url"
"os"
"sort"
"strconv"
"github.com/aclements/go-moremath/scale"
"github.com/aclements/go-moremath/vec"
"github.com/aclements/go-perf/perffile"
)
//go:embed static
var staticFiles embed.FS
// TODO: Open a browser automatically. Maybe bind to any address in
// this mode.
// TODO: Does this correctly handle the dynamic sampling rate that
// perf mem record uses by default?
func main() {
var (
flagInput = flag.String("i", "perf.data", "read memory latency profile from `file`")
flagHttp = flag.String("http", "localhost:8001", "serve HTTP on `address`")
flagDocRoot = flag.String("docroot", "", "alternate `path` to static web resources")
)
flag.Parse()
if flag.NArg() > 0 {
flag.Usage()
os.Exit(1)
}
fmt.Fprintln(os.Stderr, "loading profile...")
db := parsePerf(*flagInput)
fmt.Fprintln(os.Stderr, "profile loaded")
mux := http.NewServeMux()
if *flagDocRoot == "" {
// Use the embedded static assets.
sub, _ := fs.Sub(staticFiles, "static")
mux.Handle("/", http.FileServer(http.FS(sub)))
} else {
// Use assets from the file system.
mux.Handle("/", http.FileServer(http.Dir(*flagDocRoot)))
}
mux.Handle("/h", &heatMapHandler{db})
mux.Handle("/metadata", &metadataHandler{*flagInput, db.metadata})
fmt.Fprintf(os.Stderr, "serving on %s\n", *flagHttp)
if err := http.ListenAndServe(*flagHttp, mux); err != nil {
log.Fatal(err)
}
}
type heatMapHandler struct {
db *database
}
func (h *heatMapHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
// TOOD: Include a signature for this profile in the request
// and mark the response as cacheable.
// TODO: Compress the output.
// Request includes filter, group by. Response: map from group
// by to histograms.
qs, err := url.ParseQuery(req.URL.RawQuery)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
atoi := func(s string) int {
x, _ := strconv.Atoi(s)
return x
}
f := filter{
pid: atoi(qs.Get("pid")),
funcName: qs.Get("funcName"),
fileName: qs.Get("fileName"),
line: atoi(qs.Get("line")),
address: uint64(atoi(qs.Get("address"))),
dataSrc: perffile.DataSrc{
Op: perffile.DataSrcOp(atoi(qs.Get("op"))),
Miss: qs.Get("miss") == "miss",
Level: perffile.DataSrcLevel(atoi(qs.Get("level"))),
Snoop: perffile.DataSrcSnoop(atoi(qs.Get("snoop"))),
Locked: perffile.DataSrcLock(atoi(qs.Get("locked"))),
TLB: perffile.DataSrcTLB(atoi(qs.Get("tlb"))),
},
}
groupBy := qs.Get("groupBy")
limit := atoi(qs.Get("limit"))
// Compute the scale for this histogram set.
const useLocalScale = false
var maxLatency uint32 = 1
if useLocalScale {
h.db.filter(&f, func(p *proc, rec *record) {
if rec.latency > maxLatency {
maxLatency = rec.latency
}
})
} else {
maxLatency = h.db.maxLatency
}
scaler, err := scale.NewLog(1, float64(maxLatency), 10)
if err != nil {
log.Fatal(err)
}
scaler.Nice(scale.TickOptions{Max: 6})
var histograms []*latencyHistogram
newHist := func() *latencyHistogram {
hist := newLatencyHistogram(&scaler)
histograms = append(histograms, hist)
return hist
}
// Create aggregation function.
var agg func(*proc, *record)
switch groupBy {
default:
http.Error(w, fmt.Sprintf("unknown groupby %q", groupBy), http.StatusBadRequest)
return
case "all":
hist := newHist()
agg = func(p *proc, r *record) {
hist.update(r)
}
case "pid":
groups := make(map[*proc]*latencyHistogram)
agg = func(p *proc, r *record) {
hist, ok := groups[p]
if !ok {
hist = newHist()
hist.PID = p.pid
hist.Comm = p.comm
groups[p] = hist
}
hist.update(r)
}
case "funcName":
groups := make(map[string]*latencyHistogram)
agg = func(p *proc, r *record) {
funcName := p.ipInfo[r.ip].funcName
hist, ok := groups[funcName]
if !ok {
hist = newHist()
hist.FuncName = funcName
groups[funcName] = hist
}
hist.update(r)
}
case "annotation", "line":
groups := make(map[ipInfo]*latencyHistogram)
agg = func(p *proc, r *record) {
ipInfo := p.ipInfo[r.ip]
hist, ok := groups[ipInfo]
if !ok {
hist = newHist()
hist.FileName = ipInfo.fileName
hist.Line = ipInfo.line
groups[ipInfo] = hist
}
hist.update(r)
}
case "address":
groups := make(map[uint64]*latencyHistogram)
agg = func(p *proc, r *record) {
hist, ok := groups[r.address]
if !ok {
hist = newHist()
hist.Address = r.address
groups[r.address] = hist
}
hist.update(r)
}
case "dataSrc":
groups := make(map[perffile.DataSrc]*latencyHistogram)
add1 := func(r *record, key perffile.DataSrc, label, group string) {
hist, ok := groups[key]
if !ok {
hist = newHist()
hist.group = group
hist.Op = key.Op
hist.Miss = key.Miss
hist.Level = key.Level
hist.Snoop = key.Snoop
hist.Locked = key.Locked
hist.TLB = key.TLB
hist.DataSrcLabel = label
groups[key] = hist
}
hist.update(r)
}
agg = func(p *proc, r *record) {
ds := h.db.dataSrcs[r.dataSrc]
if ds.Op != 0 {
add1(r, perffile.DataSrc{Op: ds.Op}, ds.Op.String(), "Operation")
}
if ds.Level != 0 {
miss := " hit"
if ds.Miss {
miss = " miss"
}
add1(r, perffile.DataSrc{Miss: ds.Miss, Level: ds.Level}, ds.Level.String()+miss, "Cache level")
}
if ds.Snoop != 0 {
add1(r, perffile.DataSrc{Snoop: ds.Snoop}, ds.Snoop.String(), "Snoop")
}
if ds.Locked != 0 {
add1(r, perffile.DataSrc{Locked: ds.Locked}, ds.Locked.String()[11:], "Locked")
}
if ds.TLB != 0 {
add1(r, perffile.DataSrc{TLB: ds.TLB}, ds.TLB.String(), "TLB")
}
}
}
h.db.filter(&f, agg)
// Sort histograms by weight.
sort.Sort(sort.Reverse(weightSorter(histograms)))
// Take the top N histograms.
if groupBy == "dataSrc" {
limit = 0
}
if limit != 0 && limit < len(histograms) {
histograms = histograms[:limit]
}
// Special processing for some grouping types.
switch groupBy {
case "dataSrc":
// Add group headers
for i := 0; i < len(histograms); i++ {
if i == 0 || histograms[i-1].group != histograms[i].group {
histograms = append(histograms, nil)
copy(histograms[i+1:], histograms[i:])
histograms[i] = &latencyHistogram{
Text: histograms[i+1].group,
IsHeader: true,
}
i++
}
}
case "annotation":
if len(histograms) == 0 {
break
}
// TODO: When loading profile, check for out-of-date
// source files and warn.
ranges := []sourceRange{}
histMap := map[ipInfo]*latencyHistogram{}
for _, hist := range histograms {
ranges = append(ranges, sourceRange{hist.FileName, hist.Line, hist.Line + 1, hist.weight})
histMap[ipInfo{"", hist.FileName, hist.Line}] = hist
}
ranges = expandSourceRanges(ranges, 5)
// Sort ranges by max weight histogram.
sort.Slice(ranges, func(i, j int) bool {
return ranges[i].maxWeight > ranges[j].maxWeight
})
// Collect lines from ranges.
histograms = []*latencyHistogram{}
for _, r := range ranges {
lines, r, err := getLines(r)
if err != nil {
log.Println(err)
continue
}
if len(lines) == 0 {
continue
}
// Add a header for this range of source.
header := newLatencyHistogram(&scaler)
header.Bins = nil
header.Text = r.file
header.IsHeader = true
histograms = append(histograms, header)
for i, text := range lines {
hist := histMap[ipInfo{"", r.file, r.start + i}]
if hist == nil {
hist = newLatencyHistogram(&scaler)
hist.FileName = r.file
hist.Line = r.start + i
hist.Bins = nil
}
hist.Text = text
histograms = append(histograms, hist)
}
}
}
// Compute maximum bin size for bin scaling.
maxBin := 0
for _, hist := range histograms {
max := hist.max()
if max > maxBin {
maxBin = max
}
}
// Construct JSON reply.
major, minor := scaler.Ticks(scale.TickOptions{Max: 6})
majorX, minorX := vec.Map(scaler.Map, major), vec.Map(scaler.Map, minor)
err = json.NewEncoder(w).Encode(struct {
Histograms []*latencyHistogram
MaxBin int
MajorTicks, MajorTicksX []float64
MinorTicksX []float64
}{histograms, maxBin, major, majorX, minorX})
if err != nil {
log.Print(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
const latencyHistogramBins = 60
// TODO: There's a lot of code for transforming between filters in the
// query string, latencyHistogram, and the filter struct. Unify these
// better.
type latencyHistogram struct {
scale scale.Quantitative
Bins []int `json:",omitempty"`
weight int
group string
// Filter specification.
PID int `json:"pid,omitempty"`
Comm string `json:"comm,omitempty"`
FuncName string `json:"funcName,omitempty"`
FileName string `json:"fileName,omitempty"`
Line int `json:"line,omitempty"`
Address uint64 `json:"address,omitempty"`
// Data source filter specification.
Op perffile.DataSrcOp `json:"op,omitempty"`
Miss bool `json:"miss,omitempty"`
Level perffile.DataSrcLevel `json:"level,omitempty"`
Snoop perffile.DataSrcSnoop `json:"snoop,omitempty"`
Locked perffile.DataSrcLock `json:"locked,omitempty"`
TLB perffile.DataSrcTLB `json:"tlb,omitempty"`
// Presentation.
Text string `json:"text,omitempty"`
DataSrcLabel string `json:"dataSrcLabel,omitempty"`
IsHeader bool `json:"isHeader,omitempty"`
}
func newLatencyHistogram(scale scale.Quantitative) *latencyHistogram {
return &latencyHistogram{
scale: scale,
Bins: make([]int, latencyHistogramBins),
weight: 0,
}
}
func (h *latencyHistogram) update(r *record) {
bin := int(h.scale.Map(float64(r.latency)) * latencyHistogramBins)
if bin < 0 {
bin = 0
}
if bin >= latencyHistogramBins {
bin = latencyHistogramBins
}
h.Bins[bin] += int(r.latency)
h.weight += int(r.latency)
}
func (h *latencyHistogram) max() int {
out := 0
for _, count := range h.Bins {
if count > out {
out = count
}
}
return out
}
type weightSorter []*latencyHistogram
func (w weightSorter) Len() int {
return len(w)
}
func (w weightSorter) Less(i, j int) bool {
if w[i].group != w[j].group {
return w[i].group > w[j].group
}
return w[i].weight < w[j].weight
}
func (w weightSorter) Swap(i, j int) {
w[i], w[j] = w[j], w[i]
}
type sourceRange struct {
file string
start, end int
maxWeight int
}
func expandSourceRanges(r []sourceRange, by int) []sourceRange {
sort.Slice(r, func(i, j int) bool {
if r[i].file != r[j].file {
return r[i].file < r[j].file
}
return r[i].start < r[j].start
})
// Expand ranges.
for i := range r {
r[i].start -= by
r[i].end += by
}
// Merge ranges.
i := 0
for j := 1; j < len(r); j++ {
if r[i].file == r[j].file && r[i].end >= r[j].start {
if r[j].end > r[i].end {
r[i].end = r[j].end
}
if r[j].maxWeight > r[i].maxWeight {
r[i].maxWeight = r[j].maxWeight
}
} else {
i++
r[i] = r[j]
}
}
return r[:i+1]
}
func getLines(r sourceRange) ([]string, sourceRange, error) {
lines := []string{}
file, err := os.Open(r.file)
if err != nil {
return nil, r, err
}
defer file.Close()
// Skip to start.
if r.start < 0 {
r.start = 0
}
scanner := bufio.NewScanner(file)
for i := 0; i < r.start && scanner.Scan(); i++ {
// Do nothing
}
for i := 0; i < r.end-r.start && scanner.Err() == nil; i++ {
lines = append(lines, scanner.Text())
scanner.Scan()
}
if err := scanner.Err(); err != nil {
return nil, r, err
}
return lines, r, nil
}
type metadataHandler struct {
Filename string
Metadata
}
func (h *metadataHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
err := json.NewEncoder(w).Encode(h)
if err != nil {
log.Print(err)
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
================================================
FILE: cmd/memlat/static/bower.json
================================================
{
"name": "memlat",
"version": "0.0.0",
"homepage": "https://github.com/aclements/go-perf",
"authors": [
"Austin Clements <(none)>"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"polymer": "Polymer/polymer#^1.0.0",
"paper-button": "PolymerElements/paper-button#~1.0.3",
"paper-tabs": "PolymerElements/paper-tabs#~1.0.2",
"paper-styles": "PolymerElements/paper-styles#~1.0.11",
"iron-pages": "PolymerElements/iron-pages#~1.0.3",
"iron-ajax": "PolymerElements/iron-ajax#~1.0.4",
"paper-card": "PolymerElements/paper-card#~1.0.3",
"paper-header-panel": "PolymerElements/paper-header-panel#~1.0.4",
"paper-toolbar": "PolymerElements/paper-toolbar#~1.0.4",
"iron-icon": "PolymerElements/iron-icon#~1.0.3",
"iron-icons": "PolymerElements/iron-icons#~1.0.3"
}
}
================================================
FILE: cmd/memlat/static/bower_components/font-roboto/.bower.json
================================================
{
"name": "font-roboto",
"version": "1.0.1",
"description": "An HTML import for Roboto",
"authors": [
"The Polymer Authors"
],
"keywords": [
"font",
"roboto"
],
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/font-roboto.git"
},
"main": "roboto.html",
"license": "http://polymer.github.io/LICENSE.txt",
"homepage": "https://github.com/PolymerElements/font-roboto/",
"ignore": [
"/.*"
],
"_release": "1.0.1",
"_resolution": {
"type": "version",
"tag": "v1.0.1",
"commit": "21ce9b51a417fa9995cf6606e886aba0728f70a1"
},
"_source": "git://github.com/PolymerElements/font-roboto.git",
"_target": "^1.0.1",
"_originalSource": "PolymerElements/font-roboto"
}
================================================
FILE: cmd/memlat/static/bower_components/font-roboto/README.md
================================================
# font-roboto
================================================
FILE: cmd/memlat/static/bower_components/font-roboto/bower.json
================================================
{
"name": "font-roboto",
"version": "1.0.1",
"description": "An HTML import for Roboto",
"authors": [
"The Polymer Authors"
],
"keywords": [
"font",
"roboto"
],
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/font-roboto.git"
},
"main": "roboto.html",
"license": "http://polymer.github.io/LICENSE.txt",
"homepage": "https://github.com/PolymerElements/font-roboto/",
"ignore": [
"/.*"
]
}
================================================
FILE: cmd/memlat/static/bower_components/font-roboto/roboto.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700">
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/.bower.json
================================================
{
"name": "paper-styles",
"version": "1.0.11",
"description": "Common (global) styles for Material Design elements.",
"authors": [
"The Polymer Authors"
],
"keywords": [
"web-component",
"polymer",
"style"
],
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/paper-styles.git"
},
"main": "paper-styles.html",
"license": "http://polymer.github.io/LICENSE.txt",
"homepage": "https://github.com/polymerelements/paper-styles/",
"ignore": [
"/.*"
],
"dependencies": {
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"font-roboto": "PolymerElements/font-roboto#^1.0.1",
"polymer": "Polymer/polymer#^1.0.0"
},
"devDependencies": {
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.0.11",
"_resolution": {
"type": "version",
"tag": "v1.0.11",
"commit": "347542e9ebe3e6e5f0830ee10e1c20c12956ff2c"
},
"_source": "git://github.com/polymerelements/paper-styles.git",
"_target": "^1.0.0",
"_originalSource": "polymerelements/paper-styles"
}
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/README.md
================================================
# paper-styles
Material design CSS styles.
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/bower.json
================================================
{
"name": "paper-styles",
"version": "1.0.11",
"description": "Common (global) styles for Material Design elements.",
"authors": [
"The Polymer Authors"
],
"keywords": [
"web-component",
"polymer",
"style"
],
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/paper-styles.git"
},
"main": "paper-styles.html",
"license": "http://polymer.github.io/LICENSE.txt",
"homepage": "https://github.com/polymerelements/paper-styles/",
"ignore": [
"/.*"
],
"dependencies": {
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"font-roboto": "PolymerElements/font-roboto#^1.0.1",
"polymer": "Polymer/polymer#^1.0.0"
},
"devDependencies": {
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}
}
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/classes/global.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../paper-styles-classes.html">
<!--
A set of base styles that are applied to the document and standard elements that
match the Material Design spec.
-->
<style>
/*
Note that there is a lot of style duplication here. The hope is that the Polymer
0.8 styling solution will allow for inheritance of properties so that we can
eventually avoid it.
*/
/* Mixins */
/* [paper-font] */
body {
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased; /* OS X subpixel AA bleed bug */
}
/* [paper-font=display2] */
h1 {
font-size: 45px;
font-weight: 400;
letter-spacing: -.018em;
line-height: 48px;
}
/* [paper-font=display1] */
h2 {
font-size: 34px;
font-weight: 400;
letter-spacing: -.01em;
line-height: 40px;
}
/* [paper-font=headline] */
h3 {
font-size: 24px;
font-weight: 400;
letter-spacing: -.012em;
line-height: 32px;
}
/* [paper-font=subhead] */
h4 {
font-size: 16px;
font-weight: 400;
line-height: 24px;
}
/* [paper-font=body2] */
h5, h6 {
font-size: 14px;
font-weight: 500;
line-height: 24px;
}
/* [paper-font=button] */
a {
font-size: 14px;
font-weight: 500;
letter-spacing: 0.018em;
line-height: 24px;
text-transform: uppercase;
}
/* Overrides */
body, a {
color: #212121;
}
h1, h2, h3, h4, h5, h6, p {
margin: 0 0 20px 0;
}
h1, h2, h3, h4, h5, h6, a {
text-rendering: optimizeLegibility;
}
a {
text-decoration: none;
}
</style>
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/classes/shadow-layout.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<style>
/*******************************
Flex Layout
*******************************/
html /deep/ .layout.horizontal,
html /deep/ .layout.horizontal-reverse,
html /deep/ .layout.vertical,
html /deep/ .layout.vertical-reverse {
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
html /deep/ .layout.inline {
display: -ms-inline-flexbox;
display: -webkit-inline-flex;
display: inline-flex;
}
html /deep/ .layout.horizontal {
-ms-flex-direction: row;
-webkit-flex-direction: row;
flex-direction: row;
}
html /deep/ .layout.horizontal-reverse {
-ms-flex-direction: row-reverse;
-webkit-flex-direction: row-reverse;
flex-direction: row-reverse;
}
html /deep/ .layout.vertical {
-ms-flex-direction: column;
-webkit-flex-direction: column;
flex-direction: column;
}
html /deep/ .layout.vertical-reverse {
-ms-flex-direction: column-reverse;
-webkit-flex-direction: column-reverse;
flex-direction: column-reverse;
}
html /deep/ .layout.wrap {
-ms-flex-wrap: wrap;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
html /deep/ .layout.wrap-reverse {
-ms-flex-wrap: wrap-reverse;
-webkit-flex-wrap: wrap-reverse;
flex-wrap: wrap-reverse;
}
html /deep/ .flex-auto {
-ms-flex: 1 1 auto;
-webkit-flex: 1 1 auto;
flex: 1 1 auto;
}
html /deep/ .flex-none {
-ms-flex: none;
-webkit-flex: none;
flex: none;
}
html /deep/ .flex,
html /deep/ .flex-1 {
-ms-flex: 1;
-webkit-flex: 1;
flex: 1;
}
html /deep/ .flex-2 {
-ms-flex: 2;
-webkit-flex: 2;
flex: 2;
}
html /deep/ .flex-3 {
-ms-flex: 3;
-webkit-flex: 3;
flex: 3;
}
html /deep/ .flex-4 {
-ms-flex: 4;
-webkit-flex: 4;
flex: 4;
}
html /deep/ .flex-5 {
-ms-flex: 5;
-webkit-flex: 5;
flex: 5;
}
html /deep/ .flex-6 {
-ms-flex: 6;
-webkit-flex: 6;
flex: 6;
}
html /deep/ .flex-7 {
-ms-flex: 7;
-webkit-flex: 7;
flex: 7;
}
html /deep/ .flex-8 {
-ms-flex: 8;
-webkit-flex: 8;
flex: 8;
}
html /deep/ .flex-9 {
-ms-flex: 9;
-webkit-flex: 9;
flex: 9;
}
html /deep/ .flex-10 {
-ms-flex: 10;
-webkit-flex: 10;
flex: 10;
}
html /deep/ .flex-11 {
-ms-flex: 11;
-webkit-flex: 11;
flex: 11;
}
html /deep/ .flex-12 {
-ms-flex: 12;
-webkit-flex: 12;
flex: 12;
}
/* alignment in cross axis */
html /deep/ .layout.start {
-ms-flex-align: start;
-webkit-align-items: flex-start;
align-items: flex-start;
}
html /deep/ .layout.center,
html /deep/ .layout.center-center {
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
html /deep/ .layout.end {
-ms-flex-align: end;
-webkit-align-items: flex-end;
align-items: flex-end;
}
/* alignment in main axis */
html /deep/ .layout.start-justified {
-ms-flex-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
}
html /deep/ .layout.center-justified,
html /deep/ .layout.center-center {
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
html /deep/ .layout.end-justified {
-ms-flex-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
html /deep/ .layout.around-justified {
-ms-flex-pack: around;
-webkit-justify-content: space-around;
justify-content: space-around;
}
html /deep/ .layout.justified {
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
/* self alignment */
html /deep/ .self-start {
-ms-align-self: flex-start;
-webkit-align-self: flex-start;
align-self: flex-start;
}
html /deep/ .self-center {
-ms-align-self: center;
-webkit-align-self: center;
align-self: center;
}
html /deep/ .self-end {
-ms-align-self: flex-end;
-webkit-align-self: flex-end;
align-self: flex-end;
}
html /deep/ .self-stretch {
-ms-align-self: stretch;
-webkit-align-self: stretch;
align-self: stretch;
}
/*******************************
Other Layout
*******************************/
html /deep/ .block {
display: block;
}
/* IE 10 support for HTML5 hidden attr */
html /deep/ [hidden] {
display: none !important;
}
html /deep/ .invisible {
visibility: hidden !important;
}
html /deep/ .relative {
position: relative;
}
html /deep/ .fit {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
body.fullbleed {
margin: 0;
height: 100vh;
}
html /deep/ .scroll {
-webkit-overflow-scrolling: touch;
overflow: auto;
}
.fixed-bottom,
.fixed-left,
.fixed-right,
.fixed-top {
position: fixed;
}
html /deep/ .fixed-top {
top: 0;
left: 0;
right: 0;
}
html /deep/ .fixed-right {
top: 0;
right: 0;
botttom: 0;
}
html /deep/ .fixed-bottom {
right: 0;
bottom: 0;
left: 0;
}
html /deep/ .fixed-left {
top: 0;
botttom: 0;
left: 0;
}
</style>
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/classes/shadow.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<style>
.shadow-transition {
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.shadow-elevation-2dp {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
}
.shadow-elevation-3dp {
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
0 1px 8px 0 rgba(0, 0, 0, 0.12),
0 3px 3px -2px rgba(0, 0, 0, 0.4);
}
.shadow-elevation-4dp {
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
0 1px 10px 0 rgba(0, 0, 0, 0.12),
0 2px 4px -1px rgba(0, 0, 0, 0.4);
}
.shadow-elevation-6dp {
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
0 1px 18px 0 rgba(0, 0, 0, 0.12),
0 3px 5px -1px rgba(0, 0, 0, 0.4);
}
.shadow-elevation-8dp {
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12),
0 5px 5px -3px rgba(0, 0, 0, 0.4);
}
.shadow-elevation-16dp {
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
0 6px 30px 5px rgba(0, 0, 0, 0.12),
0 8px 10px -5px rgba(0, 0, 0, 0.4);
}
</style>
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/classes/typography.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../../font-roboto/roboto.html">
<!--
Typographic styles are provided matching the Material Design standard styles:
http://www.google.com/design/spec/style/typography.html#typography-standard-styles
To make use of them, apply a `paper-font-<style>` class to elements, matching
the font style you wish it to inherit.
<header class="paper-font-display2">Hey there!</header>
Note that these are English/Latin centric styles. You may need to further adjust
line heights and weights for CJK typesetting. See the notes in the Material
Design typography section.
-->
<style>
.paper-font-display4,
.paper-font-display3,
.paper-font-display2,
.paper-font-display1,
.paper-font-headline,
.paper-font-title,
.paper-font-subhead,
.paper-font-body2,
.paper-font-body1,
.paper-font-caption,
.paper-font-menu,
.paper-font-button {
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased; /* OS X subpixel AA bleed bug */
}
.paper-font-code2,
.paper-font-code1 {
font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
-webkit-font-smoothing: antialiased; /* OS X subpixel AA bleed bug */
}
/* Opt for better kerning for headers & other short labels. */
.paper-font-display4,
.paper-font-display3,
.paper-font-display2,
.paper-font-display1,
.paper-font-headline,
.paper-font-title,
.paper-font-subhead,
.paper-font-menu,
.paper-font-button {
text-rendering: optimizeLegibility;
}
/*
"Line wrapping only applies to Body, Subhead, Headline, and the smaller Display
styles. All other styles should exist as single lines."
*/
.paper-font-display4,
.paper-font-display3,
.paper-font-title,
.paper-font-caption,
.paper-font-menu,
.paper-font-button {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.paper-font-display4 {
font-size: 112px;
font-weight: 300;
letter-spacing: -.044em;
line-height: 120px;
}
.paper-font-display3 {
font-size: 56px;
font-weight: 400;
letter-spacing: -.026em;
line-height: 60px;
}
.paper-font-display2 {
font-size: 45px;
font-weight: 400;
letter-spacing: -.018em;
line-height: 48px;
}
.paper-font-display1 {
font-size: 34px;
font-weight: 400;
letter-spacing: -.01em;
line-height: 40px;
}
.paper-font-headline {
font-size: 24px;
font-weight: 400;
letter-spacing: -.012em;
line-height: 32px;
}
.paper-font-title {
font-size: 20px;
font-weight: 500;
line-height: 28px;
}
.paper-font-subhead {
font-size: 16px;
font-weight: 400;
line-height: 24px;
}
.paper-font-body2 {
font-size: 14px;
font-weight: 500;
line-height: 24px;
}
.paper-font-body1 {
font-size: 14px;
font-weight: 400;
line-height: 20px;
}
.paper-font-caption {
font-size: 12px;
font-weight: 400;
letter-spacing: 0.011em;
line-height: 20px;
}
.paper-font-menu {
font-size: 13px;
font-weight: 500;
line-height: 24px;
}
.paper-font-button {
font-size: 14px;
font-weight: 500;
letter-spacing: 0.018em;
line-height: 24px;
text-transform: uppercase;
}
.paper-font-code2 {
font-size: 14px;
font-weight: 700;
line-height: 20px;
}
.paper-font-code1 {
font-size: 14px;
font-weight: 700;
line-height: 20px;
}
</style>
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/color.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer.html">
<style is="custom-style">
:root {
/* Material Design color palette for Google products */
--google-red-100: #f4c7c3;
--google-red-300: #e67c73;
--google-red-500: #db4437;
--google-red-700: #c53929;
--google-blue-100: #c6dafc;
--google-blue-300: #7baaf7;
--google-blue-500: #4285f4;
--google-blue-700: #3367d6;
--google-green-100: #b7e1cd;
--google-green-300: #57bb8a;
--google-green-500: #0f9d58;
--google-green-700: #0b8043;
--google-yellow-100: #fce8b2;
--google-yellow-300: #f7cb4d;
--google-yellow-500: #f4b400;
--google-yellow-700: #f09300;
--google-grey-100: #f5f5f5;
--google-grey-300: #e0e0e0;
--google-grey-500: #9e9e9e;
--google-grey-700: #616161;
/* Material Design color palette from online spec document */
--paper-red-50: #ffebee;
--paper-red-100: #ffcdd2;
--paper-red-200: #ef9a9a;
--paper-red-300: #e57373;
--paper-red-400: #ef5350;
--paper-red-500: #f44336;
--paper-red-600: #e53935;
--paper-red-700: #d32f2f;
--paper-red-800: #c62828;
--paper-red-900: #b71c1c;
--paper-red-a100: #ff8a80;
--paper-red-a200: #ff5252;
--paper-red-a400: #ff1744;
--paper-red-a700: #d50000;
--paper-pink-50: #fce4ec;
--paper-pink-100: #f8bbd0;
--paper-pink-200: #f48fb1;
--paper-pink-300: #f06292;
--paper-pink-400: #ec407a;
--paper-pink-500: #e91e63;
--paper-pink-600: #d81b60;
--paper-pink-700: #c2185b;
--paper-pink-800: #ad1457;
--paper-pink-900: #880e4f;
--paper-pink-a100: #ff80ab;
--paper-pink-a200: #ff4081;
--paper-pink-a400: #f50057;
--paper-pink-a700: #c51162;
--paper-purple-50: #f3e5f5;
--paper-purple-100: #e1bee7;
--paper-purple-200: #ce93d8;
--paper-purple-300: #ba68c8;
--paper-purple-400: #ab47bc;
--paper-purple-500: #9c27b0;
--paper-purple-600: #8e24aa;
--paper-purple-700: #7b1fa2;
--paper-purple-800: #6a1b9a;
--paper-purple-900: #4a148c;
--paper-purple-a100: #ea80fc;
--paper-purple-a200: #e040fb;
--paper-purple-a400: #d500f9;
--paper-purple-a700: #aa00ff;
--paper-deep-purple-50: #ede7f6;
--paper-deep-purple-100: #d1c4e9;
--paper-deep-purple-200: #b39ddb;
--paper-deep-purple-300: #9575cd;
--paper-deep-purple-400: #7e57c2;
--paper-deep-purple-500: #673ab7;
--paper-deep-purple-600: #5e35b1;
--paper-deep-purple-700: #512da8;
--paper-deep-purple-800: #4527a0;
--paper-deep-purple-900: #311b92;
--paper-deep-purple-a100: #b388ff;
--paper-deep-purple-a200: #7c4dff;
--paper-deep-purple-a400: #651fff;
--paper-deep-purple-a700: #6200ea;
--paper-indigo-50: #e8eaf6;
--paper-indigo-100: #c5cae9;
--paper-indigo-200: #9fa8da;
--paper-indigo-300: #7986cb;
--paper-indigo-400: #5c6bc0;
--paper-indigo-500: #3f51b5;
--paper-indigo-600: #3949ab;
--paper-indigo-700: #303f9f;
--paper-indigo-800: #283593;
--paper-indigo-900: #1a237e;
--paper-indigo-a100: #8c9eff;
--paper-indigo-a200: #536dfe;
--paper-indigo-a400: #3d5afe;
--paper-indigo-a700: #304ffe;
--paper-blue-50: #e3f2fd;
--paper-blue-100: #bbdefb;
--paper-blue-200: #90caf9;
--paper-blue-300: #64b5f6;
--paper-blue-400: #42a5f5;
--paper-blue-500: #2196f3;
--paper-blue-600: #1e88e5;
--paper-blue-700: #1976d2;
--paper-blue-800: #1565c0;
--paper-blue-900: #0d47a1;
--paper-blue-a100: #82b1ff;
--paper-blue-a200: #448aff;
--paper-blue-a400: #2979ff;
--paper-blue-a700: #2962ff;
--paper-light-blue-50: #e1f5fe;
--paper-light-blue-100: #b3e5fc;
--paper-light-blue-200: #81d4fa;
--paper-light-blue-300: #4fc3f7;
--paper-light-blue-400: #29b6f6;
--paper-light-blue-500: #03a9f4;
--paper-light-blue-600: #039be5;
--paper-light-blue-700: #0288d1;
--paper-light-blue-800: #0277bd;
--paper-light-blue-900: #01579b;
--paper-light-blue-a100: #80d8ff;
--paper-light-blue-a200: #40c4ff;
--paper-light-blue-a400: #00b0ff;
--paper-light-blue-a700: #0091ea;
--paper-cyan-50: #e0f7fa;
--paper-cyan-100: #b2ebf2;
--paper-cyan-200: #80deea;
--paper-cyan-300: #4dd0e1;
--paper-cyan-400: #26c6da;
--paper-cyan-500: #00bcd4;
--paper-cyan-600: #00acc1;
--paper-cyan-700: #0097a7;
--paper-cyan-800: #00838f;
--paper-cyan-900: #006064;
--paper-cyan-a100: #84ffff;
--paper-cyan-a200: #18ffff;
--paper-cyan-a400: #00e5ff;
--paper-cyan-a700: #00b8d4;
--paper-teal-50: #e0f2f1;
--paper-teal-100: #b2dfdb;
--paper-teal-200: #80cbc4;
--paper-teal-300: #4db6ac;
--paper-teal-400: #26a69a;
--paper-teal-500: #009688;
--paper-teal-600: #00897b;
--paper-teal-700: #00796b;
--paper-teal-800: #00695c;
--paper-teal-900: #004d40;
--paper-teal-a100: #a7ffeb;
--paper-teal-a200: #64ffda;
--paper-teal-a400: #1de9b6;
--paper-teal-a700: #00bfa5;
--paper-green-50: #e8f5e9;
--paper-green-100: #c8e6c9;
--paper-green-200: #a5d6a7;
--paper-green-300: #81c784;
--paper-green-400: #66bb6a;
--paper-green-500: #4caf50;
--paper-green-600: #43a047;
--paper-green-700: #388e3c;
--paper-green-800: #2e7d32;
--paper-green-900: #1b5e20;
--paper-green-a100: #b9f6ca;
--paper-green-a200: #69f0ae;
--paper-green-a400: #00e676;
--paper-green-a700: #00c853;
--paper-light-green-50: #f1f8e9;
--paper-light-green-100: #dcedc8;
--paper-light-green-200: #c5e1a5;
--paper-light-green-300: #aed581;
--paper-light-green-400: #9ccc65;
--paper-light-green-500: #8bc34a;
--paper-light-green-600: #7cb342;
--paper-light-green-700: #689f38;
--paper-light-green-800: #558b2f;
--paper-light-green-900: #33691e;
--paper-light-green-a100: #ccff90;
--paper-light-green-a200: #b2ff59;
--paper-light-green-a400: #76ff03;
--paper-light-green-a700: #64dd17;
--paper-lime-50: #f9fbe7;
--paper-lime-100: #f0f4c3;
--paper-lime-200: #e6ee9c;
--paper-lime-300: #dce775;
--paper-lime-400: #d4e157;
--paper-lime-500: #cddc39;
--paper-lime-600: #c0ca33;
--paper-lime-700: #afb42b;
--paper-lime-800: #9e9d24;
--paper-lime-900: #827717;
--paper-lime-a100: #f4ff81;
--paper-lime-a200: #eeff41;
--paper-lime-a400: #c6ff00;
--paper-lime-a700: #aeea00;
--paper-yellow-50: #fffde7;
--paper-yellow-100: #fff9c4;
--paper-yellow-200: #fff59d;
--paper-yellow-300: #fff176;
--paper-yellow-400: #ffee58;
--paper-yellow-500: #ffeb3b;
--paper-yellow-600: #fdd835;
--paper-yellow-700: #fbc02d;
--paper-yellow-800: #f9a825;
--paper-yellow-900: #f57f17;
--paper-yellow-a100: #ffff8d;
--paper-yellow-a200: #ffff00;
--paper-yellow-a400: #ffea00;
--paper-yellow-a700: #ffd600;
--paper-amber-50: #fff8e1;
--paper-amber-100: #ffecb3;
--paper-amber-200: #ffe082;
--paper-amber-300: #ffd54f;
--paper-amber-400: #ffca28;
--paper-amber-500: #ffc107;
--paper-amber-600: #ffb300;
--paper-amber-700: #ffa000;
--paper-amber-800: #ff8f00;
--paper-amber-900: #ff6f00;
--paper-amber-a100: #ffe57f;
--paper-amber-a200: #ffd740;
--paper-amber-a400: #ffc400;
--paper-amber-a700: #ffab00;
--paper-orange-50: #fff3e0;
--paper-orange-100: #ffe0b2;
--paper-orange-200: #ffcc80;
--paper-orange-300: #ffb74d;
--paper-orange-400: #ffa726;
--paper-orange-500: #ff9800;
--paper-orange-600: #fb8c00;
--paper-orange-700: #f57c00;
--paper-orange-800: #ef6c00;
--paper-orange-900: #e65100;
--paper-orange-a100: #ffd180;
--paper-orange-a200: #ffab40;
--paper-orange-a400: #ff9100;
--paper-orange-a700: #ff6500;
--paper-deep-orange-50: #fbe9e7;
--paper-deep-orange-100: #ffccbc;
--paper-deep-orange-200: #ffab91;
--paper-deep-orange-300: #ff8a65;
--paper-deep-orange-400: #ff7043;
--paper-deep-orange-500: #ff5722;
--paper-deep-orange-600: #f4511e;
--paper-deep-orange-700: #e64a19;
--paper-deep-orange-800: #d84315;
--paper-deep-orange-900: #bf360c;
--paper-deep-orange-a100: #ff9e80;
--paper-deep-orange-a200: #ff6e40;
--paper-deep-orange-a400: #ff3d00;
--paper-deep-orange-a700: #dd2c00;
--paper-brown-50: #efebe9;
--paper-brown-100: #d7ccc8;
--paper-brown-200: #bcaaa4;
--paper-brown-300: #a1887f;
--paper-brown-400: #8d6e63;
--paper-brown-500: #795548;
--paper-brown-600: #6d4c41;
--paper-brown-700: #5d4037;
--paper-brown-800: #4e342e;
--paper-brown-900: #3e2723;
--paper-grey-50: #fafafa;
--paper-grey-100: #f5f5f5;
--paper-grey-200: #eeeeee;
--paper-grey-300: #e0e0e0;
--paper-grey-400: #bdbdbd;
--paper-grey-500: #9e9e9e;
--paper-grey-600: #757575;
--paper-grey-700: #616161;
--paper-grey-800: #424242;
--paper-grey-900: #212121;
--paper-blue-grey-50: #eceff1;
--paper-blue-grey-100: #cfd8dc;
--paper-blue-grey-200: #b0bec5;
--paper-blue-grey-300: #90a4ae;
--paper-blue-grey-400: #78909c;
--paper-blue-grey-500: #607d8b;
--paper-blue-grey-600: #546e7a;
--paper-blue-grey-700: #455a64;
--paper-blue-grey-800: #37474f;
--paper-blue-grey-900: #263238;
/* opacity for dark text on a light background */
--dark-divider-opacity: 0.12;
--dark-disabled-opacity: 0.26; /* or hint text */
--dark-secondary-opacity: 0.54; /* or icon */
--dark-primary-opacity: 0.87;
/* opacity for light text on a dark background */
--light-divider-opacity: 0.12;
--light-disabled-opacity: 0.3; /* or hint text */
--light-secondary-opacity: 0.7; /* or icon */
--light-primary-opacity: 1.0;
}
</style>
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/default-theme.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer.html">
<style is="custom-style">
:root {
--dark-primary-color: #303f9f;
--default-primary-color: #3f51b5;
--light-primary-color: #c5cae9;
--text-primary-color: #ffffff;
--accent-color: #ff4081;
--primary-background-color: #ffffff;
--primary-text-color: #212121;
--secondary-text-color: #757575;
--disabled-text-color: #bdbdbd;
--divider-color: #e0e0e0;
}
</style>
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/demo/index.html
================================================
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>paper-styles demo</title>
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../paper-styles.html">
<link rel="import" href="../demo-pages.html">
<style>
.redlines {
background: linear-gradient(0deg, transparent, transparent 3.5px, rgba(255,0,0,0.2) 3.5px, rgba(255,0,0,0.2) 4px);
background-size: 100% 4px;
}
.paragraph {
margin-bottom: 20px;
}
</style>
</head>
<body unresolved>
<!-- FIXME remove when https://github.com/Polymer/polymer/issues/1415 is resolved -->
<dom-module id="x-demo">
<style>
.paper-font-display4 {
@apply(--paper-font-display4);
}
.paper-font-display3 {
@apply(--paper-font-display3);
}
.paper-font-display2 {
@apply(--paper-font-display2);
}
.paper-font-display1 {
@apply(--paper-font-display1);
}
.paper-font-headline {
@apply(--paper-font-headline);
}
.paper-font-title {
@apply(--paper-font-title);
}
.paper-font-subhead {
@apply(--paper-font-subhead);
}
.paper-font-body2 {
@apply(--paper-font-body1);
}
.paper-font-body1 {
@apply(--paper-font-body1);
}
.paper-font-caption {
@apply(--paper-font-caption);
}
.paper-font-menu {
@apply(--paper-font-menu);
}
.paper-font-button {
@apply(--paper-font-button);
}
.mobile-app {
max-width: 320px;
}
.toolbar {
height: 144px;
padding: 16px;
background: var(--default-primary-color);
color: var(--text-primary-color);
@apply(--paper-font-display1);
}
.item, .disabled-item {
position: relative;
padding: 8px;
border: 1px solid;
border-color: var(--divider-color);
border-top: 0;
}
.item .primary {
color: var(--primary-text-color);
@apply(--paper-font-body2);
}
.item .secondary {
color: var(--secondary-text-color);
@apply(--paper-font-body1);
}
.disabled-item {
color: var(--disabled-text-color);
@apply(--paper-font-body2);
}
.fab {
position: absolute;
box-sizing: border-box;
padding: 8px;
width: 56px;
height: 56px;
right: 16px;
top: -28px;
border-radius: 50%;
text-align: center;
background: var(--accent-color);
color: var(--text-primary-color);
@apply(--paper-font-display1);
}
.shadow {
display: inline-block;
padding: 8px;
margin: 16px;
height: 50px;
width: 50px;
}
.shadow-2dp {
@apply(--shadow-elevation-2dp);
}
.shadow-3dp {
@apply(--shadow-elevation-3dp);
}
.shadow-4dp {
@apply(--shadow-elevation-4dp);
}
.shadow-6dp {
@apply(--shadow-elevation-6dp);
}
.shadow-8dp {
@apply(--shadow-elevation-8dp);
}
.shadow-16dp {
@apply(--shadow-elevation-16dp);
}
</style>
<template>
<h1>paper-styles</h1>
<section id="default-theme">
<h2>default-theme.html</h2>
<section class="mobile-app">
<div class="toolbar">
Title
</div>
<div class="item">
<div class="fab">+</div>
<div class="primary">Primary text</div>
<div class="secondary">Secondary text</div>
</div>
<div class="disabled-item">
Disabled
</div>
</section>
</section>
<section id="typography">
<h2>typography.html</h2>
<p>
Grumpy wizards make toxic brew for the evil Queen and Jack.
</p>
<section class="redlines paragraph">
<div class="paper-font-display4">Display 4</div>
<div class="paper-font-display3">Display 3</div>
<div class="paper-font-display2">Display 2</div>
<div class="paper-font-display1">Display 1</div>
<div class="paper-font-headline">Headline</div>
<div class="paper-font-title">Title</div>
<div class="paper-font-subhead">Subhead</div>
<div class="paper-font-body2">Body 2</div>
<div class="paper-font-body1">Body 1</div>
<div class="paper-font-caption">Caption</div>
<div class="paper-font-menu">Menu</div>
<div class="paper-font-button">Button</div>
</section>
<h3>Paragraphs</h3>
<h4>body2</h4>
<section class="paper-font-body2 redlines">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
tincidunt dui sit amet mi auctor, ac gravida magna aliquam. Fusce quis
purus elementum, tempus nisi vel, volutpat nulla. Vestibulum mollis
dictum tellus, vulputate porttitor arcu. Curabitur imperdiet risus id
egestas accumsan. Donec lectus felis, dignissim id iaculis sit amet,
faucibus in leo.
</p>
<p>
Mauris id urna ac ante ultrices commodo a imperdiet elit. Vivamus
interdum neque magna, eget dapibus est auctor et. Donec accumsan
libero nec augue scelerisque, ac egestas ante tincidunt. Proin
sollicitudin, mi eget sagittis mollis, arcu orci scelerisque turpis, a
sollicitudin tellus quam non sapien.
</p>
</section>
<h4>body1</h4>
<section class="paper-font-body1 redlines">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
tincidunt dui sit amet mi auctor, ac gravida magna aliquam. Fusce quis
purus elementum, tempus nisi vel, volutpat nulla. Vestibulum mollis
dictum tellus, vulputate porttitor arcu. Curabitur imperdiet risus id
egestas accumsan. Donec lectus felis, dignissim id iaculis sit amet,
faucibus in leo.
</p>
<p>
Mauris id urna ac ante ultrices commodo a imperdiet elit. Vivamus
interdum neque magna, eget dapibus est auctor et. Donec accumsan
libero nec augue scelerisque, ac egestas ante tincidunt. Proin
sollicitudin, mi eget sagittis mollis, arcu orci scelerisque turpis, a
sollicitudin tellus quam non sapien.
</p>
</section>
</section>
<section id="shadow">
<h2>shadow.html</h2>
<div class="shadow shadow-2dp">2dp</div>
<div class="shadow shadow-3dp">3dp</div>
<div class="shadow shadow-4dp">4dp</div>
<div class="shadow shadow-6dp">6dp</div>
<div class="shadow shadow-8dp">8dp</div>
<div class="shadow shadow-16dp">16dp</div>
</section>
</template>
</dom-module>
<script>
document.addEventListener('HTMLImportsLoaded', function() {
Polymer({
is: 'x-demo',
enableCustomStyleProperties: true
});
});
</script>
<x-demo></x-demo>
<section id="demo-page">
<h2>demo-pages.html</h2>
<h3>Horizontal sections</h3>
<div class="horizontal-section-container">
<div>
<h4>Column 1</h4>
<div class="horizontal-section">
<div>Oxygen</div>
<div>Carbon</div>
<div>Hydrogen</div>
<div>Nitrogen</div>
<div>Calcium</div>
</div>
</div>
<div>
<h4>Column 2</h4>
<div class="horizontal-section">
<div>Oxygen</div>
<div>Carbon</div>
<div>Hydrogen</div>
<div>Nitrogen</div>
<div>Calcium</div>
</div>
</div>
<div>
<h4>Column 3</h4>
<div class="horizontal-section">
<div>Oxygen</div>
<div>Carbon</div>
<div>Hydrogen</div>
<div>Nitrogen</div>
<div>Calcium</div>
</div>
</div>
</div>
<h3>Vertical sections</h3>
<div class="vertical-section-container">
<div>
<h4>Section 1</h4>
<div class="vertical-section">
<div>Oxygen</div>
<div>Carbon</div>
<div>Hydrogen</div>
<div>Nitrogen</div>
<div>Calcium</div>
</div>
</div>
</div>
<div class="vertical-section-container centered">
<h4>Section 2 (centered)</h4>
<div class="vertical-section">
<div>Oxygen</div>
<div>Carbon</div>
<div>Hydrogen</div>
<div>Nitrogen</div>
<div>Calcium</div>
</div>
</div>
</section>
</body>
</html>
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/demo-pages.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
<link rel="import" href="color.html">
<link rel="import" href="typography.html">
<link rel="import" href="shadow.html">
<style is="custom-style">
body {
font-family: 'Roboto', 'Noto', sans-serif;
font-size: 14px;
margin: 0;
padding: 24px;
background-color: var(--paper-grey-50);
}
.horizontal-section-container {
@apply(--layout-horizontal);
@apply(--layout-center-justified);
@apply(--layout-wrap);
}
.vertical-section-container {
@apply(--layout-vertical);
@apply(--center-justified);
}
.horizontal-section {
background-color: white;
padding: 24px;
margin-right: 24px;
min-width: 200px;
@apply(--shadow-elevation-2dp);
}
.vertical-section {
background-color: white;
padding: 24px;
margin: 0 24px 24px 24px;
@apply(--shadow-elevation-2dp);
}
.centered {
max-width: 400px;
margin-left: auto;
margin-right: auto;
}
code {
color: var(--google-grey-700);
}
/* TODO: remove this hack and use horizontal-section-container instead */
body > div.layout.horizontal.center-justified {
@apply(--layout-wrap);
}
</style>
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/demo.css
================================================
/**
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
body {
font-family: 'Roboto', 'Noto', sans-serif;
font-size: 14px;
margin: 0;
padding: 24px;
}
section {
padding: 20px 0;
}
section > div {
padding: 14px;
font-size: 16px;
}
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/paper-styles-classes.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
<link rel="import" href="classes/typography.html">
<link rel="import" href="classes/shadow.html">
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/paper-styles.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
<link rel="import" href="color.html">
<link rel="import" href="default-theme.html">
<link rel="import" href="shadow.html">
<link rel="import" href="typography.html">
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/shadow.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer.html">
<style is="custom-style">
:root {
--shadow-transition: {
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
};
--shadow-none: {
box-shadow: none;
};
/* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */
--shadow-elevation-2dp: {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
};
--shadow-elevation-3dp: {
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
0 1px 8px 0 rgba(0, 0, 0, 0.12),
0 3px 3px -2px rgba(0, 0, 0, 0.4);
};
--shadow-elevation-4dp: {
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
0 1px 10px 0 rgba(0, 0, 0, 0.12),
0 2px 4px -1px rgba(0, 0, 0, 0.4);
};
--shadow-elevation-6dp: {
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
0 1px 18px 0 rgba(0, 0, 0, 0.12),
0 3px 5px -1px rgba(0, 0, 0, 0.4);
};
--shadow-elevation-8dp: {
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12),
0 5px 5px -3px rgba(0, 0, 0, 0.4);
};
--shadow-elevation-16dp: {
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
0 6px 30px 5px rgba(0, 0, 0, 0.12),
0 8px 10px -5px rgba(0, 0, 0, 0.4);
};
}
</style>
================================================
FILE: cmd/memlat/static/bower_components/paper-styles/typography.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../font-roboto/roboto.html">
<style is="custom-style">
:root {
/* Shared Styles */
/*
Unfortunately, we can't use nested rules
See https://github.com/Polymer/polymer/issues/1399
*/
--paper-font-common-base: {
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
};
--paper-font-common-code: {
font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
-webkit-font-smoothing: antialiased;
};
--paper-font-common-expensive-kerning: {
text-rendering: optimizeLegibility;
};
--paper-font-common-nowrap: {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
};
/* Material Font Styles */
--paper-font-display4: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* @apply(--paper-font-common-expensive-kerning); */
text-rendering: optimizeLegibility;
/* @apply(--paper-font-common-nowrap); */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 112px;
font-weight: 300;
letter-spacing: -.044em;
line-height: 120px;
};
--paper-font-display3: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* @apply(--paper-font-common-expensive-kerning); */
text-rendering: optimizeLegibility;
/* @apply(--paper-font-common-nowrap); */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 56px;
font-weight: 400;
letter-spacing: -.026em;
line-height: 60px;
};
--paper-font-display2: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* @apply(--paper-font-common-expensive-kerning); */
text-rendering: optimizeLegibility;
font-size: 45px;
font-weight: 400;
letter-spacing: -.018em;
line-height: 48px;
};
--paper-font-display1: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* @apply(--paper-font-common-expensive-kerning); */
text-rendering: optimizeLegibility;
font-size: 34px;
font-weight: 400;
letter-spacing: -.01em;
line-height: 40px;
};
--paper-font-headline: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* @apply(--paper-font-common-expensive-kerning); */
text-rendering: optimizeLegibility;
font-size: 24px;
font-weight: 400;
letter-spacing: -.012em;
line-height: 32px;
};
--paper-font-title: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* @apply(--paper-font-common-expensive-kerning); */
text-rendering: optimizeLegibility;
/* @apply(--paper-font-common-nowrap); */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 20px;
font-weight: 500;
line-height: 28px;
};
--paper-font-subhead: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* @apply(--paper-font-common-expensive-kerning); */
text-rendering: optimizeLegibility;
font-size: 16px;
font-weight: 400;
line-height: 24px;
};
--paper-font-body2: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
font-size: 14px;
font-weight: 500;
line-height: 24px;
};
--paper-font-body1: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
font-size: 14px;
font-weight: 400;
line-height: 20px;
};
--paper-font-caption: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* @apply(--paper-font-common-nowrap); */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 12px;
font-weight: 400;
letter-spacing: 0.011em;
line-height: 20px;
};
--paper-font-menu: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* @apply(--paper-font-common-expensive-kerning); */
text-rendering: optimizeLegibility;
/* @apply(--paper-font-common-nowrap); */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 13px;
font-weight: 500;
line-height: 24px;
};
--paper-font-button: {
/* @apply(--paper-font-common-base) */
font-family: 'Roboto', 'Noto', sans-serif;
-webkit-font-smoothing: antialiased;
/* @apply(--paper-font-common-expensive-kerning); */
text-rendering: optimizeLegibility;
/* @apply(--paper-font-common-nowrap); */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 14px;
font-weight: 500;
letter-spacing: 0.018em;
line-height: 24px;
text-transform: uppercase;
};
--paper-font-code2: {
/* @apply(--paper-font-common-code); */
font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
-webkit-font-smoothing: antialiased;
font-size: 14px;
font-weight: 700;
line-height: 20px;
};
--paper-font-code1: {
/* @apply(--paper-font-common-code); */
font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
-webkit-font-smoothing: antialiased;
font-size: 14px;
font-weight: 500;
line-height: 20px;
};
}
</style>
================================================
FILE: cmd/memlat/static/bower_components/polymer/.bower.json
================================================
{
"name": "polymer",
"version": "1.1.0",
"main": [
"polymer.html"
],
"license": "http://polymer.github.io/LICENSE.txt",
"ignore": [
"/.*",
"/test/"
],
"authors": [
"The Polymer Authors (http://polymer.github.io/AUTHORS.txt)"
],
"repository": {
"type": "git",
"url": "https://github.com/Polymer/polymer.git"
},
"dependencies": {
"webcomponentsjs": "^0.7.2"
},
"devDependencies": {
"web-component-tester": "*"
},
"private": true,
"homepage": "https://github.com/Polymer/polymer",
"_release": "1.1.0",
"_resolution": {
"type": "version",
"tag": "v1.1.0",
"commit": "67fb2f85fd66d8556fc07cf1dec41ff5273fa68a"
},
"_source": "git://github.com/Polymer/polymer.git",
"_target": "^1.0.0",
"_originalSource": "Polymer/polymer",
"_direct": true
}
================================================
FILE: cmd/memlat/static/bower_components/polymer/LICENSE.txt
================================================
// Copyright (c) 2014 The Polymer Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: cmd/memlat/static/bower_components/polymer/bower.json
================================================
{
"name": "polymer",
"version": "1.1.0",
"main": [
"polymer.html"
],
"license": "http://polymer.github.io/LICENSE.txt",
"ignore": [
"/.*",
"/test/"
],
"authors": [
"The Polymer Authors (http://polymer.github.io/AUTHORS.txt)"
],
"repository": {
"type": "git",
"url": "https://github.com/Polymer/polymer.git"
},
"dependencies": {
"webcomponentsjs": "^0.7.2"
},
"devDependencies": {
"web-component-tester": "*"
},
"private": true
}
================================================
FILE: cmd/memlat/static/bower_components/polymer/build.log
================================================
BUILD LOG
---------
Build Time: 2015-08-13T16:56:33-0700
NODEJS INFORMATION
==================
nodejs: v0.12.7
del: 1.2.0
gulp: 3.9.0
gulp-audit: 1.0.0
gulp-rename: 1.2.2
gulp-replace: 0.5.3
gulp-vulcanize: 6.0.1
lazypipe: 0.2.4
polyclean: 1.2.0
run-sequence: 1.1.1
REPO REVISIONS
==============
polymer: a42ca09c3b99749b1407d5fa68cd957c2eaf5ca6
BUILD HASHES
============
polymer-mini.html: b40016f458e85bb815c898378b7bcd5c8abe5661
polymer-micro.html: ef8ebb2dc40697c845c2b8ec64ee69838d0d7bfc
polymer.html: 2f874995a3a3ada9e87da48a01d10c6d3ee297bb
================================================
FILE: cmd/memlat/static/bower_components/polymer/polymer-micro.html
================================================
<!--
@license
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--><script>(function () {
function resolve() {
document.body.removeAttribute('unresolved');
}
if (window.WebComponents) {
addEventListener('WebComponentsReady', resolve);
} else {
if (document.readyState === 'interactive' || document.readyState === 'complete') {
resolve();
} else {
addEventListener('DOMContentLoaded', resolve);
}
}
}());
Polymer = {
Settings: function () {
var user = window.Polymer || {};
location.search.slice(1).split('&').forEach(function (o) {
o = o.split('=');
o[0] && (user[o[0]] = o[1] || true);
});
var wantShadow = user.dom === 'shadow';
var hasShadow = Boolean(Element.prototype.createShadowRoot);
var nativeShadow = hasShadow && !window.ShadowDOMPolyfill;
var useShadow = wantShadow && hasShadow;
var hasNativeImports = Boolean('import' in document.createElement('link'));
var useNativeImports = hasNativeImports;
var useNativeCustomElements = !window.CustomElements || window.CustomElements.useNative;
return {
wantShadow: wantShadow,
hasShadow: hasShadow,
nativeShadow: nativeShadow,
useShadow: useShadow,
useNativeShadow: useShadow && nativeShadow,
useNativeImports: useNativeImports,
useNativeCustomElements: useNativeCustomElements
};
}()
};
(function () {
var userPolymer = window.Polymer;
window.Polymer = function (prototype) {
var ctor = desugar(prototype);
prototype = ctor.prototype;
var options = { prototype: prototype };
if (prototype.extends) {
options.extends = prototype.extends;
}
Polymer.telemetry._registrate(prototype);
document.registerElement(prototype.is, options);
return ctor;
};
var desugar = function (prototype) {
var base = Polymer.Base;
if (prototype.extends) {
base = Polymer.Base._getExtendedPrototype(prototype.extends);
}
prototype = Polymer.Base.chainObject(prototype, base);
prototype.registerCallback();
return prototype.constructor;
};
window.Polymer = Polymer;
if (userPolymer) {
for (var i in userPolymer) {
Polymer[i] = userPolymer[i];
}
}
Polymer.Class = desugar;
}());
Polymer.telemetry = {
registrations: [],
_regLog: function (prototype) {
console.log('[' + prototype.is + ']: registered');
},
_registrate: function (prototype) {
this.registrations.push(prototype);
Polymer.log && this._regLog(prototype);
},
dumpRegistrations: function () {
this.registrations.forEach(this._regLog);
}
};
Object.defineProperty(window, 'currentImport', {
enumerable: true,
configurable: true,
get: function () {
return (document._currentScript || document.currentScript).ownerDocument;
}
});
Polymer.RenderStatus = {
_ready: false,
_callbacks: [],
whenReady: function (cb) {
if (this._ready) {
cb();
} else {
this._callbacks.push(cb);
}
},
_makeReady: function () {
this._ready = true;
this._callbacks.forEach(function (cb) {
cb();
});
this._callbacks = [];
},
_catchFirstRender: function () {
requestAnimationFrame(function () {
Polymer.RenderStatus._makeReady();
});
}
};
if (window.HTMLImports) {
HTMLImports.whenReady(function () {
Polymer.RenderStatus._catchFirstRender();
});
} else {
Polymer.RenderStatus._catchFirstRender();
}
Polymer.ImportStatus = Polymer.RenderStatus;
Polymer.ImportStatus.whenLoaded = Polymer.ImportStatus.whenReady;
Polymer.Base = {
__isPolymerInstance__: true,
_addFeature: function (feature) {
this.extend(this, feature);
},
registerCallback: function () {
this._registerFeatures();
this._doBehavior('registered');
},
createdCallback: function () {
Polymer.telemetry.instanceCount++;
this.root = this;
this._doBehavior('created');
this._initFeatures();
},
attachedCallback: function () {
Polymer.RenderStatus.whenReady(function () {
this.isAttached = true;
this._doBehavior('attached');
}.bind(this));
},
detachedCallback: function () {
this.isAttached = false;
this._doBehavior('detached');
},
attributeChangedCallback: function (name) {
this._attributeChangedImpl(name);
this._doBehavior('attributeChanged', arguments);
},
_attributeChangedImpl: function (name) {
this._setAttributeToProperty(this, name);
},
extend: function (prototype, api) {
if (prototype && api) {
Object.getOwnPropertyNames(api).forEach(function (n) {
this.copyOwnProperty(n, api, prototype);
}, this);
}
return prototype || api;
},
mixin: function (target, source) {
for (var i in source) {
target[i] = source[i];
}
return target;
},
copyOwnProperty: function (name, source, target) {
var pd = Object.getOwnPropertyDescriptor(source, name);
if (pd) {
Object.defineProperty(target, name, pd);
}
},
_log: console.log.apply.bind(console.log, console),
_warn: console.warn.apply.bind(console.warn, console),
_error: console.error.apply.bind(console.error, console),
_logf: function () {
return this._logPrefix.concat([this.is]).concat(Array.prototype.slice.call(arguments, 0));
}
};
Polymer.Base._logPrefix = function () {
var color = window.chrome || /firefox/i.test(navigator.userAgent);
return color ? [
'%c[%s::%s]:',
'font-weight: bold; background-color:#EEEE00;'
] : ['[%s::%s]:'];
}();
Polymer.Base.chainObject = function (object, inherited) {
if (object && inherited && object !== inherited) {
if (!Object.__proto__) {
object = Polymer.Base.extend(Object.create(inherited), object);
}
object.__proto__ = inherited;
}
return object;
};
Polymer.Base = Polymer.Base.chainObject(Polymer.Base, HTMLElement.prototype);
if (window.CustomElements) {
Polymer.instanceof = CustomElements.instanceof;
} else {
Polymer.instanceof = function (obj, ctor) {
return obj instanceof ctor;
};
}
Polymer.isInstance = function (obj) {
return Boolean(obj && obj.__isPolymerInstance__);
};
Polymer.telemetry.instanceCount = 0;
(function () {
var modules = {};
var lcModules = {};
var DomModule = function () {
return document.createElement('dom-module');
};
DomModule.prototype = Object.create(HTMLElement.prototype);
Polymer.Base.extend(DomModule.prototype, {
constructor: DomModule,
createdCallback: function () {
this.register();
},
register: function (id) {
var id = id || this.id || this.getAttribute('name') || this.getAttribute('is');
if (id) {
this.id = id;
modules[id] = this;
lcModules[id.toLowerCase()] = this;
}
},
import: function (id, selector) {
var m = modules[id] || lcModules[id.toLowerCase()];
if (!m) {
forceDocumentUpgrade();
m = modules[id];
}
if (m && selector) {
m = m.querySelector(selector);
}
return m;
}
});
var cePolyfill = window.CustomElements && !CustomElements.useNative;
document.registerElement('dom-module', DomModule);
function forceDocumentUpgrade() {
if (cePolyfill) {
var script = document._currentScript || document.currentScript;
var doc = script && script.ownerDocument;
if (doc && !doc.__customElementsForceUpgraded) {
doc.__customElementsForceUpgraded = true;
CustomElements.upgradeAll(doc);
}
}
}
}());
Polymer.Base._addFeature({
_prepIs: function () {
if (!this.is) {
var module = (document._currentScript || document.currentScript).parentNode;
if (module.localName === 'dom-module') {
var id = module.id || module.getAttribute('name') || module.getAttribute('is');
this.is = id;
}
}
if (this.is) {
this.is = this.is.toLowerCase();
}
}
});
Polymer.Base._addFeature({
behaviors: [],
_prepBehaviors: function () {
if (this.behaviors.length) {
this.behaviors = this._flattenBehaviorsList(this.behaviors);
}
this._prepAllBehaviors(this.behaviors);
},
_flattenBehaviorsList: function (behaviors) {
var flat = [];
behaviors.forEach(function (b) {
if (b instanceof Array) {
flat = flat.concat(this._flattenBehaviorsList(b));
} else if (b) {
flat.push(b);
} else {
this._warn(this._logf('_flattenBehaviorsList', 'behavior is null, check for missing or 404 import'));
}
}, this);
return flat;
},
_prepAllBehaviors: function (behaviors) {
for (var i = behaviors.length - 1; i >= 0; i--) {
this._mixinBehavior(behaviors[i]);
}
for (var i = 0, l = behaviors.length; i < l; i++) {
this._prepBehavior(behaviors[i]);
}
this._prepBehavior(this);
},
_mixinBehavior: function (b) {
Object.getOwnPropertyNames(b).forEach(function (n) {
switch (n) {
case 'hostAttributes':
case 'registered':
case 'properties':
case 'observers':
case 'listeners':
case 'created':
case 'attached':
case 'detached':
case 'attributeChanged':
case 'configure':
case 'ready':
break;
default:
if (!this.hasOwnProperty(n)) {
this.copyOwnProperty(n, b, this);
}
break;
}
}, this);
},
_doBehavior: function (name, args) {
this.behaviors.forEach(function (b) {
this._invokeBehavior(b, name, args);
}, this);
this._invokeBehavior(this, name, args);
},
_invokeBehavior: function (b, name, args) {
var fn = b[name];
if (fn) {
fn.apply(this, args || Polymer.nar);
}
},
_marshalBehaviors: function () {
this.behaviors.forEach(function (b) {
this._marshalBehavior(b);
}, this);
this._marshalBehavior(this);
}
});
Polymer.Base._addFeature({
_getExtendedPrototype: function (tag) {
return this._getExtendedNativePrototype(tag);
},
_nativePrototypes: {},
_getExtendedNativePrototype: function (tag) {
var p = this._nativePrototypes[tag];
if (!p) {
var np = this.getNativePrototype(tag);
p = this.extend(Object.create(np), Polymer.Base);
this._nativePrototypes[tag] = p;
}
return p;
},
getNativePrototype: function (tag) {
return Object.getPrototypeOf(document.createElement(tag));
}
});
Polymer.Base._addFeature({
_prepConstructor: function () {
this._factoryArgs = this.extends ? [
this.extends,
this.is
] : [this.is];
var ctor = function () {
return this._factory(arguments);
};
if (this.hasOwnProperty('extends')) {
ctor.extends = this.extends;
}
Object.defineProperty(this, 'constructor', {
value: ctor,
writable: true,
configurable: true
});
ctor.prototype = this;
},
_factory: function (args) {
var elt = document.createElement.apply(document, this._factoryArgs);
if (this.factoryImpl) {
this.factoryImpl.apply(elt, args);
}
return elt;
}
});
Polymer.nob = Object.create(null);
Polymer.Base._addFeature({
properties: {},
getPropertyInfo: function (property) {
var info = this._getPropertyInfo(property, this.properties);
if (!info) {
this.behaviors.some(function (b) {
return info = this._getPropertyInfo(property, b.properties);
}, this);
}
return info || Polymer.nob;
},
_getPropertyInfo: function (property, properties) {
var p = properties && properties[property];
if (typeof p === 'function') {
p = properties[property] = { type: p };
}
if (p) {
p.defined = true;
}
return p;
}
});
Polymer.CaseMap = {
_caseMap: {},
dashToCamelCase: function (dash) {
var mapped = Polymer.CaseMap._caseMap[dash];
if (mapped) {
return mapped;
}
if (dash.indexOf('-') < 0) {
return Polymer.CaseMap._caseMap[dash] = dash;
}
return Polymer.CaseMap._caseMap[dash] = dash.replace(/-([a-z])/g, function (m) {
return m[1].toUpperCase();
});
},
camelToDashCase: function (camel) {
var mapped = Polymer.CaseMap._caseMap[camel];
if (mapped) {
return mapped;
}
return Polymer.CaseMap._caseMap[camel] = camel.replace(/([a-z][A-Z])/g, function (g) {
return g[0] + '-' + g[1].toLowerCase();
});
}
};
Polymer.Base._addFeature({
_prepAttributes: function () {
this._aggregatedAttributes = {};
},
_addHostAttributes: function (attributes) {
if (attributes) {
this.mixin(this._aggregatedAttributes, attributes);
}
},
_marshalHostAttributes: function () {
this._applyAttributes(this, this._aggregatedAttributes);
},
_applyAttributes: function (node, attr$) {
for (var n in attr$) {
if (!this.hasAttribute(n) && n !== 'class') {
this.serializeValueToAttribute(attr$[n], n, this);
}
}
},
_marshalAttributes: function () {
this._takeAttributesToModel(this);
},
_takeAttributesToModel: function (model) {
for (var i = 0, l = this.attributes.length; i < l; i++) {
this._setAttributeToProperty(model, this.attributes[i].name);
}
},
_setAttributeToProperty: function (model, attrName) {
if (!this._serializing) {
var propName = Polymer.CaseMap.dashToCamelCase(attrName);
var info = this.getPropertyInfo(propName);
if (info.defined || this._propertyEffects && this._propertyEffects[propName]) {
var val = this.getAttribute(attrName);
model[propName] = this.deserialize(val, info.type);
}
}
},
_serializing: false,
reflectPropertyToAttribute: function (name) {
this._serializing = true;
this.serializeValueToAttribute(this[name], Polymer.CaseMap.camelToDashCase(name));
this._serializing = false;
},
serializeValueToAttribute: function (value, attribute, node) {
var str = this.serialize(value);
(node || this)[str === undefined ? 'removeAttribute' : 'setAttribute'](attribute, str);
},
deserialize: function (value, type) {
switch (type) {
case Number:
value = Number(value);
break;
case Boolean:
value = value !== null;
break;
case Object:
try {
value = JSON.parse(value);
} catch (x) {
}
break;
case Array:
try {
value = JSON.parse(value);
} catch (x) {
value = null;
console.warn('Polymer::Attributes: couldn`t decode Array as JSON');
}
break;
case Date:
value = new Date(value);
break;
case String:
default:
break;
}
return value;
},
serialize: function (value) {
switch (typeof value) {
case 'boolean':
return value ? '' : undefined;
case 'object':
if (value instanceof Date) {
return value;
} else if (value) {
try {
return JSON.stringify(value);
} catch (x) {
return '';
}
}
default:
return value != null ? value : undefined;
}
}
});
Polymer.Base._addFeature({
_setupDebouncers: function () {
this._debouncers = {};
},
debounce: function (jobName, callback, wait) {
return this._debouncers[jobName] = Polymer.Debounce.call(this, this._debouncers[jobName], callback, wait);
},
isDebouncerActive: function (jobName) {
var debouncer = this._debouncers[jobName];
return debouncer && debouncer.finish;
},
flushDebouncer: function (jobName) {
var debouncer = this._debouncers[jobName];
if (debouncer) {
debouncer.complete();
}
},
cancelDebouncer: function (jobName) {
var debouncer = this._debouncers[jobName];
if (debouncer) {
debouncer.stop();
}
}
});
Polymer.version = '1.1.0';
Polymer.Base._addFeature({
_registerFeatures: function () {
this._prepIs();
this._prepAttributes();
this._prepBehaviors();
this._prepConstructor();
},
_prepBehavior: function (b) {
this._addHostAttributes(b.hostAttributes);
},
_marshalBehavior: function (b) {
},
_initFeatures: function () {
this._marshalHostAttributes();
this._setupDebouncers();
this._marshalBehaviors();
}
});</script>
================================================
FILE: cmd/memlat/static/bower_components/polymer/polymer-mini.html
================================================
<!--
@license
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--><link rel="import" href="polymer-micro.html">
<script>Polymer.Base._addFeature({
_prepTemplate: function () {
this._template = this._template || Polymer.DomModule.import(this.is, 'template');
if (this._template && this._template.hasAttribute('is')) {
this._warn(this._logf('_prepTemplate', 'top-level Polymer template ' + 'must not be a type-extension, found', this._template, 'Move inside simple <template>.'));
}
if (this._template && !this._template.content && HTMLTemplateElement.bootstrap) {
HTMLTemplateElement.decorate(this._template);
HTMLTemplateElement.bootstrap(this._template.content);
}
},
_stampTemplate: function () {
if (this._template) {
this.root = this.instanceTemplate(this._template);
}
},
instanceTemplate: function (template) {
var dom = document.importNode(template._content || template.content, true);
return dom;
}
});
(function () {
var baseAttachedCallback = Polymer.Base.attachedCallback;
Polymer.Base._addFeature({
_hostStack: [],
ready: function () {
},
_pushHost: function (host) {
this.dataHost = host = host || Polymer.Base._hostStack[Polymer.Base._hostStack.length - 1];
if (host && host._clients) {
host._clients.push(this);
}
this._beginHost();
},
_beginHost: function () {
Polymer.Base._hostStack.push(this);
if (!this._clients) {
this._clients = [];
}
},
_popHost: function () {
Polymer.Base._hostStack.pop();
},
_tryReady: function () {
if (this._canReady()) {
this._ready();
}
},
_canReady: function () {
return !this.dataHost || this.dataHost._clientsReadied;
},
_ready: function () {
this._beforeClientsReady();
this._setupRoot();
this._readyClients();
this._afterClientsReady();
this._readySelf();
},
_readyClients: function () {
this._beginDistribute();
var c$ = this._clients;
for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
c._ready();
}
this._finishDistribute();
this._clientsReadied = true;
this._clients = null;
},
_readySelf: function () {
this._doBehavior('ready');
this._readied = true;
if (this._attachedPending) {
this._attachedPending = false;
this.attachedCallback();
}
},
_beforeClientsReady: function () {
},
_afterClientsReady: function () {
},
_beforeAttached: function () {
},
attachedCallback: function () {
if (this._readied) {
this._beforeAttached();
baseAttachedCallback.call(this);
} else {
this._attachedPending = true;
}
}
});
}());
Polymer.ArraySplice = function () {
function newSplice(index, removed, addedCount) {
return {
index: index,
removed: removed,
addedCount: addedCount
};
}
var EDIT_LEAVE = 0;
var EDIT_UPDATE = 1;
var EDIT_ADD = 2;
var EDIT_DELETE = 3;
function ArraySplice() {
}
ArraySplice.prototype = {
calcEditDistances: function (current, currentStart, currentEnd, old, oldStart, oldEnd) {
var rowCount = oldEnd - oldStart + 1;
var columnCount = currentEnd - currentStart + 1;
var distances = new Array(rowCount);
for (var i = 0; i < rowCount; i++) {
distances[i] = new Array(columnCount);
distances[i][0] = i;
}
for (var j = 0; j < columnCount; j++)
distances[0][j] = j;
for (var i = 1; i < rowCount; i++) {
for (var j = 1; j < columnCount; j++) {
if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))
distances[i][j] = distances[i - 1][j - 1];
else {
var north = distances[i - 1][j] + 1;
var west = distances[i][j - 1] + 1;
distances[i][j] = north < west ? north : west;
}
}
}
return distances;
},
spliceOperationsFromEditDistances: function (distances) {
var i = distances.length - 1;
var j = distances[0].length - 1;
var current = distances[i][j];
var edits = [];
while (i > 0 || j > 0) {
if (i == 0) {
edits.push(EDIT_ADD);
j--;
continue;
}
if (j == 0) {
edits.push(EDIT_DELETE);
i--;
continue;
}
var northWest = distances[i - 1][j - 1];
var west = distances[i - 1][j];
var north = distances[i][j - 1];
var min;
if (west < north)
min = west < northWest ? west : northWest;
else
min = north < northWest ? north : northWest;
if (min == northWest) {
if (northWest == current) {
edits.push(EDIT_LEAVE);
} else {
edits.push(EDIT_UPDATE);
current = northWest;
}
i--;
j--;
} else if (min == west) {
edits.push(EDIT_DELETE);
i--;
current = west;
} else {
edits.push(EDIT_ADD);
j--;
current = north;
}
}
edits.reverse();
return edits;
},
calcSplices: function (current, currentStart, currentEnd, old, oldStart, oldEnd) {
var prefixCount = 0;
var suffixCount = 0;
var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);
if (currentStart == 0 && oldStart == 0)
prefixCount = this.sharedPrefix(current, old, minLength);
if (currentEnd == current.length && oldEnd == old.length)
suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);
currentStart += prefixCount;
oldStart += prefixCount;
currentEnd -= suffixCount;
oldEnd -= suffixCount;
if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)
return [];
if (currentStart == currentEnd) {
var splice = newSplice(currentStart, [], 0);
while (oldStart < oldEnd)
splice.removed.push(old[oldStart++]);
return [splice];
} else if (oldStart == oldEnd)
return [newSplice(currentStart, [], currentEnd - currentStart)];
var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));
var splice = undefined;
var splices = [];
var index = currentStart;
var oldIndex = oldStart;
for (var i = 0; i < ops.length; i++) {
switch (ops[i]) {
case EDIT_LEAVE:
if (splice) {
splices.push(splice);
splice = undefined;
}
index++;
oldIndex++;
break;
case EDIT_UPDATE:
if (!splice)
splice = newSplice(index, [], 0);
splice.addedCount++;
index++;
splice.removed.push(old[oldIndex]);
oldIndex++;
break;
case EDIT_ADD:
if (!splice)
splice = newSplice(index, [], 0);
splice.addedCount++;
index++;
break;
case EDIT_DELETE:
if (!splice)
splice = newSplice(index, [], 0);
splice.removed.push(old[oldIndex]);
oldIndex++;
break;
}
}
if (splice) {
splices.push(splice);
}
return splices;
},
sharedPrefix: function (current, old, searchLength) {
for (var i = 0; i < searchLength; i++)
if (!this.equals(current[i], old[i]))
return i;
return searchLength;
},
sharedSuffix: function (current, old, searchLength) {
var index1 = current.length;
var index2 = old.length;
var count = 0;
while (count < searchLength && this.equals(current[--index1], old[--index2]))
count++;
return count;
},
calculateSplices: function (current, previous) {
return this.calcSplices(current, 0, current.length, previous, 0, previous.length);
},
equals: function (currentValue, previousValue) {
return currentValue === previousValue;
}
};
return new ArraySplice();
}();
Polymer.EventApi = function () {
var Settings = Polymer.Settings;
var EventApi = function (event) {
this.event = event;
};
if (Settings.useShadow) {
EventApi.prototype = {
get rootTarget() {
return this.event.path[0];
},
get localTarget() {
return this.event.target;
},
get path() {
return this.event.path;
}
};
} else {
EventApi.prototype = {
get rootTarget() {
return this.event.target;
},
get localTarget() {
var current = this.event.currentTarget;
var currentRoot = current && Polymer.dom(current).getOwnerRoot();
var p$ = this.path;
for (var i = 0; i < p$.length; i++) {
if (Polymer.dom(p$[i]).getOwnerRoot() === currentRoot) {
return p$[i];
}
}
},
get path() {
if (!this.event._path) {
var path = [];
var o = this.rootTarget;
while (o) {
path.push(o);
o = Polymer.dom(o).parentNode || o.host;
}
path.push(window);
this.event._path = path;
}
return this.event._path;
}
};
}
var factory = function (event) {
if (!event.__eventApi) {
event.__eventApi = new EventApi(event);
}
return event.__eventApi;
};
return { factory: factory };
}();
Polymer.domInnerHTML = function () {
var escapeAttrRegExp = /[&\u00A0"]/g;
var escapeDataRegExp = /[&\u00A0<>]/g;
function escapeReplace(c) {
switch (c) {
case '&':
return '&';
case '<':
return '<';
case '>':
return '>';
case '"':
return '"';
case '\xA0':
return ' ';
}
}
function escapeAttr(s) {
return s.replace(escapeAttrRegExp, escapeReplace);
}
function escapeData(s) {
return s.replace(escapeDataRegExp, escapeReplace);
}
function makeSet(arr) {
var set = {};
for (var i = 0; i < arr.length; i++) {
set[arr[i]] = true;
}
return set;
}
var voidElements = makeSet([
'area',
'base',
'br',
'col',
'command',
'embed',
'hr',
'img',
'input',
'keygen',
'link',
'meta',
'param',
'source',
'track',
'wbr'
]);
var plaintextParents = makeSet([
'style',
'script',
'xmp',
'iframe',
'noembed',
'noframes',
'plaintext',
'noscript'
]);
function getOuterHTML(node, parentNode, composed) {
switch (node.nodeType) {
case Node.ELEMENT_NODE:
var tagName = node.localName;
var s = '<' + tagName;
var attrs = node.attributes;
for (var i = 0, attr; attr = attrs[i]; i++) {
s += ' ' + attr.name + '="' + escapeAttr(attr.value) + '"';
}
s += '>';
if (voidElements[tagName]) {
return s;
}
return s + getInnerHTML(node, composed) + '</' + tagName + '>';
case Node.TEXT_NODE:
var data = node.data;
if (parentNode && plaintextParents[parentNode.localName]) {
return data;
}
return escapeData(data);
case Node.COMMENT_NODE:
return '<!--' + node.data + '-->';
default:
console.error(node);
throw new Error('not implemented');
}
}
function getInnerHTML(node, composed) {
if (node instanceof HTMLTemplateElement)
node = node.content;
var s = '';
var c$ = Polymer.dom(node).childNodes;
c$ = composed ? node._composedChildren : c$;
for (var i = 0, l = c$.length, child; i < l && (child = c$[i]); i++) {
s += getOuterHTML(child, node, composed);
}
return s;
}
return { getInnerHTML: getInnerHTML };
}();
Polymer.DomApi = function () {
'use strict';
var Settings = Polymer.Settings;
var getInnerHTML = Polymer.domInnerHTML.getInnerHTML;
var nativeInsertBefore = Element.prototype.insertBefore;
var nativeRemoveChild = Element.prototype.removeChild;
var nativeAppendChild = Element.prototype.appendChild;
var nativeCloneNode = Element.prototype.cloneNode;
var nativeImportNode = Document.prototype.importNode;
var DomApi = function (node) {
this.node = node;
if (this.patch) {
this.patch();
}
};
if (window.wrap && Settings.useShadow && !Settings.useNativeShadow) {
DomApi = function (node) {
this.node = wrap(node);
if (this.patch) {
this.patch();
}
};
}
DomApi.prototype = {
flush: function () {
Polymer.dom.flush();
},
_lazyDistribute: function (host) {
if (host.shadyRoot && host.shadyRoot._distributionClean) {
host.shadyRoot._distributionClean = false;
Polymer.dom.addDebouncer(host.debounce('_distribute', host._distributeContent));
}
},
appendChild: function (node) {
var handled;
this._ensureContentLogicalInfo(node);
this._removeNodeFromHost(node, true);
if (this._nodeIsInLogicalTree(this.node)) {
this._addLogicalInfo(node, this.node);
this._addNodeToHost(node);
handled = this._maybeDistribute(node, this.node);
} else {
this._addNodeToHost(node);
}
if (!handled && !this._tryRemoveUndistributedNode(node)) {
var container = this.node._isShadyRoot ? this.node.host : this.node;
addToComposedParent(container, node);
nativeAppendChild.call(container, node);
}
return node;
},
insertBefore: function (node, ref_node) {
if (!ref_node) {
return this.appendChild(node);
}
var handled;
this._ensureContentLogicalInfo(node);
this._removeNodeFromHost(node, true);
if (this._nodeIsInLogicalTree(this.node)) {
var children = this.childNodes;
var index = children.indexOf(ref_node);
if (index < 0) {
throw Error('The ref_node to be inserted before is not a child ' + 'of this node');
}
this._addLogicalInfo(node, this.node, index);
this._addNodeToHost(node);
handled = this._maybeDistribute(node, this.node);
} else {
this._addNodeToHost(node);
}
if (!handled && !this._tryRemoveUndistributedNode(node)) {
ref_node = ref_node.localName === CONTENT ? this._firstComposedNode(ref_node) : ref_node;
var container = this.node._isShadyRoot ? this.node.host : this.node;
addToComposedParent(container, node, ref_node);
nativeInsertBefore.call(container, node, ref_node);
}
return node;
},
removeChild: function (node) {
if (factory(node).parentNode !== this.node) {
console.warn('The node to be removed is not a child of this node', node);
}
var handled;
if (this._nodeIsInLogicalTree(this.node)) {
this._removeNodeFromHost(node);
handled = this._maybeDistribute(node, this.node);
} else {
this._removeNodeFromHost(node);
}
if (!handled) {
var container = this.node._isShadyRoot ? this.node.host : this.node;
if (container === node.parentNode) {
removeFromComposedParent(container, node);
nativeRemoveChild.call(container, node);
}
}
return node;
},
replaceChild: function (node, ref_node) {
this.insertBefore(node, ref_node);
this.removeChild(ref_node);
return node;
},
_hasCachedOwnerRoot: function (node) {
return Boolean(node._ownerShadyRoot !== undefined);
},
getOwnerRoot: function () {
return this._ownerShadyRootForNode(this.node);
},
_ownerShadyRootForNode: function (node) {
if (!node) {
return;
}
if (node._ownerShadyRoot === undefined) {
var root;
if (node._isShadyRoot) {
root = node;
} else {
var parent = Polymer.dom(node).parentNode;
if (parent) {
root = parent._isShadyRoot ? parent : this._ownerShadyRootForNode(parent);
} else {
root = null;
}
}
node._ownerShadyRoot = root;
}
return node._ownerShadyRoot;
},
_maybeDistribute: function (node, parent) {
var fragContent = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && !node.__noContent && Polymer.dom(node).querySelector(CONTENT);
var wrappedContent = fragContent && Polymer.dom(fragContent).parentNode.nodeType !== Node.DOCUMENT_FRAGMENT_NODE;
var hasContent = fragContent || node.localName === CONTENT;
if (hasContent) {
var root = this._ownerShadyRootForNode(parent);
if (root) {
var host = root.host;
this._updateInsertionPoints(host);
this._lazyDistribute(host);
}
}
var parentNeedsDist = this._parentNeedsDistribution(parent);
if (parentNeedsDist) {
this._lazyDistribute(parent);
}
return parentNeedsDist || hasContent && !wrappedContent;
},
_tryRemoveUndistributedNode: function (node) {
if (this.node.shadyRoot) {
if (node._composedParent) {
nativeRemoveChild.call(node._composedParent, node);
}
return true;
}
},
_updateInsertionPoints: function (host) {
var i$ = host.shadyRoot._insertionPoints = factory(host.shadyRoot).querySelectorAll(CONTENT);
for (var i = 0, c; i < i$.length; i++) {
c = i$[i];
saveLightChildrenIfNeeded(c);
saveLightChildrenIfNeeded(factory(c).parentNode);
}
},
_nodeIsInLogicalTree: function (node) {
return Boolean(node._lightParent !== undefined || node._isShadyRoot || node.shadyRoot);
},
_ensureContentLogicalInfo: function (node) {
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
saveLightChildrenIfNeeded(this.node);
var c$ = Array.prototype.slice.call(node.childNodes);
for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
this._ensureContentLogicalInfo(n);
}
} else if (node.localName === CONTENT) {
saveLightChildrenIfNeeded(this.node);
saveLightChildrenIfNeeded(node);
}
},
_parentNeedsDistribution: function (parent) {
return parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot);
},
_removeNodeFromHost: function (node, ensureComposedRemoval) {
var hostNeedsDist;
var root;
var parent = node._lightParent;
if (parent) {
root = this._ownerShadyRootForNode(node);
if (root) {
root.host._elementRemove(node);
hostNeedsDist = this._removeDistributedChildren(root, node);
}
this._removeLogicalInfo(node, node._lightParent);
}
this._removeOwnerShadyRoot(node);
if (root && hostNeedsDist) {
this._updateInsertionPoints(root.host);
this._lazyDistribute(root.host);
} else if (ensureComposedRemoval) {
removeFromComposedParent(parent || node.parentNode, node);
}
},
_removeDistributedChildren: function (root, container) {
var hostNeedsDist;
var ip$ = root._insertionPoints;
for (var i = 0; i < ip$.length; i++) {
var content = ip$[i];
if (this._contains(container, content)) {
var dc$ = factory(content).getDistributedNodes();
for (var j = 0; j < dc$.length; j++) {
hostNeedsDist = true;
var node = dc$[j];
var parent = node.parentNode;
if (parent) {
removeFromComposedParent(parent, node);
nativeRemoveChild.call(parent, node);
}
}
}
}
return hostNeedsDist;
},
_contains: function (container, node) {
while (node) {
if (node == container) {
return true;
}
node = factory(node).parentNode;
}
},
_addNodeToHost: function (node) {
var root = this.getOwnerRoot();
if (root) {
root.host._elementAdd(node);
}
},
_addLogicalInfo: function (node, container, index) {
var children = factory(container).childNodes;
index = index === undefined ? children.length : index;
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
var c$ = Array.prototype.slice.call(node.childNodes);
for (var i = 0, n; i < c$.length && (n = c$[i]); i++) {
children.splice(index++, 0, n);
n._lightParent = container;
}
} else {
children.splice(index, 0, node);
node._lightParent = container;
}
},
_removeLogicalInfo: function (node, container) {
var children = factory(container).childNodes;
var index = children.indexOf(node);
if (index < 0 || container !== node._lightParent) {
throw Error('The node to be removed is not a child of this node');
}
children.splice(index, 1);
node._lightParent = null;
},
_removeOwnerShadyRoot: function (node) {
if (this._hasCachedOwnerRoot(node)) {
var c$ = factory(node).childNodes;
for (var i = 0, l = c$.length, n; i < l && (n = c$[i]); i++) {
this._removeOwnerShadyRoot(n);
}
}
node._ownerShadyRoot = undefined;
},
_firstComposedNode: function (content) {
var n$ = factory(content).getDistributedNodes();
for (var i = 0, l = n$.length, n, p$; i < l && (n = n$[i]); i++) {
p$ = factory(n).getDestinationInsertionPoints();
if (p$[p$.length - 1] === content) {
return n;
}
}
},
querySelector: function (selector) {
return this.querySelectorAll(selector)[0];
},
querySelectorAll: function (selector) {
return this._query(function (n) {
return matchesSelector.call(n, selector);
}, this.node);
},
_query: function (matcher, node) {
node = node || this.node;
var list = [];
this._queryElements(factory(node).childNodes, matcher, list);
return list;
},
_queryElements: function (elements, matcher, list) {
for (var i = 0, l = elements.length, c; i < l && (c = elements[i]); i++) {
if (c.nodeType === Node.ELEMENT_NODE) {
this._queryElement(c, matcher, list);
}
}
},
_queryElement: function (node, matcher, list) {
if (matcher(node)) {
list.push(node);
}
this._queryElements(factory(node).childNodes, matcher, list);
},
getDestinationInsertionPoints: function () {
return this.node._destinationInsertionPoints || [];
},
getDistributedNodes: function () {
return this.node._distributedNodes || [];
},
queryDistributedElements: function (selector) {
var c$ = this.childNodes;
var list = [];
this._distributedFilter(selector, c$, list);
for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
if (c.localName === CONTENT) {
this._distributedFilter(selector, factory(c).getDistributedNodes(), list);
}
}
return list;
},
_distributedFilter: function (selector, list, results) {
results = results || [];
for (var i = 0, l = list.length, d; i < l && (d = list[i]); i++) {
if (d.nodeType === Node.ELEMENT_NODE && d.localName !== CONTENT && matchesSelector.call(d, selector)) {
results.push(d);
}
}
return results;
},
_clear: function () {
while (this.childNodes.length) {
this.removeChild(this.childNodes[0]);
}
},
setAttribute: function (name, value) {
this.node.setAttribute(name, value);
this._distributeParent();
},
removeAttribute: function (name) {
this.node.removeAttribute(name);
this._distributeParent();
},
_distributeParent: function () {
if (this._parentNeedsDistribution(this.parentNode)) {
this._lazyDistribute(this.parentNode);
}
},
cloneNode: function (deep) {
var n = nativeCloneNode.call(this.node, false);
if (deep) {
var c$ = this.childNodes;
var d = factory(n);
for (var i = 0, nc; i < c$.length; i++) {
nc = factory(c$[i]).cloneNode(true);
d.appendChild(nc);
}
}
return n;
},
importNode: function (externalNode, deep) {
var doc = this.node instanceof Document ? this.node : this.node.ownerDocument;
var n = nativeImportNode.call(doc, externalNode, false);
if (deep) {
var c$ = factory(externalNode).childNodes;
var d = factory(n);
for (var i = 0, nc; i < c$.length; i++) {
nc = factory(doc).importNode(c$[i], true);
d.appendChild(nc);
}
}
return n;
}
};
Object.defineProperty(DomApi.prototype, 'classList', {
get: function () {
if (!this._classList) {
this._classList = new DomApi.ClassList(this);
}
return this._classList;
},
configurable: true
});
DomApi.ClassList = function (host) {
this.domApi = host;
this.node = host.node;
};
DomApi.ClassList.prototype = {
add: function () {
this.node.classList.add.apply(this.node.classList, arguments);
this.domApi._distributeParent();
},
remove: function () {
this.node.classList.remove.apply(this.node.classList, arguments);
this.domApi._distributeParent();
},
toggle: function () {
this.node.classList.toggle.apply(this.node.classList, arguments);
this.domApi._distributeParent();
},
contains: function () {
return this.node.classList.contains.apply(this.node.classList, arguments);
}
};
if (!Settings.useShadow) {
Object.defineProperties(DomApi.prototype, {
childNodes: {
get: function () {
var c$ = getLightChildren(this.node);
return Array.isArray(c$) ? c$ : Array.prototype.slice.call(c$);
},
configurable: true
},
children: {
get: function () {
return Array.prototype.filter.call(this.childNodes, function (n) {
return n.nodeType === Node.ELEMENT_NODE;
});
},
configurable: true
},
parentNode: {
get: function () {
return this.node._lightParent || (this.node.__patched ? this.node._composedParent : this.node.parentNode);
},
configurable: true
},
firstChild: {
get: function () {
return this.childNodes[0];
},
configurable: true
},
lastChild: {
get: function () {
var c$ = this.childNodes;
return c$[c$.length - 1];
},
configurable: true
},
nextSibling: {
get: function () {
var c$ = this.parentNode && factory(this.parentNode).childNodes;
if (c$) {
return c$[Array.prototype.indexOf.call(c$, this.node) + 1];
}
},
configurable: true
},
previousSibling: {
get: function () {
var c$ = this.parentNode && factory(this.parentNode).childNodes;
if (c$) {
return c$[Array.prototype.indexOf.call(c$, this.node) - 1];
}
},
configurable: true
},
firstElementChild: {
get: function () {
return this.children[0];
},
configurable: true
},
lastElementChild: {
get: function () {
var c$ = this.children;
return c$[c$.length - 1];
},
configurable: true
},
nextElementSibling: {
get: function () {
var c$ = this.parentNode && factory(this.parentNode).children;
if (c$) {
return c$[Array.prototype.indexOf.call(c$, this.node) + 1];
}
},
configurable: true
},
previousElementSibling: {
get: function () {
var c$ = this.parentNode && factory(this.parentNode).children;
if (c$) {
return c$[Array.prototype.indexOf.call(c$, this.node) - 1];
}
},
configurable: true
},
textContent: {
get: function () {
var nt = this.node.nodeType;
if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
return this.node.textContent;
} else {
var tc = [];
for (var i = 0, cn = this.childNodes, c; c = cn[i]; i++) {
if (c.nodeType !== Node.COMMENT_NODE) {
tc.push(c.textContent);
}
}
return tc.join('');
}
},
set: function (text) {
var nt = this.node.nodeType;
if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
this.node.textContent = text;
} else {
this._clear();
if (text) {
this.appendChild(document.createTextNode(text));
}
}
},
configurable: true
},
innerHTML: {
get: function () {
var nt = this.node.nodeType;
if (nt === Node.TEXT_NODE || nt === Node.COMMENT_NODE) {
return null;
} else {
return getInnerHTML(this.node);
}
},
set: function (text) {
var nt = this.node.nodeType;
if (nt !== Node.TEXT_NODE || nt !== Node.COMMENT_NODE) {
this._clear();
var d = document.createElement('div');
d.innerHTML = text;
var c$ = Array.prototype.slice.call(d.childNodes);
for (var i = 0; i < c$.length; i++) {
this.appendChild(c$[i]);
}
}
},
configurable: true
}
});
DomApi.prototype._getComposedInnerHTML = function () {
return getInnerHTML(this.node, true);
};
} else {
DomApi.prototype.querySelectorAll = function (selector) {
return Array.prototype.slice.call(this.node.querySelectorAll(selector));
};
DomApi.prototype.getOwnerRoot = function () {
var n = this.node;
while (n) {
if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE && n.host) {
return n;
}
n = n.parentNode;
}
};
DomApi.prototype.cloneNode = function (deep) {
return this.node.cloneNode(deep);
};
DomApi.prototype.importNode = function (externalNode, deep) {
var doc = this.node instanceof Document ? this.node : this.node.ownerDocument;
return doc.importNode(externalNode, deep);
};
DomApi.prototype.getDestinationInsertionPoints = function () {
var n$ = this.node.getDestinationInsertionPoints && this.node.getDestinationInsertionPoints();
return n$ ? Array.prototype.slice.call(n$) : [];
};
DomApi.prototype.getDistributedNodes = function () {
var n$ = this.node.getDistributedNodes && this.node.getDistributedNodes();
return n$ ? Array.prototype.slice.call(n$) : [];
};
DomApi.prototype._distributeParent = function () {
};
Object.defineProperties(DomApi.prototype, {
childNodes: {
get: function () {
return Array.prototype.slice.call(this.node.childNodes);
},
configurable: true
},
children: {
get: function () {
return Array.prototype.slice.call(this.node.children);
},
configurable: true
},
textContent: {
get: function () {
return this.node.textContent;
},
set: function (value) {
return this.node.textContent = value;
},
configurable: true
},
innerHTML: {
get: function () {
return this.node.innerHTML;
},
set: function (value) {
return this.node.innerHTML = value;
},
configurable: true
}
});
var forwards = [
'parentNode',
'firstChild',
'lastChild',
'nextSibling',
'previousSibling',
'firstElementChild',
'lastElementChild',
'nextElementSibling',
'previousElementSibling'
];
forwards.forEach(function (name) {
Object.defineProperty(DomApi.prototype, name, {
get: function () {
return this.node[name];
},
configurable: true
});
});
}
var CONTENT = 'content';
var factory = function (node, patch) {
node = node || document;
if (!node.__domApi) {
node.__domApi = new DomApi(node, patch);
}
return node.__domApi;
};
Polymer.dom = function (obj, patch) {
if (obj instanceof Event) {
return Polymer.EventApi.factory(obj);
} else {
return factory(obj, patch);
}
};
Polymer.Base.extend(Polymer.dom, {
_flushGuard: 0,
_FLUSH_MAX: 100,
_needsTakeRecords: !Polymer.Settings.useNativeCustomElements,
_debouncers: [],
_finishDebouncer: null,
flush: function () {
for (var i = 0; i < this._debouncers.length; i++) {
this._debouncers[i].complete();
}
if (this._finishDebouncer) {
this._finishDebouncer.complete();
}
this._flushPolyfills();
if (this._debouncers.length && this._flushGuard < this._FLUSH_MAX) {
this._flushGuard++;
this.flush();
} else {
if (this._flushGuard >= this._FLUSH_MAX) {
console.warn('Polymer.dom.flush aborted. Flush may not be complete.');
}
this._flushGuard = 0;
}
},
_flushPolyfills: function () {
if (this._needsTakeRecords) {
CustomElements.takeRecords();
}
},
addDebouncer: function (debouncer) {
this._debouncers.push(debouncer);
this._finishDebouncer = Polymer.Debounce(this._finishDebouncer, this._finishFlush);
},
_finishFlush: function () {
Polymer.dom._debouncers = [];
}
});
function getLightChildren(node) {
var children = node._lightChildren;
return children ? children : node.childNodes;
}
function getComposedChildren(node) {
if (!node._composedChildren) {
node._composedChildren = Array.prototype.slice.call(node.childNodes);
}
return node._composedChildren;
}
function addToComposedParent(parent, node, ref_node) {
var children = getComposedChildren(parent);
var i = ref_node ? children.indexOf(ref_node) : -1;
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
var fragChildren = getComposedChildren(node);
for (var j = 0; j < fragChildren.length; j++) {
addNodeToComposedChildren(fragChildren[j], parent, children, i + j);
}
node._composedChildren = null;
} else {
addNodeToComposedChildren(node, parent, children, i);
}
}
function addNodeToComposedChildren(node, parent, children, i) {
node._composedParent = parent;
children.splice(i >= 0 ? i : children.length, 0, node);
}
function removeFromComposedParent(parent, node) {
node._composedParent = null;
if (parent) {
var children = getComposedChildren(parent);
var i = children.indexOf(node);
if (i >= 0) {
children.splice(i, 1);
}
}
}
function saveLightChildrenIfNeeded(node) {
if (!node._lightChildren) {
var c$ = Array.prototype.slice.call(node.childNodes);
for (var i = 0, l = c$.length, child; i < l && (child = c$[i]); i++) {
child._lightParent = child._lightParent || node;
}
node._lightChildren = c$;
}
}
function hasInsertionPoint(root) {
return Boolean(root._insertionPoints.length);
}
var p = Element.prototype;
var matchesSelector = p.matches || p.matchesSelector || p.mozMatchesSelector || p.msMatchesSelector || p.oMatchesSelector || p.webkitMatchesSelector;
return {
getLightChildren: getLightChildren,
getComposedChildren: getComposedChildren,
removeFromComposedParent: removeFromComposedParent,
saveLightChildrenIfNeeded: saveLightChildrenIfNeeded,
matchesSelector: matchesSelector,
hasInsertionPoint: hasInsertionPoint,
ctor: DomApi,
factory: factory
};
}();
(function () {
Polymer.Base._addFeature({
_prepShady: function () {
this._useContent = this._useContent || Boolean(this._template);
},
_poolContent: function () {
if (this._useContent) {
saveLightChildrenIfNeeded(this);
}
},
_setupRoot: function () {
if (this._useContent) {
this._createLocalRoot();
if (!this.dataHost) {
upgradeLightChildren(this._lightChildren);
}
}
},
_createLocalRoot: function () {
this.shadyRoot = this.root;
this.shadyRoot._distributionClean = false;
this.shadyRoot._isShadyRoot = true;
this.shadyRoot._dirtyRoots = [];
var i$ = this.shadyRoot._insertionPoints = !this._notes || this._notes._hasContent ? this.shadyRoot.querySelectorAll('content') : [];
saveLightChildrenIfNeeded(this.shadyRoot);
for (var i = 0, c; i < i$.length; i++) {
c = i$[i];
saveLightChildrenIfNeeded(c);
saveLightChildrenIfNeeded(c.parentNode);
}
this.shadyRoot.host = this;
},
get domHost() {
var root = Polymer.dom(this).getOwnerRoot();
return root && root.host;
},
distributeContent: function (updateInsertionPoints) {
if (this.shadyRoot) {
var dom = Polymer.dom(this);
if (updateInsertionPoints) {
dom._updateInsertionPoints(this);
}
var host = getTopDistributingHost(this);
dom._lazyDistribute(host);
}
},
_distributeContent: function () {
if (this._useContent && !this.shadyRoot._distributionClean) {
this._beginDistribute();
this._distributeDirtyRoots();
this._finishDistribute();
}
},
_beginDistribute: function () {
if (this._useContent && hasInsertionPoint(this.shadyRoot)) {
this._resetDistribution();
this._distributePool(this.shadyRoot, this._collectPool());
}
},
_distributeDirtyRoots: function () {
var c$ = this.shadyRoot._dirtyRoots;
for (var i = 0, l = c$.length, c; i < l && (c = c$[i]); i++) {
c._distributeContent();
}
this.shadyRoot._dirtyRoots = [];
},
_finishDistribute: function () {
if (this._useContent) {
this.shadyRoot._distributionClean = true;
if (hasInsertionPoint(this.shadyRoot)) {
this._composeTree();
} else {
if (!this.shadyRoot._hasDistributed) {
this.textContent = '';
this._composedChildren = null;
this.appendChild(this.shadyRoot);
} else {
var children = this._composeNode(this);
this._updateChildNodes(this, children);
}
}
this.shadyRoot._hasDistributed = true;
}
},
elementMatches: function (selector, node) {
node = node || this;
return matchesSelector.call(node, selector);
},
_resetDistribution: function () {
var children = getLightChildren(this);
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (child._destinationInsertionPoints) {
child._destinationInsertionPoints = undefined;
}
if (isInsertionPoint(child)) {
clearDistributedDestinationInsertionPoints(child);
}
}
var root = this.shadyRoot;
var p$ = root._insertionPoints;
for (var j = 0; j < p$.length; j++) {
p$[j]._distributedNodes = [];
}
},
_collectPool: function () {
var pool = [];
var children = getLightChildren(this);
for (var i = 0; i < children.length; i++) {
var child = children[i];
if (isInsertionPoint(child)) {
pool.push.apply(pool, child._distributedNodes);
} else {
pool.push(child);
}
}
return pool;
},
_distributePool: function (node, pool) {
var p$ = node._insertionPoints;
for (var i = 0, l = p$.length, p; i < l && (p = p$[i]); i++) {
this._distributeInsertionPoint(p, pool);
maybeRedistributeParent(p, this);
}
},
_distributeInsertionPoint: function (content, pool) {
var anyDistributed = false;
for (var i = 0, l = pool.length, node; i < l; i++) {
node = pool[i];
if (!node) {
continue;
}
if (this._matchesContentSelect(node, content)) {
distributeNodeInto(node, content);
pool[i] = undefined;
anyDistributed = true;
}
}
if (!anyDistributed) {
var children = getLightChildren(content);
for (var j = 0; j < children.length; j++) {
distributeNodeInto(children[j], content);
}
}
},
_composeTree: function () {
this._updateChildNodes(this, this._composeNode(this));
var p$ = this.shadyRoot._insertionPoints;
for (var i = 0, l = p$.length, p, parent; i < l && (p = p$[i]); i++) {
parent = p._lightParent || p.parentNode;
if (!parent._useContent && parent !== this && parent !== this.shadyRoot) {
this._updateChildNodes(parent, this._composeNode(parent));
}
}
},
_composeNode: function (node) {
var children = [];
var c$ = getLightChildren(node.shadyRoot || node);
for (var i = 0; i < c$.length; i++) {
var child = c$[i];
if (isInsertionPoint(child)) {
var distributedNodes = child._distributedNodes;
for (var j = 0; j < distributedNodes.length; j++) {
var distributedNode = distributedNodes[j];
if (isFinalDestination(child, distributedNode)) {
children.push(distributedNode);
}
}
} else {
children.push(child);
}
}
return children;
},
_updateChildNodes: function (container, children) {
var composed = getComposedChildren(container);
var splices = Polymer.ArraySplice.calculateSplices(children, composed);
for (var i = 0, d = 0, s; i < splices.length && (s = splices[i]); i++) {
for (var j = 0, n; j < s.removed.length && (n = s.removed[j]); j++) {
remove(n);
composed.splice(s.index + d, 1);
}
d -= s.addedCount;
}
for (var i = 0, s, next; i < splices.length && (s = splices[i]); i++) {
next = composed[s.index];
for (var j = s.index, n; j < s.index + s.addedCount; j++) {
n = children[j];
insertBefore(container, n, next);
composed.splice(j, 0, n);
}
}
},
_matchesContentSelect: function (node, contentElement) {
var select = contentElement.getAttribute('select');
if (!select) {
return true;
}
select = select.trim();
if (!select) {
return true;
}
if (!(node instanceof Element)) {
return false;
}
var validSelectors = /^(:not\()?[*.#[a-zA-Z_|]/;
if (!validSelectors.test(select)) {
return false;
}
return this.elementMatches(select, node);
},
_elementAdd: function () {
},
_elementRemove: function () {
}
});
var saveLightChildrenIfNeeded = Polymer.DomApi.saveLightChildrenIfNeeded;
var getLightChildren = Polymer.DomApi.getLightChildren;
var matchesSelector = Polymer.DomApi.matchesSelector;
var hasInsertionPoint = Polymer.DomApi.hasInsertionPoint;
var getComposedChildren = Polymer.DomApi.getComposedChildren;
var removeFromComposedParent = Polymer.DomApi.removeFromComposedParent;
function distributeNodeInto(child, insertionPoint) {
insertionPoint._distributedNodes.push(child);
var points = child._destinationInsertionPoints;
if (!points) {
child._destinationInsertionPoints = [insertionPoint];
} else {
points.push(insertionPoint);
}
}
function clearDistributedDestinationInsertionPoints(content) {
var e$ = content._distributedNodes;
if (e$) {
for (var i = 0; i < e$.length; i++) {
var d = e$[i]._destinationInsertionPoints;
if (d) {
d.splice(d.indexOf(content) + 1, d.length);
}
}
}
}
function maybeRedistributeParent(content, host) {
var parent = content._lightParent;
if (parent && parent.shadyRoot && hasInsertionPoint(parent.shadyRoot) && parent.shadyRoot._distributionClean) {
parent.shadyRoot._distributionClean = false;
host.shadyRoot._dirtyRoots.push(parent);
}
}
function isFinalDestination(insertionPoint, node) {
var points = node._destinationInsertionPoints;
return points && points[points.length - 1] === insertionPoint;
}
function isInsertionPoint(node) {
return node.localName == 'content';
}
var nativeInsertBefore = Element.prototype.insertBefore;
var nativeRemoveChild = Element.prototype.removeChild;
function insertBefore(parentNode, newChild, refChild) {
var newChildParent = getComposedParent(newChild);
if (newChildParent !== parentNode) {
removeFromComposedParent(newChildParent, newChild);
}
remove(newChild);
nativeInsertBefore.call(parentNode, newChild, refChild || null);
newChild._composedParent = parentNode;
}
function remove(node) {
var parentNode = getComposedParent(node);
if (parentNode) {
node._composedParent = null;
nativeRemoveChild.call(parentNode, node);
}
}
function getComposedParent(node) {
return node.__patched ? node._composedParent : node.parentNode;
}
function getTopDistributingHost(host) {
while (host && hostNeedsRedistribution(host)) {
host = host.domHost;
}
return host;
}
function hostNeedsRedistribution(host) {
var c$ = Polymer.dom(host).children;
for (var i = 0, c; i < c$.length; i++) {
c = c$[i];
if (c.localName === 'content') {
return host.domHost;
}
}
}
var needsUpgrade = window.CustomElements && !CustomElements.useNative;
function upgradeLightChildren(children) {
if (needsUpgrade && children) {
for (var i = 0; i < children.length; i++) {
CustomElements.upgrade(children[i]);
}
}
}
}());
if (Polymer.Settings.useShadow) {
Polymer.Base._addFeature({
_poolContent: function () {
},
_beginDistribute: function () {
},
distributeContent: function () {
},
_distributeContent: function () {
},
_finishDistribute: function () {
},
_createLocalRoot: function () {
this.createShadowRoot();
this.shadowRoot.appendChild(this.root);
this.root = this.shadowRoot;
}
});
}
Polymer.DomModule = document.createElement('dom-module');
Polymer.Base._addFeature({
_registerFeatures: function () {
this._prepIs();
this._prepAttributes();
this._prepBehaviors();
this._prepConstructor();
this._prepTemplate();
this._prepShady();
},
_prepBehavior: function (b) {
this._addHostAttributes(b.hostAttributes);
},
_initFeatures: function () {
this._poolContent();
this._pushHost();
this._stampTemplate();
this._popHost();
this._marshalHostAttributes();
this._setupDebouncers();
this._marshalBehaviors();
this._tryReady();
},
_marshalBehavior: function (b) {
}
});</script>
================================================
FILE: cmd/memlat/static/bower_components/polymer/polymer.html
================================================
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--><!--
@license
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--><link rel="import" href="polymer-mini.html">
<script>Polymer.nar = [];
Polymer.Annotations = {
parseAnnotations: function (template) {
var list = [];
var content = template._content || template.content;
this._parseNodeAnnotations(content, list);
return list;
},
_parseNodeAnnotations: function (node, list) {
return node.nodeType === Node.TEXT_NODE ? this._parseTextNodeAnnotation(node, list) : this._parseElementAnnotations(node, list);
},
_testEscape: function (value) {
var escape = value.slice(0, 2);
if (escape === '{{' || escape === '[[') {
return escape;
}
},
_parseTextNodeAnnotation: function (node, list) {
var v = node.textContent;
var escape = this._testEscape(v);
if (escape) {
node.textContent = ' ';
var annote = {
bindings: [{
kind: 'text',
mode: escape[0],
value: v.slice(2, -2).trim()
}]
};
list.push(annote);
return annote;
}
},
_parseElementAnnotations: function (element, list) {
var annote = {
bindings: [],
events: []
};
if (element.localName === 'content') {
list._hasContent = true;
}
this._parseChildNodesAnnotations(element, annote, list);
if (element.attributes) {
this._parseNodeAttributeAnnotations(element, annote, list);
if (this.prepElement) {
this.prepElement(element);
}
}
if (annote.bindings.length || annote.events.length || annote.id) {
list.push(annote);
}
return annote;
},
_parseChildNodesAnnotations: function (root, annote, list, callback) {
if (root.firstChild) {
for (var i = 0, node = root.firstChild; node; node = node.nextSibling, i++) {
if (node.localName === 'template' && !node.hasAttribute('preserve-content')) {
this._parseTemplate(node, i, list, annote);
}
if (node.nodeType === Node.TEXT_NODE) {
var n = node.nextSibling;
while (n && n.nodeType === Node.TEXT_NODE) {
node.textContent += n.textContent;
root.removeChild(n);
n = n.nextSibling;
}
}
var childAnnotation = this._parseNodeAnnotations(node, list, callback);
if (childAnnotation) {
childAnnotation.parent = annote;
childAnnotation.index = i;
}
}
}
},
_parseTemplate: function (node, index, list, parent) {
var content = document.createDocumentFragment();
content._notes = this.parseAnnotations(node);
content.appendChild(node.content);
list.push({
bindings: Polymer.nar,
events: Polymer.nar,
templateContent: content,
parent: parent,
index: index
});
},
_parseNodeAttributeAnnotations: function (node, annotation) {
for (var i = node.attributes.length - 1, a; a = node.attributes[i]; i--) {
var n = a.name, v = a.value;
if (n === 'id' && !this._testEscape(v)) {
annotation.id = v;
} else if (n.slice(0, 3) === 'on-') {
node.removeAttribute(n);
annotation.events.push({
name: n.slice(3),
value: v
});
} else {
var b = this._parseNodeAttributeAnnotation(node, n, v);
if (b) {
annotation.bindings.push(b);
}
}
}
},
_parseNodeAttributeAnnotation: function (node, n, v) {
var escape = this._testEscape(v);
if (escape) {
var customEvent;
var name = n;
var mode = escape[0];
v = v.slice(2, -2).trim();
var not = false;
if (v[0] == '!') {
v = v.substring(1);
not = true;
}
var kind = 'property';
if (n[n.length - 1] == '$') {
name = n.slice(0, -1);
kind = 'attribute';
}
var notifyEvent, colon;
if (mode == '{' && (colon = v.indexOf('::')) > 0) {
notifyEvent = v.substring(colon + 2);
v = v.substring(0, colon);
customEvent = true;
}
if (node.localName == 'input' && n == 'value') {
node.setAttribute(n, '');
}
node.removeAttribute(n);
if (kind === 'property') {
name = Polymer.CaseMap.dashToCamelCase(name);
}
return {
kind: kind,
mode: mode,
name: name,
value: v,
negate: not,
event: notifyEvent,
customEvent: customEvent
};
}
},
_localSubTree: function (node, host) {
return node === host ? node.childNodes : node._lightChildren || node.childNodes;
},
findAnnotatedNode: function (root, annote) {
var parent = annote.parent && Polymer.Annotations.findAnnotatedNode(root, annote.parent);
return !parent ? root : Polymer.Annotations._localSubTree(parent, root)[annote.index];
}
};
(function () {
function resolveCss(cssText, ownerDocument) {
return cssText.replace(CSS_URL_RX, function (m, pre, url, post) {
return pre + '\'' + resolve(url.replace(/["']/g, ''), ownerDocument) + '\'' + post;
});
}
function resolveAttrs(element, ownerDocument) {
for (var name in URL_ATTRS) {
var a$ = URL_ATTRS[name];
for (var i = 0, l = a$.length, a, at, v; i < l && (a = a$[i]); i++) {
if (name === '*' || element.localName === name) {
at = element.attributes[a];
v = at && at.value;
if (v && v.search(BINDING_RX) < 0) {
at.value = a === 'style' ? resolveCss(v, ownerDocument) : resolve(v, ownerDocument);
}
}
}
}
}
function resolve(url, ownerDocument) {
if (url && url[0] === '#') {
return url;
}
var resolver = getUrlResolver(ownerDocument);
resolver.href = url;
return resolver.href || url;
}
var tempDoc;
var tempDocBase;
function resolveUrl(url, baseUri) {
if (!tempDoc) {
tempDoc = document.implementation.createHTMLDocument('temp');
tempDocBase = tempDoc.createElement('base');
tempDoc.head.appendChild(tempDocBase);
}
tempDocBase.href = baseUri;
return resolve(url, tempDoc);
}
function getUrlResolver(ownerDocument) {
return ownerDocument.__urlResolver || (ownerDocument.__urlResolver = ownerDocument.createElement('a'));
}
var CSS_URL_RX = /(url\()([^)]*)(\))/g;
var URL_ATTRS = {
'*': [
'href',
'src',
'style',
'url'
],
form: ['action']
};
var BINDING_RX = /\{\{|\[\[/;
Polymer.ResolveUrl = {
resolveCss: resolveCss,
resolveAttrs: resolveAttrs,
resolveUrl: resolveUrl
};
}());
Polymer.Base._addFeature({
_prepAnnotations: function () {
if (!this._template) {
this._notes = [];
} else {
Polymer.Annotations.prepElement = this._prepElement.bind(this);
this._notes = Polymer.Annotations.parseAnnotations(this._template);
this._processAnnotations(this._notes);
Polymer.Annotations.prepElement = null;
}
},
_processAnnotations: function (notes) {
for (var i = 0; i < notes.length; i++) {
var note = notes[i];
for (var j = 0; j < note.bindings.length; j++) {
var b = note.bindings[j];
b.signature = this._parseMethod(b.value);
if (!b.signature) {
b.model = this._modelForPath(b.value);
}
}
if (note.templateContent) {
this._processAnnotations(note.templateContent._notes);
var pp = note.templateContent._parentProps = this._discoverTemplateParentProps(note.templateContent._notes);
var bindings = [];
for (var prop in pp) {
bindings.push({
index: note.index,
kind: 'property',
mode: '{',
name: '_parent_' + prop,
model: prop,
value: prop
});
}
note.bindings = note.bindings.concat(bindings);
}
}
},
_discoverTemplateParentProps: function (notes) {
var pp = {};
notes.forEach(function (n) {
n.bindings.forEach(function (b) {
if (b.signature) {
var args = b.signature.args;
for (var k = 0; k < args.length; k++) {
pp[args[k].model] = true;
}
} else {
pp[b.model] = true;
}
});
if (n.templateContent) {
var tpp = n.templateContent._parentProps;
Polymer.Base.mixin(pp, tpp);
}
});
return pp;
},
_prepElement: function (element) {
Polymer.ResolveUrl.resolveAttrs(element, this._template.ownerDocument);
},
_findAnnotatedNode: Polymer.Annotations.findAnnotatedNode,
_marshalAnnotationReferences: function () {
if (this._template) {
this._marshalIdNodes();
this._marshalAnnotatedNodes();
this._marshalAnnotatedListeners();
}
},
_configureAnnotationReferences: function () {
this._configureTemplateContent();
},
_configureTemplateContent: function () {
this._notes.forEach(function (note, i) {
if (note.templateContent) {
this._nodes[i]._content = note.templateContent;
}
}, this);
},
_marshalIdNodes: function () {
this.$ = {};
this._notes.forEach(function (a) {
if (a.id) {
this.$[a.id] = this._findAnnotatedNode(this.root, a);
}
}, this);
},
_marshalAnnotatedNodes: function () {
if (this._nodes) {
this._nodes = this._nodes.map(function (a) {
return this._findAnnotatedNode(this.root, a);
}, this);
}
},
_marshalAnnotatedListeners: function () {
this._notes.forEach(function (a) {
if (a.events && a.events.length) {
var node = this._findAnnotatedNode(this.root, a);
a.events.forEach(function (e) {
this.listen(node, e.name, e.value);
}, this);
}
}, this);
}
});
Polymer.Base._addFeature({
listeners: {},
_listenListeners: function (listeners) {
var node, name, key;
for (key in listeners) {
if (key.indexOf('.') < 0) {
node = this;
name = key;
} else {
name = key.split('.');
node = this.$[name[0]];
name = name[1];
}
this.listen(node, name, listeners[key]);
}
},
listen: function (node, eventName, methodName) {
this._listen(node, eventName, this._createEventHandler(node, eventName, methodName));
},
_boundListenerKey: function (eventName, methodName) {
return eventName + ':' + methodName;
},
_recordEventHandler: function (host, eventName, target, methodName, handler) {
var hbl = host.__boundListeners;
if (!hbl) {
hbl = host.__boundListeners = new WeakMap();
}
var bl = hbl.get(target);
if (!bl) {
bl = {};
hbl.set(target, bl);
}
var key = this._boundListenerKey(eventName, methodName);
bl[key] = handler;
},
_recallEventHandler: function (host, eventName, target, methodName) {
var hbl = host.__boundListeners;
if (!hbl) {
return;
}
var bl = hbl.get(target);
if (!bl) {
return;
}
var key = this._boundListenerKey(eventName, methodName);
return bl[key];
},
_createEventHandler: function (node, eventName, methodName) {
var host = this;
var handler = function (e) {
if (host[methodName]) {
host[methodName](e, e.detail);
} else {
host._warn(host._logf('_createEventHandler', 'listener method `' + methodName + '` not defined'));
}
};
this._recordEventHandler(host, eventName, node, methodName, handler);
return handler;
},
unlisten: function (node, eventName, methodName) {
var handler = this._recallEventHandler(this, eventName, node, methodName);
if (handler) {
this._unlisten(node, eventName, handler);
}
},
_listen: function (node, eventName, handler) {
node.addEventListener(eventName, handler);
},
_unlisten: function (node, eventName, handler) {
node.removeEventListener(eventName, handler);
}
});
(function () {
'use strict';
var HAS_NATIVE_TA = typeof document.head.style.touchAction === 'string';
var GESTURE_KEY = '__polymerGestures';
var HANDLED_OBJ = '__polymerGesturesHandled';
var TOUCH_ACTION = '__polymerGesturesTouchAction';
var TAP_DISTANCE = 25;
var TRACK_DISTANCE = 5;
var TRACK_LENGTH = 2;
var MOUSE_TIMEOUT = 2500;
var MOUSE_EVENTS = [
'mousedown',
'mousemove',
'mouseup',
'click'
];
var MOUSE_WHICH_TO_BUTTONS = [
0,
1,
4,
2
];
var MOUSE_HAS_BUTTONS = function () {
try {
return new MouseEvent('test', { buttons: 1 }).buttons === 1;
} catch (e) {
return false;
}
}();
var IS_TOUCH_ONLY = navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);
var mouseCanceller = function (mouseEvent) {
mouseEvent[HANDLED_OBJ] = { skip: true };
if (mouseEvent.type === 'click') {
var path = Polymer.dom(mouseEvent).path;
for (var i = 0; i < path.length; i++) {
if (path[i] === POINTERSTATE.mouse.target) {
return;
}
}
mouseEvent.preventDefault();
mouseEvent.stopPropagation();
}
};
function setupTeardownMouseCanceller(setup) {
for (var i = 0, en; i < MOUSE_EVENTS.length; i++) {
en = MOUSE_EVENTS[i];
if (setup) {
document.addEventListener(en, mouseCanceller, true);
} else {
document.removeEventListener(en, mouseCanceller, true);
}
}
}
function ignoreMouse() {
if (IS_TOUCH_ONLY) {
return;
}
if (!POINTERSTATE.mouse.mouseIgnoreJob) {
setupTeardownMouseCanceller(true);
}
var unset = function () {
setupTeardownMouseCanceller();
POINTERSTATE.mouse.target = null;
POINTERSTATE.mouse.mouseIgnoreJob = null;
};
POINTERSTATE.mouse.mouseIgnoreJob = Polymer.Debounce(POINTERSTATE.mouse.mouseIgnoreJob, unset, MOUSE_TIMEOUT);
}
function hasLeftMouseButton(ev) {
var type = ev.type;
if (MOUSE_EVENTS.indexOf(type) === -1) {
return false;
}
if (type === 'mousemove') {
var buttons = ev.buttons === undefined ? 1 : ev.buttons;
if (ev instanceof window.MouseEvent && !MOUSE_HAS_BUTTONS) {
buttons = MOUSE_WHICH_TO_BUTTONS[ev.which] || 0;
}
return Boolean(buttons & 1);
} else {
var button = ev.button === undefined ? 0 : ev.button;
return button === 0;
}
}
function isSyntheticClick(ev) {
if (ev.type === 'click') {
if (ev.detail === 0) {
return true;
}
var t = Gestures.findOriginalTarget(ev);
var bcr = t.getBoundingClientRect();
var x = ev.pageX, y = ev.pageY;
return !(x >= bcr.left && x <= bcr.right && (y >= bcr.top && y <= bcr.bottom));
}
return false;
}
var POINTERSTATE = {
mouse: {
target: null,
mouseIgnoreJob: null
},
touch: {
x: 0,
y: 0,
id: -1,
scrollDecided: false
}
};
function firstTouchAction(ev) {
var path = Polymer.dom(ev).path;
var ta = 'auto';
for (var i = 0, n; i < path.length; i++) {
n = path[i];
if (n[TOUCH_ACTION]) {
ta = n[TOUCH_ACTION];
break;
}
}
return ta;
}
function trackDocument(stateObj, movefn, upfn) {
stateObj.movefn = movefn;
stateObj.upfn = upfn;
document.addEventListener('mousemove', movefn);
document.addEventListener('mouseup', upfn);
}
function untrackDocument(stateObj) {
document.removeEventListener('mousemove', stateObj.movefn);
document.removeEventListener('mouseup', stateObj.upfn);
}
var Gestures = {
gestures: {},
recognizers: [],
deepTargetFind: function (x, y) {
var node = document.elementFromPoint(x, y);
var next = node;
while (next && next.shadowRoot) {
next = next.shadowRoot.elementFromPoint(x, y);
if (next) {
node = next;
}
}
return node;
},
findOriginalTarget: function (ev) {
if (ev.path) {
return ev.path[0];
}
return ev.target;
},
handleNative: function (ev) {
var handled;
var type = ev.type;
var node = ev.currentTarget;
var gobj = node[GESTURE_KEY];
var gs = gobj[type];
if (!gs) {
return;
}
if (!ev[HANDLED_OBJ]) {
ev[HANDLED_OBJ] = {};
if (type.slice(0, 5) === 'touch') {
var t = ev.changedTouches[0];
if (type === 'touchstart') {
if (ev.touches.length === 1) {
POINTERSTATE.touch.id = t.identifier;
}
}
if (POINTERSTATE.touch.id !== t.identifier) {
return;
}
if (!HAS_NATIVE_TA) {
if (type === 'touchstart' || type === 'touchmove') {
Gestures.handleTouchAction(ev);
}
}
if (type === 'touchend') {
POINTERSTATE.mouse.target = Polymer.dom(ev).rootTarget;
ignoreMouse(true);
}
}
}
handled = ev[HANDLED_OBJ];
if (handled.skip) {
return;
}
var recognizers = Gestures.recognizers;
for (var i = 0, r; i < recognizers.length; i++) {
r = recognizers[i];
if (gs[r.name] && !handled[r.name]) {
if (r.flow && r.flow.start.indexOf(ev.type) > -1) {
if (r.reset) {
r.reset();
}
}
}
}
for (var i = 0, r; i < recognizers.length; i++) {
r = recognizers[i];
if (gs[r.name] && !handled[r.name]) {
handled[r.name] = true;
r[type](ev);
}
}
},
handleTouchAction: function (ev) {
var t = ev.changedTouches[0];
var type = ev.type;
if (type === 'touchstart') {
POINTERSTATE.touch.x = t.clientX;
POINTERSTATE.touch.y = t.clientY;
POINTERSTATE.touch.scrollDecided = false;
} else if (type === 'touchmove') {
if (POINTERSTATE.touch.scrollDecided) {
return;
}
POINTERSTATE.touch.scrollDecided = true;
var ta = firstTouchAction(ev);
var prevent = false;
var dx = Math.abs(POINTERSTATE.touch.x - t.clientX);
var dy = Math.abs(POINTERSTATE.touch.y - t.clientY);
if (!ev.cancelable) {
} else if (ta === 'none') {
prevent = true;
} else if (ta === 'pan-x') {
prevent = dy > dx;
} else if (ta === 'pan-y') {
prevent = dx > dy;
}
if (prevent) {
ev.preventDefault();
} else {
Gestures.prevent('track');
}
}
},
add: function (node, evType, handler) {
var recognizer = this.gestures[evType];
var deps = recognizer.deps;
var name = recognizer.name;
var gobj = node[GESTURE_KEY];
if (!gobj) {
node[GESTURE_KEY] = gobj = {};
}
for (var i = 0, dep, gd; i < deps.length; i++) {
dep = deps[i];
if (IS_TOUCH_ONLY && MOUSE_EVENTS.indexOf(dep) > -1) {
continue;
}
gd = gobj[dep];
if (!gd) {
gobj[dep] = gd = { _count: 0 };
}
if (gd._count === 0) {
node.addEventListener(dep, this.handleNative);
}
gd[name] = (gd[name] || 0) + 1;
gd._count = (gd._count || 0) + 1;
}
node.addEventListener(evType, handler);
if (recognizer.touchAction) {
this.setTouchAction(node, recognizer.touchAction);
}
},
remove: function (node, evType, handler) {
var recognizer = this.gestures[evType];
var deps = recognizer.deps;
var name = recognizer.name;
var gobj = node[GESTURE_KEY];
if (gobj) {
for (var i = 0, dep, gd; i < deps.length; i++) {
dep = deps[i];
gd = gobj[dep];
if (gd && gd[name]) {
gd[name] = (gd[name] || 1) - 1;
gd._count = (gd._count || 1) - 1;
}
if (gd._count === 0) {
node.removeEventListener(dep, this.handleNative);
}
}
}
node.removeEventListener(evType, handler);
},
register: function (recog) {
this.recognizers.push(recog);
for (var i = 0; i < recog.emits.length; i++) {
this.gestures[recog.emits[i]] = recog;
}
},
findRecognizerByEvent: function (evName) {
for (var i = 0, r; i < this.recognizers.length; i++) {
r = this.recognizers[i];
for (var j = 0, n; j < r.emits.length; j++) {
n = r.emits[j];
if (n === evName) {
return r;
}
}
}
return null;
},
setTouchAction: function (node, value) {
if (HAS_NATIVE_TA) {
node.style.touchAction = value;
}
node[TOUCH_ACTION] = value;
},
fire: function (target, type, detail) {
var ev = Polymer.Base.fire(type, detail, {
node: target,
bubbles: true,
cancelable: true
});
if (ev.defaultPrevented) {
var se = detail.sourceEvent;
if (se && se.preventDefault) {
se.preventDefault();
}
}
},
prevent: function (evName) {
var recognizer = this.findRecognizerByEvent(evName);
if (recognizer.info) {
recognizer.info.prevent = true;
}
}
};
Gestures.register({
name: 'downup',
deps: [
'mousedown',
'touchstart',
'touchend'
],
flow: {
start: [
'mousedown',
'touchstart'
],
end: [
'mouseup',
'touchend'
]
},
emits: [
'down',
'up'
],
info: {
movefn: function () {
},
upfn: function () {
}
},
reset: function () {
untrackDocument(this.info);
},
mousedown: function (e) {
if (!hasLeftMouseButton(e)) {
return;
}
var t = Gestures.findOriginalTarget(e);
var self = this;
var movefn = function movefn(e) {
if (!hasLeftMouseButton(e)) {
self.fire('up', t, e);
untrackDocument(self.info);
}
};
var upfn = function upfn(e) {
if (hasLeftMouseButton(e)) {
self.fire('up', t, e);
}
untrackDocument(self.info);
};
trackDocument(this.info, movefn, upfn);
this.fire('down', t, e);
},
touchstart: function (e) {
this.fire('down', Gestures.findOriginalTarget(e), e.changedTouches[0]);
},
touchend: function (e) {
this.fire('up', Gestures.findOriginalTarget(e), e.changedTouches[0]);
},
fire: function (type, target, event) {
var self = this;
Gestures.fire(target, type, {
x: event.clientX,
y: event.clientY,
sourceEvent: event,
prevent: Gestures.prevent.bind(Gestures)
});
}
});
Gestures.register({
name: 'track',
touchAction: 'none',
deps: [
'mousedown',
'touchstart',
'touchmove',
'touchend'
],
flow: {
start: [
'mousedown',
'touchstart'
],
end: [
'mouseup',
'touchend'
]
},
emits: ['track'],
info: {
x: 0,
y: 0,
state: 'start',
started: false,
moves: [],
addMove: function (move) {
if (this.moves.length > TRACK_LENGTH) {
this.moves.shift();
}
this.moves.push(move);
},
movefn: function () {
},
upfn: function () {
},
prevent: false
},
reset: function () {
this.info.state = 'start';
this.info.started = false;
this.info.moves = [];
this.info.x = 0;
this.info.y = 0;
this.info.prevent = false;
untrackDocument(this.info);
},
hasMovedEnough: function (x, y) {
if (this.info.prevent) {
return false;
}
if (this.info.started) {
return true;
}
var dx = Math.abs(this.info.x - x);
var dy = Math.abs(this.info.y - y);
return dx >= TRACK_DISTANCE || dy >= TRACK_DISTANCE;
},
mousedown: function (e) {
if (!hasLeftMouseButton(e)) {
return;
}
var t = Gestures.findOriginalTarget(e);
var self = this;
var movefn = function movefn(e) {
var x = e.clientX, y = e.clientY;
if (self.hasMovedEnough(x, y)) {
self.info.state = self.info.started ? e.type === 'mouseup' ? 'end' : 'track' : 'start';
self.info.addMove({
x: x,
y: y
});
if (!hasLeftMouseButton(e)) {
self.info.state = 'end';
untrackDocument(self.info);
}
self.fire(t, e);
self.info.started = true;
}
};
var upfn = function upfn(e) {
if (self.info.started) {
Gestures.prevent('tap');
movefn(e);
}
untrackDocument(self.info);
};
trackDocument(this.info, movefn, upfn);
this.info.x = e.clientX;
this.info.y = e.clientY;
},
touchstart: function (e) {
var ct = e.changedTouches[0];
this.info.x = ct.clientX;
this.info.y = ct.clientY;
},
touchmove: function (e) {
var t = Gestures.findOriginalTarget(e);
var ct = e.changedTouches[0];
var x = ct.clientX, y = ct.clientY;
if (this.hasMovedEnough(x, y)) {
this.info.addMove({
x: x,
y: y
});
this.fire(t, ct);
this.info.state = 'track';
this.info.started = true;
}
},
touchend: function (e) {
var t = Gestures.findOriginalTarget(e);
var ct = e.changedTouches[0];
if (this.info.started) {
Gestures.prevent('tap');
this.info.state = 'end';
this.info.addMove({
x: ct.clientX,
y: ct.clientY
});
this.fire(t, ct);
}
},
fire: function (target, touch) {
var secondlast = this.info.moves[this.info.moves.length - 2];
var lastmove = this.info.moves[this.info.moves.length - 1];
var dx = lastmove.x - this.info.x;
var dy = lastmove.y - this.info.y;
var ddx, ddy = 0;
if (secondlast) {
ddx = lastmove.x - secondlast.x;
ddy = lastmove.y - secondlast.y;
}
return Gestures.fire(target, 'track', {
state: this.info.state,
x: touch.c
gitextract_kmdeuzjx/
├── .github/
│ └── workflows/
│ └── test.yml
├── .gitignore
├── LICENSE
├── README.md
├── cmd/
│ ├── bitstringer/
│ │ └── main.go
│ ├── branchstats/
│ │ └── main.go
│ ├── memanim/
│ │ ├── .gitignore
│ │ ├── hilbert_test.go
│ │ └── main.go
│ ├── memheat/
│ │ ├── draw.go
│ │ ├── main.go
│ │ └── svg.go
│ ├── memlat/
│ │ ├── database.go
│ │ ├── main.go
│ │ └── static/
│ │ ├── bower.json
│ │ ├── bower_components/
│ │ │ ├── font-roboto/
│ │ │ │ ├── .bower.json
│ │ │ │ ├── README.md
│ │ │ │ ├── bower.json
│ │ │ │ └── roboto.html
│ │ │ ├── paper-styles/
│ │ │ │ ├── .bower.json
│ │ │ │ ├── README.md
│ │ │ │ ├── bower.json
│ │ │ │ ├── classes/
│ │ │ │ │ ├── global.html
│ │ │ │ │ ├── shadow-layout.html
│ │ │ │ │ ├── shadow.html
│ │ │ │ │ └── typography.html
│ │ │ │ ├── color.html
│ │ │ │ ├── default-theme.html
│ │ │ │ ├── demo/
│ │ │ │ │ └── index.html
│ │ │ │ ├── demo-pages.html
│ │ │ │ ├── demo.css
│ │ │ │ ├── paper-styles-classes.html
│ │ │ │ ├── paper-styles.html
│ │ │ │ ├── shadow.html
│ │ │ │ └── typography.html
│ │ │ ├── polymer/
│ │ │ │ ├── .bower.json
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── bower.json
│ │ │ │ ├── build.log
│ │ │ │ ├── polymer-micro.html
│ │ │ │ ├── polymer-mini.html
│ │ │ │ └── polymer.html
│ │ │ ├── promise-polyfill/
│ │ │ │ ├── .bower.json
│ │ │ │ ├── Gruntfile.js
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Promise-Statics.js
│ │ │ │ ├── Promise.js
│ │ │ │ ├── README.md
│ │ │ │ ├── bower.json
│ │ │ │ ├── package.json
│ │ │ │ ├── promise-polyfill-lite.html
│ │ │ │ └── promise-polyfill.html
│ │ │ └── webcomponentsjs/
│ │ │ ├── .bower.json
│ │ │ ├── CustomElements.js
│ │ │ ├── HTMLImports.js
│ │ │ ├── MutationObserver.js
│ │ │ ├── README.md
│ │ │ ├── ShadowDOM.js
│ │ │ ├── bower.json
│ │ │ ├── build.log
│ │ │ ├── package.json
│ │ │ ├── webcomponents-lite.js
│ │ │ └── webcomponents.js
│ │ ├── index.html
│ │ └── memlat-browser.html
│ ├── perfdump/
│ │ └── main.go
│ └── prologuer/
│ └── main.go
├── fmt_test.go
├── go.mod
├── go.sum
├── internal/
│ ├── cparse/
│ │ ├── enums.go
│ │ ├── enums_test.go
│ │ ├── lex.go
│ │ ├── lex_test.go
│ │ ├── pp.go
│ │ ├── pp_test.go
│ │ └── vals.go
│ └── gendefs/
│ ├── edit.go
│ └── main.go
├── perffile/
│ ├── auxflags_string.go
│ ├── auxpmuformat_string.go
│ ├── bpfeventtype_string.go
│ ├── branchflags_string.go
│ ├── branchsampletype_string.go
│ ├── breakpointop_string.go
│ ├── buf.go
│ ├── bufdecoder.go
│ ├── cpumode_string.go
│ ├── cpuset.go
│ ├── datasrcblock_string.go
│ ├── datasrchops_string.go
│ ├── datasrclevel_string.go
│ ├── datasrclevelnum_string.go
│ ├── datasrclock_string.go
│ ├── datasrcop_string.go
│ ├── datasrcsnoop_string.go
│ ├── datasrctlb_string.go
│ ├── doc_test.go
│ ├── eventflags_string.go
│ ├── eventhardwareid_string.go
│ ├── eventprecision_string.go
│ ├── events.go
│ ├── eventtype_string.go
│ ├── format.go
│ ├── gendefs.sh
│ ├── ksymbolflags_string.go
│ ├── ksymboltype_string.go
│ ├── meta.go
│ ├── package.go
│ ├── reader.go
│ ├── readformat_string.go
│ ├── records.go
│ ├── recordsorder_string.go
│ ├── recordtype_string.go
│ ├── sampleformat_string.go
│ ├── sampleregsabi_string.go
│ └── transaction_string.go
├── perfsession/
│ ├── package.go
│ ├── ranges.go
│ ├── session.go
│ └── symbolize.go
├── scale/
│ ├── interface.go
│ ├── linear.go
│ ├── log.go
│ ├── output.go
│ ├── power.go
│ └── util.go
└── scripts/
├── membw
├── memload.py
└── topdown.py
SYMBOL INDEX (1785 symbols across 76 files)
FILE: cmd/bitstringer/main.go
function main (line 33) | func main() {
function prefixDirectory (line 123) | func prefixDirectory(dir string, names []string) []string {
function writeStringer (line 134) | func writeStringer(w io.Writer, pkg, tname, prefix string, consts []*typ...
FILE: cmd/branchstats/main.go
type PC (line 48) | type PC struct
type Agg (line 53) | type Agg struct
type pair (line 60) | type pair struct
function main (line 66) | func main() {
type pairSorter (line 190) | type pairSorter
method Len (line 192) | func (p pairSorter) Len() int {
method Swap (line 196) | func (p pairSorter) Swap(i, j int) {
method Less (line 200) | func (p pairSorter) Less(i, j int) bool {
function getLines (line 213) | func getLines(path string, minLine, maxLine int) ([]string, error) {
function stringCommon (line 242) | func stringCommon(strs []string) int {
FILE: cmd/memanim/hilbert_test.go
function TestHilbert (line 9) | func TestHilbert(t *testing.T) {
function abs (line 28) | func abs(n int) int {
FILE: cmd/memanim/main.go
constant pageBytes (line 47) | pageBytes = 4096
function main (line 49) | func main() {
type event (line 213) | type event struct
function parsePerf (line 222) | func parsePerf(fileName, by string) []event {
type addrMapper (line 258) | type addrMapper struct
method mapAddr (line 304) | func (am *addrMapper) mapAddr(addr uint64) uint64 {
function newAddrMapper (line 266) | func newAddrMapper(events []event, normMax uint64) *addrMapper {
function normalizeWeight (line 313) | func normalizeWeight(events []event) {
function zeroTime (line 335) | func zeroTime(events []event) {
type uint64Slice (line 345) | type uint64Slice
method Len (line 347) | func (s uint64Slice) Len() int {
method Less (line 351) | func (s uint64Slice) Less(i, j int) bool {
method Swap (line 355) | func (s uint64Slice) Swap(i, j int) {
function hilbert (line 361) | func hilbert(n, d int) (x, y int) {
function writePNG (line 384) | func writePNG(path string, img image.Image) {
constant numPanels (line 407) | numPanels = len(panelLevels)
function init (line 414) | func init() {
FILE: cmd/memheat/draw.go
type TicksFormat (line 14) | type TicksFormat struct
method HTicks (line 20) | func (f *TicksFormat) HTicks(svg *SVG, scale scale.Interface, x scale....
FILE: cmd/memheat/main.go
type lineStat (line 23) | type lineStat struct
function main (line 35) | func main() {
type lineStatSorter (line 276) | type lineStatSorter struct
method Len (line 281) | func (s lineStatSorter) Len() int {
method Swap (line 285) | func (s lineStatSorter) Swap(i, j int) {
method Less (line 289) | func (s lineStatSorter) Less(i, j int) bool {
function limitFuncs (line 315) | func limitFuncs(stats []*lineStat, limit int) []*lineStat {
function sections (line 328) | func sections(count int, newGroup func(int) bool) [][2]int {
function getLine (line 345) | func getLine(path string, line int) string {
FILE: cmd/memheat/svg.go
type SVG (line 16) | type SVG struct
method fprintf (line 51) | func (s *SVG) fprintf(format string, a ...interface{}) {
method SetFill (line 58) | func (s *SVG) SetFill(c color.Color) {
method SetStroke (line 66) | func (s *SVG) SetStroke(c color.Color) {
method SetLineWidth (line 74) | func (s *SVG) SetLineWidth(lw float64) {
method style (line 78) | func (s *SVG) style(parts ...string) string {
method NewPath (line 93) | func (s *SVG) NewPath() *SVG {
method MoveTo (line 98) | func (s *SVG) MoveTo(x, y float64) *SVG {
method LineToRel (line 103) | func (s *SVG) LineToRel(xd, yd float64) *SVG {
method Rect (line 116) | func (s *SVG) Rect(x, y, w, h float64) *SVG {
method ClosePath (line 120) | func (s *SVG) ClosePath() *SVG {
method pathData (line 125) | func (s *SVG) pathData() string {
method Stroke (line 129) | func (s *SVG) Stroke() *SVG {
method FillPreserve (line 134) | func (s *SVG) FillPreserve() *SVG {
method Fill (line 139) | func (s *SVG) Fill() *SVG {
method FillStroke (line 143) | func (s *SVG) FillStroke() *SVG {
method Clip (line 148) | func (s *SVG) Clip() *SVG {
method ResetClip (line 155) | func (s *SVG) ResetClip() *SVG {
method Tooltip (line 160) | func (s *SVG) Tooltip(text string) *SVG {
method TooltipHighlight (line 169) | func (s *SVG) TooltipHighlight(text string) *SVG {
method Text (line 201) | func (s *SVG) Text(x, y float64, opts TextOpts, text string) {
method Done (line 233) | func (s *SVG) Done() error {
function NewSVG (line 29) | func NewSVG(w io.Writer, width, height int) *SVG {
type svglen (line 37) | type svglen
method String (line 39) | func (v svglen) String() string {
function colorToCSS (line 43) | func colorToCSS(c color.Color) string {
type Anchor (line 178) | type Anchor
constant AnchorStart (line 181) | AnchorStart Anchor = iota
constant AnchorMiddle (line 182) | AnchorMiddle
constant AnchorEnd (line 183) | AnchorEnd
type Baseline (line 186) | type Baseline
constant BaselineAuto (line 189) | BaselineAuto Baseline = iota
constant BaselineBaseline (line 190) | BaselineBaseline
constant BaselineMiddle (line 191) | BaselineMiddle
type TextOpts (line 194) | type TextOpts struct
FILE: cmd/memlat/database.go
type database (line 15) | type database struct
method filter (line 208) | func (db *database) filter(f *filter, cb func(*proc, *record)) {
type proc (line 35) | type proc struct
type record (line 42) | type record struct
type ipInfo (line 49) | type ipInfo struct
type dataSrcID (line 56) | type dataSrcID
type Metadata (line 58) | type Metadata struct
function parsePerf (line 66) | func parsePerf(fileName string) *database {
type filter (line 198) | type filter struct
FILE: cmd/memlat/main.go
function main (line 103) | func main() {
type heatMapHandler (line 137) | type heatMapHandler struct
method ServeHTTP (line 141) | func (h *heatMapHandler) ServeHTTP(w http.ResponseWriter, req *http.Re...
constant latencyHistogramBins (line 416) | latencyHistogramBins = 60
type latencyHistogram (line 422) | type latencyHistogram struct
method update (line 458) | func (h *latencyHistogram) update(r *record) {
method max (line 470) | func (h *latencyHistogram) max() int {
function newLatencyHistogram (line 450) | func newLatencyHistogram(scale scale.Quantitative) *latencyHistogram {
type weightSorter (line 480) | type weightSorter
method Len (line 482) | func (w weightSorter) Len() int {
method Less (line 486) | func (w weightSorter) Less(i, j int) bool {
method Swap (line 493) | func (w weightSorter) Swap(i, j int) {
type sourceRange (line 497) | type sourceRange struct
function expandSourceRanges (line 503) | func expandSourceRanges(r []sourceRange, by int) []sourceRange {
function getLines (line 535) | func getLines(r sourceRange) ([]string, sourceRange, error) {
type metadataHandler (line 564) | type metadataHandler struct
method ServeHTTP (line 569) | func (h *metadataHandler) ServeHTTP(w http.ResponseWriter, req *http.R...
FILE: cmd/memlat/static/bower_components/promise-polyfill/Promise-Statics.js
function res (line 7) | function res(i, val) {
FILE: cmd/memlat/static/bower_components/promise-polyfill/Promise.js
function MakePromise (line 1) | function MakePromise (asap) {
FILE: cmd/memlat/static/bower_components/webcomponentsjs/CustomElements.js
function scheduleCallback (line 73) | function scheduleCallback(observer) {
function wrapIfNeeded (line 80) | function wrapIfNeeded(node) {
function dispatchCallbacks (line 83) | function dispatchCallbacks() {
function removeTransientObserversFor (line 101) | function removeTransientObserversFor(observer) {
function forEachAncestorAndObserverEnqueueRecord (line 110) | function forEachAncestorAndObserverEnqueueRecord(target, callback) {
function JsMutationObserver (line 125) | function JsMutationObserver(callback) {
function MutationRecord (line 175) | function MutationRecord(type, target) {
function copyMutationRecord (line 186) | function copyMutationRecord(original) {
function getRecord (line 198) | function getRecord(type, target) {
function getRecordWithOldValue (line 201) | function getRecordWithOldValue(oldValue) {
function clearRecords (line 207) | function clearRecords() {
function recordRepresentsCurrentMutation (line 210) | function recordRepresentsCurrentMutation(record) {
function selectRecord (line 213) | function selectRecord(lastRecord, newRecord) {
function Registration (line 218) | function Registration(observer, target, options) {
function forSubtree (line 369) | function forSubtree(node, cb) {
function findAllElements (line 378) | function findAllElements(node, find, data) {
function forRoots (line 394) | function forRoots(node, cb) {
function forDocumentTree (line 401) | function forDocumentTree(doc, cb) {
function _forDocumentTree (line 404) | function _forDocumentTree(doc, cb, processingDocuments) {
function addedNode (line 426) | function addedNode(node, isAttached) {
function added (line 429) | function added(node, isAttached) {
function addedSubtree (line 437) | function addedSubtree(node, isAttached) {
function deferMutation (line 448) | function deferMutation(fn) {
function takeMutations (line 455) | function takeMutations() {
function attached (line 463) | function attached(element) {
function _attached (line 472) | function _attached(element) {
function detachedNode (line 480) | function detachedNode(node) {
function detached (line 486) | function detached(element) {
function _detached (line 495) | function _detached(element) {
function inDocument (line 503) | function inDocument(element) {
function watchShadow (line 513) | function watchShadow(node) {
function handler (line 523) | function handler(root, mutations) {
function takeRecords (line 557) | function takeRecords(node) {
function observe (line 572) | function observe(inRoot) {
function upgradeDocument (line 583) | function upgradeDocument(doc) {
function upgradeDocumentTree (line 591) | function upgradeDocumentTree(doc) {
function upgrade (line 613) | function upgrade(node, isAttached) {
function upgradeWithDefinition (line 624) | function upgradeWithDefinition(element, definition, isAttached) {
function implementPrototype (line 639) | function implementPrototype(element, definition) {
function customMixin (line 647) | function customMixin(inTarget, inSrc, inNative) {
function created (line 661) | function created(element) {
function register (line 678) | function register(name, options) {
function overrideAttributeApi (line 710) | function overrideAttributeApi(prototype) {
function changeAttribute (line 724) | function changeAttribute(name, value, operation) {
function isReservedTag (line 733) | function isReservedTag(name) {
function ancestry (line 741) | function ancestry(extnds) {
function resolveTagName (line 748) | function resolveTagName(definition) {
function resolvePrototypeChain (line 758) | function resolvePrototypeChain(definition) {
function instantiate (line 783) | function instantiate(definition) {
function getRegisteredDefinition (line 787) | function getRegisteredDefinition(name) {
function registerDefinition (line 792) | function registerDefinition(name, definition) {
function generateConstructor (line 795) | function generateConstructor(definition) {
function createElementNS (line 801) | function createElementNS(namespace, tag, typeExtension) {
function createElement (line 808) | function createElement(tag, typeExtension) {
function wrapDomMethodToForceUpgrade (line 858) | function wrapDomMethodToForceUpgrade(obj, methodName) {
function bootstrap (line 930) | function bootstrap() {
FILE: cmd/memlat/static/bower_components/webcomponentsjs/HTMLImports.js
function scheduleCallback (line 73) | function scheduleCallback(observer) {
function wrapIfNeeded (line 80) | function wrapIfNeeded(node) {
function dispatchCallbacks (line 83) | function dispatchCallbacks() {
function removeTransientObserversFor (line 101) | function removeTransientObserversFor(observer) {
function forEachAncestorAndObserverEnqueueRecord (line 110) | function forEachAncestorAndObserverEnqueueRecord(target, callback) {
function JsMutationObserver (line 125) | function JsMutationObserver(callback) {
function MutationRecord (line 175) | function MutationRecord(type, target) {
function copyMutationRecord (line 186) | function copyMutationRecord(original) {
function getRecord (line 198) | function getRecord(type, target) {
function getRecordWithOldValue (line 201) | function getRecordWithOldValue(oldValue) {
function clearRecords (line 207) | function clearRecords() {
function recordRepresentsCurrentMutation (line 210) | function recordRepresentsCurrentMutation(record) {
function selectRecord (line 213) | function selectRecord(lastRecord, newRecord) {
function Registration (line 218) | function Registration(observer, target, options) {
function whenReady (line 368) | function whenReady(callback, doc) {
function isDocumentReady (line 376) | function isDocumentReady(doc) {
function whenDocumentReady (line 379) | function whenDocumentReady(callback, doc) {
function markTargetLoaded (line 392) | function markTargetLoaded(event) {
function watchImportsLoad (line 395) | function watchImportsLoad(callback, doc) {
function isImportLoaded (line 432) | function isImportLoaded(link) {
function handleImports (line 445) | function handleImports(nodes) {
function isImport (line 452) | function isImport(element) {
function handleImport (line 455) | function handleImport(element) {
function nodeIsImport (line 900) | function nodeIsImport(elt) {
function generateScriptDataUrl (line 903) | function generateScriptDataUrl(script) {
function generateScriptContent (line 907) | function generateScriptContent(script) {
function generateSourceMapHint (line 910) | function generateSourceMapHint(script) {
function cloneStyle (line 918) | function cloneStyle(style) {
function isImportLink (line 983) | function isImportLink(elt) {
function isLinkRel (line 986) | function isLinkRel(elt, rel) {
function hasBaseURIAccessor (line 989) | function hasBaseURIAccessor(doc) {
function makeDocument (line 992) | function makeDocument(resource, url) {
function bootstrap (line 1082) | function bootstrap() {
FILE: cmd/memlat/static/bower_components/webcomponentsjs/MutationObserver.js
function scheduleCallback (line 73) | function scheduleCallback(observer) {
function wrapIfNeeded (line 80) | function wrapIfNeeded(node) {
function dispatchCallbacks (line 83) | function dispatchCallbacks() {
function removeTransientObserversFor (line 101) | function removeTransientObserversFor(observer) {
function forEachAncestorAndObserverEnqueueRecord (line 110) | function forEachAncestorAndObserverEnqueueRecord(target, callback) {
function JsMutationObserver (line 125) | function JsMutationObserver(callback) {
function MutationRecord (line 175) | function MutationRecord(type, target) {
function copyMutationRecord (line 186) | function copyMutationRecord(original) {
function getRecord (line 198) | function getRecord(type, target) {
function getRecordWithOldValue (line 201) | function getRecordWithOldValue(oldValue) {
function clearRecords (line 207) | function clearRecords() {
function recordRepresentsCurrentMutation (line 210) | function recordRepresentsCurrentMutation(record) {
function selectRecord (line 213) | function selectRecord(lastRecord, newRecord) {
function Registration (line 218) | function Registration(observer, target, options) {
FILE: cmd/memlat/static/bower_components/webcomponentsjs/ShadowDOM.js
function detectEval (line 54) | function detectEval() {
function assert (line 69) | function assert(b) {
function mixin (line 75) | function mixin(to, from) {
function mixinStatics (line 83) | function mixinStatics(to, from) {
function oneOf (line 100) | function oneOf(object, propertyNames) {
function defineNonEnumerableDataProperty (line 111) | function defineNonEnumerableDataProperty(object, name, value) {
function getWrapperConstructor (line 116) | function getWrapperConstructor(node, opt_instance) {
function addForwardingProperties (line 132) | function addForwardingProperties(nativePrototype, wrapperPrototype) {
function registerInstanceProperties (line 135) | function registerInstanceProperties(wrapperPrototype, instanceObject) {
function isEventHandlerName (line 145) | function isEventHandlerName(name) {
function isIdentifierName (line 148) | function isIdentifierName(name) {
function getGetter (line 151) | function getGetter(name) {
function getSetter (line 156) | function getSetter(name) {
function getMethod (line 161) | function getMethod(name) {
function getDescriptor (line 166) | function getDescriptor(source, name) {
function installProperty (line 177) | function installProperty(source, target, allowMethod, opt_blacklist) {
function register (line 209) | function register(nativeConstructor, wrapperConstructor, opt_instance) {
function registerInternal (line 217) | function registerInternal(nativePrototype, wrapperConstructor, opt_insta...
function isWrapperFor (line 227) | function isWrapperFor(wrapperConstructor, nativeConstructor) {
function registerObject (line 230) | function registerObject(object) {
function createWrapperConstructor (line 237) | function createWrapperConstructor(superWrapperConstructor) {
function isWrapper (line 246) | function isWrapper(object) {
function isNative (line 249) | function isNative(object) {
function wrap (line 252) | function wrap(impl) {
function unwrap (line 261) | function unwrap(wrapper) {
function unsafeUnwrap (line 266) | function unsafeUnwrap(wrapper) {
function setWrapper (line 269) | function setWrapper(impl, wrapper) {
function unwrapIfNeeded (line 273) | function unwrapIfNeeded(object) {
function wrapIfNeeded (line 276) | function wrapIfNeeded(object) {
function rewrap (line 279) | function rewrap(node, wrapper) {
function defineGetter (line 290) | function defineGetter(constructor, name, getter) {
function defineWrapGetter (line 294) | function defineWrapGetter(constructor, name) {
function forwardMethodsToWrapper (line 299) | function forwardMethodsToWrapper(constructors, names) {
function newSplice (line 334) | function newSplice(index, removed, addedCount) {
function ArraySplice (line 345) | function ArraySplice() {}
function handle (line 495) | function handle() {
function setEndOfMicrotask (line 517) | function setEndOfMicrotask(func) {
function scheduleCallback (line 534) | function scheduleCallback(observer) {
function notifyObservers (line 542) | function notifyObservers() {
function MutationRecord (line 561) | function MutationRecord(type, target) {
function registerTransientObservers (line 572) | function registerTransientObservers(ancestor, node) {
function removeTransientObserversFor (line 582) | function removeTransientObserversFor(observer) {
function enqueueMutation (line 593) | function enqueueMutation(target, type, data) {
function MutationObserverOptions (line 633) | function MutationObserverOptions(options) {
function MutationObserver (line 658) | function MutationObserver(callback) {
function Registration (line 705) | function Registration(observer, target, options) {
function TreeScope (line 743) | function TreeScope(root, parent) {
method renderer (line 748) | get renderer() {
function setTreeScope (line 761) | function setTreeScope(node, treeScope) {
function getTreeScope (line 772) | function getTreeScope(node) {
function isShadowRoot (line 810) | function isShadowRoot(node) {
function rootOfNode (line 813) | function rootOfNode(node) {
function getEventPath (line 816) | function getEventPath(node, event) {
function eventMustBeStopped (line 848) | function eventMustBeStopped(event) {
function isShadowInsertionPoint (line 864) | function isShadowInsertionPoint(node) {
function getDestinationInsertionPoints (line 867) | function getDestinationInsertionPoints(node) {
function eventRetargetting (line 870) | function eventRetargetting(path, currentTarget) {
function getTreeScopeAncestors (line 883) | function getTreeScopeAncestors(treeScope) {
function lowestCommonInclusiveAncestor (line 890) | function lowestCommonInclusiveAncestor(tsA, tsB) {
function getTreeScopeRoot (line 901) | function getTreeScopeRoot(ts) {
function relatedTargetResolution (line 905) | function relatedTargetResolution(event, currentTarget, relatedTarget) {
function inSameTree (line 922) | function inSameTree(a, b) {
function dispatchOriginalEvent (line 930) | function dispatchOriginalEvent(originalEvent) {
function isLoadLikeEvent (line 940) | function isLoadLikeEvent(event) {
function dispatchEvent (line 949) | function dispatchEvent(event, originalWrapperTarget) {
function dispatchCapturing (line 986) | function dispatchCapturing(event, eventPath, win, overrideTarget) {
function dispatchAtTarget (line 996) | function dispatchAtTarget(event, eventPath, win, overrideTarget) {
function dispatchBubbling (line 1001) | function dispatchBubbling(event, eventPath, win, overrideTarget) {
function invoke (line 1010) | function invoke(currentTarget, event, phase, eventPath, overrideTarget) {
function Listener (line 1066) | function Listener(type, handler, capture) {
method removed (line 1075) | get removed() {
function Event (line 1087) | function Event(type, options) {
method target (line 1099) | get target() {
method currentTarget (line 1102) | get currentTarget() {
method eventPhase (line 1105) | get eventPhase() {
method path (line 1108) | get path() {
function unwrapOptions (line 1122) | function unwrapOptions(options) {
function registerGenericEvent (line 1130) | function registerGenericEvent(name, SuperEvent, prototype) {
method relatedTarget (line 1149) | get relatedTarget() {
function getInitFunction (line 1155) | function getInitFunction(name, relatedTargetIndex) {
function constructEvent (line 1179) | function constructEvent(OriginalEvent, name, type, options) {
function BeforeUnloadEvent (line 1228) | function BeforeUnloadEvent(impl) {
method returnValue (line 1233) | get returnValue() {
method returnValue (line 1236) | set returnValue(v) {
function isValidListener (line 1241) | function isValidListener(fun) {
function isMutationEvent (line 1245) | function isMutationEvent(type) {
function EventTarget (line 1261) | function EventTarget(impl) {
function getTargetToListenAt (line 1273) | function getTargetToListenAt(wrapper) {
function hasListener (line 1331) | function hasListener(node, type) {
function hasListenerInAncestors (line 1340) | function hasListenerInAncestors(target, type) {
function wrapEventTargetMethods (line 1347) | function wrapEventTargetMethods(constructors) {
function elementFromPoint (line 1351) | function elementFromPoint(self, document, x, y) {
function getEventHandlerGetter (line 1360) | function getEventHandlerGetter(name) {
function getEventHandlerSetter (line 1366) | function getEventHandlerSetter(name) {
function nonEnum (line 1421) | function nonEnum(obj, prop) {
function Touch (line 1424) | function Touch(impl) {
method target (line 1428) | get target() {
function TouchList (line 1443) | function TouchList() {
function wrapTouchList (line 1452) | function wrapTouchList(nativeTouchList) {
function TouchEvent (line 1460) | function TouchEvent(impl) {
method touches (line 1465) | get touches() {
method targetTouches (line 1468) | get targetTouches() {
method changedTouches (line 1471) | get changedTouches() {
function nonEnum (line 1491) | function nonEnum(obj, prop) {
function NodeList (line 1494) | function NodeList() {
function wrapNodeList (line 1504) | function wrapNodeList(list) {
function addWrapNodeListMethod (line 1513) | function addWrapNodeListMethod(wrapperConstructor, name) {
function assertIsNodeWrapper (line 1549) | function assertIsNodeWrapper(node) {
function createOneElementNodeList (line 1552) | function createOneElementNodeList(node) {
function enqueueRemovalForInsertedNodes (line 1559) | function enqueueRemovalForInsertedNodes(node, parent, nodes) {
function enqueueRemovalForInsertedDocumentFragment (line 1566) | function enqueueRemovalForInsertedDocumentFragment(df, nodes) {
function collectNodes (line 1571) | function collectNodes(node, parentNode, previousNode, nextNode) {
function collectNodesNative (line 1600) | function collectNodesNative(node) {
function collectNodesForDocumentFragment (line 1607) | function collectNodesForDocumentFragment(node) {
function snapshotNodeList (line 1617) | function snapshotNodeList(nodeList) {
function nodeWasAdded (line 1620) | function nodeWasAdded(node, treeScope) {
function nodesWereAdded (line 1624) | function nodesWereAdded(nodes, parent) {
function nodeWasRemoved (line 1630) | function nodeWasRemoved(node) {
function nodesWereRemoved (line 1633) | function nodesWereRemoved(nodes) {
function ensureSameOwnerDocument (line 1638) | function ensureSameOwnerDocument(parent, child) {
function adoptNodesIfNeeded (line 1642) | function adoptNodesIfNeeded(owner, nodes) {
function unwrapNodesForInsertion (line 1650) | function unwrapNodesForInsertion(owner, nodes) {
function clearChildNodes (line 1660) | function clearChildNodes(wrapper) {
function removeAllChildNodes (line 1671) | function removeAllChildNodes(wrapper) {
function invalidateParent (line 1695) | function invalidateParent(node) {
function cleanupNodes (line 1699) | function cleanupNodes(nodes) {
function cloneNode (line 1707) | function cloneNode(node, deep, opt_doc) {
function contains (line 1723) | function contains(self, child) {
function Node (line 1731) | function Node(original) {
method parentNode (line 1903) | get parentNode() {
method firstChild (line 1906) | get firstChild() {
method lastChild (line 1909) | get lastChild() {
method nextSibling (line 1912) | get nextSibling() {
method previousSibling (line 1915) | get previousSibling() {
method parentElement (line 1918) | get parentElement() {
method textContent (line 1925) | get textContent() {
method textContent (line 1934) | set textContent(textContent) {
method childNodes (line 1955) | get childNodes() {
function filterNodeList (line 2038) | function filterNodeList(list, index, result, deep) {
function shimSelector (line 2052) | function shimSelector(selector) {
function shimMatchesSelector (line 2055) | function shimMatchesSelector(selector) {
function findOne (line 2058) | function findOne(node, selector) {
function matchesSelector (line 2068) | function matchesSelector(el, selector) {
function matchesTagName (line 2072) | function matchesTagName(el, localName, localNameLowerCase) {
function matchesEveryThing (line 2076) | function matchesEveryThing() {
function matchesLocalNameOnly (line 2079) | function matchesLocalNameOnly(el, ns, localName) {
function matchesNameSpace (line 2082) | function matchesNameSpace(el, ns) {
function matchesLocalNameNS (line 2085) | function matchesLocalNameNS(el, ns, localName) {
function findElements (line 2088) | function findElements(node, index, result, p, arg0, arg1) {
function querySelectorAllFiltered (line 2097) | function querySelectorAllFiltered(p, index, result, selector, deep) {
function getElementsByTagNameFiltered (line 2153) | function getElementsByTagNameFiltered(p, index, result, localName, lower...
function getElementsByTagNameNSFiltered (line 2168) | function getElementsByTagNameNSFiltered(p, index, result, ns, localName) {
function forwardElement (line 2213) | function forwardElement(node) {
function backwardsElement (line 2219) | function backwardsElement(node) {
method firstElementChild (line 2226) | get firstElementChild() {
method lastElementChild (line 2229) | get lastElementChild() {
method childElementCount (line 2232) | get childElementCount() {
method children (line 2239) | get children() {
method nextElementSibling (line 2254) | get nextElementSibling() {
method previousElementSibling (line 2257) | get previousElementSibling() {
function CharacterData (line 2281) | function CharacterData(node) {
method nodeValue (line 2286) | get nodeValue() {
method nodeValue (line 2289) | set nodeValue(data) {
method textContent (line 2292) | get textContent() {
method textContent (line 2295) | set textContent(value) {
method data (line 2298) | get data() {
method data (line 2301) | set data(value) {
function toUInt32 (line 2320) | function toUInt32(x) {
function Text (line 2324) | function Text(node) {
function getClass (line 2353) | function getClass(el) {
function enqueueClassAttributeChange (line 2356) | function enqueueClassAttributeChange(el, oldValue) {
function invalidateClass (line 2363) | function invalidateClass(el) {
function changeClass (line 2366) | function changeClass(tokenList, method, args) {
function invalidateRendererBasedOnAttribute (line 2414) | function invalidateRendererBasedOnAttribute(element, name) {
function enqueAttributeChange (line 2420) | function enqueAttributeChange(element, name, oldValue) {
function Element (line 2428) | function Element(node) {
method shadowRoot (line 2440) | get shadowRoot() {
method classList (line 2455) | get classList() {
method className (line 2465) | get className() {
method className (line 2468) | set className(v) {
method id (line 2471) | get id() {
method id (line 2474) | set id(v) {
function escapeReplace (line 2516) | function escapeReplace(c) {
function escapeAttr (line 2534) | function escapeAttr(s) {
function escapeData (line 2537) | function escapeData(s) {
function makeSet (line 2540) | function makeSet(arr) {
function needsSelfClosingSlash (line 2550) | function needsSelfClosingSlash(node) {
function getOuterHTML (line 2555) | function getOuterHTML(node, parentNode) {
function getInnerHTML (line 2583) | function getInnerHTML(node) {
function setInnerHTML (line 2591) | function setInnerHTML(node, value, opt_tagName) {
function HTMLElement (line 2604) | function HTMLElement(node) {
method innerHTML (line 2609) | get innerHTML() {
method innerHTML (line 2612) | set innerHTML(value) {
method outerHTML (line 2633) | get outerHTML() {
method outerHTML (line 2636) | set outerHTML(value) {
method hidden (line 2673) | get hidden() {
method hidden (line 2676) | set hidden(v) {
function frag (line 2684) | function frag(contextElement, html) {
function getter (line 2694) | function getter(name) {
function getterRequiresRendering (line 2700) | function getterRequiresRendering(name) {
function getterAndSetterRequiresRendering (line 2704) | function getterAndSetterRequiresRendering(name) {
function methodRequiresRendering (line 2716) | function methodRequiresRendering(name) {
function HTMLCanvasElement (line 2741) | function HTMLCanvasElement(node) {
function HTMLContentElement (line 2761) | function HTMLContentElement(node) {
method select (line 2767) | get select() {
method select (line 2770) | set select(value) {
function HTMLFormElement (line 2790) | function HTMLFormElement(node) {
method elements (line 2795) | get elements() {
function HTMLImageElement (line 2810) | function HTMLImageElement(node) {
function Image (line 2815) | function Image(width, height) {
function HTMLShadowElement (line 2837) | function HTMLShadowElement(node) {
function getTemplateContentsOwner (line 2856) | function getTemplateContentsOwner(doc) {
function extractContent (line 2868) | function extractContent(templateElement) {
function HTMLTemplateElement (line 2878) | function HTMLTemplateElement(node) {
method content (line 2888) | get content() {
function HTMLMediaElement (line 2903) | function HTMLMediaElement(node) {
function HTMLAudioElement (line 2919) | function HTMLAudioElement(node) {
function Audio (line 2924) | function Audio(src) {
function trimText (line 2948) | function trimText(s) {
function HTMLOptionElement (line 2951) | function HTMLOptionElement(node) {
method text (line 2956) | get text() {
method text (line 2959) | set text(value) {
method form (line 2962) | get form() {
function Option (line 2967) | function Option(text, value, defaultSelected, selected) {
function HTMLSelectElement (line 2992) | function HTMLSelectElement(node) {
method form (line 3009) | get form() {
function HTMLTableElement (line 3026) | function HTMLTableElement(node) {
method caption (line 3031) | get caption() {
method tHead (line 3037) | get tHead() {
method tFoot (line 3046) | get tFoot() {
method tBodies (line 3049) | get tBodies() {
method rows (line 3055) | get rows() {
function HTMLTableSectionElement (line 3075) | function HTMLTableSectionElement(node) {
method rows (line 3081) | get rows() {
function HTMLTableRowElement (line 3101) | function HTMLTableRowElement(node) {
method cells (line 3106) | get cells() {
function HTMLUnknownElement (line 3126) | function HTMLUnknownElement(node) {
function SVGUseElement (line 3176) | function SVGUseElement(impl) {
method instanceRoot (line 3182) | get instanceRoot() {
method animatedInstanceRoot (line 3185) | get animatedInstanceRoot() {
function SVGElementInstance (line 3203) | function SVGElementInstance(impl) {
method correspondingElement (line 3208) | get correspondingElement() {
method correspondingUseElement (line 3211) | get correspondingUseElement() {
method parentNode (line 3214) | get parentNode() {
method childNodes (line 3217) | get childNodes() {
method firstChild (line 3220) | get firstChild() {
method lastChild (line 3223) | get lastChild() {
method previousSibling (line 3226) | get previousSibling() {
method nextSibling (line 3229) | get nextSibling() {
function CanvasRenderingContext2D (line 3247) | function CanvasRenderingContext2D(impl) {
method canvas (line 3251) | get canvas() {
function WebGLRenderingContext (line 3277) | function WebGLRenderingContext(impl) {
method canvas (line 3281) | get canvas() {
function ShadowRoot (line 3333) | function ShadowRoot(hostWrapper) {
method innerHTML (line 3345) | get innerHTML() {
method innerHTML (line 3348) | set innerHTML(value) {
method olderShadowRoot (line 3352) | get olderShadowRoot() {
method host (line 3355) | get host() {
function getHost (line 3379) | function getHost(node) {
function hostNodeToShadowNode (line 3386) | function hostNodeToShadowNode(refNode, offset) {
function shadowNodeToHostNode (line 3402) | function shadowNodeToHostNode(node) {
function Range (line 3406) | function Range(impl) {
method startContainer (line 3410) | get startContainer() {
method endContainer (line 3413) | get endContainer() {
method commonAncestorContainer (line 3416) | get commonAncestorContainer() {
function updateWrapperUpAndSideways (line 3500) | function updateWrapperUpAndSideways(wrapper) {
function updateWrapperDown (line 3505) | function updateWrapperDown(wrapper) {
function updateAllChildNodes (line 3509) | function updateAllChildNodes(parentNodeWrapper) {
function insertBefore (line 3516) | function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrappe...
function remove (line 3533) | function remove(nodeWrapper) {
function resetDistributedNodes (line 3548) | function resetDistributedNodes(insertionPoint) {
function getDistributedNodes (line 3551) | function getDistributedNodes(insertionPoint) {
function getChildNodesSnapshot (line 3556) | function getChildNodesSnapshot(node) {
function renderAllPending (line 3566) | function renderAllPending() {
function handleRequestAnimationFrame (line 3575) | function handleRequestAnimationFrame() {
function getRendererForHost (line 3579) | function getRendererForHost(host) {
function getShadowRootAncestor (line 3587) | function getShadowRootAncestor(node) {
function getRendererForShadowRoot (line 3592) | function getRendererForShadowRoot(shadowRoot) {
function RenderNode (line 3599) | function RenderNode(node) {
function ShadowRenderer (line 3646) | function ShadowRenderer(host) {
method parentRenderer (line 3664) | get parentRenderer() {
function poolPopulation (line 3793) | function poolPopulation(node) {
function getShadowInsertionPoint (line 3804) | function getShadowInsertionPoint(node) {
function destributeNodeInto (line 3813) | function destributeNodeInto(child, insertionPoint) {
function getDestinationInsertionPoints (line 3818) | function getDestinationInsertionPoints(node) {
function resetDestinationInsertionPoints (line 3821) | function resetDestinationInsertionPoints(node) {
function matches (line 3825) | function matches(node, contentElement) {
function isFinalDestination (line 3838) | function isFinalDestination(insertionPoint, node) {
function isInsertionPoint (line 3842) | function isInsertionPoint(node) {
function isShadowHost (line 3845) | function isShadowHost(shadowHost) {
function getShadowTrees (line 3848) | function getShadowTrees(host) {
function render (line 3855) | function render(host) {
function createWrapperConstructor (line 3901) | function createWrapperConstructor(name) {
function Selection (line 3928) | function Selection(impl) {
method anchorNode (line 3932) | get anchorNode() {
method focusNode (line 3935) | get focusNode() {
function TreeWalker (line 3977) | function TreeWalker(impl) {
method root (line 3981) | get root() {
method currentNode (line 3984) | get currentNode() {
method currentNode (line 3987) | set currentNode(node) {
method filter (line 3990) | get filter() {
function Document (line 4042) | function Document(node) {
function wrapMethod (line 4050) | function wrapMethod(name) {
function adoptNodeNoRemove (line 4058) | function adoptNodeNoRemove(node, doc) {
function adoptSubtree (line 4062) | function adoptSubtree(node, doc) {
function adoptOlderShadowRoots (line 4069) | function adoptOlderShadowRoots(shadowRoot, doc) {
function CustomElementConstructor (line 4155) | function CustomElementConstructor(node) {
method implementation (line 4182) | get implementation() {
method defaultView (line 4189) | get defaultView() {
function DOMImplementation (line 4196) | function DOMImplementation(impl) {
function wrapImplMethod (line 4204) | function wrapImplMethod(constructor, name) {
function forwardImplMethod (line 4210) | function forwardImplMethod(constructor, name) {
function Window (line 4240) | function Window(impl) {
method document (line 4274) | get document() {
function FormData (line 4307) | function FormData(formElement) {
function overrideConstructor (line 4402) | function overrideConstructor(tagName) {
FILE: cmd/memlat/static/bower_components/webcomponentsjs/webcomponents-lite.js
function isRelativeScheme (line 81) | function isRelativeScheme(scheme) {
function invalid (line 84) | function invalid() {
function IDNAToASCII (line 88) | function IDNAToASCII(h) {
function percentEscape (line 94) | function percentEscape(c) {
function percentEscapeQuery (line 101) | function percentEscapeQuery(c) {
function parse (line 109) | function parse(input, stateOverride, base) {
function clear (line 458) | function clear() {
function jURL (line 471) | function jURL(url, base) {
method href (line 482) | get href() {
method href (line 490) | set href(href) {
method protocol (line 494) | get protocol() {
method protocol (line 497) | set protocol(protocol) {
method host (line 501) | get host() {
method host (line 504) | set host(host) {
method hostname (line 508) | get hostname() {
method hostname (line 511) | set hostname(hostname) {
method port (line 515) | get port() {
method port (line 518) | set port(port) {
method pathname (line 522) | get pathname() {
method pathname (line 525) | set pathname(pathname) {
method search (line 530) | get search() {
method search (line 533) | set search(search) {
method hash (line 539) | get hash() {
method hash (line 542) | set hash(hash) {
method origin (line 548) | get origin() {
function scheduleCallback (line 641) | function scheduleCallback(observer) {
function wrapIfNeeded (line 648) | function wrapIfNeeded(node) {
function dispatchCallbacks (line 651) | function dispatchCallbacks() {
function removeTransientObserversFor (line 669) | function removeTransientObserversFor(observer) {
function forEachAncestorAndObserverEnqueueRecord (line 678) | function forEachAncestorAndObserverEnqueueRecord(target, callback) {
function JsMutationObserver (line 693) | function JsMutationObserver(callback) {
function MutationRecord (line 743) | function MutationRecord(type, target) {
function copyMutationRecord (line 754) | function copyMutationRecord(original) {
function getRecord (line 766) | function getRecord(type, target) {
function getRecordWithOldValue (line 769) | function getRecordWithOldValue(oldValue) {
function clearRecords (line 775) | function clearRecords() {
function recordRepresentsCurrentMutation (line 778) | function recordRepresentsCurrentMutation(record) {
function selectRecord (line 781) | function selectRecord(lastRecord, newRecord) {
function Registration (line 786) | function Registration(observer, target, options) {
function whenReady (line 936) | function whenReady(callback, doc) {
function isDocumentReady (line 944) | function isDocumentReady(doc) {
function whenDocumentReady (line 947) | function whenDocumentReady(callback, doc) {
function markTargetLoaded (line 960) | function markTargetLoaded(event) {
function watchImportsLoad (line 963) | function watchImportsLoad(callback, doc) {
function isImportLoaded (line 1000) | function isImportLoaded(link) {
function handleImports (line 1013) | function handleImports(nodes) {
function isImport (line 1020) | function isImport(element) {
function handleImport (line 1023) | function handleImport(element) {
function nodeIsImport (line 1468) | function nodeIsImport(elt) {
function generateScriptDataUrl (line 1471) | function generateScriptDataUrl(script) {
function generateScriptContent (line 1475) | function generateScriptContent(script) {
function generateSourceMapHint (line 1478) | function generateSourceMapHint(script) {
function cloneStyle (line 1486) | function cloneStyle(style) {
function isImportLink (line 1551) | function isImportLink(elt) {
function isLinkRel (line 1554) | function isLinkRel(elt, rel) {
function hasBaseURIAccessor (line 1557) | function hasBaseURIAccessor(doc) {
function makeDocument (line 1560) | function makeDocument(resource, url) {
function bootstrap (line 1650) | function bootstrap() {
function forSubtree (line 1683) | function forSubtree(node, cb) {
function findAllElements (line 1692) | function findAllElements(node, find, data) {
function forRoots (line 1708) | function forRoots(node, cb) {
function forDocumentTree (line 1715) | function forDocumentTree(doc, cb) {
function _forDocumentTree (line 1718) | function _forDocumentTree(doc, cb, processingDocuments) {
function addedNode (line 1740) | function addedNode(node, isAttached) {
function added (line 1743) | function added(node, isAttached) {
function addedSubtree (line 1751) | function addedSubtree(node, isAttached) {
function deferMutation (line 1762) | function deferMutation(fn) {
function takeMutations (line 1769) | function takeMutations() {
function attached (line 1777) | function attached(element) {
function _attached (line 1786) | function _attached(element) {
function detachedNode (line 1794) | function detachedNode(node) {
function detached (line 1800) | function detached(element) {
function _detached (line 1809) | function _detached(element) {
function inDocument (line 1817) | function inDocument(element) {
function watchShadow (line 1827) | function watchShadow(node) {
function handler (line 1837) | function handler(root, mutations) {
function takeRecords (line 1871) | function takeRecords(node) {
function observe (line 1886) | function observe(inRoot) {
function upgradeDocument (line 1897) | function upgradeDocument(doc) {
function upgradeDocumentTree (line 1905) | function upgradeDocumentTree(doc) {
function upgrade (line 1927) | function upgrade(node, isAttached) {
function upgradeWithDefinition (line 1938) | function upgradeWithDefinition(element, definition, isAttached) {
function implementPrototype (line 1953) | function implementPrototype(element, definition) {
function customMixin (line 1961) | function customMixin(inTarget, inSrc, inNative) {
function created (line 1975) | function created(element) {
function register (line 1992) | function register(name, options) {
function overrideAttributeApi (line 2024) | function overrideAttributeApi(prototype) {
function changeAttribute (line 2038) | function changeAttribute(name, value, operation) {
function isReservedTag (line 2047) | function isReservedTag(name) {
function ancestry (line 2055) | function ancestry(extnds) {
function resolveTagName (line 2062) | function resolveTagName(definition) {
function resolvePrototypeChain (line 2072) | function resolvePrototypeChain(definition) {
function instantiate (line 2097) | function instantiate(definition) {
function getRegisteredDefinition (line 2101) | function getRegisteredDefinition(name) {
function registerDefinition (line 2106) | function registerDefinition(name, definition) {
function generateConstructor (line 2109) | function generateConstructor(definition) {
function createElementNS (line 2115) | function createElementNS(namespace, tag, typeExtension) {
function createElement (line 2122) | function createElement(tag, typeExtension) {
function wrapDomMethodToForceUpgrade (line 2172) | function wrapDomMethodToForceUpgrade(obj, methodName) {
function bootstrap (line 2244) | function bootstrap() {
function escapeReplace (line 2347) | function escapeReplace(c) {
function escapeData (line 2362) | function escapeData(s) {
FILE: cmd/memlat/static/bower_components/webcomponentsjs/webcomponents.js
function detectEval (line 99) | function detectEval() {
function assert (line 114) | function assert(b) {
function mixin (line 120) | function mixin(to, from) {
function mixinStatics (line 128) | function mixinStatics(to, from) {
function oneOf (line 145) | function oneOf(object, propertyNames) {
function defineNonEnumerableDataProperty (line 156) | function defineNonEnumerableDataProperty(object, name, value) {
function getWrapperConstructor (line 161) | function getWrapperConstructor(node, opt_instance) {
function addForwardingProperties (line 177) | function addForwardingProperties(nativePrototype, wrapperPrototype) {
function registerInstanceProperties (line 180) | function registerInstanceProperties(wrapperPrototype, instanceObject) {
function isEventHandlerName (line 190) | function isEventHandlerName(name) {
function isIdentifierName (line 193) | function isIdentifierName(name) {
function getGetter (line 196) | function getGetter(name) {
function getSetter (line 201) | function getSetter(name) {
function getMethod (line 206) | function getMethod(name) {
function getDescriptor (line 211) | function getDescriptor(source, name) {
function installProperty (line 222) | function installProperty(source, target, allowMethod, opt_blacklist) {
function register (line 254) | function register(nativeConstructor, wrapperConstructor, opt_instance) {
function registerInternal (line 262) | function registerInternal(nativePrototype, wrapperConstructor, opt_insta...
function isWrapperFor (line 272) | function isWrapperFor(wrapperConstructor, nativeConstructor) {
function registerObject (line 275) | function registerObject(object) {
function createWrapperConstructor (line 282) | function createWrapperConstructor(superWrapperConstructor) {
function isWrapper (line 291) | function isWrapper(object) {
function isNative (line 294) | function isNative(object) {
function wrap (line 297) | function wrap(impl) {
function unwrap (line 306) | function unwrap(wrapper) {
function unsafeUnwrap (line 311) | function unsafeUnwrap(wrapper) {
function setWrapper (line 314) | function setWrapper(impl, wrapper) {
function unwrapIfNeeded (line 318) | function unwrapIfNeeded(object) {
function wrapIfNeeded (line 321) | function wrapIfNeeded(object) {
function rewrap (line 324) | function rewrap(node, wrapper) {
function defineGetter (line 335) | function defineGetter(constructor, name, getter) {
function defineWrapGetter (line 339) | function defineWrapGetter(constructor, name) {
function forwardMethodsToWrapper (line 344) | function forwardMethodsToWrapper(constructors, names) {
function newSplice (line 378) | function newSplice(index, removed, addedCount) {
function ArraySplice (line 389) | function ArraySplice() {}
function handle (line 538) | function handle() {
function setEndOfMicrotask (line 560) | function setEndOfMicrotask(func) {
function scheduleCallback (line 576) | function scheduleCallback(observer) {
function notifyObservers (line 584) | function notifyObservers() {
function MutationRecord (line 603) | function MutationRecord(type, target) {
function registerTransientObservers (line 614) | function registerTransientObservers(ancestor, node) {
function removeTransientObserversFor (line 624) | function removeTransientObserversFor(observer) {
function enqueueMutation (line 635) | function enqueueMutation(target, type, data) {
function MutationObserverOptions (line 675) | function MutationObserverOptions(options) {
function MutationObserver (line 700) | function MutationObserver(callback) {
function Registration (line 747) | function Registration(observer, target, options) {
function TreeScope (line 784) | function TreeScope(root, parent) {
method renderer (line 789) | get renderer() {
function setTreeScope (line 802) | function setTreeScope(node, treeScope) {
function getTreeScope (line 813) | function getTreeScope(node) {
function isShadowRoot (line 850) | function isShadowRoot(node) {
function rootOfNode (line 853) | function rootOfNode(node) {
function getEventPath (line 856) | function getEventPath(node, event) {
function eventMustBeStopped (line 888) | function eventMustBeStopped(event) {
function isShadowInsertionPoint (line 904) | function isShadowInsertionPoint(node) {
function getDestinationInsertionPoints (line 907) | function getDestinationInsertionPoints(node) {
function eventRetargetting (line 910) | function eventRetargetting(path, currentTarget) {
function getTreeScopeAncestors (line 923) | function getTreeScopeAncestors(treeScope) {
function lowestCommonInclusiveAncestor (line 930) | function lowestCommonInclusiveAncestor(tsA, tsB) {
function getTreeScopeRoot (line 941) | function getTreeScopeRoot(ts) {
function relatedTargetResolution (line 945) | function relatedTargetResolution(event, currentTarget, relatedTarget) {
function inSameTree (line 962) | function inSameTree(a, b) {
function dispatchOriginalEvent (line 970) | function dispatchOriginalEvent(originalEvent) {
function isLoadLikeEvent (line 980) | function isLoadLikeEvent(event) {
function dispatchEvent (line 989) | function dispatchEvent(event, originalWrapperTarget) {
function dispatchCapturing (line 1026) | function dispatchCapturing(event, eventPath, win, overrideTarget) {
function dispatchAtTarget (line 1036) | function dispatchAtTarget(event, eventPath, win, overrideTarget) {
function dispatchBubbling (line 1041) | function dispatchBubbling(event, eventPath, win, overrideTarget) {
function invoke (line 1050) | function invoke(currentTarget, event, phase, eventPath, overrideTarget) {
function Listener (line 1106) | function Listener(type, handler, capture) {
method removed (line 1115) | get removed() {
function Event (line 1127) | function Event(type, options) {
method target (line 1139) | get target() {
method currentTarget (line 1142) | get currentTarget() {
method eventPhase (line 1145) | get eventPhase() {
method path (line 1148) | get path() {
function unwrapOptions (line 1162) | function unwrapOptions(options) {
function registerGenericEvent (line 1170) | function registerGenericEvent(name, SuperEvent, prototype) {
method relatedTarget (line 1189) | get relatedTarget() {
function getInitFunction (line 1195) | function getInitFunction(name, relatedTargetIndex) {
function constructEvent (line 1219) | function constructEvent(OriginalEvent, name, type, options) {
function BeforeUnloadEvent (line 1268) | function BeforeUnloadEvent(impl) {
method returnValue (line 1273) | get returnValue() {
method returnValue (line 1276) | set returnValue(v) {
function isValidListener (line 1281) | function isValidListener(fun) {
function isMutationEvent (line 1285) | function isMutationEvent(type) {
function EventTarget (line 1301) | function EventTarget(impl) {
function getTargetToListenAt (line 1313) | function getTargetToListenAt(wrapper) {
function hasListener (line 1371) | function hasListener(node, type) {
function hasListenerInAncestors (line 1380) | function hasListenerInAncestors(target, type) {
function wrapEventTargetMethods (line 1387) | function wrapEventTargetMethods(constructors) {
function elementFromPoint (line 1391) | function elementFromPoint(self, document, x, y) {
function getEventHandlerGetter (line 1400) | function getEventHandlerGetter(name) {
function getEventHandlerSetter (line 1406) | function getEventHandlerSetter(name) {
function nonEnum (line 1460) | function nonEnum(obj, prop) {
function Touch (line 1463) | function Touch(impl) {
method target (line 1467) | get target() {
function TouchList (line 1482) | function TouchList() {
function wrapTouchList (line 1491) | function wrapTouchList(nativeTouchList) {
function TouchEvent (line 1499) | function TouchEvent(impl) {
method touches (line 1504) | get touches() {
method targetTouches (line 1507) | get targetTouches() {
method changedTouches (line 1510) | get changedTouches() {
function nonEnum (line 1529) | function nonEnum(obj, prop) {
function NodeList (line 1532) | function NodeList() {
function wrapNodeList (line 1542) | function wrapNodeList(list) {
function addWrapNodeListMethod (line 1551) | function addWrapNodeListMethod(wrapperConstructor, name) {
function assertIsNodeWrapper (line 1585) | function assertIsNodeWrapper(node) {
function createOneElementNodeList (line 1588) | function createOneElementNodeList(node) {
function enqueueRemovalForInsertedNodes (line 1595) | function enqueueRemovalForInsertedNodes(node, parent, nodes) {
function enqueueRemovalForInsertedDocumentFragment (line 1602) | function enqueueRemovalForInsertedDocumentFragment(df, nodes) {
function collectNodes (line 1607) | function collectNodes(node, parentNode, previousNode, nextNode) {
function collectNodesNative (line 1636) | function collectNodesNative(node) {
function collectNodesForDocumentFragment (line 1643) | function collectNodesForDocumentFragment(node) {
function snapshotNodeList (line 1653) | function snapshotNodeList(nodeList) {
function nodeWasAdded (line 1656) | function nodeWasAdded(node, treeScope) {
function nodesWereAdded (line 1660) | function nodesWereAdded(nodes, parent) {
function nodeWasRemoved (line 1666) | function nodeWasRemoved(node) {
function nodesWereRemoved (line 1669) | function nodesWereRemoved(nodes) {
function ensureSameOwnerDocument (line 1674) | function ensureSameOwnerDocument(parent, child) {
function adoptNodesIfNeeded (line 1678) | function adoptNodesIfNeeded(owner, nodes) {
function unwrapNodesForInsertion (line 1686) | function unwrapNodesForInsertion(owner, nodes) {
function clearChildNodes (line 1696) | function clearChildNodes(wrapper) {
function removeAllChildNodes (line 1707) | function removeAllChildNodes(wrapper) {
function invalidateParent (line 1731) | function invalidateParent(node) {
function cleanupNodes (line 1735) | function cleanupNodes(nodes) {
function cloneNode (line 1743) | function cloneNode(node, deep, opt_doc) {
function contains (line 1759) | function contains(self, child) {
function Node (line 1767) | function Node(original) {
method parentNode (line 1939) | get parentNode() {
method firstChild (line 1942) | get firstChild() {
method lastChild (line 1945) | get lastChild() {
method nextSibling (line 1948) | get nextSibling() {
method previousSibling (line 1951) | get previousSibling() {
method parentElement (line 1954) | get parentElement() {
method textContent (line 1961) | get textContent() {
method textContent (line 1970) | set textContent(textContent) {
method childNodes (line 1991) | get childNodes() {
function filterNodeList (line 2073) | function filterNodeList(list, index, result, deep) {
function shimSelector (line 2087) | function shimSelector(selector) {
function shimMatchesSelector (line 2090) | function shimMatchesSelector(selector) {
function findOne (line 2093) | function findOne(node, selector) {
function matchesSelector (line 2103) | function matchesSelector(el, selector) {
function matchesTagName (line 2107) | function matchesTagName(el, localName, localNameLowerCase) {
function matchesEveryThing (line 2111) | function matchesEveryThing() {
function matchesLocalNameOnly (line 2114) | function matchesLocalNameOnly(el, ns, localName) {
function matchesNameSpace (line 2117) | function matchesNameSpace(el, ns) {
function matchesLocalNameNS (line 2120) | function matchesLocalNameNS(el, ns, localName) {
function findElements (line 2123) | function findElements(node, index, result, p, arg0, arg1) {
function querySelectorAllFiltered (line 2132) | function querySelectorAllFiltered(p, index, result, selector, deep) {
function getElementsByTagNameFiltered (line 2188) | function getElementsByTagNameFiltered(p, index, result, localName, lower...
function getElementsByTagNameNSFiltered (line 2203) | function getElementsByTagNameNSFiltered(p, index, result, ns, localName) {
function forwardElement (line 2247) | function forwardElement(node) {
function backwardsElement (line 2253) | function backwardsElement(node) {
method firstElementChild (line 2260) | get firstElementChild() {
method lastElementChild (line 2263) | get lastElementChild() {
method childElementCount (line 2266) | get childElementCount() {
method children (line 2273) | get children() {
method nextElementSibling (line 2288) | get nextElementSibling() {
method previousElementSibling (line 2291) | get previousElementSibling() {
function CharacterData (line 2314) | function CharacterData(node) {
method nodeValue (line 2319) | get nodeValue() {
method nodeValue (line 2322) | set nodeValue(data) {
method textContent (line 2325) | get textContent() {
method textContent (line 2328) | set textContent(value) {
method data (line 2331) | get data() {
method data (line 2334) | set data(value) {
function toUInt32 (line 2352) | function toUInt32(x) {
function Text (line 2356) | function Text(node) {
function getClass (line 2384) | function getClass(el) {
function enqueueClassAttributeChange (line 2387) | function enqueueClassAttributeChange(el, oldValue) {
function invalidateClass (line 2394) | function invalidateClass(el) {
function changeClass (line 2397) | function changeClass(tokenList, method, args) {
function invalidateRendererBasedOnAttribute (line 2444) | function invalidateRendererBasedOnAttribute(element, name) {
function enqueAttributeChange (line 2450) | function enqueAttributeChange(element, name, oldValue) {
function Element (line 2458) | function Element(node) {
method shadowRoot (line 2470) | get shadowRoot() {
method classList (line 2485) | get classList() {
method className (line 2495) | get className() {
method className (line 2498) | set className(v) {
method id (line 2501) | get id() {
method id (line 2504) | set id(v) {
function escapeReplace (line 2545) | function escapeReplace(c) {
function escapeAttr (line 2563) | function escapeAttr(s) {
function escapeData (line 2566) | function escapeData(s) {
function makeSet (line 2569) | function makeSet(arr) {
function needsSelfClosingSlash (line 2579) | function needsSelfClosingSlash(node) {
function getOuterHTML (line 2584) | function getOuterHTML(node, parentNode) {
function getInnerHTML (line 2612) | function getInnerHTML(node) {
function setInnerHTML (line 2620) | function setInnerHTML(node, value, opt_tagName) {
function HTMLElement (line 2633) | function HTMLElement(node) {
method innerHTML (line 2638) | get innerHTML() {
method innerHTML (line 2641) | set innerHTML(value) {
method outerHTML (line 2662) | get outerHTML() {
method outerHTML (line 2665) | set outerHTML(value) {
method hidden (line 2702) | get hidden() {
method hidden (line 2705) | set hidden(v) {
function frag (line 2713) | function frag(contextElement, html) {
function getter (line 2723) | function getter(name) {
function getterRequiresRendering (line 2729) | function getterRequiresRendering(name) {
function getterAndSetterRequiresRendering (line 2733) | function getterAndSetterRequiresRendering(name) {
function methodRequiresRendering (line 2745) | function methodRequiresRendering(name) {
function HTMLCanvasElement (line 2769) | function HTMLCanvasElement(node) {
function HTMLContentElement (line 2788) | function HTMLContentElement(node) {
method select (line 2794) | get select() {
method select (line 2797) | set select(value) {
function HTMLFormElement (line 2816) | function HTMLFormElement(node) {
method elements (line 2821) | get elements() {
function HTMLImageElement (line 2835) | function HTMLImageElement(node) {
function Image (line 2840) | function Image(width, height) {
function HTMLShadowElement (line 2861) | function HTMLShadowElement(node) {
function getTemplateContentsOwner (line 2879) | function getTemplateContentsOwner(doc) {
function extractContent (line 2891) | function extractContent(templateElement) {
function HTMLTemplateElement (line 2901) | function HTMLTemplateElement(node) {
method content (line 2911) | get content() {
function HTMLMediaElement (line 2925) | function HTMLMediaElement(node) {
function HTMLAudioElement (line 2940) | function HTMLAudioElement(node) {
function Audio (line 2945) | function Audio(src) {
function trimText (line 2968) | function trimText(s) {
function HTMLOptionElement (line 2971) | function HTMLOptionElement(node) {
method text (line 2976) | get text() {
method text (line 2979) | set text(value) {
method form (line 2982) | get form() {
function Option (line 2987) | function Option(text, value, defaultSelected, selected) {
function HTMLSelectElement (line 3011) | function HTMLSelectElement(node) {
method form (line 3028) | get form() {
function HTMLTableElement (line 3044) | function HTMLTableElement(node) {
method caption (line 3049) | get caption() {
method tHead (line 3055) | get tHead() {
method tFoot (line 3064) | get tFoot() {
method tBodies (line 3067) | get tBodies() {
method rows (line 3073) | get rows() {
function HTMLTableSectionElement (line 3092) | function HTMLTableSectionElement(node) {
method rows (line 3098) | get rows() {
function HTMLTableRowElement (line 3117) | function HTMLTableRowElement(node) {
method cells (line 3122) | get cells() {
function HTMLUnknownElement (line 3141) | function HTMLUnknownElement(node) {
function SVGUseElement (line 3189) | function SVGUseElement(impl) {
method instanceRoot (line 3195) | get instanceRoot() {
method animatedInstanceRoot (line 3198) | get animatedInstanceRoot() {
function SVGElementInstance (line 3215) | function SVGElementInstance(impl) {
method correspondingElement (line 3220) | get correspondingElement() {
method correspondingUseElement (line 3223) | get correspondingUseElement() {
method parentNode (line 3226) | get parentNode() {
method childNodes (line 3229) | get childNodes() {
method firstChild (line 3232) | get firstChild() {
method lastChild (line 3235) | get lastChild() {
method previousSibling (line 3238) | get previousSibling() {
method nextSibling (line 3241) | get nextSibling() {
function CanvasRenderingContext2D (line 3258) | function CanvasRenderingContext2D(impl) {
method canvas (line 3262) | get canvas() {
function WebGLRenderingContext (line 3287) | function WebGLRenderingContext(impl) {
method canvas (line 3291) | get canvas() {
function ShadowRoot (line 3341) | function ShadowRoot(hostWrapper) {
method innerHTML (line 3353) | get innerHTML() {
method innerHTML (line 3356) | set innerHTML(value) {
method olderShadowRoot (line 3360) | get olderShadowRoot() {
method host (line 3363) | get host() {
function getHost (line 3386) | function getHost(node) {
function hostNodeToShadowNode (line 3393) | function hostNodeToShadowNode(refNode, offset) {
function shadowNodeToHostNode (line 3409) | function shadowNodeToHostNode(node) {
function Range (line 3413) | function Range(impl) {
method startContainer (line 3417) | get startContainer() {
method endContainer (line 3420) | get endContainer() {
method commonAncestorContainer (line 3423) | get commonAncestorContainer() {
function updateWrapperUpAndSideways (line 3506) | function updateWrapperUpAndSideways(wrapper) {
function updateWrapperDown (line 3511) | function updateWrapperDown(wrapper) {
function updateAllChildNodes (line 3515) | function updateAllChildNodes(parentNodeWrapper) {
function insertBefore (line 3522) | function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrappe...
function remove (line 3539) | function remove(nodeWrapper) {
function resetDistributedNodes (line 3554) | function resetDistributedNodes(insertionPoint) {
function getDistributedNodes (line 3557) | function getDistributedNodes(insertionPoint) {
function getChildNodesSnapshot (line 3562) | function getChildNodesSnapshot(node) {
function renderAllPending (line 3572) | function renderAllPending() {
function handleRequestAnimationFrame (line 3581) | function handleRequestAnimationFrame() {
function getRendererForHost (line 3585) | function getRendererForHost(host) {
function getShadowRootAncestor (line 3593) | function getShadowRootAncestor(node) {
function getRendererForShadowRoot (line 3598) | function getRendererForShadowRoot(shadowRoot) {
function RenderNode (line 3605) | function RenderNode(node) {
function ShadowRenderer (line 3652) | function ShadowRenderer(host) {
method parentRenderer (line 3670) | get parentRenderer() {
function poolPopulation (line 3799) | function poolPopulation(node) {
function getShadowInsertionPoint (line 3810) | function getShadowInsertionPoint(node) {
function destributeNodeInto (line 3819) | function destributeNodeInto(child, insertionPoint) {
function getDestinationInsertionPoints (line 3824) | function getDestinationInsertionPoints(node) {
function resetDestinationInsertionPoints (line 3827) | function resetDestinationInsertionPoints(node) {
function matches (line 3831) | function matches(node, contentElement) {
function isFinalDestination (line 3844) | function isFinalDestination(insertionPoint, node) {
function isInsertionPoint (line 3848) | function isInsertionPoint(node) {
function isShadowHost (line 3851) | function isShadowHost(shadowHost) {
function getShadowTrees (line 3854) | function getShadowTrees(host) {
function render (line 3861) | function render(host) {
function createWrapperConstructor (line 3906) | function createWrapperConstructor(name) {
function Selection (line 3932) | function Selection(impl) {
method anchorNode (line 3936) | get anchorNode() {
method focusNode (line 3939) | get focusNode() {
function TreeWalker (line 3980) | function TreeWalker(impl) {
method root (line 3984) | get root() {
method currentNode (line 3987) | get currentNode() {
method currentNode (line 3990) | set currentNode(node) {
method filter (line 3993) | get filter() {
function Document (line 4044) | function Document(node) {
function wrapMethod (line 4052) | function wrapMethod(name) {
function adoptNodeNoRemove (line 4060) | function adoptNodeNoRemove(node, doc) {
function adoptSubtree (line 4064) | function adoptSubtree(node, doc) {
function adoptOlderShadowRoots (line 4071) | function adoptOlderShadowRoots(shadowRoot, doc) {
function CustomElementConstructor (line 4157) | function CustomElementConstructor(node) {
method implementation (line 4184) | get implementation() {
method defaultView (line 4191) | get defaultView() {
function DOMImplementation (line 4198) | function DOMImplementation(impl) {
function wrapImplMethod (line 4206) | function wrapImplMethod(constructor, name) {
function forwardImplMethod (line 4212) | function forwardImplMethod(constructor, name) {
function Window (line 4241) | function Window(impl) {
method document (line 4275) | get document() {
function FormData (line 4306) | function FormData(formElement) {
function overrideConstructor (line 4399) | function overrideConstructor(tagName) {
function stylesToCssText (line 4699) | function stylesToCssText(styles, preserveComments) {
function cssTextToStyle (line 4709) | function cssTextToStyle(cssText) {
function cssToRules (line 4714) | function cssToRules(cssText) {
function initFrame (line 4730) | function initFrame() {
function inFrame (line 4738) | function inFrame(fn) {
function withCssRules (line 4747) | function withCssRules(cssText, callback) {
function rulesToCss (line 4764) | function rulesToCss(cssRules) {
function addCssToDocument (line 4770) | function addCssToDocument(cssText) {
function addOwnSheet (line 4775) | function addOwnSheet(cssText, name) {
function getSheet (line 4785) | function getSheet() {
function isRelativeScheme (line 4886) | function isRelativeScheme(scheme) {
function invalid (line 4889) | function invalid() {
function IDNAToASCII (line 4893) | function IDNAToASCII(h) {
function percentEscape (line 4899) | function percentEscape(c) {
function percentEscapeQuery (line 4906) | function percentEscapeQuery(c) {
function parse (line 4914) | function parse(input, stateOverride, base) {
function clear (line 5263) | function clear() {
function jURL (line 5276) | function jURL(url, base) {
method href (line 5287) | get href() {
method href (line 5295) | set href(href) {
method protocol (line 5299) | get protocol() {
method protocol (line 5302) | set protocol(protocol) {
method host (line 5306) | get host() {
method host (line 5309) | set host(host) {
method hostname (line 5313) | get hostname() {
method hostname (line 5316) | set hostname(hostname) {
method port (line 5320) | get port() {
method port (line 5323) | set port(port) {
method pathname (line 5327) | get pathname() {
method pathname (line 5330) | set pathname(pathname) {
method search (line 5335) | get search() {
method search (line 5338) | set search(search) {
method hash (line 5344) | get hash() {
method hash (line 5347) | set hash(hash) {
method origin (line 5353) | get origin() {
function scheduleCallback (line 5410) | function scheduleCallback(observer) {
function wrapIfNeeded (line 5417) | function wrapIfNeeded(node) {
function dispatchCallbacks (line 5420) | function dispatchCallbacks() {
function removeTransientObserversFor (line 5438) | function removeTransientObserversFor(observer) {
function forEachAncestorAndObserverEnqueueRecord (line 5447) | function forEachAncestorAndObserverEnqueueRecord(target, callback) {
function JsMutationObserver (line 5462) | function JsMutationObserver(callback) {
function MutationRecord (line 5512) | function MutationRecord(type, target) {
function copyMutationRecord (line 5523) | function copyMutationRecord(original) {
function getRecord (line 5535) | function getRecord(type, target) {
function getRecordWithOldValue (line 5538) | function getRecordWithOldValue(oldValue) {
function clearRecords (line 5544) | function clearRecords() {
function recordRepresentsCurrentMutation (line 5547) | function recordRepresentsCurrentMutation(record) {
function selectRecord (line 5550) | function selectRecord(lastRecord, newRecord) {
function Registration (line 5555) | function Registration(observer, target, options) {
function whenReady (line 5705) | function whenReady(callback, doc) {
function isDocumentReady (line 5713) | function isDocumentReady(doc) {
function whenDocumentReady (line 5716) | function whenDocumentReady(callback, doc) {
function markTargetLoaded (line 5729) | function markTargetLoaded(event) {
function watchImportsLoad (line 5732) | function watchImportsLoad(callback, doc) {
function isImportLoaded (line 5769) | function isImportLoaded(link) {
function handleImports (line 5782) | function handleImports(nodes) {
function isImport (line 5789) | function isImport(element) {
function handleImport (line 5792) | function handleImport(element) {
function nodeIsImport (line 6237) | function nodeIsImport(elt) {
function generateScriptDataUrl (line 6240) | function generateScriptDataUrl(script) {
function generateScriptContent (line 6244) | function generateScriptContent(script) {
function generateSourceMapHint (line 6247) | function generateSourceMapHint(script) {
function cloneStyle (line 6255) | function cloneStyle(style) {
function isImportLink (line 6320) | function isImportLink(elt) {
function isLinkRel (line 6323) | function isLinkRel(elt, rel) {
function hasBaseURIAccessor (line 6326) | function hasBaseURIAccessor(doc) {
function makeDocument (line 6329) | function makeDocument(resource, url) {
function bootstrap (line 6419) | function bootstrap() {
function forSubtree (line 6452) | function forSubtree(node, cb) {
function findAllElements (line 6461) | function findAllElements(node, find, data) {
function forRoots (line 6477) | function forRoots(node, cb) {
function forDocumentTree (line 6484) | function forDocumentTree(doc, cb) {
function _forDocumentTree (line 6487) | function _forDocumentTree(doc, cb, processingDocuments) {
function addedNode (line 6509) | function addedNode(node, isAttached) {
function added (line 6512) | function added(node, isAttached) {
function addedSubtree (line 6520) | function addedSubtree(node, isAttached) {
function deferMutation (line 6531) | function deferMutation(fn) {
function takeMutations (line 6538) | function takeMutations() {
function attached (line 6546) | function attached(element) {
function _attached (line 6555) | function _attached(element) {
function detachedNode (line 6563) | function detachedNode(node) {
function detached (line 6569) | function detached(element) {
function _detached (line 6578) | function _detached(element) {
function inDocument (line 6586) | function inDocument(element) {
function watchShadow (line 6596) | function watchShadow(node) {
function handler (line 6606) | function handler(root, mutations) {
function takeRecords (line 6640) | function takeRecords(node) {
function observe (line 6655) | function observe(inRoot) {
function upgradeDocument (line 6666) | function upgradeDocument(doc) {
function upgradeDocumentTree (line 6674) | function upgradeDocumentTree(doc) {
function upgrade (line 6696) | function upgrade(node, isAttached) {
function upgradeWithDefinition (line 6707) | function upgradeWithDefinition(element, definition, isAttached) {
function implementPrototype (line 6722) | function implementPrototype(element, definition) {
function customMixin (line 6730) | function customMixin(inTarget, inSrc, inNative) {
function created (line 6744) | function created(element) {
function register (line 6761) | function register(name, options) {
function overrideAttributeApi (line 6793) | function overrideAttributeApi(prototype) {
function changeAttribute (line 6807) | function changeAttribute(name, value, operation) {
function isReservedTag (line 6816) | function isReservedTag(name) {
function ancestry (line 6824) | function ancestry(extnds) {
function resolveTagName (line 6831) | function resolveTagName(definition) {
function resolvePrototypeChain (line 6841) | function resolvePrototypeChain(definition) {
function instantiate (line 6866) | function instantiate(definition) {
function getRegisteredDefinition (line 6870) | function getRegisteredDefinition(name) {
function registerDefinition (line 6875) | function registerDefinition(name, definition) {
function generateConstructor (line 6878) | function generateConstructor(definition) {
function createElementNS (line 6884) | function createElementNS(namespace, tag, typeExtension) {
function createElement (line 6891) | function createElement(tag, typeExtension) {
function wrapDomMethodToForceUpgrade (line 6941) | function wrapDomMethodToForceUpgrade(obj, methodName) {
function bootstrap (line 7013) | function bootstrap() {
FILE: cmd/perfdump/main.go
function main (line 18) | func main() {
function parseOrder (line 99) | func parseOrder(order string) (perffile.RecordsOrder, bool) {
function printFields (line 111) | func printFields(v reflect.Value) {
function fmtVal (line 129) | func fmtVal(name string, v reflect.Value) string {
FILE: cmd/prologuer/main.go
function main (line 32) | func main() {
function prologueRanges (line 74) | func prologueRanges(session *perfsession.Session, mmap *perfsession.Mmap...
function fillRanges (line 117) | func fillRanges(r *perfsession.Ranges, dwarff *dwarf.Data) (prologueByte...
function prologueEndPCs (line 187) | func prologueEndPCs(dwarff *dwarf.Data, cu *dwarf.Entry) []uint64 {
FILE: fmt_test.go
function TestGofmt (line 15) | func TestGofmt(t *testing.T) {
function TestGenerated (line 32) | func TestGenerated(t *testing.T) {
function copyTree (line 56) | func copyTree(t *testing.T) (string, map[string]string) {
function copyFile (line 102) | func copyFile(src, dst string) error {
function diffFiles (line 123) | func diffFiles(t *testing.T, fileMap map[string]string) bool {
FILE: internal/cparse/enums.go
type Enum (line 11) | type Enum struct
function FindEnums (line 17) | func FindEnums(tokens []Tok) ([]Enum, error) {
FILE: internal/cparse/enums_test.go
function TestFindEnums (line 11) | func TestFindEnums(t *testing.T) {
FILE: internal/cparse/lex.go
type Toks (line 13) | type Toks struct
type Tok (line 17) | type Tok struct
method Int (line 34) | func (t Tok) Int() int {
method Match (line 45) | func (t Tok) Match(kind TokKind, text string) bool {
type TokKind (line 22) | type TokKind
constant TokKeyword (line 25) | TokKeyword TokKind = 1 + iota
constant TokIdent (line 26) | TokIdent
constant TokNumber (line 27) | TokNumber
constant TokString (line 28) | TokString
constant TokChar (line 29) | TokChar
constant TokOp (line 30) | TokOp
constant TokEOF (line 31) | TokEOF
type chProps (line 72) | type chProps
constant chNonDigit (line 75) | chNonDigit chProps = 1 << iota
constant chDigit (line 76) | chDigit
constant chOct (line 77) | chOct
constant chHex (line 78) | chHex
constant chChars (line 79) | chChars
constant chPunct (line 80) | chPunct
function mkTokTab (line 83) | func mkTokTab(punct, keywords []string) (tab [256]chProps, ptab map[stri...
type pos (line 117) | type pos struct
method error (line 122) | func (p pos) error(f string, args ...interface{}) error {
type charReader (line 130) | type charReader struct
method ReadByte (line 135) | func (r *charReader) ReadByte() byte {
method EOF (line 155) | func (r *charReader) EOF() bool {
function Tokenize (line 161) | func Tokenize(src []byte) ([]Tok, error) {
function hexVal (line 331) | func hexVal(ch byte) uint8 {
type toks (line 343) | type toks
method Next (line 345) | func (s toks) Next() Tok {
method Peek (line 352) | func (s toks) Peek(kind TokKind, text string) bool {
method Try (line 356) | func (s *toks) Try(kind TokKind, text string) bool {
method TryIdent (line 364) | func (s *toks) TryIdent() (Tok, bool) {
method Skip (line 373) | func (s *toks) Skip(n int) {
method SkipBalanced (line 380) | func (s *toks) SkipBalanced(until ...string) {
FILE: internal/cparse/lex_test.go
function TestTokenize (line 11) | func TestTokenize(t *testing.T) {
FILE: internal/cparse/pp.go
type BuildEnv (line 16) | type BuildEnv struct
function FindMacros (line 24) | func FindMacros(env *BuildEnv, r io.Reader) ([]string, error) {
function Preprocess (line 51) | func Preprocess(env *BuildEnv, r io.Reader) ([]byte, error) {
FILE: internal/cparse/pp_test.go
function TestMacros (line 15) | func TestMacros(t *testing.T) {
function needCC (line 34) | func needCC(t *testing.T) {
function preprocess (line 43) | func preprocess(t *testing.T, src string) []byte {
FILE: internal/cparse/vals.go
type Extractor (line 18) | type Extractor struct
method Extract (line 24) | func (e *Extractor) Extract(env *BuildEnv) error {
FILE: internal/gendefs/edit.go
type Edit (line 9) | type Edit struct
function DoEdit (line 15) | func DoEdit(src []byte, edits []Edit) []byte {
FILE: internal/gendefs/main.go
function main (line 26) | func main() {
function process (line 35) | func process(path string) {
type def (line 242) | type def struct
function parseDef (line 254) | func parseDef(c *ast.Comment) *def {
function compileGlob (line 303) | func compileGlob(glob string) func(string) (suff string, match bool) {
function cleanVals (line 318) | func cleanVals(lits []interface{}) []ast.Expr {
function cNameToGo (line 412) | func cNameToGo(c string) string {
function format (line 431) | func format(src []byte) []byte {
FILE: perffile/auxflags_string.go
method String (line 7) | func (i AuxFlags) String() string {
FILE: perffile/auxpmuformat_string.go
function _ (line 7) | func _() {
constant _AuxPMUFormat_name (line 16) | _AuxPMUFormat_name = "AuxPMUFormatCoresightCoresightAuxPMUFormatCoresigh...
method String (line 20) | func (i AuxPMUFormat) String() string {
FILE: perffile/bpfeventtype_string.go
method String (line 7) | func (i BPFEventType) String() string {
FILE: perffile/branchflags_string.go
method String (line 7) | func (i BranchFlags) String() string {
FILE: perffile/branchsampletype_string.go
method String (line 7) | func (i BranchSampleType) String() string {
FILE: perffile/breakpointop_string.go
method String (line 7) | func (i BreakpointOp) String() string {
FILE: perffile/buf.go
type bufferedSectionReader (line 18) | type bufferedSectionReader struct
method readErr (line 38) | func (b *bufferedSectionReader) readErr() error {
method Seek (line 44) | func (b *bufferedSectionReader) Seek(offset int64, whence int) (int64,...
method Read (line 57) | func (b *bufferedSectionReader) Read(p []byte) (n int, err error) {
method fill (line 90) | func (b *bufferedSectionReader) fill() {
function newBufferedSectionReader (line 26) | func newBufferedSectionReader(rd *io.SectionReader) *bufferedSectionRead...
FILE: perffile/bufdecoder.go
type bufDecoder (line 9) | type bufDecoder struct
method skip (line 14) | func (b *bufDecoder) skip(n int) {
method bytes (line 18) | func (b *bufDecoder) bytes(x []byte) {
method u8 (line 23) | func (b *bufDecoder) u8() uint8 {
method u16 (line 29) | func (b *bufDecoder) u16() uint16 {
method u32 (line 35) | func (b *bufDecoder) u32() uint32 {
method i32 (line 41) | func (b *bufDecoder) i32() int32 {
method u64 (line 47) | func (b *bufDecoder) u64() uint64 {
method i64 (line 53) | func (b *bufDecoder) i64() int64 {
method u64s (line 59) | func (b *bufDecoder) u64s(x []uint64) {
method u32If (line 66) | func (b *bufDecoder) u32If(cond bool) uint32 {
method i32If (line 73) | func (b *bufDecoder) i32If(cond bool) int32 {
method u64If (line 80) | func (b *bufDecoder) u64If(cond bool) uint64 {
method i64If (line 87) | func (b *bufDecoder) i64If(cond bool) int64 {
method cstring (line 94) | func (b *bufDecoder) cstring() string {
method lenString (line 108) | func (b *bufDecoder) lenString() string {
method stringList (line 119) | func (b *bufDecoder) stringList() []string {
FILE: perffile/cpumode_string.go
function _ (line 7) | func _() {
constant _CPUMode_name (line 19) | _CPUMode_name = "CPUModeUnknownCPUModeKernelCPUModeUserCPUModeHypervisor...
method String (line 23) | func (i CPUMode) String() string {
FILE: perffile/cpuset.go
type CPUSet (line 15) | type CPUSet
method String (line 55) | func (c CPUSet) String() string {
function parseCPUSet (line 17) | func parseCPUSet(str string) (CPUSet, error) {
FILE: perffile/datasrcblock_string.go
method String (line 7) | func (i DataSrcBlock) String() string {
FILE: perffile/datasrchops_string.go
function _ (line 7) | func _() {
constant _DataSrcHops_name_0 (line 19) | _DataSrcHops_name_0 = "DataSrcHopsNADataSrcHopsCore"
constant _DataSrcHops_name_1 (line 20) | _DataSrcHops_name_1 = "DataSrcHopsNodeDataSrcHopesBoard"
method String (line 28) | func (i DataSrcHops) String() string {
FILE: perffile/datasrclevel_string.go
method String (line 7) | func (i DataSrcLevel) String() string {
FILE: perffile/datasrclevelnum_string.go
function _ (line 7) | func _() {
constant _DataSrcLevelNum_name_0 (line 23) | _DataSrcLevelNum_name_0 = "DataSrcLevelNumL1DataSrcLevelNumL2DataSrcLeve...
constant _DataSrcLevelNum_name_1 (line 24) | _DataSrcLevelNum_name_1 = "DataSrcLevelNumAnyCacheDataSrcLevelNumLFBData...
method String (line 32) | func (i DataSrcLevelNum) String() string {
FILE: perffile/datasrclock_string.go
function _ (line 7) | func _() {
constant _DataSrcLock_name (line 16) | _DataSrcLock_name = "DataSrcLockNADataSrcLockUnlockedDataSrcLockLocked"
method String (line 20) | func (i DataSrcLock) String() string {
FILE: perffile/datasrcop_string.go
method String (line 7) | func (i DataSrcOp) String() string {
FILE: perffile/datasrcsnoop_string.go
method String (line 7) | func (i DataSrcSnoop) String() string {
FILE: perffile/datasrctlb_string.go
method String (line 7) | func (i DataSrcTLB) String() string {
FILE: perffile/doc_test.go
function Example (line 12) | func Example() {
FILE: perffile/eventflags_string.go
method String (line 7) | func (i EventFlags) String() string {
FILE: perffile/eventhardwareid_string.go
function _ (line 7) | func _() {
constant _EventHardwareID_name (line 23) | _EventHardwareID_name = "EventHardwareIDCPUCyclesEventHardwareIDInstruct...
method String (line 27) | func (i EventHardwareID) String() string {
function _ (line 33) | func _() {
constant _EventSoftware_name (line 51) | _EventSoftware_name = "EventSoftwareCPUClockEventSoftwareTaskClockEventS...
method String (line 55) | func (i EventSoftware) String() string {
function _ (line 61) | func _() {
constant _HWCache_name (line 74) | _HWCache_name = "HWCacheL1DHWCacheL1IHWCacheLLHWCacheDTLBHWCacheITLBHWCa...
method String (line 78) | func (i HWCache) String() string {
function _ (line 84) | func _() {
constant _HWCacheOp_name (line 93) | _HWCacheOp_name = "HWCacheOpReadHWCacheOpWriteHWCacheOpPrefetch"
method String (line 97) | func (i HWCacheOp) String() string {
function _ (line 103) | func _() {
constant _HWCacheResult_name (line 111) | _HWCacheResult_name = "HWCacheResultAccessHWCacheResultMiss"
method String (line 115) | func (i HWCacheResult) String() string {
FILE: perffile/eventprecision_string.go
function _ (line 7) | func _() {
constant _EventPrecision_name (line 17) | _EventPrecision_name = "EventPrecisionArbitrarySkidEventPrecisionConstan...
method String (line 21) | func (i EventPrecision) String() string {
FILE: perffile/events.go
type EventGeneric (line 17) | type EventGeneric struct
method Decode (line 39) | func (g *EventGeneric) Decode() Event {
type eventUnknown (line 75) | type eventUnknown struct
method Generic (line 79) | func (e eventUnknown) Generic() EventGeneric {
type EventHardware (line 84) | type EventHardware struct
method Generic (line 89) | func (e EventHardware) Generic() EventGeneric {
type EventHardwareID (line 98) | type EventHardwareID
constant EventHardwareIDCPUCycles (line 103) | EventHardwareIDCPUCycles EventHardwareID = iota
constant EventHardwareIDInstructions (line 104) | EventHardwareIDInstructions
constant EventHardwareIDCacheReferences (line 105) | EventHardwareIDCacheReferences
constant EventHardwareIDCacheMisses (line 106) | EventHardwareIDCacheMisses
constant EventHardwareIDBranchInstructions (line 107) | EventHardwareIDBranchInstructions
constant EventHardwareIDBranchMisses (line 108) | EventHardwareIDBranchMisses
constant EventHardwareIDBusCycles (line 109) | EventHardwareIDBusCycles
constant EventHardwareIDStalledCyclesFrontend (line 110) | EventHardwareIDStalledCyclesFrontend
constant EventHardwareIDStalledCyclesBackend (line 111) | EventHardwareIDStalledCyclesBackend
constant EventHardwareIDRefCPUCycles (line 112) | EventHardwareIDRefCPUCycles
type PMUTypeID (line 117) | type PMUTypeID
type EventSoftware (line 123) | type EventSoftware
method Generic (line 142) | func (e EventSoftware) Generic() EventGeneric {
constant EventSoftwareCPUClock (line 128) | EventSoftwareCPUClock EventSoftware = iota
constant EventSoftwareTaskClock (line 129) | EventSoftwareTaskClock
constant EventSoftwarePageFaults (line 130) | EventSoftwarePageFaults
constant EventSoftwareContextSwitches (line 131) | EventSoftwareContextSwitches
constant EventSoftwareCPUMigrations (line 132) | EventSoftwareCPUMigrations
constant EventSoftwarePageFaultsMin (line 133) | EventSoftwarePageFaultsMin
constant EventSoftwarePageFaultsMaj (line 134) | EventSoftwarePageFaultsMaj
constant EventSoftwareAlignmentFaults (line 135) | EventSoftwareAlignmentFaults
constant EventSoftwareEmulationFaults (line 136) | EventSoftwareEmulationFaults
constant EventSoftwareDummy (line 137) | EventSoftwareDummy
constant EventSoftwareBpfOutput (line 138) | EventSoftwareBpfOutput
constant EventSoftwareCGroupSwitches (line 139) | EventSoftwareCGroupSwitches
type EventTracepoint (line 150) | type EventTracepoint
method Generic (line 152) | func (e EventTracepoint) Generic() EventGeneric {
type EventHWCache (line 157) | type EventHWCache struct
method Generic (line 164) | func (e EventHWCache) Generic() EventGeneric {
type HWCache (line 173) | type HWCache
constant HWCacheL1D (line 178) | HWCacheL1D HWCache = iota
constant HWCacheL1I (line 179) | HWCacheL1I
constant HWCacheLL (line 180) | HWCacheLL
constant HWCacheDTLB (line 181) | HWCacheDTLB
constant HWCacheITLB (line 182) | HWCacheITLB
constant HWCacheBPU (line 183) | HWCacheBPU
constant HWCacheNode (line 184) | HWCacheNode
type HWCacheOp (line 191) | type HWCacheOp
constant HWCacheOpRead (line 196) | HWCacheOpRead HWCacheOp = iota
constant HWCacheOpWrite (line 197) | HWCacheOpWrite
constant HWCacheOpPrefetch (line 198) | HWCacheOpPrefetch
type HWCacheResult (line 206) | type HWCacheResult
constant HWCacheResultAccess (line 211) | HWCacheResultAccess HWCacheResult = iota
constant HWCacheResultMiss (line 212) | HWCacheResultMiss
type EventRaw (line 217) | type EventRaw
method Generic (line 219) | func (e EventRaw) Generic() EventGeneric {
type EventBreakpoint (line 227) | type EventBreakpoint struct
method Generic (line 239) | func (e EventBreakpoint) Generic() EventGeneric {
type BreakpointOp (line 248) | type BreakpointOp
constant BreakpointOpR (line 251) | BreakpointOpR BreakpointOp = 1
constant BreakpointOpW (line 252) | BreakpointOpW = 2
constant BreakpointOpRW (line 253) | BreakpointOpRW = BreakpointOpR | BreakpointOpW
constant BreakpointOpX (line 254) | BreakpointOpX = 4
FILE: perffile/eventtype_string.go
function _ (line 7) | func _() {
constant _EventType_name (line 19) | _EventType_name = "EventTypeHardwareEventTypeSoftwareEventTypeTracepoint...
method String (line 23) | func (i EventType) String() string {
FILE: perffile/format.go
constant numFeatureBits (line 18) | numFeatureBits = 256
type fileHeader (line 21) | type fileHeader struct
method hasFeature (line 32) | func (h *fileHeader) hasFeature(f feature) bool {
type fileSection (line 37) | type fileSection struct
method sectionReader (line 41) | func (s fileSection) sectionReader(r io.ReaderAt) *io.SectionReader {
method data (line 45) | func (s fileSection) data(r io.ReaderAt) ([]byte, error) {
type feature (line 55) | type feature
constant featureReserved (line 61) | featureReserved feature = iota
constant featureTracingData (line 62) | featureTracingData
constant featureBuildID (line 63) | featureBuildID
constant featureHostname (line 65) | featureHostname
constant featureOSRelease (line 66) | featureOSRelease
constant featureVersion (line 67) | featureVersion
constant featureArch (line 68) | featureArch
constant featureNrCpus (line 69) | featureNrCpus
constant featureCPUDesc (line 70) | featureCPUDesc
constant featureCPUID (line 71) | featureCPUID
constant featureTotalMem (line 72) | featureTotalMem
constant featureCmdline (line 73) | featureCmdline
constant featureEventDesc (line 74) | featureEventDesc
constant featureCPUTopology (line 75) | featureCPUTopology
constant featureNUMATopology (line 76) | featureNUMATopology
constant featureBranchStack (line 77) | featureBranchStack
constant featurePMUMappings (line 78) | featurePMUMappings
constant featureGroupDesc (line 79) | featureGroupDesc
type fileAttr (line 83) | type fileAttr struct
type eventAttrV0 (line 91) | type eventAttrV0 struct
type eventAttrVN (line 109) | type eventAttrVN struct
type attrID (line 144) | type attrID
type Event (line 152) | type Event interface
type EventType (line 161) | type EventType
constant EventTypeHardware (line 167) | EventTypeHardware EventType = iota
constant EventTypeSoftware (line 168) | EventTypeSoftware
constant EventTypeTracepoint (line 169) | EventTypeTracepoint
constant EventTypeHWCache (line 170) | EventTypeHWCache
constant EventTypeRaw (line 171) | EventTypeRaw
constant EventTypeBreakpoint (line 172) | EventTypeBreakpoint
type EventID (line 176) | type EventID
type EventAttr (line 182) | type EventAttr struct
type SampleFormat (line 262) | type SampleFormat
method sampleIDOffset (line 298) | func (s SampleFormat) sampleIDOffset() int {
method recordIDOffset (line 327) | func (s SampleFormat) recordIDOffset() int {
method trailerBytes (line 349) | func (s SampleFormat) trailerBytes() int {
constant SampleFormatIP (line 268) | SampleFormatIP SampleFormat = 1 << iota
constant SampleFormatTID (line 269) | SampleFormatTID
constant SampleFormatTime (line 270) | SampleFormatTime
constant SampleFormatAddr (line 271) | SampleFormatAddr
constant SampleFormatRead (line 272) | SampleFormatRead
constant SampleFormatCallchain (line 273) | SampleFormatCallchain
constant SampleFormatID (line 274) | SampleFormatID
constant SampleFormatCPU (line 275) | SampleFormatCPU
constant SampleFormatPeriod (line 276) | SampleFormatPeriod
constant SampleFormatStreamID (line 277) | SampleFormatStreamID
constant SampleFormatRaw (line 278) | SampleFormatRaw
constant SampleFormatBranchStack (line 279) | SampleFormatBranchStack
constant SampleFormatRegsUser (line 280) | SampleFormatRegsUser
constant SampleFormatStackUser (line 281) | SampleFormatStackUser
constant SampleFormatWeight (line 282) | SampleFormatWeight
constant SampleFormatDataSrc (line 283) | SampleFormatDataSrc
constant SampleFormatIdentifier (line 284) | SampleFormatIdentifier
constant SampleFormatTransaction (line 285) | SampleFormatTransaction
constant SampleFormatRegsIntr (line 286) | SampleFormatRegsIntr
constant SampleFormatPhysAddr (line 287) | SampleFormatPhysAddr
constant SampleFormatAux (line 288) | SampleFormatAux
constant SampleFormatCGroup (line 289) | SampleFormatCGroup
constant SampleFormatDataPageSize (line 290) | SampleFormatDataPageSize
constant SampleFormatCodePageSize (line 291) | SampleFormatCodePageSize
constant SampleFormatWeightStruct (line 292) | SampleFormatWeightStruct
type ReadFormat (line 359) | type ReadFormat
constant ReadFormatTotalTimeEnabled (line 365) | ReadFormatTotalTimeEnabled ReadFormat = 1 << iota
constant ReadFormatTotalTimeRunning (line 366) | ReadFormatTotalTimeRunning
constant ReadFormatID (line 367) | ReadFormatID
constant ReadFormatGroup (line 368) | ReadFormatGroup
type EventFlags (line 375) | type EventFlags
constant EventFlagDisabled (line 382) | EventFlagDisabled EventFlags = 1 << iota
constant EventFlagInherit (line 384) | EventFlagInherit
constant EventFlagPinned (line 386) | EventFlagPinned
constant EventFlagExclusive (line 388) | EventFlagExclusive
constant EventFlagExcludeUser (line 390) | EventFlagExcludeUser
constant EventFlagExcludeKernel (line 391) | EventFlagExcludeKernel
constant EventFlagExcludeHypervisor (line 392) | EventFlagExcludeHypervisor
constant EventFlagExcludeIdle (line 393) | EventFlagExcludeIdle
constant EventFlagMmap (line 395) | EventFlagMmap
constant EventFlagComm (line 397) | EventFlagComm
constant EventFlagFreq (line 399) | EventFlagFreq
constant EventFlagInheritStat (line 401) | EventFlagInheritStat
constant EventFlagEnableOnExec (line 403) | EventFlagEnableOnExec
constant EventFlagTask (line 405) | EventFlagTask
constant EventFlagWakeupWatermark (line 407) | EventFlagWakeupWatermark
constant EventFlagMmapData (line 412) | EventFlagMmapData EventFlags = 1 << (2 + iota)
constant EventFlagSampleIDAll (line 414) | EventFlagSampleIDAll
constant EventFlagExcludeHost (line 416) | EventFlagExcludeHost
constant EventFlagExcludeGuest (line 417) | EventFlagExcludeGuest
constant EventFlagExcludeCallchainKernel (line 419) | EventFlagExcludeCallchainKernel
constant EventFlagExcludeCallchainUser (line 420) | EventFlagExcludeCallchainUser
constant EventFlagMmapInodeData (line 422) | EventFlagMmapInodeData
constant EventFlagCommExec (line 424) | EventFlagCommExec
constant EventFlagClockID (line 426) | EventFlagClockID
constant EventFlagContextSwitch (line 429) | EventFlagContextSwitch
constant EventFlagWriteBackward (line 431) | EventFlagWriteBackward
constant EventFlagNamespaces (line 433) | EventFlagNamespaces
constant EventFlagKsymbol (line 435) | EventFlagKsymbol
constant EventFlagAuxOutput (line 437) | EventFlagAuxOutput
constant EventFlagCGroup (line 439) | EventFlagCGroup
constant EventFlagTextPoke (line 441) | EventFlagTextPoke
constant EventFlagBuildID (line 443) | EventFlagBuildID
constant EventFlagInheritThread (line 445) | EventFlagInheritThread
constant EventFlagRemoveOnExec (line 447) | EventFlagRemoveOnExec
constant EventFlagSigtrap (line 449) | EventFlagSigtrap
constant eventFlagPreciseShift (line 451) | eventFlagPreciseShift = 15
constant eventFlagPreciseMask (line 452) | eventFlagPreciseMask = 0x3 << eventFlagPreciseShift
type EventPrecision (line 458) | type EventPrecision
constant EventPrecisionArbitrarySkid (line 463) | EventPrecisionArbitrarySkid EventPrecision = iota
constant EventPrecisionConstantSkid (line 464) | EventPrecisionConstantSkid
constant EventPrecisionTryZeroSkid (line 465) | EventPrecisionTryZeroSkid
constant EventPrecisionZeroSkip (line 466) | EventPrecisionZeroSkip
type BranchSampleType (line 479) | type BranchSampleType
constant BranchSampleUser (line 485) | BranchSampleUser BranchSampleType = 1 << iota
constant BranchSampleKernel (line 486) | BranchSampleKernel
constant BranchSampleHV (line 487) | BranchSampleHV
constant BranchSampleAny (line 489) | BranchSampleAny
constant BranchSampleAnyCall (line 490) | BranchSampleAnyCall
constant BranchSampleAnyReturn (line 491) | BranchSampleAnyReturn
constant BranchSampleIndCall (line 492) | BranchSampleIndCall
constant BranchSampleAbortTX (line 493) | BranchSampleAbortTX
constant BranchSampleInTX (line 494) | BranchSampleInTX
constant BranchSampleNoTX (line 495) | BranchSampleNoTX
constant BranchSampleCond (line 496) | BranchSampleCond
constant BranchSampleCallStack (line 498) | BranchSampleCallStack
constant BranchSampleIndJump (line 499) | BranchSampleIndJump
constant BranchSampleCall (line 500) | BranchSampleCall
constant BranchSampleNoFlags (line 502) | BranchSampleNoFlags
constant BranchSampleNoCycles (line 503) | BranchSampleNoCycles
constant BranchSampleTypeSave (line 504) | BranchSampleTypeSave
constant BranchSampleHWIndex (line 505) | BranchSampleHWIndex
type recordHeader (line 509) | type recordHeader struct
type RecordType (line 518) | type RecordType
constant RecordTypeMmap (line 524) | RecordTypeMmap RecordType = 1 + iota
constant RecordTypeLost (line 525) | RecordTypeLost
constant RecordTypeComm (line 526) | RecordTypeComm
constant RecordTypeExit (line 527) | RecordTypeExit
constant RecordTypeThrottle (line 528) | RecordTypeThrottle
constant RecordTypeUnthrottle (line 529) | RecordTypeUnthrottle
constant RecordTypeFork (line 530) | RecordTypeFork
constant RecordTypeRead (line 531) | RecordTypeRead
constant RecordTypeSample (line 532) | RecordTypeSample
constant recordTypeMmap2 (line 533) | recordTypeMmap2
constant RecordTypeAux (line 534) | RecordTypeAux
constant RecordTypeItraceStart (line 535) | RecordTypeItraceStart
constant RecordTypeLostSamples (line 536) | RecordTypeLostSamples
constant RecordTypeSwitch (line 537) | RecordTypeSwitch
constant RecordTypeSwitchCPUWide (line 538) | RecordTypeSwitchCPUWide
constant RecordTypeNamespaces (line 539) | RecordTypeNamespaces
constant RecordTypeKsymbol (line 540) | RecordTypeKsymbol
constant RecordTypeBPFEvent (line 541) | RecordTypeBPFEvent
constant RecordTypeCGroup (line 542) | RecordTypeCGroup
constant RecordTypeTextPoke (line 543) | RecordTypeTextPoke
constant RecordTypeAuxOutputHardwareID (line 544) | RecordTypeAuxOutputHardwareID
constant recordTypeUserStart (line 546) | recordTypeUserStart RecordType = 64
constant recordTypeAttr (line 555) | recordTypeAttr RecordType = recordTypeUserStart + iota
constant recordTypeEventType (line 556) | recordTypeEventType
constant recordTypeTracingData (line 557) | recordTypeTracingData
constant recordTypeBuildID (line 558) | recordTypeBuildID
constant recordTypeFinishedRound (line 559) | recordTypeFinishedRound
constant recordTypeIDIndex (line 560) | recordTypeIDIndex
constant RecordTypeAuxtraceInfo (line 561) | RecordTypeAuxtraceInfo
constant RecordTypeAuxtrace (line 562) | RecordTypeAuxtrace
constant RecordTypeAuxtraceError (line 563) | RecordTypeAuxtraceError
constant recordTypeThreadMap (line 564) | recordTypeThreadMap
constant recordTypeCPUMap (line 565) | recordTypeCPUMap
constant recordTypeStatConfig (line 566) | recordTypeStatConfig
constant recordTypeStat (line 567) | recordTypeStat
constant recordTypeStatRound (line 568) | recordTypeStatRound
constant recordTypeEventUpdate (line 569) | recordTypeEventUpdate
constant recordTypeTimeConv (line 570) | recordTypeTimeConv
constant recordTypeHeaderFeature (line 571) | recordTypeHeaderFeature
type recordMisc (line 575) | type recordMisc
constant recordMiscCPUModeMask (line 581) | recordMiscCPUModeMask recordMisc = 7
constant recordMiscProcMapParseTimeout (line 582) | recordMiscProcMapParseTimeout = 1 << 12
constant recordMiscMmapData (line 583) | recordMiscMmapData = 1 << 13
constant recordMiscCommExec (line 584) | recordMiscCommExec = 1 << 13
constant recordMiscForkExec (line 585) | recordMiscForkExec = 1 << 13
constant recordMiscSwitchOut (line 586) | recordMiscSwitchOut = 1 << 13
constant recordMiscExactIP (line 591) | recordMiscExactIP = 1 << 14
constant recordMiscSwitchOutPreempt (line 596) | recordMiscSwitchOutPreempt = 1 << 14
constant recordMiscMmapBuildID (line 601) | recordMiscMmapBuildID = 1 << 14
type Record (line 606) | type Record interface
type RecordCommon (line 617) | type RecordCommon struct
method Common (line 636) | func (r *RecordCommon) Common() *RecordCommon {
type RecordUnknown (line 641) | type RecordUnknown struct
method Type (line 649) | func (r *RecordUnknown) Type() RecordType {
type RecordMmap (line 656) | type RecordMmap struct
method Type (line 678) | func (r *RecordMmap) Type() RecordType {
type RecordLost (line 684) | type RecordLost struct
method Type (line 691) | func (r *RecordLost) Type() RecordType {
type RecordComm (line 698) | type RecordComm struct
method Type (line 707) | func (r *RecordComm) Type() RecordType {
type RecordExit (line 712) | type RecordExit struct
method Type (line 719) | func (r *RecordExit) Type() RecordType {
type RecordThrottle (line 725) | type RecordThrottle struct
method Type (line 733) | func (r *RecordThrottle) Type() RecordType {
type RecordFork (line 739) | type RecordFork struct
method Type (line 746) | func (r *RecordFork) Type() RecordType {
type RecordAux (line 751) | type RecordAux struct
method Type (line 759) | func (r *RecordAux) Type() RecordType {
type AuxFlags (line 764) | type AuxFlags
constant AuxFlagTruncated (line 771) | AuxFlagTruncated AuxFlags = 1 << iota
constant AuxFlagOverwrite (line 775) | AuxFlagOverwrite
constant AuxFlagPartial (line 778) | AuxFlagPartial
constant AuxFlagCollision (line 781) | AuxFlagCollision
type AuxPMUFormat (line 785) | type AuxPMUFormat
constant AuxPMUFormatCoresightCoresight (line 791) | AuxPMUFormatCoresightCoresight AuxPMUFormat = 0
constant AuxPMUFormatCoresightRaw (line 792) | AuxPMUFormatCoresightRaw AuxPMUFormat = 1
constant AuxPMUFormatDefault (line 794) | AuxPMUFormatDefault AuxPMUFormat = 0
type RecordItraceStart (line 798) | type RecordItraceStart struct
method Type (line 803) | func (r *RecordItraceStart) Type() RecordType {
type RecordLostSamples (line 808) | type RecordLostSamples struct
method Type (line 814) | func (r *RecordLostSamples) Type() RecordType {
type RecordSwitch (line 820) | type RecordSwitch struct
method Type (line 828) | func (r *RecordSwitch) Type() RecordType {
type RecordSwitchCPUWide (line 833) | type RecordSwitchCPUWide struct
method Type (line 850) | func (r *RecordSwitchCPUWide) Type() RecordType {
type RecordNamespaces (line 854) | type RecordNamespaces struct
method Type (line 861) | func (r *RecordNamespaces) Type() RecordType {
type Namespace (line 865) | type Namespace struct
type RecordKsymbol (line 871) | type RecordKsymbol struct
method Type (line 881) | func (r *RecordKsymbol) Type() RecordType {
type KsymbolType (line 885) | type KsymbolType
constant KsymbolTypeUnknown (line 891) | KsymbolTypeUnknown KsymbolType = iota
constant KsymbolTypeBpf (line 892) | KsymbolTypeBpf
constant KsymbolTypeOol (line 893) | KsymbolTypeOol
type KsymbolFlags (line 897) | type KsymbolFlags
constant KsymbolFlagUnregister (line 904) | KsymbolFlagUnregister KsymbolFlags = iota
type RecordBPFEvent (line 908) | type RecordBPFEvent struct
method Type (line 917) | func (r *RecordBPFEvent) Type() RecordType {
type BPFEventType (line 921) | type BPFEventType
constant BPFEventTypeUnknown (line 927) | BPFEventTypeUnknown BPFEventType = iota
constant BPFEventTypeProgLoad (line 928) | BPFEventTypeProgLoad
constant BPFEventTypeProgUnload (line 929) | BPFEventTypeProgUnload
type BPFEventFlags (line 932) | type BPFEventFlags
type RecordCGroup (line 937) | type RecordCGroup struct
method Type (line 944) | func (r *RecordCGroup) Type() RecordType {
type RecordTextPoke (line 950) | type RecordTextPoke struct
method Type (line 958) | func (r *RecordTextPoke) Type() RecordType {
type RecordAuxOutputHardwareID (line 967) | type RecordAuxOutputHardwareID struct
method Type (line 973) | func (r *RecordAuxOutputHardwareID) Type() RecordType {
type RecordAuxtraceInfo (line 977) | type RecordAuxtraceInfo struct
method Type (line 985) | func (r *RecordAuxtraceInfo) Type() RecordType {
type RecordAuxtrace (line 989) | type RecordAuxtrace struct
method Type (line 1012) | func (r *RecordAuxtrace) Type() RecordType {
type RecordSample (line 1021) | type RecordSample struct
method Type (line 1103) | func (r *RecordSample) Type() RecordType {
method String (line 1107) | func (r *RecordSample) String() string {
method Fields (line 1185) | func (r *RecordSample) Fields() []string {
type CPUMode (line 1264) | type CPUMode
constant CPUModeUnknown (line 1270) | CPUModeUnknown CPUMode = iota
constant CPUModeKernel (line 1271) | CPUModeKernel
constant CPUModeUser (line 1272) | CPUModeUser
constant CPUModeHypervisor (line 1273) | CPUModeHypervisor
constant CPUModeGuestKernel (line 1274) | CPUModeGuestKernel
constant CPUModeGuestUser (line 1275) | CPUModeGuestUser
type Count (line 1286) | type Count struct
type BranchRecord (line 1294) | type BranchRecord struct
type BranchFlags (line 1309) | type BranchFlags
constant BranchFlagMispredicted (line 1315) | BranchFlagMispredicted BranchFlags = 1 << iota
constant BranchFlagPredicted (line 1320) | BranchFlagPredicted
constant BranchFlagInTransaction (line 1324) | BranchFlagInTransaction
constant BranchFlagAbort (line 1327) | BranchFlagAbort
type BranchType (line 1330) | type BranchType
constant BranchTypeUnknown (line 1335) | BranchTypeUnknown BranchType = iota
constant BranchTypeCond (line 1336) | BranchTypeCond
constant BranchTypeUncond (line 1337) | BranchTypeUncond
constant BranchTypeInd (line 1338) | BranchTypeInd
constant BranchTypeCall (line 1339) | BranchTypeCall
constant BranchTypeIndCall (line 1340) | BranchTypeIndCall
constant BranchTypeRet (line 1341) | BranchTypeRet
constant BranchTypeSyscall (line 1342) | BranchTypeSyscall
constant BranchTypeSysret (line 1343) | BranchTypeSysret
constant BranchTypeCondCall (line 1344) | BranchTypeCondCall
constant BranchTypeCondRet (line 1345) | BranchTypeCondRet
constant BranchTypeEret (line 1346) | BranchTypeEret
constant BranchTypeIrq (line 1347) | BranchTypeIrq
constant CallchainHV (line 1358) | CallchainHV uint64 = 0xffffffffffffffe0
constant CallchainKernel (line 1359) | CallchainKernel = 0xffffffffffffff80
constant CallchainUser (line 1360) | CallchainUser = 0xfffffffffffffe00
constant CallchainGuest (line 1361) | CallchainGuest = 0xfffffffffffff800
constant CallchainGuestKernel (line 1362) | CallchainGuestKernel = 0xfffffffffffff780
constant CallchainGuestUser (line 1363) | CallchainGuestUser = 0xfffffffffffff600
type SampleRegsABI (line 1371) | type SampleRegsABI
constant SampleRegsABINone (line 1377) | SampleRegsABINone SampleRegsABI = iota
constant SampleRegsABI32 (line 1378) | SampleRegsABI32
constant SampleRegsABI64 (line 1379) | SampleRegsABI64
type DataSrc (line 1382) | type DataSrc struct
type DataSrcOp (line 1395) | type DataSrcOp
constant DataSrcOpLoad (line 1400) | DataSrcOpLoad DataSrcOp = 1 << iota
constant DataSrcOpStore (line 1401) | DataSrcOpStore
constant DataSrcOpPrefetch (line 1402) | DataSrcOpPrefetch
constant DataSrcOpExec (line 1403) | DataSrcOpExec
constant DataSrcOpNA (line 1405) | DataSrcOpNA DataSrcOp = 0
type DataSrcLevel (line 1408) | type DataSrcLevel
constant DataSrcLevelL1 (line 1413) | DataSrcLevelL1 DataSrcLevel = 1 << iota
constant DataSrcLevelLFB (line 1414) | DataSrcLevelLFB
constant DataSrcLevelL2 (line 1415) | DataSrcLevelL2
constant DataSrcLevelL3 (line 1416) | DataSrcLevelL3
constant DataSrcLevelLocalRAM (line 1417) | DataSrcLevelLocalRAM
constant DataSrcLevelRemoteRAM1 (line 1418) | DataSrcLevelRemoteRAM1
constant DataSrcLevelRemoteRAM2 (line 1419) | DataSrcLevelRemoteRAM2
constant DataSrcLevelRemoteCache1 (line 1420) | DataSrcLevelRemoteCache1
constant DataSrcLevelRemoteCache2 (line 1421) | DataSrcLevelRemoteCache2
constant DataSrcLevelIO (line 1422) | DataSrcLevelIO
constant DataSrcLevelUncached (line 1423) | DataSrcLevelUncached
constant DataSrcLevelNA (line 1425) | DataSrcLevelNA DataSrcLevel = 0
type DataSrcSnoop (line 1428) | type DataSrcSnoop
constant DataSrcSnoopNone (line 1433) | DataSrcSnoopNone DataSrcSnoop = 1 << iota
constant DataSrcSnoopHit (line 1434) | DataSrcSnoopHit
constant DataSrcSnoopMiss (line 1435) | DataSrcSnoopMiss
constant DataSrcSnoopHitM (line 1436) | DataSrcSnoopHitM
constant DataSrcSnoopFwd (line 1437) | DataSrcSnoopFwd
constant DataSrcSnoopNA (line 1439) | DataSrcSnoopNA DataSrcSnoop = 0
type DataSrcLock (line 1442) | type DataSrcLock
constant DataSrcLockNA (line 1447) | DataSrcLockNA DataSrcLock = iota
constant DataSrcLockUnlocked (line 1448) | DataSrcLockUnlocked
constant DataSrcLockLocked (line 1449) | DataSrcLockLocked
type DataSrcTLB (line 1452) | type DataSrcTLB
constant DataSrcTLBHit (line 1457) | DataSrcTLBHit DataSrcTLB = 1 << iota
constant DataSrcTLBMiss (line 1458) | DataSrcTLBMiss
constant DataSrcTLBL1 (line 1459) | DataSrcTLBL1
constant DataSrcTLBL2 (line 1460) | DataSrcTLBL2
constant DataSrcTLBHardwareWalker (line 1461) | DataSrcTLBHardwareWalker
constant DataSrcTLBOSFaultHandler (line 1462) | DataSrcTLBOSFaultHandler
constant DataSrcTLBNA (line 1464) | DataSrcTLBNA DataSrcTLB = 0
type DataSrcLevelNum (line 1467) | type DataSrcLevelNum
constant DataSrcLevelNumL1 (line 1473) | DataSrcLevelNumL1 DataSrcLevelNum = 0x01
constant DataSrcLevelNumL2 (line 1474) | DataSrcLevelNumL2 DataSrcLevelNum = 0x02
constant DataSrcLevelNumL3 (line 1475) | DataSrcLevelNumL3 DataSrcLevelNum = 0x03
constant DataSrcLevelNumL4 (line 1476) | DataSrcLevelNumL4 DataSrcLevelNum = 0x04
constant DataSrcLevelNumAnyCache (line 1477) | DataSrcLevelNumAnyCache DataSrcLevelNum = 0x0b
constant DataSrcLevelNumLFB (line 1478) | DataSrcLevelNumLFB DataSrcLevelNum = 0x0c
constant DataSrcLevelNumRAM (line 1479) | DataSrcLevelNumRAM DataSrcLevelNum = 0x0d
constant DataSrcLevelNumPMEM (line 1480) | DataSrcLevelNumPMEM DataSrcLevelNum = 0x0e
constant DataSrcLevelNumNA (line 1481) | DataSrcLevelNumNA DataSrcLevelNum = 0x0f
type DataSrcBlock (line 1484) | type DataSrcBlock
constant DataSrcBlockData (line 1489) | DataSrcBlockData DataSrcBlock = 1 << iota
constant DataSrcBlockAddr (line 1490) | DataSrcBlockAddr
constant DataSrcBlockNA (line 1492) | DataSrcBlockNA DataSrcBlock = 0
type DataSrcHops (line 1495) | type DataSrcHops
constant DataSrcHopsCore (line 1500) | DataSrcHopsCore DataSrcHops = 1
constant DataSrcHopsNode (line 1501) | DataSrcHopsNode DataSrcHops = 3
constant DataSrcHopsSocket (line 1502) | DataSrcHopsSocket DataSrcHops = 3
constant DataSrcHopesBoard (line 1503) | DataSrcHopesBoard DataSrcHops = 4
constant DataSrcHopsNA (line 1505) | DataSrcHopsNA DataSrcHops = 0
type Transaction (line 1508) | type Transaction
constant TransactionElision (line 1516) | TransactionElision Transaction = 1 << iota
constant TransactionTransaction (line 1517) | TransactionTransaction
constant TransactionSync (line 1518) | TransactionSync
constant TransactionAsync (line 1519) | TransactionAsync
constant TransactionRetry (line 1520) | TransactionRetry
constant TransactionConflict (line 1521) | TransactionConflict
constant TransactionCapacityWrite (line 1522) | TransactionCapacityWrite
constant TransactionCapacityRead (line 1523) | TransactionCapacityRead
type Weights (line 1526) | type Weights struct
FILE: perffile/ksymbolflags_string.go
method String (line 7) | func (i KsymbolFlags) String() string {
FILE: perffile/ksymboltype_string.go
method String (line 7) | func (i KsymbolType) String() string {
FILE: perffile/meta.go
type FileMeta (line 14) | type FileMeta struct
method parse (line 140) | func (m *FileMeta) parse(f feature, sec fileSection, r io.ReaderAt) er...
method parseBuildID (line 166) | func (m *FileMeta) parseBuildID(bd bufDecoder) error {
method parseNrCPUs (line 187) | func (m *FileMeta) parseNrCPUs(bd bufDecoder) error {
method parseTotalMem (line 192) | func (m *FileMeta) parseTotalMem(bd bufDecoder) error {
method parseCmdLine (line 197) | func (m *FileMeta) parseCmdLine(bd bufDecoder) error {
method parseCPUTopology (line 210) | func (m *FileMeta) parseCPUTopology(bd bufDecoder) error {
method parseNUMATopology (line 230) | func (m *FileMeta) parseNUMATopology(bd bufDecoder) error {
method parsePMUMappings (line 249) | func (m *FileMeta) parsePMUMappings(bd bufDecoder) error {
method parseGroupDesc (line 258) | func (m *FileMeta) parseGroupDesc(bd bufDecoder) error {
type BuildIDInfo (line 86) | type BuildIDInfo struct
type BuildID (line 93) | type BuildID
method String (line 95) | func (b BuildID) String() string {
type NUMANode (line 100) | type NUMANode struct
type GroupDesc (line 117) | type GroupDesc struct
function stringFeature (line 157) | func stringFeature(name string) func(*FileMeta, bufDecoder) error {
FILE: perffile/reader.go
type File (line 21) | type File struct
method Close (line 264) | func (f *File) Close() error {
method Records (line 326) | func (f *File) Records(order RecordsOrder) *Records {
function New (line 46) | func New(r io.ReaderAt) (*File, error) {
function Open (line 179) | func Open(name string) (*File, error) {
function readFileAttr (line 193) | func readFileAttr(sr *io.SectionReader, fa *fileAttr) error {
function readSlice (line 276) | func readSlice(sr *io.SectionReader, v interface{}) error {
type RecordsOrder (line 298) | type RecordsOrder
constant RecordsFileOrder (line 305) | RecordsFileOrder RecordsOrder = iota
constant RecordsCausalOrder (line 313) | RecordsCausalOrder
constant RecordsTimeOrder (line 319) | RecordsTimeOrder
type timeSorter (line 365) | type timeSorter struct
method Len (line 370) | func (s *timeSorter) Len() int {
method Less (line 374) | func (s *timeSorter) Less(i, j int) bool {
method Swap (line 378) | func (s *timeSorter) Swap(i, j int) {
FILE: perffile/readformat_string.go
method String (line 7) | func (i ReadFormat) String() string {
FILE: perffile/records.go
type Records (line 26) | type Records struct
method Err (line 56) | func (r *Records) Err() error {
method Next (line 67) | func (r *Records) Next() bool {
method getAttr (line 201) | func (r *Records) getAttr(id attrID, nilOk bool) *EventAttr {
method parseCommon (line 220) | func (r *Records) parseCommon(bd *bufDecoder, o *RecordCommon, missing...
method parseMmap (line 249) | func (r *Records) parseMmap(bd *bufDecoder, hdr *recordHeader, common ...
method parseLost (line 289) | func (r *Records) parseLost(bd *bufDecoder, hdr *recordHeader, common ...
method parseComm (line 300) | func (r *Records) parseComm(bd *bufDecoder, hdr *recordHeader, common ...
method parseExit (line 315) | func (r *Records) parseExit(bd *bufDecoder, hdr *recordHeader, common ...
method parseThrottle (line 327) | func (r *Records) parseThrottle(bd *bufDecoder, hdr *recordHeader, com...
method parseFork (line 346) | func (r *Records) parseFork(bd *bufDecoder, hdr *recordHeader, common ...
method parseAux (line 358) | func (r *Records) parseAux(bd *bufDecoder, hdr *recordHeader, common *...
method parseItraceStart (line 374) | func (r *Records) parseItraceStart(bd *bufDecoder, hdr *recordHeader, ...
method parseLostSamples (line 381) | func (r *Records) parseLostSamples(bd *bufDecoder, hdr *recordHeader, ...
method parseSwitch (line 387) | func (r *Records) parseSwitch(bd *bufDecoder, hdr *recordHeader, commo...
method parseSwitchCPUWide (line 394) | func (r *Records) parseSwitchCPUWide(bd *bufDecoder, hdr *recordHeader...
method parseNamespaces (line 403) | func (r *Records) parseNamespaces(bd *bufDecoder, hdr *recordHeader, c...
method parseKsymbol (line 415) | func (r *Records) parseKsymbol(bd *bufDecoder, hdr *recordHeader, comm...
method parseBPFEvent (line 425) | func (r *Records) parseBPFEvent(bd *bufDecoder, hdr *recordHeader, com...
method parseCGroup (line 435) | func (r *Records) parseCGroup(bd *bufDecoder, hdr *recordHeader, commo...
method parseTextPoke (line 443) | func (r *Records) parseTextPoke(bd *bufDecoder, hdr *recordHeader, com...
method parseAuxOutputHardwareID (line 458) | func (r *Records) parseAuxOutputHardwareID(bd *bufDecoder, hdr *record...
method parseAuxtraceInfo (line 464) | func (r *Records) parseAuxtraceInfo(bd *bufDecoder, hdr *recordHeader,...
method parseAuxtrace (line 474) | func (r *Records) parseAuxtrace(bd *bufDecoder, hdr *recordHeader, com...
method parseSample (line 487) | func (r *Records) parseSample(bd *bufDecoder, hdr *recordHeader, commo...
method parseReadFormat (line 663) | func (r *Records) parseReadFormat(bd *bufDecoder, f ReadFormat, out *[...
function decodeDataSrc (line 700) | func decodeDataSrc(d uint64) (out DataSrc) {
function weight (line 763) | func weight(x uint64) int {
FILE: perffile/recordsorder_string.go
function _ (line 7) | func _() {
constant _RecordsOrder_name (line 16) | _RecordsOrder_name = "RecordsFileOrderRecordsCausalOrderRecordsTimeOrder"
method String (line 20) | func (i RecordsOrder) String() string {
FILE: perffile/recordtype_string.go
function _ (line 7) | func _() {
constant _RecordType_name_0 (line 53) | _RecordType_name_0 = "RecordTypeMmapRecordTypeLostRecordTypeCommRecordTy...
constant _RecordType_name_1 (line 54) | _RecordType_name_1 = "recordTypeUserStartrecordTypeEventTyperecordTypeTr...
method String (line 62) | func (i RecordType) String() string {
FILE: perffile/sampleformat_string.go
method String (line 7) | func (i SampleFormat) String() string {
FILE: perffile/sampleregsabi_string.go
function _ (line 7) | func _() {
constant _SampleRegsABI_name (line 16) | _SampleRegsABI_name = "SampleRegsABINoneSampleRegsABI32SampleRegsABI64"
method String (line 20) | func (i SampleRegsABI) String() string {
FILE: perffile/transaction_string.go
method String (line 7) | func (i Transaction) String() string {
FILE: perfsession/ranges.go
type Ranges (line 11) | type Ranges struct
method Add (line 24) | func (r *Ranges) Add(lo, hi uint64, val interface{}) {
method Get (line 30) | func (r *Ranges) Get(idx uint64) (lo, hi uint64, val interface{}, ok b...
type rangeEnt (line 16) | type rangeEnt struct
FILE: perfsession/session.go
type Session (line 11) | type Session struct
method Update (line 35) | func (s *Session) Update(r perffile.Record) {
method LookupPID (line 76) | func (s *Session) LookupPID(pid int) *PIDInfo {
function New (line 19) | func New(f *perffile.File) *Session {
type PIDInfo (line 80) | type PIDInfo struct
method fork (line 88) | func (p *PIDInfo) fork(pid int) *PIDInfo {
method munmap (line 96) | func (p *PIDInfo) munmap(addr, mlen uint64) {
method mapFind (line 139) | func (p *PIDInfo) mapFind(addr uint64) *Mmap {
method LookupMmap (line 148) | func (p *PIDInfo) LookupMmap(addr uint64) *Mmap {
type Mmap (line 156) | type Mmap struct
method fork (line 162) | func (m *Mmap) fork(pid int) *Mmap {
type Forkable (line 166) | type Forkable interface
type ExtraKey (line 170) | type ExtraKey
function NewExtraKey (line 175) | func NewExtraKey(name string) ExtraKey {
type ForkableExtra (line 182) | type ForkableExtra
method Fork (line 184) | func (f ForkableExtra) Fork(pid int) Forkable {
FILE: perfsession/symbolize.go
type Symbolic (line 24) | type Symbolic struct
function Symbolize (line 31) | func Symbolize(session *Session, mmap *Mmap, ip uint64, out *Symbolic) b...
function getSymbolicExtra (line 61) | func getSymbolicExtra(session *Session, filename string) *symbolicExtra {
function newSymbolicExtra (line 123) | func newSymbolicExtra(filename string) (*symbolicExtra, error) {
function newKallsyms (line 164) | func newKallsyms(filename string) (*symbolicExtra, error) {
type symbolicExtra (line 197) | type symbolicExtra struct
method findIP (line 206) | func (s *symbolicExtra) findIP(mmap *Mmap, ip uint64) (f *funcRange, l...
type funcRange (line 236) | type funcRange struct
function dwarfFuncTable (line 242) | func dwarfFuncTable(dwarff *dwarf.Data) []funcRange {
function elfFuncTable (line 301) | func elfFuncTable(filename string, elff *elf.File) (out []funcRange, isR...
type funcRangeSorter (line 345) | type funcRangeSorter
method Len (line 347) | func (s funcRangeSorter) Len() int {
method Swap (line 351) | func (s funcRangeSorter) Swap(i, j int) {
method Less (line 355) | func (s funcRangeSorter) Less(i, j int) bool {
function setFuncHighPCs (line 361) | func setFuncHighPCs(functab []funcRange) {
function dwarfLineTable (line 374) | func dwarfLineTable(dwarff *dwarf.Data) []dwarf.LineEntry {
FILE: scale/interface.go
type Interface (line 9) | type Interface interface
FILE: scale/linear.go
type Linear (line 7) | type Linear struct
method Of (line 17) | func (s Linear) Of(x float64) float64 {
method Ticks (line 21) | func (s Linear) Ticks(n int) (major, minor []float64) {
function NewLinear (line 12) | func NewLinear(input []float64) Linear {
FILE: scale/log.go
type Log (line 9) | type Log struct
method precompute (line 25) | func (s *Log) precompute() {
method Of (line 30) | func (s *Log) Of(x float64) float64 {
method Nice (line 38) | func (s *Log) Nice(n int) {
method Ticks (line 63) | func (s *Log) Ticks(n int) (major, minor []float64) {
function NewLog (line 18) | func NewLog(input []float64, base float64) *Log {
FILE: scale/output.go
type OutputScale (line 7) | type OutputScale struct
method Crop (line 22) | func (s *OutputScale) Crop() {
method Unclamp (line 26) | func (s *OutputScale) Unclamp() {
method Clamp (line 30) | func (s *OutputScale) Clamp() {
method Of (line 34) | func (s OutputScale) Of(x float64) (float64, bool) {
constant clampCrop (line 13) | clampCrop = iota
constant clampNone (line 14) | clampNone
constant clampClamp (line 15) | clampClamp
function NewOutputScale (line 18) | func NewOutputScale(min, max float64) OutputScale {
FILE: scale/power.go
type Power (line 9) | type Power struct
method Of (line 19) | func (s Power) Of(x float64) float64 {
method Ticks (line 23) | func (s Power) Ticks(n int) (major, minor []float64) {
function NewPower (line 15) | func NewPower(input []float64, exp float64) Power {
FILE: scale/util.go
function minmax (line 7) | func minmax(xs []float64) (min float64, max float64) {
FILE: scripts/memload.py
function gather (line 8) | def gather(counters):
function cpu_family_model (line 43) | def cpu_family_model():
function main (line 56) | def main():
FILE: scripts/topdown.py
function gather (line 10) | def gather(counters):
class Formula (line 45) | class Formula:
method __init__ (line 46) | def __init__(self, children):
method eval (line 49) | def eval(self, ctx):
method events (line 52) | def events(self):
method __add__ (line 55) | def __add__(self, o):
method __radd__ (line 58) | def __radd__(self, o):
method __sub__ (line 61) | def __sub__(self, o):
method __rsub__ (line 64) | def __rsub__(self, o):
method __mul__ (line 67) | def __mul__(self, o):
method __rmul__ (line 70) | def __rmul__(self, o):
method __truediv__ (line 73) | def __truediv__(self, o):
method __rtruediv__ (line 76) | def __rtruediv__(self, o):
class FormulaOp (line 79) | class FormulaOp(Formula):
method __init__ (line 80) | def __init__(self, op, *args):
method eval (line 84) | def eval(self, ctx):
method events (line 89) | def events(self):
class E (line 96) | class E(Formula):
method __init__ (line 97) | def __init__(self, event):
method eval (line 101) | def eval(self, ctx):
method events (line 104) | def events(self):
class Node (line 167) | class Node:
method __init__ (line 168) | def __init__(self, label, value, *children):
method events (line 171) | def events(self):
method eval (line 179) | def eval(self, ctx):
method show (line 184) | def show(self, ctx, indent=0):
function cpu_family_model (line 217) | def cpu_family_model():
function main (line 230) | def main():
Condensed preview — 130 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,146K chars).
[
{
"path": ".github/workflows/test.yml",
"chars": 413,
"preview": "on: [push, pull_request]\nname: Test\njobs:\n test:\n strategy:\n matrix:\n go-version: [1.17.x]\n os: ["
},
{
"path": ".gitignore",
"chars": 167,
"preview": "/cmd/bitstringer/bitstringer\n/cmd/branchstats/branchstats\n/cmd/memanim/memanim\n/cmd/memheat/memheat\n/cmd/memlat/memlat\n/"
},
{
"path": "LICENSE",
"chars": 1479,
"preview": "Copyright (c) 2015 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or with"
},
{
"path": "README.md",
"chars": 1488,
"preview": "go-perf is a set of tools for working with Linux perf.data profiles,\nas well as a set of Go packages for parsing and int"
},
{
"path": "cmd/bitstringer/main.go",
"chars": 4626,
"preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/branchstats/main.go",
"chars": 6294,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/memanim/.gitignore",
"chars": 36,
"preview": "/addr.png\n/f*.png\n/out.mp4\n/memanim\n"
},
{
"path": "cmd/memanim/hilbert_test.go",
"chars": 694,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/memanim/main.go",
"chars": 11015,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/memheat/draw.go",
"chars": 1330,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/memheat/main.go",
"chars": 8309,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/memheat/svg.go",
"chars": 5075,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/memlat/database.go",
"chars": 6452,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/memlat/main.go",
"chars": 15375,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/memlat/static/bower.json",
"chars": 912,
"preview": "{\n \"name\": \"memlat\",\n \"version\": \"0.0.0\",\n \"homepage\": \"https://github.com/aclements/go-perf\",\n \"authors\": [\n \"Au"
},
{
"path": "cmd/memlat/static/bower_components/font-roboto/.bower.json",
"chars": 751,
"preview": "{\n \"name\": \"font-roboto\",\n \"version\": \"1.0.1\",\n \"description\": \"An HTML import for Roboto\",\n \"authors\": [\n \"The P"
},
{
"path": "cmd/memlat/static/bower_components/font-roboto/README.md",
"chars": 14,
"preview": "# font-roboto\n"
},
{
"path": "cmd/memlat/static/bower_components/font-roboto/bower.json",
"chars": 464,
"preview": "{\n \"name\": \"font-roboto\",\n \"version\": \"1.0.1\",\n \"description\": \"An HTML import for Roboto\",\n \"authors\": [\n \"The P"
},
{
"path": "cmd/memlat/static/bower_components/font-roboto/roboto.html",
"chars": 738,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/.bower.json",
"chars": 1094,
"preview": "{\n \"name\": \"paper-styles\",\n \"version\": \"1.0.11\",\n \"description\": \"Common (global) styles for Material Design elements"
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/README.md",
"chars": 44,
"preview": "# paper-styles\n\nMaterial design CSS styles.\n"
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/bower.json",
"chars": 803,
"preview": "{\n \"name\": \"paper-styles\",\n \"version\": \"1.0.11\",\n \"description\": \"Common (global) styles for Material Design elements"
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/classes/global.html",
"chars": 1967,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/classes/shadow-layout.html",
"chars": 6057,
"preview": "<!--\r\n@license\r\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\r\nThis code may only be used under t"
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/classes/shadow.html",
"chars": 1656,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/classes/typography.html",
"chars": 3698,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/color.html",
"chars": 10378,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/default-theme.html",
"chars": 980,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/demo/index.html",
"chars": 10010,
"preview": "<!doctype html>\n\n<!--\n @license\n Copyright (c) 2015 The Polymer Project Authors. All rights reserved.\n This code may "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/demo-pages.html",
"chars": 1788,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/demo.css",
"chars": 702,
"preview": "/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the B"
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/paper-styles-classes.html",
"chars": 690,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/paper-styles.html",
"chars": 827,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/shadow.html",
"chars": 2029,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/paper-styles/typography.html",
"chars": 6754,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/polymer/.bower.json",
"chars": 827,
"preview": "{\n \"name\": \"polymer\",\n \"version\": \"1.1.0\",\n \"main\": [\n \"polymer.html\"\n ],\n \"license\": \"http://polymer.github.io/"
},
{
"path": "cmd/memlat/static/bower_components/polymer/LICENSE.txt",
"chars": 1562,
"preview": "// Copyright (c) 2014 The Polymer Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms,"
},
{
"path": "cmd/memlat/static/bower_components/polymer/bower.json",
"chars": 493,
"preview": "{\n \"name\": \"polymer\",\n \"version\": \"1.1.0\",\n \"main\": [\n \"polymer.html\"\n ],\n \"license\": \"http://polymer.github.io/"
},
{
"path": "cmd/memlat/static/bower_components/polymer/build.log",
"chars": 550,
"preview": "BUILD LOG\n---------\nBuild Time: 2015-08-13T16:56:33-0700\n\nNODEJS INFORMATION\n==================\nnodejs: v0.12.7\ndel: 1.2"
},
{
"path": "cmd/memlat/static/bower_components/polymer/polymer-micro.html",
"chars": 14486,
"preview": "<!--\n@license\nCopyright (c) 2014 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/polymer/polymer-mini.html",
"chars": 38686,
"preview": "<!--\n@license\nCopyright (c) 2014 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/polymer/polymer.html",
"chars": 105080,
"preview": "<!--\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the "
},
{
"path": "cmd/memlat/static/bower_components/promise-polyfill/.bower.json",
"chars": 870,
"preview": "{\n \"name\": \"promise-polyfill\",\n \"version\": \"1.0.0\",\n \"homepage\": \"https://github.com/taylorhakes/promise-polyfill\",\n "
},
{
"path": "cmd/memlat/static/bower_components/promise-polyfill/Gruntfile.js",
"chars": 755,
"preview": "module.exports = function(grunt) {\n\n\tgrunt.initConfig({\n\t\tpkg: grunt.file.readJSON('package.json'),\n\n\t\tuglify: {\n\t\t\topti"
},
{
"path": "cmd/memlat/static/bower_components/promise-polyfill/LICENSE",
"chars": 1090,
"preview": "Copyright (c) 2014 Taylor Hakes\nCopyright (c) 2014 Forbes Lindesay\n\nPermission is hereby granted, free of charge, to any"
},
{
"path": "cmd/memlat/static/bower_components/promise-polyfill/Promise-Statics.js",
"chars": 1039,
"preview": "Promise.all = Promise.all || function () {\n var args = Array.prototype.slice.call(arguments.length === 1 && Array.isArr"
},
{
"path": "cmd/memlat/static/bower_components/promise-polyfill/Promise.js",
"chars": 2895,
"preview": "function MakePromise (asap) {\n function Promise(fn) {\n\t\tif (typeof this !== 'object' || typeof fn !== 'function') throw"
},
{
"path": "cmd/memlat/static/bower_components/promise-polyfill/README.md",
"chars": 267,
"preview": "# Promise Polyfill\n\nNote: this is an unsolicited fork of [taylorhakes/promise-polyfill](https://github.com/taylorhakes/p"
},
{
"path": "cmd/memlat/static/bower_components/promise-polyfill/bower.json",
"chars": 581,
"preview": "{\n \"name\": \"promise-polyfill\",\n \"version\": \"1.0.0\",\n \"homepage\": \"https://github.com/taylorhakes/promise-polyfill\",\n "
},
{
"path": "cmd/memlat/static/bower_components/promise-polyfill/package.json",
"chars": 973,
"preview": "{\n \"name\": \"promise-polyfill\",\n \"version\": \"2.0.0\",\n \"description\": \"Lightweight promise polyfill. A+ compliant\",\n \""
},
{
"path": "cmd/memlat/static/bower_components/promise-polyfill/promise-polyfill-lite.html",
"chars": 184,
"preview": "<link rel=\"import\" href=\"../polymer/polymer.html\">\n<script src='./Promise.js'></script>\n<script>\nif (!window.Promise) {\n"
},
{
"path": "cmd/memlat/static/bower_components/promise-polyfill/promise-polyfill.html",
"chars": 101,
"preview": "<link rel=\"import\" href=\"./promise-polyfill-lite.html\">\n<script src='./Promise-Statics.js'></script>\n"
},
{
"path": "cmd/memlat/static/bower_components/webcomponentsjs/.bower.json",
"chars": 631,
"preview": "{\n \"name\": \"webcomponentsjs\",\n \"main\": \"webcomponents.js\",\n \"version\": \"0.7.11\",\n \"homepage\": \"http://webcomponents."
},
{
"path": "cmd/memlat/static/bower_components/webcomponentsjs/CustomElements.js",
"chars": 31912,
"preview": "/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used un"
},
{
"path": "cmd/memlat/static/bower_components/webcomponentsjs/HTMLImports.js",
"chars": 36200,
"preview": "/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used un"
},
{
"path": "cmd/memlat/static/bower_components/webcomponentsjs/MutationObserver.js",
"chars": 12554,
"preview": "/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used un"
},
{
"path": "cmd/memlat/static/bower_components/webcomponentsjs/README.md",
"chars": 5788,
"preview": "webcomponents.js\n================\n\n[ 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used un"
},
{
"path": "cmd/memlat/static/bower_components/webcomponentsjs/bower.json",
"chars": 358,
"preview": "{\n \"name\": \"webcomponentsjs\",\n \"main\": \"webcomponents.js\",\n \"version\": \"0.7.11\",\n \"homepage\": \"http://webcomponents."
},
{
"path": "cmd/memlat/static/bower_components/webcomponentsjs/build.log",
"chars": 1101,
"preview": "BUILD LOG\n---------\nBuild Time: 2015-08-13T12:57:18-0700\n\nNODEJS INFORMATION\n==================\nnodejs: v0.12.7\ngulp: 3."
},
{
"path": "cmd/memlat/static/bower_components/webcomponentsjs/package.json",
"chars": 763,
"preview": "{\n \"name\": \"webcomponents.js\",\n \"version\": \"0.7.11\",\n \"description\": \"webcomponents.js\",\n \"main\": \"webcomponents.js\""
},
{
"path": "cmd/memlat/static/bower_components/webcomponentsjs/webcomponents-lite.js",
"chars": 75439,
"preview": "/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used un"
},
{
"path": "cmd/memlat/static/bower_components/webcomponentsjs/webcomponents.js",
"chars": 256228,
"preview": "/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used un"
},
{
"path": "cmd/memlat/static/index.html",
"chars": 998,
"preview": "<!DOCTYPE html>\n<!-- Copyright 2015 The Go Authors. All rights reserved.\n -- Use of this source code is governed by a B"
},
{
"path": "cmd/memlat/static/memlat-browser.html",
"chars": 21735,
"preview": "<!-- Copyright 2015 The Go Authors. All rights reserved.\n -- Use of this source code is governed by a BSD-style\n -- li"
},
{
"path": "cmd/perfdump/main.go",
"chars": 3163,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "cmd/prologuer/main.go",
"chars": 4662,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "fmt_test.go",
"chars": 3195,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"testing\"\n)\n\n// TestGofmt tes"
},
{
"path": "go.mod",
"chars": 336,
"preview": "module github.com/aclements/go-perf\n\ngo 1.18\n\nrequire (\n\tgithub.com/aclements/go-moremath v0.0.0-20210112150236-f10218a3"
},
{
"path": "go.sum",
"chars": 1109,
"preview": "github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 h1:xlwdaKcTNVW4PtpQb8aKA4Pjy0CdJHEqvFbAnvR5m2g=\ngith"
},
{
"path": "internal/cparse/enums.go",
"chars": 1065,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/cparse/enums_test.go",
"chars": 702,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/cparse/lex.go",
"chars": 8078,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/cparse/lex_test.go",
"chars": 760,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/cparse/pp.go",
"chars": 1414,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/cparse/pp_test.go",
"chars": 970,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/cparse/vals.go",
"chars": 2723,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/gendefs/edit.go",
"chars": 909,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "internal/gendefs/main.go",
"chars": 10351,
"preview": "// Copyright 2018 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perffile/auxflags_string.go",
"chars": 485,
"preview": "// Code generated by \"bitstringer -type=AuxFlags\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i AuxFlags) St"
},
{
"path": "perffile/auxpmuformat_string.go",
"chars": 762,
"preview": "// Code generated by \"stringer -type=AuxPMUFormat\"; DO NOT EDIT.\n\npackage perffile\n\nimport \"strconv\"\n\nfunc _() {\n\t// An "
},
{
"path": "perffile/bpfeventtype_string.go",
"chars": 406,
"preview": "// Code generated by \"bitstringer -type=BPFEventType\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i BPFEvent"
},
{
"path": "perffile/branchflags_string.go",
"chars": 513,
"preview": "// Code generated by \"bitstringer -type=BranchFlags\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i BranchFla"
},
{
"path": "perffile/branchsampletype_string.go",
"chars": 1231,
"preview": "// Code generated by \"bitstringer -type=BranchSampleType\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i Bran"
},
{
"path": "perffile/breakpointop_string.go",
"chars": 370,
"preview": "// Code generated by \"bitstringer -type=BreakpointOp\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i Breakpoi"
},
{
"path": "perffile/buf.go",
"chars": 2428,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perffile/bufdecoder.go",
"chars": 2076,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perffile/cpumode_string.go",
"chars": 812,
"preview": "// Code generated by \"stringer -type=CPUMode\"; DO NOT EDIT.\n\npackage perffile\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"inva"
},
{
"path": "perffile/cpuset.go",
"chars": 1346,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perffile/datasrcblock_string.go",
"chars": 381,
"preview": "// Code generated by \"bitstringer -type=DataSrcBlock\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i DataSrcB"
},
{
"path": "perffile/datasrchops_string.go",
"chars": 984,
"preview": "// Code generated by \"stringer -type=DataSrcHops\"; DO NOT EDIT.\n\npackage perffile\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \""
},
{
"path": "perffile/datasrclevel_string.go",
"chars": 870,
"preview": "// Code generated by \"bitstringer -type=DataSrcLevel\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i DataSrcL"
},
{
"path": "perffile/datasrclevelnum_string.go",
"chars": 1306,
"preview": "// Code generated by \"stringer -type=DataSrcLevelNum\"; DO NOT EDIT.\n\npackage perffile\n\nimport \"strconv\"\n\nfunc _() {\n\t// "
},
{
"path": "perffile/datasrclock_string.go",
"chars": 736,
"preview": "// Code generated by \"stringer -type=DataSrcLock\"; DO NOT EDIT.\n\npackage perffile\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \""
},
{
"path": "perffile/datasrcop_string.go",
"chars": 470,
"preview": "// Code generated by \"bitstringer -type=DataSrcOp\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i DataSrcOp) "
},
{
"path": "perffile/datasrcsnoop_string.go",
"chars": 522,
"preview": "// Code generated by \"bitstringer -type=DataSrcSnoop\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i DataSrcS"
},
{
"path": "perffile/datasrctlb_string.go",
"chars": 588,
"preview": "// Code generated by \"bitstringer -type=DataSrcTLB\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i DataSrcTLB"
},
{
"path": "perffile/doc_test.go",
"chars": 509,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perffile/eventflags_string.go",
"chars": 2292,
"preview": "// Code generated by \"bitstringer -type=EventFlags\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i EventFlags"
},
{
"path": "perffile/eventhardwareid_string.go",
"chars": 4585,
"preview": "// Code generated by \"stringer -type=EventHardwareID,EventSoftware,HWCache,HWCacheOp,HWCacheResult\"; DO NOT EDIT.\n\npacka"
},
{
"path": "perffile/eventprecision_string.go",
"chars": 884,
"preview": "// Code generated by \"stringer -type=EventPrecision\"; DO NOT EDIT.\n\npackage perffile\n\nimport \"strconv\"\n\nfunc _() {\n\t// A"
},
{
"path": "perffile/events.go",
"chars": 6662,
"preview": "package perffile\n\n/*gendefs:C\n#include <include/uapi/linux/perf_event.h>\n*/\n\n//go:generate -command bitstringer ../cmd/b"
},
{
"path": "perffile/eventtype_string.go",
"chars": 855,
"preview": "// Code generated by \"stringer -type=EventType\"; DO NOT EDIT.\n\npackage perffile\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"in"
},
{
"path": "perffile/format.go",
"chars": 42311,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perffile/gendefs.sh",
"chars": 431,
"preview": "#!/bin/sh\n\nset -e\n\nif [ \"$1\" = -u ]; then\n update=1\n shift\nfi\n\nif [ \"$#\" != 1 ]; then\n echo \"Usage: $0 [-u] <Li"
},
{
"path": "perffile/ksymbolflags_string.go",
"chars": 293,
"preview": "// Code generated by \"bitstringer -type=KsymbolFlags\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i KsymbolF"
},
{
"path": "perffile/ksymboltype_string.go",
"chars": 378,
"preview": "// Code generated by \"bitstringer -type=KsymbolType\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i KsymbolTy"
},
{
"path": "perffile/meta.go",
"chars": 7791,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perffile/package.go",
"chars": 576,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perffile/reader.go",
"chars": 11924,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perffile/readformat_string.go",
"chars": 511,
"preview": "// Code generated by \"bitstringer -type=ReadFormat\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i ReadFormat"
},
{
"path": "perffile/records.go",
"chars": 19833,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perffile/recordsorder_string.go",
"chars": 748,
"preview": "// Code generated by \"stringer -type=RecordsOrder\"; DO NOT EDIT.\n\npackage perffile\n\nimport \"strconv\"\n\nfunc _() {\n\t// An "
},
{
"path": "perffile/recordtype_string.go",
"chars": 2818,
"preview": "// Code generated by \"stringer -type=RecordType\"; DO NOT EDIT.\n\npackage perffile\n\nimport \"strconv\"\n\nfunc _() {\n\t// An \"i"
},
{
"path": "perffile/sampleformat_string.go",
"chars": 1633,
"preview": "// Code generated by \"bitstringer -type=SampleFormat\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i SampleFo"
},
{
"path": "perffile/sampleregsabi_string.go",
"chars": 743,
"preview": "// Code generated by \"stringer -type=SampleRegsABI\"; DO NOT EDIT.\n\npackage perffile\n\nimport \"strconv\"\n\nfunc _() {\n\t// An"
},
{
"path": "perffile/transaction_string.go",
"chars": 726,
"preview": "// Code generated by \"bitstringer -type=Transaction\"; DO NOT EDIT\n\npackage perffile\n\nimport \"strconv\"\n\nfunc (i Transacti"
},
{
"path": "perfsession/package.go",
"chars": 417,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perfsession/ranges.go",
"chars": 1153,
"preview": "// Copyright 2019 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perfsession/session.go",
"chars": 3766,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "perfsession/symbolize.go",
"chars": 9178,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "scale/interface.go",
"chars": 363,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "scale/linear.go",
"chars": 656,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "scale/log.go",
"chars": 2341,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "scale/output.go",
"chars": 812,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "scale/power.go",
"chars": 528,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "scale/util.go",
"chars": 352,
"preview": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "scripts/membw",
"chars": 1203,
"preview": "#!/bin/zsh\n\n# Measure read/write memory bandwidth at memory controllers.\n#\n# Based on \"Intel® Xeon® Processor E5 v2 and "
},
{
"path": "scripts/memload.py",
"chars": 2379,
"preview": "#!/usr/bin/python3\n\nimport os\nimport sys\nimport subprocess\nimport operator\n\ndef gather(counters):\n counters = list(fr"
},
{
"path": "scripts/topdown.py",
"chars": 9394,
"preview": "#!/usr/bin/python3\n\nimport os\nimport sys\nimport subprocess\nimport operator\n\n# TODO: Improve the quality of computed metr"
}
]
About this extraction
This page contains the full source code of the aclements/go-perf GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 130 files (1.0 MB), approximately 283.6k tokens, and a symbol index with 1785 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.