├── cmd ├── memanim │ ├── .gitignore │ └── hilbert_test.go ├── memlat │ └── static │ │ ├── bower_components │ │ ├── font-roboto │ │ │ ├── README.md │ │ │ ├── bower.json │ │ │ ├── roboto.html │ │ │ └── .bower.json │ │ ├── iron-ajax │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ ├── bower.json │ │ │ └── .bower.json │ │ ├── iron-icon │ │ │ ├── .gitignore │ │ │ ├── demo │ │ │ │ └── location.png │ │ │ ├── hero.svg │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ ├── bower.json │ │ │ └── .bower.json │ │ ├── iron-meta │ │ │ ├── .gitignore │ │ │ ├── bower.json │ │ │ ├── test │ │ │ │ ├── index.html │ │ │ │ └── basic.html │ │ │ ├── index.html │ │ │ ├── .bower.json │ │ │ ├── README.md │ │ │ └── demo │ │ │ │ └── index.html │ │ ├── iron-pages │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ ├── hero.svg │ │ │ ├── bower.json │ │ │ └── .bower.json │ │ ├── paper-card │ │ │ ├── .gitignore │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ ├── README.md │ │ │ └── bower.json │ │ ├── paper-tabs │ │ │ ├── .gitignore │ │ │ ├── paper-tabs-icons.html │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ ├── hero.svg │ │ │ ├── README.md │ │ │ └── bower.json │ │ ├── iron-behaviors │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── test │ │ │ │ ├── index.html │ │ │ │ └── test-elements.html │ │ │ ├── index.html │ │ │ ├── bower.json │ │ │ ├── .bower.json │ │ │ └── demo │ │ │ │ └── index.html │ │ ├── iron-iconset-svg │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ ├── bower.json │ │ │ └── .bower.json │ │ ├── paper-behaviors │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── test │ │ │ │ ├── index.html │ │ │ │ ├── test-button.html │ │ │ │ └── test-radio-button.html │ │ │ ├── index.html │ │ │ ├── bower.json │ │ │ └── paper-inky-focus-behavior.html │ │ ├── paper-button │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── bower.json │ │ │ └── README.md │ │ ├── paper-material │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ ├── bower.json │ │ │ └── .bower.json │ │ ├── paper-ripple │ │ │ ├── .gitignore │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── bower.json │ │ │ ├── index.html │ │ │ ├── hero.svg │ │ │ └── .bower.json │ │ ├── paper-toolbar │ │ │ ├── .gitignore │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── bower.json │ │ │ ├── index.html │ │ │ └── .bower.json │ │ ├── iron-flex-layout │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── bower.json │ │ │ ├── .bower.json │ │ │ └── demo │ │ │ │ └── index.html │ │ ├── iron-menu-behavior │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── test │ │ │ │ ├── test-menu.html │ │ │ │ ├── test-menubar.html │ │ │ │ └── index.html │ │ │ ├── bower.json │ │ │ ├── index.html │ │ │ ├── demo │ │ │ │ ├── simple-menu.html │ │ │ │ └── simple-menubar.html │ │ │ └── .bower.json │ │ ├── paper-header-panel │ │ │ ├── .gitignore │ │ │ ├── bower.json │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── index.html │ │ │ └── .bower.json │ │ ├── paper-icon-button │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── bower.json │ │ │ └── README.md │ │ ├── iron-a11y-keys-behavior │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── demo │ │ │ │ └── index.html │ │ │ ├── bower.json │ │ │ ├── test │ │ │ │ └── index.html │ │ │ └── .bower.json │ │ ├── iron-resizable-behavior │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── bower.json │ │ │ ├── test │ │ │ │ └── index.html │ │ │ ├── demo │ │ │ │ └── index.html │ │ │ └── .bower.json │ │ ├── iron-selector │ │ │ ├── .gitignore │ │ │ ├── bower.json │ │ │ ├── index.html │ │ │ ├── test │ │ │ │ ├── index.html │ │ │ │ └── content-element.html │ │ │ ├── .bower.json │ │ │ └── README.md │ │ ├── paper-styles │ │ │ ├── README.md │ │ │ ├── paper-styles-classes.html │ │ │ ├── demo.css │ │ │ ├── paper-styles.html │ │ │ ├── bower.json │ │ │ ├── default-theme.html │ │ │ └── .bower.json │ │ ├── iron-icons │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── index.html │ │ │ ├── bower.json │ │ │ ├── .bower.json │ │ │ └── hero.svg │ │ ├── promise-polyfill │ │ │ ├── promise-polyfill.html │ │ │ ├── promise-polyfill-lite.html │ │ │ ├── README.md │ │ │ ├── bower.json │ │ │ ├── Gruntfile.js │ │ │ ├── .bower.json │ │ │ ├── package.json │ │ │ ├── LICENSE │ │ │ ├── Promise-Statics.js │ │ │ └── Promise.min.js │ │ ├── webcomponentsjs │ │ │ ├── bower.json │ │ │ ├── .bower.json │ │ │ ├── package.json │ │ │ └── build.log │ │ └── polymer │ │ │ ├── bower.json │ │ │ ├── build.log │ │ │ ├── .bower.json │ │ │ └── LICENSE.txt │ │ ├── bower.json │ │ └── index.html └── memheat │ └── draw.go ├── .gitignore ├── go.mod ├── perffile ├── ksymbolflags_string.go ├── breakpointop_string.go ├── datasrcblock_string.go ├── ksymboltype_string.go ├── bpfeventtype_string.go ├── gendefs.sh ├── datasrcop_string.go ├── auxflags_string.go ├── package.go ├── doc_test.go ├── readformat_string.go ├── branchflags_string.go ├── datasrcsnoop_string.go ├── datasrctlb_string.go ├── datasrclock_string.go ├── sampleregsabi_string.go ├── recordsorder_string.go ├── auxpmuformat_string.go ├── transaction_string.go ├── cpumode_string.go ├── eventtype_string.go ├── eventprecision_string.go ├── datasrclevel_string.go ├── datasrchops_string.go ├── datasrclevelnum_string.go ├── branchsampletype_string.go └── cpuset.go ├── scale ├── interface.go ├── util.go ├── power.go ├── linear.go └── output.go ├── perfsession ├── package.go └── ranges.go ├── .github └── workflows │ └── test.yml ├── internal ├── cparse │ ├── enums_test.go │ ├── lex_test.go │ ├── pp_test.go │ ├── enums.go │ └── pp.go └── gendefs │ └── edit.go ├── go.sum ├── scripts └── membw ├── LICENSE └── README.md /cmd/memanim/.gitignore: -------------------------------------------------------------------------------- 1 | /addr.png 2 | /f*.png 3 | /out.mp4 4 | /memanim 5 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/font-roboto/README.md: -------------------------------------------------------------------------------- 1 | # font-roboto 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-ajax/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icon/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-meta/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-pages/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-card/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components/ 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-tabs/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components/ 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-behaviors/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-iconset-svg/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-behaviors/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-button/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-material/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-ripple/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-toolbar/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components/ 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-flex-layout/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | 3 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-menu-behavior/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-header-panel/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components/ 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-icon-button/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-a11y-keys-behavior/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-resizable-behavior/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-selector/.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-styles/README.md: -------------------------------------------------------------------------------- 1 | # paper-styles 2 | 3 | Material design CSS styles. 4 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icons/.gitignore: -------------------------------------------------------------------------------- 1 | util/node_modules 2 | material-design-icons 3 | bower_components 4 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-flex-layout/README.md: -------------------------------------------------------------------------------- 1 | iron-flex-layout 2 | ================ 3 | 4 | Layout styles for the iron elements. 5 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-menu-behavior/README.md: -------------------------------------------------------------------------------- 1 | # iron-menu-behavior 2 | 3 | `Polymer.IronMenuBehavior` implements accessible menu behavior. 4 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-behaviors/README.md: -------------------------------------------------------------------------------- 1 | paper-behaviors 2 | =============== 3 | 4 | These are common behaviors used across `paper-*` elements. 5 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icon/demo/location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aclements/go-perf/HEAD/cmd/memlat/static/bower_components/iron-icon/demo/location.png -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/promise-polyfill/promise-polyfill.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-behaviors/README.md: -------------------------------------------------------------------------------- 1 | iron-behaviors 2 | ============== 3 | 4 | This repository collects shared behaviors that are mixed in to other elements. 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /cmd/bitstringer/bitstringer 2 | /cmd/branchstats/branchstats 3 | /cmd/memanim/memanim 4 | /cmd/memheat/memheat 5 | /cmd/memlat/memlat 6 | /cmd/perfdump/perfdump 7 | /cmd/prologuer/prologuer 8 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-iconset-svg/README.md: -------------------------------------------------------------------------------- 1 | iron-iconset-svg 2 | ========= 3 | 4 | See the [component page](http://polymer-project.org/docs/elements/iron-elements.html#iron-iconset-svg) for more information. 5 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icons/README.md: -------------------------------------------------------------------------------- 1 | iron-icons 2 | ========= 3 | 4 | ## Building 5 | Running `update-icons.sh` will checkout [material-design-icons](https://github.com/google/material-design-icons), reduce 6 | the fileset to 24px svgs, and compile the iconsets. 7 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/promise-polyfill/promise-polyfill-lite.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/promise-polyfill/README.md: -------------------------------------------------------------------------------- 1 | # Promise Polyfill 2 | 3 | Note: this is an unsolicited fork of [taylorhakes/promise-polyfill](https://github.com/taylorhakes/promise-polyfill) 4 | and should be considered experimental and unstable compared to upstream. 5 | 6 | ## Testing 7 | ``` 8 | npm install 9 | npm test 10 | ``` 11 | 12 | ## License 13 | MIT 14 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/aclements/go-perf 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 7 | github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 8 | github.com/ianlancetaylor/demangle v0.0.0-20220517205856-0058ec4f073c 9 | ) 10 | 11 | require golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9 // indirect 12 | -------------------------------------------------------------------------------- /perffile/ksymbolflags_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=KsymbolFlags"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i KsymbolFlags) String() string { 8 | if i == 0 { 9 | return "Unregister" 10 | } 11 | s := "" 12 | i &^= 0 13 | if i == 0 { 14 | return s[:len(s)-1] 15 | } 16 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 17 | } 18 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-material/README.md: -------------------------------------------------------------------------------- 1 | # paper-material 2 | A Material Design container that looks like a lifted piece of paper. 3 | 4 | `paper-material` is a container that renders two shadows on top of each other to 5 | create the effect of a lifted piece of paper. 6 | 7 | Example: 8 | 9 | ```html 10 | 11 | ... content ... 12 | 13 | ``` 14 | -------------------------------------------------------------------------------- /scale/interface.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package scale 6 | 7 | // A scale satisfies Interface if it maps from some input range to an 8 | // output interval [0, 1]. 9 | type Interface interface { 10 | Of(x float64) float64 11 | Ticks(n int) (major, minor []float64) 12 | } 13 | -------------------------------------------------------------------------------- /scale/util.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package scale 6 | 7 | func minmax(xs []float64) (min float64, max float64) { 8 | min, max = xs[0], xs[0] 9 | for _, x := range xs { 10 | if x < min { 11 | min = x 12 | } 13 | if x > max { 14 | max = x 15 | } 16 | } 17 | return 18 | } 19 | -------------------------------------------------------------------------------- /perfsession/package.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package perfsession provides utilities for tracking session state 6 | // while processing a perf.data profile. 7 | // 8 | // The API of perfsession should be considered unstable at this point. 9 | package perfsession // import "github.com/aclements/go-perf/perfsession" 10 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/webcomponentsjs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webcomponentsjs", 3 | "main": "webcomponents.js", 4 | "version": "0.7.11", 5 | "homepage": "http://webcomponents.org", 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/webcomponents/webcomponentsjs.git" 12 | }, 13 | "keywords": [ 14 | "webcomponents" 15 | ], 16 | "license": "BSD", 17 | "ignore": [] 18 | } 19 | -------------------------------------------------------------------------------- /perffile/breakpointop_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=BreakpointOp"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i BreakpointOp) String() string { 8 | if i == 0 { 9 | return "0" 10 | } 11 | s := "" 12 | if i&BreakpointOpR != 0 { 13 | s += "R|" 14 | } 15 | if i&BreakpointOpRW != 0 { 16 | s += "RW|" 17 | } 18 | i &^= 3 19 | if i == 0 { 20 | return s[:len(s)-1] 21 | } 22 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 23 | } 24 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | on: [push, pull_request] 2 | name: Test 3 | jobs: 4 | test: 5 | strategy: 6 | matrix: 7 | go-version: [1.17.x] 8 | os: [ubuntu-latest, macos-latest, windows-latest] 9 | runs-on: ${{ matrix.os }} 10 | steps: 11 | - uses: actions/setup-go@v3 12 | with: 13 | go-version: ${{ matrix.go-version }} 14 | - uses: actions/checkout@v3 15 | - run: go install golang.org/x/tools/cmd/stringer@latest 16 | - run: go test ./... 17 | -------------------------------------------------------------------------------- /perffile/datasrcblock_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=DataSrcBlock"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i DataSrcBlock) String() string { 8 | if i == 0 { 9 | return "NA" 10 | } 11 | s := "" 12 | if i&DataSrcBlockAddr != 0 { 13 | s += "Addr|" 14 | } 15 | if i&DataSrcBlockData != 0 { 16 | s += "Data|" 17 | } 18 | i &^= 3 19 | if i == 0 { 20 | return s[:len(s)-1] 21 | } 22 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 23 | } 24 | -------------------------------------------------------------------------------- /perffile/ksymboltype_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=KsymbolType"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i KsymbolType) String() string { 8 | if i == 0 { 9 | return "Unknown" 10 | } 11 | s := "" 12 | if i&KsymbolTypeBpf != 0 { 13 | s += "Bpf|" 14 | } 15 | if i&KsymbolTypeOol != 0 { 16 | s += "Ool|" 17 | } 18 | i &^= 3 19 | if i == 0 { 20 | return s[:len(s)-1] 21 | } 22 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 23 | } 24 | -------------------------------------------------------------------------------- /perffile/bpfeventtype_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=BPFEventType"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i BPFEventType) String() string { 8 | if i == 0 { 9 | return "Unknown" 10 | } 11 | s := "" 12 | if i&BPFEventTypeProgLoad != 0 { 13 | s += "ProgLoad|" 14 | } 15 | if i&BPFEventTypeProgUnload != 0 { 16 | s += "ProgUnload|" 17 | } 18 | i &^= 3 19 | if i == 0 { 20 | return s[:len(s)-1] 21 | } 22 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 23 | } 24 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-pages/README.md: -------------------------------------------------------------------------------- 1 | iron-pages 2 | ========== 3 | 4 | `iron-pages` is used to select one of its children to show. One use is to cycle through a list of 5 | children "pages". 6 | 7 | Example: 8 | 9 | ```html 10 | 11 |
One
12 |
Two
13 |
Three
14 |
15 | 16 | 22 | ``` 23 | -------------------------------------------------------------------------------- /perffile/gendefs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [ "$1" = -u ]; then 6 | update=1 7 | shift 8 | fi 9 | 10 | if [ "$#" != 1 ]; then 11 | echo "Usage: $0 [-u] " 2>&1 12 | exit 2 13 | fi 14 | linux="$1" 15 | 16 | go build ../internal/gendefs 17 | 18 | process() { 19 | ./gendefs -ccflags "-I $linux" $1 > .$1.tmp 20 | if [ -z "$update" ]; then 21 | diff -u $1 .$1.tmp || true 22 | rm .$1.tmp 23 | else 24 | mv .$1.tmp $1 25 | fi 26 | } 27 | 28 | process events.go 29 | process format.go 30 | rm gendefs 31 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/font-roboto/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "font-roboto", 3 | "version": "1.0.1", 4 | "description": "An HTML import for Roboto", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "keywords": [ 9 | "font", 10 | "roboto" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "git://github.com/PolymerElements/font-roboto.git" 15 | }, 16 | "main": "roboto.html", 17 | "license": "http://polymer.github.io/LICENSE.txt", 18 | "homepage": "https://github.com/PolymerElements/font-roboto/", 19 | "ignore": [ 20 | "/.*" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /perffile/datasrcop_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=DataSrcOp"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i DataSrcOp) String() string { 8 | if i == 0 { 9 | return "NA" 10 | } 11 | s := "" 12 | if i&DataSrcOpExec != 0 { 13 | s += "Exec|" 14 | } 15 | if i&DataSrcOpLoad != 0 { 16 | s += "Load|" 17 | } 18 | if i&DataSrcOpPrefetch != 0 { 19 | s += "Prefetch|" 20 | } 21 | if i&DataSrcOpStore != 0 { 22 | s += "Store|" 23 | } 24 | i &^= 15 25 | if i == 0 { 26 | return s[:len(s)-1] 27 | } 28 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 29 | } 30 | -------------------------------------------------------------------------------- /perffile/auxflags_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=AuxFlags"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i AuxFlags) String() string { 8 | if i == 0 { 9 | return "0" 10 | } 11 | s := "" 12 | if i&AuxFlagCollision != 0 { 13 | s += "Collision|" 14 | } 15 | if i&AuxFlagOverwrite != 0 { 16 | s += "Overwrite|" 17 | } 18 | if i&AuxFlagPartial != 0 { 19 | s += "Partial|" 20 | } 21 | if i&AuxFlagTruncated != 0 { 22 | s += "Truncated|" 23 | } 24 | i &^= 15 25 | if i == 0 { 26 | return s[:len(s)-1] 27 | } 28 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 29 | } 30 | -------------------------------------------------------------------------------- /perffile/package.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package perffile is a parser for Linux perf.data profiles. 6 | // 7 | // Parsing a perf.data profile starts with a call to New or Open to 8 | // open a perf.data file. A perf.data file consists of a sequence of 9 | // records, which can be retrieved with File.Records, as well as 10 | // several metadata fields, which can be retrieved with other methods 11 | // of File. 12 | package perffile // import "github.com/aclements/go-perf/perffile" 13 | -------------------------------------------------------------------------------- /scale/power.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package scale 6 | 7 | import "math" 8 | 9 | type Power struct { 10 | lin Linear 11 | exp float64 12 | } 13 | 14 | // NewPower returns a new power scale. 15 | func NewPower(input []float64, exp float64) Power { 16 | return Power{NewLinear(input), exp} 17 | } 18 | 19 | func (s Power) Of(x float64) float64 { 20 | return math.Pow(s.lin.Of(x), s.exp) 21 | } 22 | 23 | func (s Power) Ticks(n int) (major, minor []float64) { 24 | return s.lin.Ticks(n) 25 | } 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/polymer/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "polymer", 3 | "version": "1.1.0", 4 | "main": [ 5 | "polymer.html" 6 | ], 7 | "license": "http://polymer.github.io/LICENSE.txt", 8 | "ignore": [ 9 | "/.*", 10 | "/test/" 11 | ], 12 | "authors": [ 13 | "The Polymer Authors (http://polymer.github.io/AUTHORS.txt)" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/Polymer/polymer.git" 18 | }, 19 | "dependencies": { 20 | "webcomponentsjs": "^0.7.2" 21 | }, 22 | "devDependencies": { 23 | "web-component-tester": "*" 24 | }, 25 | "private": true 26 | } 27 | -------------------------------------------------------------------------------- /perffile/doc_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package perffile 6 | 7 | import ( 8 | "fmt" 9 | "log" 10 | ) 11 | 12 | func Example() { 13 | f, err := Open("perf.data") 14 | if err != nil { 15 | log.Fatal(err) 16 | } 17 | defer f.Close() 18 | 19 | rs := f.Records(RecordsTimeOrder) 20 | for rs.Next() { 21 | switch r := rs.Record.(type) { 22 | case *RecordSample: 23 | fmt.Printf("sample: %+v\n", r) 24 | } 25 | } 26 | if err := rs.Err(); err != nil { 27 | log.Fatal(err) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /perffile/readformat_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=ReadFormat"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i ReadFormat) String() string { 8 | if i == 0 { 9 | return "0" 10 | } 11 | s := "" 12 | if i&ReadFormatGroup != 0 { 13 | s += "Group|" 14 | } 15 | if i&ReadFormatID != 0 { 16 | s += "ID|" 17 | } 18 | if i&ReadFormatTotalTimeEnabled != 0 { 19 | s += "TotalTimeEnabled|" 20 | } 21 | if i&ReadFormatTotalTimeRunning != 0 { 22 | s += "TotalTimeRunning|" 23 | } 24 | i &^= 15 25 | if i == 0 { 26 | return s[:len(s)-1] 27 | } 28 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 29 | } 30 | -------------------------------------------------------------------------------- /perffile/branchflags_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=BranchFlags"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i BranchFlags) String() string { 8 | if i == 0 { 9 | return "0" 10 | } 11 | s := "" 12 | if i&BranchFlagAbort != 0 { 13 | s += "Abort|" 14 | } 15 | if i&BranchFlagInTransaction != 0 { 16 | s += "InTransaction|" 17 | } 18 | if i&BranchFlagMispredicted != 0 { 19 | s += "Mispredicted|" 20 | } 21 | if i&BranchFlagPredicted != 0 { 22 | s += "Predicted|" 23 | } 24 | i &^= 15 25 | if i == 0 { 26 | return s[:len(s)-1] 27 | } 28 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 29 | } 30 | -------------------------------------------------------------------------------- /perffile/datasrcsnoop_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=DataSrcSnoop"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i DataSrcSnoop) String() string { 8 | if i == 0 { 9 | return "NA" 10 | } 11 | s := "" 12 | if i&DataSrcSnoopFwd != 0 { 13 | s += "Fwd|" 14 | } 15 | if i&DataSrcSnoopHit != 0 { 16 | s += "Hit|" 17 | } 18 | if i&DataSrcSnoopHitM != 0 { 19 | s += "HitM|" 20 | } 21 | if i&DataSrcSnoopMiss != 0 { 22 | s += "Miss|" 23 | } 24 | if i&DataSrcSnoopNone != 0 { 25 | s += "None|" 26 | } 27 | i &^= 31 28 | if i == 0 { 29 | return s[:len(s)-1] 30 | } 31 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 32 | } 33 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/polymer/build.log: -------------------------------------------------------------------------------- 1 | BUILD LOG 2 | --------- 3 | Build Time: 2015-08-13T16:56:33-0700 4 | 5 | NODEJS INFORMATION 6 | ================== 7 | nodejs: v0.12.7 8 | del: 1.2.0 9 | gulp: 3.9.0 10 | gulp-audit: 1.0.0 11 | gulp-rename: 1.2.2 12 | gulp-replace: 0.5.3 13 | gulp-vulcanize: 6.0.1 14 | lazypipe: 0.2.4 15 | polyclean: 1.2.0 16 | run-sequence: 1.1.1 17 | 18 | REPO REVISIONS 19 | ============== 20 | polymer: a42ca09c3b99749b1407d5fa68cd957c2eaf5ca6 21 | 22 | BUILD HASHES 23 | ============ 24 | polymer-mini.html: b40016f458e85bb815c898378b7bcd5c8abe5661 25 | polymer-micro.html: ef8ebb2dc40697c845c2b8ec64ee69838d0d7bfc 26 | polymer.html: 2f874995a3a3ada9e87da48a01d10c6d3ee297bb -------------------------------------------------------------------------------- /perffile/datasrctlb_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=DataSrcTLB"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i DataSrcTLB) String() string { 8 | if i == 0 { 9 | return "NA" 10 | } 11 | s := "" 12 | if i&DataSrcTLBHardwareWalker != 0 { 13 | s += "HardwareWalker|" 14 | } 15 | if i&DataSrcTLBHit != 0 { 16 | s += "Hit|" 17 | } 18 | if i&DataSrcTLBL1 != 0 { 19 | s += "L1|" 20 | } 21 | if i&DataSrcTLBL2 != 0 { 22 | s += "L2|" 23 | } 24 | if i&DataSrcTLBMiss != 0 { 25 | s += "Miss|" 26 | } 27 | if i&DataSrcTLBOSFaultHandler != 0 { 28 | s += "OSFaultHandler|" 29 | } 30 | i &^= 63 31 | if i == 0 { 32 | return s[:len(s)-1] 33 | } 34 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 35 | } 36 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/promise-polyfill/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "promise-polyfill", 3 | "version": "1.0.0", 4 | "homepage": "https://github.com/taylorhakes/promise-polyfill", 5 | "authors": [ 6 | "Taylor Hakes" 7 | ], 8 | "description": "Lightweight promise polyfill for the browser and node. A+ Compliant.", 9 | "main": "Promise.js", 10 | "moduleType": [ 11 | "globals", 12 | "node" 13 | ], 14 | "keywords": [ 15 | "promise", 16 | "es6", 17 | "polyfill", 18 | "html5" 19 | ], 20 | "license": "MIT", 21 | "ignore": [ 22 | "**/.*", 23 | "node_modules", 24 | "bower_components", 25 | "test", 26 | "tests" 27 | ], 28 | "dependencies": { 29 | "polymer": "polymer/polymer#^1.0.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-flex-layout/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-flex-layout", 3 | "version": "1.0.3", 4 | "description": "Provide flexbox-based layouts", 5 | "keywords": [ 6 | "web-components", 7 | "polymer", 8 | "layout" 9 | ], 10 | "private": true, 11 | "license": "http://polymer.github.io/LICENSE.txt", 12 | "authors": [ 13 | "The Polymer Authors" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-flex-layout.git" 18 | }, 19 | "dependencies": { 20 | "polymer": "Polymer/polymer#^1.0.0" 21 | }, 22 | "devDependencies": { 23 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 24 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-a11y-keys-behavior/README.md: -------------------------------------------------------------------------------- 1 | iron-a11y-keys-behavior 2 | ======================= 3 | 4 | `Polymer.IronA11yKeysBehavior` provides a normalized interface for processing 5 | keyboard commands that pertain to [WAI-ARIA best practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding). 6 | The element takes care of browser differences with respect to Keyboard events 7 | and uses an expressive syntax to filter key presses. 8 | 9 | Use the `keyBindings` prototype property to express what combination of keys 10 | will trigger the event to fire. 11 | 12 | Use the `key-event-target` attribute to set up event handlers on a specific 13 | node. 14 | The `keys-pressed` event will fire when one of the key combinations set with the 15 | `keys` property is pressed. 16 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/webcomponentsjs/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webcomponentsjs", 3 | "main": "webcomponents.js", 4 | "version": "0.7.11", 5 | "homepage": "http://webcomponents.org", 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/webcomponents/webcomponentsjs.git" 12 | }, 13 | "keywords": [ 14 | "webcomponents" 15 | ], 16 | "license": "BSD", 17 | "ignore": [], 18 | "_release": "0.7.11", 19 | "_resolution": { 20 | "type": "version", 21 | "tag": "v0.7.11", 22 | "commit": "ce6321507de6161ec52b43f82a6c36eda614d750" 23 | }, 24 | "_source": "git://github.com/Polymer/webcomponentsjs.git", 25 | "_target": "^0.7.2", 26 | "_originalSource": "webcomponentsjs" 27 | } -------------------------------------------------------------------------------- /scale/linear.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package scale 6 | 7 | type Linear struct { 8 | min, width float64 9 | } 10 | 11 | // NewLinear returns a new linear scale. 12 | func NewLinear(input []float64) Linear { 13 | min, max := minmax(input) 14 | return Linear{min, max - min} 15 | } 16 | 17 | func (s Linear) Of(x float64) float64 { 18 | return (x - s.min) / s.width 19 | } 20 | 21 | func (s Linear) Ticks(n int) (major, minor []float64) { 22 | major, minor = make([]float64, n), []float64{} 23 | 24 | // TODO: Pick good ticks 25 | 26 | for i := range major { 27 | major[i] = float64(i)*s.width/float64(n) + s.min 28 | } 29 | 30 | return 31 | } 32 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-styles/paper-styles-classes.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/font-roboto/roboto.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /cmd/memanim/hilbert_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import "testing" 8 | 9 | func TestHilbert(t *testing.T) { 10 | const n = 64 11 | x0, y0 := hilbert(n, 0) 12 | have := make([]bool, n*n) 13 | have[x0+y0*n] = true 14 | for d := 1; d < n*n; d++ { 15 | x1, y1 := hilbert(n, d) 16 | if !(x0 == x1 && abs(y0-y1) == 1 || 17 | y0 == y1 && abs(x0-x1) == 1) { 18 | t.Fatalf("moved by more than 1: (%d,%d) -> (%d,%d)", x0, y0, x1, y1) 19 | } 20 | if have[x1+y1*n] { 21 | t.Fatalf("repeated point (%d,%d)", x1, y1) 22 | } 23 | have[x1+y1*n] = true 24 | x0, y0 = x1, y1 25 | } 26 | } 27 | 28 | func abs(n int) int { 29 | if n < 0 { 30 | return -n 31 | } 32 | return n 33 | } 34 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icon/hero.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-styles/demo.css: -------------------------------------------------------------------------------- 1 | /** 2 | @license 3 | Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 4 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | Code distributed by Google as part of the polymer project is also 8 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | 10 | */ 11 | body { 12 | font-family: 'Roboto', 'Noto', sans-serif; 13 | font-size: 14px; 14 | margin: 0; 15 | padding: 24px; 16 | } 17 | 18 | section { 19 | padding: 20px 0; 20 | } 21 | 22 | section > div { 23 | padding: 14px; 24 | font-size: 16px; 25 | } 26 | -------------------------------------------------------------------------------- /internal/cparse/enums_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cparse 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func TestFindEnums(t *testing.T) { 12 | needCC(t) 13 | 14 | pp := preprocess(t, "int foo(); enum tag { A, B = 2 + (C, D), E };") 15 | toks, err := Tokenize(pp) 16 | if err != nil { 17 | t.Fatal(err) 18 | } 19 | enums, err := FindEnums(toks) 20 | if err != nil { 21 | t.Fatal(err) 22 | } 23 | if len(enums) != 3 { 24 | t.Fatalf("expected 3 enums, got %d", len(enums)) 25 | } 26 | for i, name := range []string{"A", "B", "E"} { 27 | if enums[i].Tag.Text != "tag" || enums[i].Ident.Text != name { 28 | t.Errorf("expected enum tag.%s, got %v", name, enums[i]) 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /perffile/datasrclock_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=DataSrcLock"; DO NOT EDIT. 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[DataSrcLockNA-0] 12 | _ = x[DataSrcLockUnlocked-1] 13 | _ = x[DataSrcLockLocked-2] 14 | } 15 | 16 | const _DataSrcLock_name = "DataSrcLockNADataSrcLockUnlockedDataSrcLockLocked" 17 | 18 | var _DataSrcLock_index = [...]uint8{0, 13, 32, 49} 19 | 20 | func (i DataSrcLock) String() string { 21 | if i < 0 || i >= DataSrcLock(len(_DataSrcLock_index)-1) { 22 | return "DataSrcLock(" + strconv.FormatInt(int64(i), 10) + ")" 23 | } 24 | return _DataSrcLock_name[_DataSrcLock_index[i]:_DataSrcLock_index[i+1]] 25 | } 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-ajax/README.md: -------------------------------------------------------------------------------- 1 | iron-ajax 2 | ========= 3 | 4 | The `iron-ajax` element exposes network request functionality. 5 | 6 | ```html 7 | 12 | ``` 13 | 14 | With `auto` set to `true`, the element performs a request whenever 15 | its `url`, `params` or `body` properties are changed. Automatically generated 16 | requests will be debounced in the case that multiple attributes are changed 17 | sequentially. 18 | 19 | Note: The `params` attribute must be double quoted JSON. 20 | 21 | You can trigger a request explicitly by calling `generateRequest` on the 22 | element. 23 | -------------------------------------------------------------------------------- /perffile/sampleregsabi_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=SampleRegsABI"; DO NOT EDIT. 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[SampleRegsABINone-0] 12 | _ = x[SampleRegsABI32-1] 13 | _ = x[SampleRegsABI64-2] 14 | } 15 | 16 | const _SampleRegsABI_name = "SampleRegsABINoneSampleRegsABI32SampleRegsABI64" 17 | 18 | var _SampleRegsABI_index = [...]uint8{0, 17, 32, 47} 19 | 20 | func (i SampleRegsABI) String() string { 21 | if i >= SampleRegsABI(len(_SampleRegsABI_index)-1) { 22 | return "SampleRegsABI(" + strconv.FormatInt(int64(i), 10) + ")" 23 | } 24 | return _SampleRegsABI_name[_SampleRegsABI_index[i]:_SampleRegsABI_index[i+1]] 25 | } 26 | -------------------------------------------------------------------------------- /perffile/recordsorder_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=RecordsOrder"; DO NOT EDIT. 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[RecordsFileOrder-0] 12 | _ = x[RecordsCausalOrder-1] 13 | _ = x[RecordsTimeOrder-2] 14 | } 15 | 16 | const _RecordsOrder_name = "RecordsFileOrderRecordsCausalOrderRecordsTimeOrder" 17 | 18 | var _RecordsOrder_index = [...]uint8{0, 16, 34, 50} 19 | 20 | func (i RecordsOrder) String() string { 21 | if i < 0 || i >= RecordsOrder(len(_RecordsOrder_index)-1) { 22 | return "RecordsOrder(" + strconv.FormatInt(int64(i), 10) + ")" 23 | } 24 | return _RecordsOrder_name[_RecordsOrder_index[i]:_RecordsOrder_index[i+1]] 25 | } 26 | -------------------------------------------------------------------------------- /perffile/auxpmuformat_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=AuxPMUFormat"; DO NOT EDIT. 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[AuxPMUFormatCoresightCoresight-0] 12 | _ = x[AuxPMUFormatCoresightRaw-1] 13 | _ = x[AuxPMUFormatDefault-0] 14 | } 15 | 16 | const _AuxPMUFormat_name = "AuxPMUFormatCoresightCoresightAuxPMUFormatCoresightRaw" 17 | 18 | var _AuxPMUFormat_index = [...]uint8{0, 30, 54} 19 | 20 | func (i AuxPMUFormat) String() string { 21 | if i >= AuxPMUFormat(len(_AuxPMUFormat_index)-1) { 22 | return "AuxPMUFormat(" + strconv.FormatInt(int64(i), 10) + ")" 23 | } 24 | return _AuxPMUFormat_name[_AuxPMUFormat_index[i]:_AuxPMUFormat_index[i+1]] 25 | } 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-icon-button/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-resizable-behavior/README.md: -------------------------------------------------------------------------------- 1 | iron-resizable-behavior 2 | ======================= 3 | 4 | `IronResizableBehavior` is a behavior that can be used in Polymer elements to 5 | coordinate the flow of resize events between "resizers" (elements that control the 6 | size or hidden state of their children) and "resizables" (elements that need to be 7 | notified when they are resized or un-hidden by their parents in order to take 8 | action on their new measurements). 9 | 10 | Elements that perform measurement should add the `IronResizableBehavior` behavior to 11 | their element definition and listen for the `iron-resize` event on themselves. 12 | This event will be fired when they become showing after having been hidden, 13 | when they are resized explicitly by another resizable, or when the window has been 14 | resized. 15 | 16 | Note, the `iron-resize` event is non-bubbling. 17 | -------------------------------------------------------------------------------- /internal/cparse/lex_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cparse 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func TestTokenize(t *testing.T) { 12 | needCC(t) 13 | 14 | pp := preprocess(t, "#include ") 15 | toks, err := Tokenize(pp) 16 | if err != nil { 17 | t.Fatal(err) 18 | } 19 | // Look for "int fprintf(FILE *". 20 | subSeq := []Tok{{TokKeyword, "int"}, {TokIdent, "fprintf"}, {TokOp, "("}, {TokIdent, "FILE"}, {TokOp, "*"}} 21 | outer: 22 | for start := range toks { 23 | if len(toks)-start < len(subSeq) { 24 | t.Fatal("didn't find fprintf declaration in token stream") 25 | } 26 | for i, tok := range subSeq { 27 | if toks[start+i] != tok { 28 | continue outer 29 | } 30 | } 31 | // Found the subsequence. 32 | break 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/font-roboto/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "font-roboto", 3 | "version": "1.0.1", 4 | "description": "An HTML import for Roboto", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "keywords": [ 9 | "font", 10 | "roboto" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "git://github.com/PolymerElements/font-roboto.git" 15 | }, 16 | "main": "roboto.html", 17 | "license": "http://polymer.github.io/LICENSE.txt", 18 | "homepage": "https://github.com/PolymerElements/font-roboto/", 19 | "ignore": [ 20 | "/.*" 21 | ], 22 | "_release": "1.0.1", 23 | "_resolution": { 24 | "type": "version", 25 | "tag": "v1.0.1", 26 | "commit": "21ce9b51a417fa9995cf6606e886aba0728f70a1" 27 | }, 28 | "_source": "git://github.com/PolymerElements/font-roboto.git", 29 | "_target": "^1.0.1", 30 | "_originalSource": "PolymerElements/font-roboto" 31 | } -------------------------------------------------------------------------------- /perffile/transaction_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=Transaction"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i Transaction) String() string { 8 | if i == 0 { 9 | return "0" 10 | } 11 | s := "" 12 | if i&TransactionAsync != 0 { 13 | s += "Async|" 14 | } 15 | if i&TransactionCapacityRead != 0 { 16 | s += "CapacityRead|" 17 | } 18 | if i&TransactionCapacityWrite != 0 { 19 | s += "CapacityWrite|" 20 | } 21 | if i&TransactionConflict != 0 { 22 | s += "Conflict|" 23 | } 24 | if i&TransactionElision != 0 { 25 | s += "Elision|" 26 | } 27 | if i&TransactionRetry != 0 { 28 | s += "Retry|" 29 | } 30 | if i&TransactionSync != 0 { 31 | s += "Sync|" 32 | } 33 | if i&TransactionTransaction != 0 { 34 | s += "Transaction|" 35 | } 36 | i &^= 255 37 | if i == 0 { 38 | return s[:len(s)-1] 39 | } 40 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 41 | } 42 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-meta/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-meta", 3 | "version": "1.0.3", 4 | "keywords": [ 5 | "web-components", 6 | "polymer" 7 | ], 8 | "license": "http://polymer.github.io/LICENSE.txt", 9 | "description": "Useful for sharing information across a DOM tree", 10 | "private": true, 11 | "authors": [ 12 | "The Polymer Authors" 13 | ], 14 | "repository": { 15 | "type": "git", 16 | "url": "git://github.com/PolymerElements/iron-meta.git" 17 | }, 18 | "dependencies": { 19 | "polymer": "Polymer/polymer#^1.0.0" 20 | }, 21 | "devDependencies": { 22 | "paper-styles": "polymerelements/paper-styles#^1.0.4", 23 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 24 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 25 | "web-component-tester": "*", 26 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-styles/paper-styles.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-a11y-keys-behavior/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | iron-a11y-keys-behavior 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/webcomponentsjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webcomponents.js", 3 | "version": "0.7.11", 4 | "description": "webcomponents.js", 5 | "main": "webcomponents.js", 6 | "directories": { 7 | "test": "tests" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/webcomponents/webcomponentsjs.git" 12 | }, 13 | "author": "The Polymer Authors", 14 | "license": { 15 | "type": "BSD-3-Clause", 16 | "url": "http://polymer.github.io/LICENSE.txt" 17 | }, 18 | "bugs": { 19 | "url": "https://github.com/webcomponents/webcomponentsjs/issues" 20 | }, 21 | "homepage": "http://webcomponents.org", 22 | "devDependencies": { 23 | "gulp": "^3.8.8", 24 | "gulp-audit": "^1.0.0", 25 | "gulp-concat": "^2.4.1", 26 | "gulp-header": "^1.1.1", 27 | "gulp-uglify": "^1.0.1", 28 | "run-sequence": "^1.0.1", 29 | "web-component-tester": "*" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /perffile/cpumode_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=CPUMode"; DO NOT EDIT. 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[CPUModeUnknown-0] 12 | _ = x[CPUModeKernel-1] 13 | _ = x[CPUModeUser-2] 14 | _ = x[CPUModeHypervisor-3] 15 | _ = x[CPUModeGuestKernel-4] 16 | _ = x[CPUModeGuestUser-5] 17 | } 18 | 19 | const _CPUMode_name = "CPUModeUnknownCPUModeKernelCPUModeUserCPUModeHypervisorCPUModeGuestKernelCPUModeGuestUser" 20 | 21 | var _CPUMode_index = [...]uint8{0, 14, 27, 38, 55, 73, 89} 22 | 23 | func (i CPUMode) String() string { 24 | if i >= CPUMode(len(_CPUMode_index)-1) { 25 | return "CPUMode(" + strconv.FormatInt(int64(i), 10) + ")" 26 | } 27 | return _CPUMode_name[_CPUMode_index[i]:_CPUMode_index[i+1]] 28 | } 29 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icon/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | Tests 17 | 18 | 19 | 20 | 21 | 22 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-iconset-svg/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | Tests 16 | 17 | 18 | 19 | 20 | 21 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-selector/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-selector", 3 | "version": "1.0.2", 4 | "description": "Manages a set of elements that can be selected", 5 | "private": true, 6 | "license": "http://polymer.github.io/LICENSE.txt", 7 | "main": [ 8 | "iron-selector.html" 9 | ], 10 | "authors": [ 11 | "The Polymer Authors" 12 | ], 13 | "keywords": [ 14 | "web-components", 15 | "polymer", 16 | "selector" 17 | ], 18 | "repository": { 19 | "type": "git", 20 | "url": "git://github.com/PolymerElements/iron-selector.git" 21 | }, 22 | "dependencies": { 23 | "polymer": "Polymer/polymer#^1.0.0" 24 | }, 25 | "devDependencies": { 26 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 27 | "test-fixture": "PolymerElements/test-fixture#^1.0.0", 28 | "web-component-tester": "*", 29 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-meta/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | Tests 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-tabs/paper-tabs-icons.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-resizable-behavior/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | iron-resizable-behavior 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-styles/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-styles", 3 | "version": "1.0.11", 4 | "description": "Common (global) styles for Material Design elements.", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "keywords": [ 9 | "web-component", 10 | "polymer", 11 | "style" 12 | ], 13 | "repository": { 14 | "type": "git", 15 | "url": "git://github.com/PolymerElements/paper-styles.git" 16 | }, 17 | "main": "paper-styles.html", 18 | "license": "http://polymer.github.io/LICENSE.txt", 19 | "homepage": "https://github.com/polymerelements/paper-styles/", 20 | "ignore": [ 21 | "/.*" 22 | ], 23 | "dependencies": { 24 | "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", 25 | "font-roboto": "PolymerElements/font-roboto#^1.0.1", 26 | "polymer": "Polymer/polymer#^1.0.0" 27 | }, 28 | "devDependencies": { 29 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/promise-polyfill/Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 3 | grunt.initConfig({ 4 | pkg: grunt.file.readJSON('package.json'), 5 | 6 | uglify: { 7 | options: { 8 | banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n' 9 | }, 10 | dist: { 11 | files: { 12 | 'Promise.min.uglify.js': ['Promise.js'] 13 | } 14 | } 15 | }, 16 | 17 | closurecompiler: { 18 | options: { 19 | compilation_level: 'ADVANCED_OPTIMIZATIONS', 20 | }, 21 | dist: { 22 | files: { 23 | 'Promise.min.js': ['Promise.js'] 24 | } 25 | } 26 | }, 27 | 28 | bytesize: { 29 | dist: { 30 | src: ['Promise*.js'] 31 | } 32 | } 33 | }); 34 | 35 | grunt.loadNpmTasks('grunt-contrib-uglify'); 36 | grunt.loadNpmTasks('grunt-closurecompiler'); 37 | grunt.loadNpmTasks('grunt-bytesize'); 38 | 39 | grunt.registerTask('build', ['closurecompiler', 'bytesize']); 40 | }; 41 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icons/index.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-resizable-behavior/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-resizable-behavior", 3 | "version": "1.0.2", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "Coordinates the flow of resizeable elements", 6 | "private": true, 7 | "main": "iron-resizable-behavior.html", 8 | "authors": [ 9 | "The Polymer Authors" 10 | ], 11 | "keywords": [ 12 | "web-components", 13 | "polymer", 14 | "iron", 15 | "behavior" 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/PolymerElements/iron-resizable-behavior.git" 20 | }, 21 | "dependencies": { 22 | "polymer": "Polymer/polymer#^1.0.0" 23 | }, 24 | "devDependencies": { 25 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 26 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 27 | "web-component-tester": "*", 28 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /perffile/eventtype_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=EventType"; DO NOT EDIT. 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[EventTypeHardware-0] 12 | _ = x[EventTypeSoftware-1] 13 | _ = x[EventTypeTracepoint-2] 14 | _ = x[EventTypeHWCache-3] 15 | _ = x[EventTypeRaw-4] 16 | _ = x[EventTypeBreakpoint-5] 17 | } 18 | 19 | const _EventType_name = "EventTypeHardwareEventTypeSoftwareEventTypeTracepointEventTypeHWCacheEventTypeRawEventTypeBreakpoint" 20 | 21 | var _EventType_index = [...]uint8{0, 17, 34, 53, 69, 81, 100} 22 | 23 | func (i EventType) String() string { 24 | if i >= EventType(len(_EventType_index)-1) { 25 | return "EventType(" + strconv.FormatInt(int64(i), 10) + ")" 26 | } 27 | return _EventType_name[_EventType_index[i]:_EventType_index[i+1]] 28 | } 29 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icon/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-resizable-behavior/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | Tests 17 | 18 | 19 | 20 | 21 | 22 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-ajax/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-button/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-iconset-svg/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-pages/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | Tests 17 | 18 | 19 | 20 | 21 | 22 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-tabs/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | Tests 17 | 18 | 19 | 20 | 21 | 22 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /perffile/eventprecision_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=EventPrecision"; DO NOT EDIT. 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[EventPrecisionArbitrarySkid-0] 12 | _ = x[EventPrecisionConstantSkid-1] 13 | _ = x[EventPrecisionTryZeroSkid-2] 14 | _ = x[EventPrecisionZeroSkip-3] 15 | } 16 | 17 | const _EventPrecision_name = "EventPrecisionArbitrarySkidEventPrecisionConstantSkidEventPrecisionTryZeroSkidEventPrecisionZeroSkip" 18 | 19 | var _EventPrecision_index = [...]uint8{0, 27, 53, 78, 100} 20 | 21 | func (i EventPrecision) String() string { 22 | if i < 0 || i >= EventPrecision(len(_EventPrecision_index)-1) { 23 | return "EventPrecision(" + strconv.FormatInt(int64(i), 10) + ")" 24 | } 25 | return _EventPrecision_name[_EventPrecision_index[i]:_EventPrecision_index[i+1]] 26 | } 27 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-behaviors/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-ajax/index.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | iron-ajax 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-behaviors/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/polymer/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "polymer", 3 | "version": "1.1.0", 4 | "main": [ 5 | "polymer.html" 6 | ], 7 | "license": "http://polymer.github.io/LICENSE.txt", 8 | "ignore": [ 9 | "/.*", 10 | "/test/" 11 | ], 12 | "authors": [ 13 | "The Polymer Authors (http://polymer.github.io/AUTHORS.txt)" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/Polymer/polymer.git" 18 | }, 19 | "dependencies": { 20 | "webcomponentsjs": "^0.7.2" 21 | }, 22 | "devDependencies": { 23 | "web-component-tester": "*" 24 | }, 25 | "private": true, 26 | "homepage": "https://github.com/Polymer/polymer", 27 | "_release": "1.1.0", 28 | "_resolution": { 29 | "type": "version", 30 | "tag": "v1.1.0", 31 | "commit": "67fb2f85fd66d8556fc07cf1dec41ff5273fa68a" 32 | }, 33 | "_source": "git://github.com/Polymer/polymer.git", 34 | "_target": "^1.0.0", 35 | "_originalSource": "Polymer/polymer", 36 | "_direct": true 37 | } -------------------------------------------------------------------------------- /scale/output.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package scale 6 | 7 | type OutputScale struct { 8 | min, max float64 9 | clamp int 10 | } 11 | 12 | const ( 13 | clampCrop = iota 14 | clampNone 15 | clampClamp 16 | ) 17 | 18 | func NewOutputScale(min, max float64) OutputScale { 19 | return OutputScale{min, max, clampCrop} 20 | } 21 | 22 | func (s *OutputScale) Crop() { 23 | s.clamp = clampCrop 24 | } 25 | 26 | func (s *OutputScale) Unclamp() { 27 | s.clamp = clampNone 28 | } 29 | 30 | func (s *OutputScale) Clamp() { 31 | s.clamp = clampClamp 32 | } 33 | 34 | func (s OutputScale) Of(x float64) (float64, bool) { 35 | if s.clamp == clampCrop { 36 | if x < 0 || x > 1 { 37 | return 0, false 38 | } 39 | } else if s.clamp == clampClamp { 40 | if x < 0 { 41 | x = 0 42 | } else if x > 1 { 43 | x = 1 44 | } 45 | } 46 | return x*(s.max-s.min) + s.min, true 47 | } 48 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-card/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | paper-card tests 16 | 17 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-ripple/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | Tests 16 | 17 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-toolbar/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | paper-toolbar tests 15 | 16 | 17 | 18 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-meta/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | iron-meta 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-resizable-behavior/demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | iron-resizable-behavior demo 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-behaviors/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-button/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | paper-button tests 16 | 17 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-material/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | paper-material tests 16 | 17 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "memlat", 3 | "version": "0.0.0", 4 | "homepage": "https://github.com/aclements/go-perf", 5 | "authors": [ 6 | "Austin Clements <(none)>" 7 | ], 8 | "license": "MIT", 9 | "ignore": [ 10 | "**/.*", 11 | "node_modules", 12 | "bower_components", 13 | "test", 14 | "tests" 15 | ], 16 | "dependencies": { 17 | "polymer": "Polymer/polymer#^1.0.0", 18 | "paper-button": "PolymerElements/paper-button#~1.0.3", 19 | "paper-tabs": "PolymerElements/paper-tabs#~1.0.2", 20 | "paper-styles": "PolymerElements/paper-styles#~1.0.11", 21 | "iron-pages": "PolymerElements/iron-pages#~1.0.3", 22 | "iron-ajax": "PolymerElements/iron-ajax#~1.0.4", 23 | "paper-card": "PolymerElements/paper-card#~1.0.3", 24 | "paper-header-panel": "PolymerElements/paper-header-panel#~1.0.4", 25 | "paper-toolbar": "PolymerElements/paper-toolbar#~1.0.4", 26 | "iron-icon": "PolymerElements/iron-icon#~1.0.3", 27 | "iron-icons": "PolymerElements/iron-icons#~1.0.3" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-pages/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | iron-pages 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-card/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | paper-card 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-iconset-svg/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-iconset-svg", 3 | "description": "Manages a set of svg icons", 4 | "version": "1.0.4", 5 | "keywords": [ 6 | "web-components", 7 | "polymer", 8 | "icon" 9 | ], 10 | "license": "http://polymer.github.io/LICENSE.txt", 11 | "private": true, 12 | "authors": [ 13 | "The Polymer Authors" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-iconset-svg.git" 18 | }, 19 | "dependencies": { 20 | "polymer": "polymer/polymer#^1.0.0", 21 | "iron-meta": "polymerelements/iron-meta#^1.0.0" 22 | }, 23 | "devDependencies": { 24 | "paper-styles": "polymerelements/paper-styles#^1.0.2", 25 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 26 | "iron-icon": "polymerelements/iron-icon#^1.0.0", 27 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 28 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", 29 | "web-component-tester": "*" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-pages/hero.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-behaviors/test/test-button.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-icon-button/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | paper-icon-button tests 16 | 17 | 18 | 19 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-ripple/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-ripple", 3 | "version": "1.0.1", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "Adds a material design ripple to any container", 6 | "private": true, 7 | "authors": [ 8 | "The Polymer Authors" 9 | ], 10 | "keywords": [ 11 | "web-components", 12 | "polymer", 13 | "ripple" 14 | ], 15 | "main": "paper-ripple.html", 16 | "dependencies": { 17 | "polymer": "Polymer/polymer#^1.0.0", 18 | "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0" 19 | }, 20 | "devDependencies": { 21 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 22 | "iron-icon": "polymerelements/iron-icon#^1.0.0", 23 | "iron-icons": "polymerelements/iron-icons#^1.0.0", 24 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 25 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 26 | "web-component-tester": "*", 27 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-ripple/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | paper-ripple 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-tabs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | paper-tabs 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-behaviors/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | Iron Behaviors 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-selector/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | iron-selector 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-a11y-keys-behavior/demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | Iron A11y Keys Behavior demo 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/promise-polyfill/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "promise-polyfill", 3 | "version": "1.0.0", 4 | "homepage": "https://github.com/taylorhakes/promise-polyfill", 5 | "authors": [ 6 | "Taylor Hakes" 7 | ], 8 | "description": "Lightweight promise polyfill for the browser and node. A+ Compliant.", 9 | "main": "Promise.js", 10 | "moduleType": [ 11 | "globals", 12 | "node" 13 | ], 14 | "keywords": [ 15 | "promise", 16 | "es6", 17 | "polyfill", 18 | "html5" 19 | ], 20 | "license": "MIT", 21 | "ignore": [ 22 | "**/.*", 23 | "node_modules", 24 | "bower_components", 25 | "test", 26 | "tests" 27 | ], 28 | "dependencies": { 29 | "polymer": "polymer/polymer#^1.0.0" 30 | }, 31 | "_release": "1.0.0", 32 | "_resolution": { 33 | "type": "version", 34 | "tag": "v1.0.0", 35 | "commit": "2ef7dada161cae30e69ffff918485c57121d4b88" 36 | }, 37 | "_source": "git://github.com/polymerlabs/promise-polyfill.git", 38 | "_target": "^1.0.0", 39 | "_originalSource": "polymerlabs/promise-polyfill" 40 | } -------------------------------------------------------------------------------- /internal/gendefs/edit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import "sort" 8 | 9 | type Edit struct { 10 | Pos int // Byte offset of edit 11 | Del int // Number of bytes to delete at Pos 12 | Insert []byte // Bytes to insert at Pos 13 | } 14 | 15 | func DoEdit(src []byte, edits []Edit) []byte { 16 | // Sort the edits in order. 17 | sort.SliceStable(edits, func(i, j int) bool { 18 | return edits[i].Pos < edits[j].Pos 19 | }) 20 | 21 | // Check for overlapping edits. 22 | for i := 1; i < len(edits); i++ { 23 | if edits[i-1].Pos+edits[i-1].Del > edits[i].Pos { 24 | panic("overlapping edits") 25 | } 26 | } 27 | 28 | // Process edits. 29 | out := []byte{} 30 | srcPos := 0 31 | for _, edit := range edits { 32 | out = append(out, src[srcPos:edit.Pos]...) 33 | out = append(out, edit.Insert...) 34 | srcPos = edit.Pos + edit.Del 35 | } 36 | out = append(out, src[srcPos:]...) 37 | 38 | return out 39 | } 40 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-menu-behavior/test/test-menu.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 41 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-menu-behavior/test/test-menubar.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 22 | 23 | 24 | 41 | -------------------------------------------------------------------------------- /perffile/datasrclevel_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=DataSrcLevel"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i DataSrcLevel) String() string { 8 | if i == 0 { 9 | return "NA" 10 | } 11 | s := "" 12 | if i&DataSrcLevelIO != 0 { 13 | s += "IO|" 14 | } 15 | if i&DataSrcLevelL1 != 0 { 16 | s += "L1|" 17 | } 18 | if i&DataSrcLevelL2 != 0 { 19 | s += "L2|" 20 | } 21 | if i&DataSrcLevelL3 != 0 { 22 | s += "L3|" 23 | } 24 | if i&DataSrcLevelLFB != 0 { 25 | s += "LFB|" 26 | } 27 | if i&DataSrcLevelLocalRAM != 0 { 28 | s += "LocalRAM|" 29 | } 30 | if i&DataSrcLevelRemoteCache1 != 0 { 31 | s += "RemoteCache1|" 32 | } 33 | if i&DataSrcLevelRemoteCache2 != 0 { 34 | s += "RemoteCache2|" 35 | } 36 | if i&DataSrcLevelRemoteRAM1 != 0 { 37 | s += "RemoteRAM1|" 38 | } 39 | if i&DataSrcLevelRemoteRAM2 != 0 { 40 | s += "RemoteRAM2|" 41 | } 42 | if i&DataSrcLevelUncached != 0 { 43 | s += "Uncached|" 44 | } 45 | i &^= 2047 46 | if i == 0 { 47 | return s[:len(s)-1] 48 | } 49 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 50 | } 51 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-selector/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | Tests 16 | 17 | 18 | 19 | 20 | 21 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-tabs/hero.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /cmd/memlat/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | Memory latency profile browser 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-behaviors/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-behaviors", 3 | "version": "1.0.7", 4 | "description": "Provides a set of behaviors for the iron elements", 5 | "private": true, 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/PolymerElements/iron-behaviors.git" 12 | }, 13 | "main": [ 14 | "iron-button-state.html", 15 | "iron-control-state.html" 16 | ], 17 | "license": "http://polymer.github.io/LICENSE.txt", 18 | "dependencies": { 19 | "polymer": "Polymer/polymer#^1.0.0", 20 | "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" 21 | }, 22 | "devDependencies": { 23 | "paper-styles": "polymerelements/paper-styles#^1.0.2", 24 | "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", 25 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 26 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 27 | "web-component-tester": "*", 28 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-card/README.md: -------------------------------------------------------------------------------- 1 | # paper-card 2 | 3 | Material Design: Cards 4 | 5 | `paper-card` is a container with a drop shadow. 6 | 7 | Example: 8 | ```html 9 | 10 |
Some content
11 |
12 | Some action 13 |
14 |
15 | ``` 16 | 17 | ### Accessibility 18 | By default, the `aria-label` will be set to the value of the `heading` attribute. 19 | 20 | ### Styling 21 | 22 | The following custom properties and mixins are available for styling: 23 | 24 | Custom property | Description | Default 25 | ----------------|-------------|---------- 26 | `--paper-card-header-color` | The color of the header text | `#000` 27 | `--paper-card-header` | Mixin applied to the card header section | `{}` 28 | `--paper-card-content` | Mixin applied to the card content section| `{}` 29 | `--paper-card-actions` | Mixin applied to the card action section | `{}` 30 | `--paper-card` | Mixin applied to the card | `{}` 31 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 h1:xlwdaKcTNVW4PtpQb8aKA4Pjy0CdJHEqvFbAnvR5m2g= 2 | github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= 3 | github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= 4 | github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= 5 | github.com/ianlancetaylor/demangle v0.0.0-20220517205856-0058ec4f073c h1:rwmN+hgiyp8QyBqzdEX43lTjKAxaqCrYHaU5op5P9J8= 6 | github.com/ianlancetaylor/demangle v0.0.0-20220517205856-0058ec4f073c/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= 7 | golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9 h1:LRtI4W37N+KFebI/qV0OFiLUv4GLOWeEW5hn/KEJvxE= 8 | golang.org/x/image v0.0.0-20220413100746-70e8d0d3baa9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= 9 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 10 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 11 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-a11y-keys-behavior/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-a11y-keys-behavior", 3 | "version": "1.0.5", 4 | "description": "A behavior that enables keybindings for greater a11y.", 5 | "keywords": [ 6 | "web-components", 7 | "web-component", 8 | "polymer", 9 | "a11y", 10 | "input" 11 | ], 12 | "authors": [ 13 | "The Polymer Authors" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git" 18 | }, 19 | "main": "iron-a11y-keys-behavior.html", 20 | "license": "http://polymer.github.io/LICENSE.txt", 21 | "dependencies": { 22 | "polymer": "Polymer/polymer#^1.0.0" 23 | }, 24 | "devDependencies": { 25 | "paper-styles": "PolymerElements/paper-styles#^1.0.2", 26 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 27 | "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", 28 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 29 | "web-component-tester": "*", 30 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-pages/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-pages", 3 | "version": "1.0.3", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "Organizes a set of pages and shows one at a time", 6 | "main": "iron-pages.html", 7 | "private": true, 8 | "authors": [ 9 | "The Polymer Authors" 10 | ], 11 | "repository": { 12 | "type": "git", 13 | "url": "git://github.com/PolymerElements/iron-pages.git" 14 | }, 15 | "keywords": [ 16 | "web-components", 17 | "polymer", 18 | "container" 19 | ], 20 | "dependencies": { 21 | "iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0", 22 | "iron-selector": "polymerelements/iron-selector#^1.0.0", 23 | "polymer": "Polymer/polymer#^1.0.0" 24 | }, 25 | "devDependencies": { 26 | "paper-styles": "polymerelements/paper-styles#^1.0.2", 27 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 28 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 29 | "web-component-tester": "*", 30 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icon/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-icon", 3 | "private": true, 4 | "version": "1.0.3", 5 | "license": "http://polymer.github.io/LICENSE.txt", 6 | "description": "An element that supports displaying an icon", 7 | "main": "iron-icon.html", 8 | "author": [ 9 | "The Polymer Authors" 10 | ], 11 | "keywords": [ 12 | "web-components", 13 | "polymer", 14 | "icon" 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/PolymerElements/iron-icon.git" 19 | }, 20 | "dependencies": { 21 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 22 | "iron-meta": "polymerelements/iron-meta#^1.0.0", 23 | "polymer": "Polymer/polymer#^1.0.0" 24 | }, 25 | "devDependencies": { 26 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 27 | "iron-iconset": "polymerelements/iron-iconset#^1.0.0", 28 | "iron-icons": "polymerelements/iron-icons#^1.0.0", 29 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 30 | "web-component-tester": "*", 31 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-material/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | paper-material 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /perffile/datasrchops_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=DataSrcHops"; DO NOT EDIT. 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[DataSrcHopsCore-1] 12 | _ = x[DataSrcHopsNode-3] 13 | _ = x[DataSrcHopsSocket-3] 14 | _ = x[DataSrcHopesBoard-4] 15 | _ = x[DataSrcHopsNA-0] 16 | } 17 | 18 | const ( 19 | _DataSrcHops_name_0 = "DataSrcHopsNADataSrcHopsCore" 20 | _DataSrcHops_name_1 = "DataSrcHopsNodeDataSrcHopesBoard" 21 | ) 22 | 23 | var ( 24 | _DataSrcHops_index_0 = [...]uint8{0, 13, 28} 25 | _DataSrcHops_index_1 = [...]uint8{0, 15, 32} 26 | ) 27 | 28 | func (i DataSrcHops) String() string { 29 | switch { 30 | case 0 <= i && i <= 1: 31 | return _DataSrcHops_name_0[_DataSrcHops_index_0[i]:_DataSrcHops_index_0[i+1]] 32 | case 3 <= i && i <= 4: 33 | i -= 3 34 | return _DataSrcHops_name_1[_DataSrcHops_index_1[i]:_DataSrcHops_index_1[i+1]] 35 | default: 36 | return "DataSrcHops(" + strconv.FormatInt(int64(i), 10) + ")" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/promise-polyfill/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "promise-polyfill", 3 | "version": "2.0.0", 4 | "description": "Lightweight promise polyfill. A+ compliant", 5 | "main": "Promise.js", 6 | "scripts": { 7 | "test": "./node_modules/.bin/promises-aplus-tests tests/adapter.js; ./node_modules/.bin/promises-es6-tests tests/adapter.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://taylorhakes@github.com/taylorhakes/promise-polyfill.git" 12 | }, 13 | "author": "Taylor Hakes", 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/taylorhakes/promise-polyfill/issues" 17 | }, 18 | "homepage": "https://github.com/taylorhakes/promise-polyfill", 19 | "devDependencies": { 20 | "grunt": "^0.4.5", 21 | "grunt-bytesize": "^0.1.1", 22 | "grunt-closurecompiler": "^0.9.9", 23 | "grunt-contrib-uglify": "^0.4.0", 24 | "mocha": "^2.2.1", 25 | "promises-aplus-tests": "*", 26 | "promises-es6-tests": "^0.5.0" 27 | }, 28 | "keywords": [ 29 | "promise", 30 | "promise-polyfill", 31 | "ES6", 32 | "promises-aplus" 33 | ], 34 | "dependencies": {} 35 | } 36 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-material/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-material", 3 | "version": "1.0.1", 4 | "description": "A material design container that looks like a lifted sheet of paper", 5 | "private": true, 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "keywords": [ 10 | "web-components", 11 | "web-component", 12 | "polymer", 13 | "paper", 14 | "container" 15 | ], 16 | "main": [ 17 | "paper-material.html" 18 | ], 19 | "repository": { 20 | "type": "git", 21 | "url": "git://github.com/PolymerElements/paper-material" 22 | }, 23 | "license": "http://polymer.github.io/LICENSE.txt", 24 | "homepage": "https://github.com/PolymerElements/paper-material", 25 | "ignore": [], 26 | "dependencies": { 27 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 28 | "polymer": "Polymer/polymer#^1.0.0" 29 | }, 30 | "devDependencies": { 31 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 32 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 33 | "web-component-tester": "*", 34 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-toolbar/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-toolbar", 3 | "version": "1.0.4", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "A material design toolbar that is easily customizable", 6 | "private": true, 7 | "main": [ 8 | "paper-toolbar.html" 9 | ], 10 | "authors": [ 11 | "The Polymer Authors" 12 | ], 13 | "keywords": [ 14 | "web-components", 15 | "polymer", 16 | "toolbar", 17 | "layout" 18 | ], 19 | "repository": { 20 | "type": "git", 21 | "url": "git://github.com/PolymerElements/paper-toolbar.git" 22 | }, 23 | "dependencies": { 24 | "paper-styles": "PolymerElements/paper-styles#^1.0.0", 25 | "polymer": "Polymer/polymer#^1.0.0" 26 | }, 27 | "devDependencies": { 28 | "iron-icons": "PolymerElements/iron-icons#^1.0.0", 29 | "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0", 30 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 31 | "test-fixture": "PolymerElements/test-fixture#^1.0.0", 32 | "web-component-tester": "*", 33 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-flex-layout/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-flex-layout", 3 | "version": "1.0.3", 4 | "description": "Provide flexbox-based layouts", 5 | "keywords": [ 6 | "web-components", 7 | "polymer", 8 | "layout" 9 | ], 10 | "private": true, 11 | "license": "http://polymer.github.io/LICENSE.txt", 12 | "authors": [ 13 | "The Polymer Authors" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-flex-layout.git" 18 | }, 19 | "dependencies": { 20 | "polymer": "Polymer/polymer#^1.0.0" 21 | }, 22 | "devDependencies": { 23 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 24 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 25 | }, 26 | "homepage": "https://github.com/PolymerElements/iron-flex-layout", 27 | "_release": "1.0.3", 28 | "_resolution": { 29 | "type": "version", 30 | "tag": "v1.0.3", 31 | "commit": "e6c2cfec18354973ac03e70dcd8afcc3c72d09b9" 32 | }, 33 | "_source": "git://github.com/PolymerElements/iron-flex-layout.git", 34 | "_target": "^1.0.0", 35 | "_originalSource": "PolymerElements/iron-flex-layout" 36 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-menu-behavior/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-menu-behavior", 3 | "version": "1.0.1", 4 | "description": "Provides accessible menu behavior", 5 | "authors": "The Polymer Authors", 6 | "keywords": [ 7 | "web-components", 8 | "polymer", 9 | "behavior", 10 | "menu" 11 | ], 12 | "main": "iron-menu-behavior.html", 13 | "private": true, 14 | "repository": { 15 | "type": "git", 16 | "url": "git://github.com/PolymerElements/iron-menu-behavior" 17 | }, 18 | "license": "http://polymer.github.io/LICENSE.txt", 19 | "homepage": "https://github.com/PolymerElements/iron-menu-behavior", 20 | "ignore": [], 21 | "dependencies": { 22 | "iron-selector": "PolymerElements/iron-selector#^1.0.0", 23 | "polymer": "Polymer/polymer#^1.0.0", 24 | "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0" 25 | }, 26 | "devDependencies": { 27 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 28 | "test-fixture": "PolymerElements/test-fixture#^1.0.0", 29 | "web-component-tester": "*", 30 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-styles/default-theme.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 40 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-menu-behavior/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | iron-menu-behavior 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/promise-polyfill/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Taylor Hakes 2 | Copyright (c) 2014 Forbes Lindesay 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-header-panel/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-header-panel", 3 | "version": "1.0.4", 4 | "description": "A header and content wrapper for layout with headers", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "keywords": [ 9 | "web-components", 10 | "polymer", 11 | "layout" 12 | ], 13 | "main": [ 14 | "paper-header-panel.html" 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/PolymerElements/paper-header-panel.git" 19 | }, 20 | "private": true, 21 | "license": "http://polymer.github.io/LICENSE.txt", 22 | "homepage": "https://github.com/PolymerElements/paper-header-panel", 23 | "ignore": [], 24 | "dependencies": { 25 | "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", 26 | "polymer": "Polymer/polymer#^1.0.0" 27 | }, 28 | "devDependencies": { 29 | "web-component-tester": "*", 30 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 31 | "test-fixture": "PolymerElements/test-fixture#^1.0.0", 32 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", 33 | "paper-styles": "PolymerElements/paper-styles#^1.0.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-header-panel/test/index.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | paper-header-panel tests 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /internal/cparse/pp_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cparse 6 | 7 | import ( 8 | "bytes" 9 | "os/exec" 10 | "testing" 11 | ) 12 | 13 | var defaultEnv = BuildEnv{} 14 | 15 | func TestMacros(t *testing.T) { 16 | needCC(t) 17 | 18 | src := bytes.NewBufferString("#define TEST 123\n#define EMPTY") 19 | macros, err := FindMacros(&defaultEnv, src) 20 | if err != nil { 21 | t.Fatal(err) 22 | } 23 | outer: 24 | for _, want := range []string{"EMPTY", "TEST", "__STDC__"} { 25 | for _, have := range macros { 26 | if have == want { 27 | continue outer 28 | } 29 | } 30 | t.Errorf("%q is not defined", want) 31 | } 32 | } 33 | 34 | func needCC(t *testing.T) { 35 | t.Helper() 36 | 37 | const bin = "cc" 38 | if _, err := exec.LookPath(bin); err != nil { 39 | t.Skipf("need %s binary in PATH", bin) 40 | } 41 | } 42 | 43 | func preprocess(t *testing.T, src string) []byte { 44 | t.Helper() 45 | 46 | sb := bytes.NewBufferString(src) 47 | pp, err := Preprocess(&defaultEnv, sb) 48 | if err != nil { 49 | t.Fatal(err) 50 | } 51 | return pp 52 | } 53 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-a11y-keys-behavior/test/index.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | Tests 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-menu-behavior/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | iron-menu-behavior tests 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-selector/test/content-element.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 21 | 22 | 23 | 24 | 44 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-flex-layout/demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | iron-flex-layout 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/promise-polyfill/Promise-Statics.js: -------------------------------------------------------------------------------- 1 | Promise.all = Promise.all || function () { 2 | var args = Array.prototype.slice.call(arguments.length === 1 && Array.isArray(arguments[0]) ? arguments[0] : arguments); 3 | 4 | return new Promise(function (resolve, reject) { 5 | if (args.length === 0) return resolve([]); 6 | var remaining = args.length; 7 | function res(i, val) { 8 | try { 9 | if (val && (typeof val === 'object' || typeof val === 'function')) { 10 | var then = val.then; 11 | if (typeof then === 'function') { 12 | then.call(val, function (val) { res(i, val) }, reject); 13 | return; 14 | } 15 | } 16 | args[i] = val; 17 | if (--remaining === 0) { 18 | resolve(args); 19 | } 20 | } catch (ex) { 21 | reject(ex); 22 | } 23 | } 24 | for (var i = 0; i < args.length; i++) { 25 | res(i, args[i]); 26 | } 27 | }); 28 | }; 29 | 30 | Promise.race = Promise.race || function (values) { 31 | return new Promise(function (resolve, reject) { 32 | for(var i = 0, len = values.length; i < len; i++) { 33 | values[i].then(resolve, reject); 34 | } 35 | }); 36 | }; 37 | 38 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icons/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-icons", 3 | "version": "1.0.3", 4 | "description": "A set of icons for use with iron-icon", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "keywords": [ 9 | "web-components", 10 | "polymer", 11 | "icon" 12 | ], 13 | "main": "iron-icons.html", 14 | "private": true, 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-icons" 18 | }, 19 | "license": "http://polymer.github.io/LICENSE.txt", 20 | "homepage": "https://github.com/PolymerElements/paper-icons", 21 | "dependencies": { 22 | "iron-icon": "polymerelements/iron-icon#^1.0.0", 23 | "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0", 24 | "polymer": "Polymer/polymer#^1.0.0" 25 | }, 26 | "devDependencies": { 27 | "paper-styles": "polymerelements/paper-styles#^1.0.2", 28 | "iron-component-page": "polymerelements/iron-component-page#1.0.0", 29 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 30 | "iron-meta": "polymerelements/iron-meta#^1.0.0", 31 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 32 | }, 33 | "ignore": [ 34 | "util", 35 | "update-icons.sh" 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/promise-polyfill/Promise.min.js: -------------------------------------------------------------------------------- 1 | function m(n){function b(a){if("object"!==typeof this||"function"!==typeof a)throw new TypeError;this.c=this.a=null;this.b=[];g(a,h.bind(this),d.bind(this))}function k(a){var c=this;null===this.a?this.b.push(a):n(function(){var f=c.a?a.d:a.e;if("function"!==typeof f)(c.a?a.resolve:a.reject)(c.c);else{var e;try{e=f(c.c)}catch(b){a.reject(b);return}a.resolve(e)}})}function h(a){try{if(a===this)throw new TypeError;if(a&&("object"===typeof a||"function"===typeof a)){var c=a.then;if("function"===typeof c){g(c.bind(a), 2 | h.bind(this),d.bind(this));return}}this.a=!0;this.c=a;l.call(this)}catch(b){d.call(this,b)}}function d(a){this.a=!1;this.c=a;l.call(this)}function l(){for(var a=0,c=this.b.length;a 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | paper-toolbar 18 | 19 | 20 | 21 | 22 | 23 | 24 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-menu-behavior/demo/simple-menu.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 24 | 31 | 32 | 33 | 34 | 51 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/webcomponentsjs/build.log: -------------------------------------------------------------------------------- 1 | BUILD LOG 2 | --------- 3 | Build Time: 2015-08-13T12:57:18-0700 4 | 5 | NODEJS INFORMATION 6 | ================== 7 | nodejs: v0.12.7 8 | gulp: 3.9.0 9 | gulp-audit: 1.0.0 10 | gulp-concat: 2.6.0 11 | gulp-header: 1.2.2 12 | gulp-uglify: 1.2.0 13 | run-sequence: 1.1.2 14 | web-component-tester: 3.3.10 15 | 16 | REPO REVISIONS 17 | ============== 18 | webcomponentsjs: 0fc12104ac6f39421c5105a3694aa740ed3835df 19 | 20 | BUILD HASHES 21 | ============ 22 | CustomElements.js: 174a3a08af4a551dbd436f5dc527e29c4b989919 23 | CustomElements.min.js: 5d7f8991d0ce8a10307114de07d7ce0d1481f3a5 24 | HTMLImports.js: 6bb55981141fcf206496c34dad811e176f0d13f8 25 | HTMLImports.min.js: f956c8f8751b4e87fd93f5d4a3d053e6e8654d52 26 | MutationObserver.js: e0fce524fed93243c80971b72be846775bb74d53 27 | MutationObserver.min.js: 25c795fa01bd9d9feb3a52cf60ab2b6749b78c75 28 | ShadowDOM.js: 1874e157c0462484bbb34b812d6ec7a97cf63995 29 | ShadowDOM.min.js: 9a7fca60240b59961eba22b941ab0f890124e96b 30 | webcomponents-lite.js: 406c7a34b1ab536e7bdf943c22d4293fbbe464e9 31 | webcomponents-lite.min.js: 97f3d2215d0390bc2e246bd1c1f363b257050f70 32 | webcomponents.js: 8aa2b2a294e917ec792f6b52f27cfbf9b00f519f 33 | webcomponents.min.js: 4df2e85a7b0cd173494a9e8ab71660943734fcf9 -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-header-panel/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | paper-header-panel 18 | 19 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-styles/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-styles", 3 | "version": "1.0.11", 4 | "description": "Common (global) styles for Material Design elements.", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "keywords": [ 9 | "web-component", 10 | "polymer", 11 | "style" 12 | ], 13 | "repository": { 14 | "type": "git", 15 | "url": "git://github.com/PolymerElements/paper-styles.git" 16 | }, 17 | "main": "paper-styles.html", 18 | "license": "http://polymer.github.io/LICENSE.txt", 19 | "homepage": "https://github.com/polymerelements/paper-styles/", 20 | "ignore": [ 21 | "/.*" 22 | ], 23 | "dependencies": { 24 | "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", 25 | "font-roboto": "PolymerElements/font-roboto#^1.0.1", 26 | "polymer": "Polymer/polymer#^1.0.0" 27 | }, 28 | "devDependencies": { 29 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 30 | }, 31 | "_release": "1.0.11", 32 | "_resolution": { 33 | "type": "version", 34 | "tag": "v1.0.11", 35 | "commit": "347542e9ebe3e6e5f0830ee10e1c20c12956ff2c" 36 | }, 37 | "_source": "git://github.com/polymerelements/paper-styles.git", 38 | "_target": "^1.0.0", 39 | "_originalSource": "polymerelements/paper-styles" 40 | } -------------------------------------------------------------------------------- /internal/cparse/enums.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cparse 6 | 7 | import ( 8 | "fmt" 9 | ) 10 | 11 | type Enum struct { 12 | Tag Tok 13 | Ident Tok 14 | } 15 | 16 | // FindEnums finds top-level enumeration constants in toks. 17 | func FindEnums(tokens []Tok) ([]Enum, error) { 18 | t := toks(tokens) 19 | var enums []Enum 20 | for len(t) > 0 { 21 | switch { 22 | case t.Try(TokOp, "{"): 23 | t.SkipBalanced("}") 24 | case t.Try(TokOp, "("): 25 | t.SkipBalanced(")") 26 | case t.Try(TokOp, "["): 27 | t.SkipBalanced("]") 28 | case t.Try(TokKeyword, "enum"): 29 | // Found an enum. Skip tag, if any. 30 | tag, _ := t.TryIdent() 31 | if t.Try(TokOp, "{") { 32 | for { 33 | if t.Try(TokOp, "}") { 34 | break 35 | } 36 | id, ok := t.TryIdent() 37 | if !ok { 38 | return nil, fmt.Errorf("expected identifier") 39 | } 40 | enums = append(enums, Enum{tag, id}) 41 | // Consume initializer. 42 | if t.Try(TokOp, "=") { 43 | t.SkipBalanced(",", "}") 44 | } 45 | t.Try(TokOp, ",") 46 | } 47 | } 48 | default: 49 | t.Skip(1) 50 | } 51 | } 52 | return enums, nil 53 | } 54 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-meta/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-meta", 3 | "version": "1.0.3", 4 | "keywords": [ 5 | "web-components", 6 | "polymer" 7 | ], 8 | "license": "http://polymer.github.io/LICENSE.txt", 9 | "description": "Useful for sharing information across a DOM tree", 10 | "private": true, 11 | "authors": [ 12 | "The Polymer Authors" 13 | ], 14 | "repository": { 15 | "type": "git", 16 | "url": "git://github.com/PolymerElements/iron-meta.git" 17 | }, 18 | "dependencies": { 19 | "polymer": "Polymer/polymer#^1.0.0" 20 | }, 21 | "devDependencies": { 22 | "paper-styles": "polymerelements/paper-styles#^1.0.4", 23 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 24 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 25 | "web-component-tester": "*", 26 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 27 | }, 28 | "homepage": "https://github.com/polymerelements/iron-meta", 29 | "_release": "1.0.3", 30 | "_resolution": { 31 | "type": "version", 32 | "tag": "v1.0.3", 33 | "commit": "91529259262b0d8f33fed44bc3fd47aedf35cb04" 34 | }, 35 | "_source": "git://github.com/polymerelements/iron-meta.git", 36 | "_target": "^1.0.0", 37 | "_originalSource": "polymerelements/iron-meta" 38 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-ajax/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-ajax", 3 | "version": "1.0.4", 4 | "description": "Makes it easy to make ajax calls and parse the response", 5 | "private": true, 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "keywords": [ 10 | "web-components", 11 | "polymer", 12 | "ajax" 13 | ], 14 | "main": [ 15 | "iron-ajax.html", 16 | "iron-request.html" 17 | ], 18 | "repository": { 19 | "type": "git", 20 | "url": "git://github.com/PolymerElements/iron-ajax.git" 21 | }, 22 | "license": "http://polymer.github.io/LICENSE.txt", 23 | "homepage": "https://github.com/PolymerElements/iron-ajax", 24 | "ignore": [], 25 | "dependencies": { 26 | "promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0", 27 | "polymer": "Polymer/polymer#^1.0.0" 28 | }, 29 | "devDependencies": { 30 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 31 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 32 | "iron-image": "polymerelements/iron-image#^1.0.0", 33 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 34 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 35 | "web-component-tester": "*", 36 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-ripple/hero.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-selector/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-selector", 3 | "version": "1.0.2", 4 | "description": "Manages a set of elements that can be selected", 5 | "private": true, 6 | "license": "http://polymer.github.io/LICENSE.txt", 7 | "main": [ 8 | "iron-selector.html" 9 | ], 10 | "authors": [ 11 | "The Polymer Authors" 12 | ], 13 | "keywords": [ 14 | "web-components", 15 | "polymer", 16 | "selector" 17 | ], 18 | "repository": { 19 | "type": "git", 20 | "url": "git://github.com/PolymerElements/iron-selector.git" 21 | }, 22 | "dependencies": { 23 | "polymer": "Polymer/polymer#^1.0.0" 24 | }, 25 | "devDependencies": { 26 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 27 | "test-fixture": "PolymerElements/test-fixture#^1.0.0", 28 | "web-component-tester": "*", 29 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 30 | }, 31 | "homepage": "https://github.com/PolymerElements/iron-selector", 32 | "_release": "1.0.2", 33 | "_resolution": { 34 | "type": "version", 35 | "tag": "v1.0.2", 36 | "commit": "ea22d91d11ba6f72c01faa952d5e600f9d1773cf" 37 | }, 38 | "_source": "git://github.com/PolymerElements/iron-selector.git", 39 | "_target": "^1.0.0", 40 | "_originalSource": "PolymerElements/iron-selector" 41 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-icon-button/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-icon-button", 3 | "private": true, 4 | "version": "1.0.3", 5 | "license": "http://polymer.github.io/LICENSE.txt", 6 | "description": "A material design icon button", 7 | "main": "paper-icon-button.html", 8 | "author": [ 9 | "The Polymer Authors" 10 | ], 11 | "keywords": [ 12 | "web-components", 13 | "polymer", 14 | "button", 15 | "icon", 16 | "control" 17 | ], 18 | "repository": { 19 | "type": "git", 20 | "url": "git://github.com/PolymerElements/paper-icon-button.git" 21 | }, 22 | "dependencies": { 23 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 24 | "iron-icon": "polymerelements/iron-icon#^1.0.0", 25 | "iron-icons": "polymerelements/iron-icons#^1.0.0", 26 | "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0", 27 | "paper-ripple": "polymerelements/paper-ripple#^1.0.0", 28 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 29 | "polymer": "Polymer/polymer#^1.0.0" 30 | }, 31 | "devDependencies": { 32 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 33 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 34 | "web-component-tester": "*", 35 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-card/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-card", 3 | "version": "1.0.3", 4 | "description": "Material design piece of paper with unique related data", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "keywords": [ 9 | "web-components", 10 | "polymer", 11 | "card" 12 | ], 13 | "main": [ 14 | "paper-card.html" 15 | ], 16 | "private": true, 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/PolymerElements/paper-card.git" 20 | }, 21 | "license": "http://polymer.github.io/LICENSE.txt", 22 | "homepage": "https://github.com/PolymerElements/paper-card", 23 | "ignore": [], 24 | "dependencies": { 25 | "polymer": "Polymer/polymer#^1.1.0", 26 | "paper-material": "PolymerElements/paper-material#^1.0.0" 27 | }, 28 | "devDependencies": { 29 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 30 | "test-fixture": "PolymerElements/test-fixture#^1.0.0", 31 | "web-component-tester": "*", 32 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", 33 | "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0", 34 | "paper-button": "PolymerElements/paper-button#^1.0.0", 35 | "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", 36 | "paper-styles": "PolymerElements/paper-styles#^1.0.0" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-menu-behavior/demo/simple-menubar.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 27 | 28 | 35 | 36 | 37 | 38 | 55 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-behaviors/test/test-radio-button.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 26 | 31 | 32 | 33 | 42 | -------------------------------------------------------------------------------- /scripts/membw: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | # Measure read/write memory bandwidth at memory controllers. 4 | # 5 | # Based on "Intel® Xeon® Processor E5 v2 and E7 v2 Product Families 6 | # Uncore Performance Monitoring Reference Manual". 7 | 8 | set -e 9 | 10 | family=$(grep '^cpu family' /proc/cpuinfo | awk '{print $4; exit}') 11 | model=$(grep '^model' /proc/cpuinfo | awk '{print $3; exit}') 12 | fm=$(printf "%02x" $family)_$(printf "%02x" $model) 13 | 14 | # TODO: This works for all E5 v2 and E7 v2. There are probably other 15 | # CPUIDs that apply. 16 | if [[ $fm != 06_3e ]]; then 17 | echo "Unsupported family/model $fm" >&2 18 | exit 1 19 | fi 20 | 21 | # Get iMC uncore boxes. In the E5 v2 there are four. 22 | imcs=($(cd -q /sys/bus/event_source/devices/; echo uncore_imc_*)) 23 | 24 | # Construct the event list. 25 | events=() 26 | for imc in $imcs; do 27 | events=($events -e $imc/event=0x04,umask=0x03/ -e $imc/event=0x04,umask=0x0c/) 28 | done 29 | 30 | # Uncore events must be monitored system-wide. 31 | output=$(perf stat -a $events $* 2>&1) 32 | echo $output 33 | 34 | echo $output | awk ' 35 | /uncore_imc_.*umask=0x03/ {read += $1} 36 | /uncore_imc_.*umask=0x0c/ {write += $1} 37 | /time elapsed/ {time = $1} 38 | END { 39 | print (64 * read / time / 1024 / 1024) " MiB read per second" 40 | print (64 * write / time / 1024 / 1024) " MiB written per second" 41 | }' 42 | -------------------------------------------------------------------------------- /perfsession/ranges.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package perfsession 6 | 7 | import "sort" 8 | 9 | // Ranges stores data associated with ranges of uint64 values and 10 | // supports efficient lookup. 11 | type Ranges struct { 12 | rs []rangeEnt 13 | sorted bool 14 | } 15 | 16 | type rangeEnt struct { 17 | lo, hi uint64 18 | val interface{} 19 | } 20 | 21 | // Add inserts val for range [lo, hi). 22 | // 23 | // Add is undefined if [lo, hi) overlaps a range already in r. 24 | func (r *Ranges) Add(lo, hi uint64, val interface{}) { 25 | r.rs = append(r.rs, rangeEnt{lo, hi, val}) 26 | r.sorted = false 27 | } 28 | 29 | // Get returns the range and the value for the range containing idx. 30 | func (r *Ranges) Get(idx uint64) (lo, hi uint64, val interface{}, ok bool) { 31 | if r == nil { 32 | return 0, 0, nil, false 33 | } 34 | 35 | rs := r.rs 36 | if !r.sorted { 37 | sort.Slice(rs, func(i, j int) bool { 38 | return rs[i].lo < rs[j].lo 39 | }) 40 | r.sorted = true 41 | } 42 | 43 | i := sort.Search(len(rs), func(i int) bool { 44 | return idx < rs[i].hi 45 | }) 46 | if i < len(rs) && rs[i].lo <= idx && idx < rs[i].hi { 47 | return rs[i].lo, rs[i].hi, rs[i].val, true 48 | } 49 | return 0, 0, nil, false 50 | } 51 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-behaviors/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-behaviors", 3 | "version": "1.0.3", 4 | "description": "Common behaviors across the paper elements", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "main": [ 9 | "paper-button-behavior.html", 10 | "paper-radio-button-behavior.html" 11 | ], 12 | "keywords": [ 13 | "web-components", 14 | "web-component", 15 | "polymer", 16 | "paper", 17 | "behavior" 18 | ], 19 | "private": true, 20 | "repository": { 21 | "type": "git", 22 | "url": "git://github.com/PolymerElements/paper-behaviors" 23 | }, 24 | "license": "http://polymer.github.io/LICENSE.txt", 25 | "homepage": "https://github.com/PolymerElements/paper-behaviors", 26 | "dependencies": { 27 | "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0", 28 | "polymer": "Polymer/polymer#^1.0.0" 29 | }, 30 | "devDependencies": { 31 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 32 | "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", 33 | "paper-material": "PolymerElements/paper-material#^1.0.0", 34 | "paper-ripple": "PolymerElements/paper-ripple#^1.0.0", 35 | "test-fixture": "PolymerElements/test-fixture#^1.0.0", 36 | "web-component-tester": "*", 37 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-resizable-behavior/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-resizable-behavior", 3 | "version": "1.0.2", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "Coordinates the flow of resizeable elements", 6 | "private": true, 7 | "main": "iron-resizable-behavior.html", 8 | "authors": [ 9 | "The Polymer Authors" 10 | ], 11 | "keywords": [ 12 | "web-components", 13 | "polymer", 14 | "iron", 15 | "behavior" 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/PolymerElements/iron-resizable-behavior.git" 20 | }, 21 | "dependencies": { 22 | "polymer": "Polymer/polymer#^1.0.0" 23 | }, 24 | "devDependencies": { 25 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 26 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 27 | "web-component-tester": "*", 28 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 29 | }, 30 | "homepage": "https://github.com/polymerelements/iron-resizable-behavior", 31 | "_release": "1.0.2", 32 | "_resolution": { 33 | "type": "version", 34 | "tag": "v1.0.2", 35 | "commit": "85de8ba28be2bf17c81d6436ef1119022b003674" 36 | }, 37 | "_source": "git://github.com/polymerelements/iron-resizable-behavior.git", 38 | "_target": "^1.0.0", 39 | "_originalSource": "polymerelements/iron-resizable-behavior" 40 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-selector/README.md: -------------------------------------------------------------------------------- 1 | iron-selector 2 | ============= 3 | 4 | `iron-selector` is an element which can be used to manage a list of elements 5 | that can be selected. Tapping on the item will make the item selected. The `selected` indicates 6 | which item is being selected. The default is to use the index of the item. 7 | 8 | Example: 9 | 10 | ```html 11 | 12 |
Item 1
13 |
Item 2
14 |
Item 3
15 |
16 | ``` 17 | 18 | If you want to use the attribute value of an element for `selected` instead of the index, 19 | set `attrForSelected` to the name of the attribute. For example, if you want to select item by 20 | `name`, set `attrForSelected` to `name`. 21 | 22 | Example: 23 | 24 | ```html 25 | 26 |
Foo
27 |
Bar
28 |
Zot
29 |
30 | ``` 31 | 32 | `iron-selector` is not styled. Use the `iron-selected` CSS class to style the selected element. 33 | 34 | Example: 35 | 36 | ```html 37 | 42 | 43 | ... 44 | 45 | 46 |
Item 1
47 |
Item 2
48 |
Item 3
49 |
50 | ``` 51 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-iconset-svg/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-iconset-svg", 3 | "description": "Manages a set of svg icons", 4 | "version": "1.0.4", 5 | "keywords": [ 6 | "web-components", 7 | "polymer", 8 | "icon" 9 | ], 10 | "license": "http://polymer.github.io/LICENSE.txt", 11 | "private": true, 12 | "authors": [ 13 | "The Polymer Authors" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-iconset-svg.git" 18 | }, 19 | "dependencies": { 20 | "polymer": "polymer/polymer#^1.0.0", 21 | "iron-meta": "polymerelements/iron-meta#^1.0.0" 22 | }, 23 | "devDependencies": { 24 | "paper-styles": "polymerelements/paper-styles#^1.0.2", 25 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 26 | "iron-icon": "polymerelements/iron-icon#^1.0.0", 27 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 28 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", 29 | "web-component-tester": "*" 30 | }, 31 | "homepage": "https://github.com/polymerelements/iron-iconset-svg", 32 | "_release": "1.0.4", 33 | "_resolution": { 34 | "type": "version", 35 | "tag": "v1.0.4", 36 | "commit": "795aa82ac22971421bc4375efbd2419ebba9099f" 37 | }, 38 | "_source": "git://github.com/polymerelements/iron-iconset-svg.git", 39 | "_target": "^1.0.0", 40 | "_originalSource": "polymerelements/iron-iconset-svg" 41 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-button/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-button", 3 | "version": "1.0.3", 4 | "description": "Material design button", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "keywords": [ 9 | "web-components", 10 | "web-component", 11 | "polymer", 12 | "paper", 13 | "button" 14 | ], 15 | "main": "paper-button.html", 16 | "private": true, 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/PolymerElements/paper-button" 20 | }, 21 | "license": "http://polymer.github.io/LICENSE.txt", 22 | "homepage": "https://github.com/PolymerElements/paper-button", 23 | "dependencies": { 24 | "paper-ripple": "polymerelements/paper-ripple#^1.0.0", 25 | "paper-material": "polymerelements/paper-material#^1.0.0", 26 | "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0", 27 | "polymer": "Polymer/polymer#^1.0.0" 28 | }, 29 | "devDependencies": { 30 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 31 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 32 | "iron-icon": "polymerelements/iron-icon#^1.0.0", 33 | "iron-icons": "polymerelements/iron-icons#^1.0.0", 34 | "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", 35 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 36 | "web-component-tester": "*", 37 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-ripple/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-ripple", 3 | "version": "1.0.1", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "Adds a material design ripple to any container", 6 | "private": true, 7 | "authors": [ 8 | "The Polymer Authors" 9 | ], 10 | "keywords": [ 11 | "web-components", 12 | "polymer", 13 | "ripple" 14 | ], 15 | "main": "paper-ripple.html", 16 | "dependencies": { 17 | "polymer": "Polymer/polymer#^1.0.0", 18 | "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0" 19 | }, 20 | "devDependencies": { 21 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 22 | "iron-icon": "polymerelements/iron-icon#^1.0.0", 23 | "iron-icons": "polymerelements/iron-icons#^1.0.0", 24 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 25 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 26 | "web-component-tester": "*", 27 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 28 | }, 29 | "homepage": "https://github.com/polymerelements/paper-ripple", 30 | "_release": "1.0.1", 31 | "_resolution": { 32 | "type": "version", 33 | "tag": "v1.0.1", 34 | "commit": "af19d904802437c305390bb03415c11661de3d0a" 35 | }, 36 | "_source": "git://github.com/polymerelements/paper-ripple.git", 37 | "_target": "^1.0.0", 38 | "_originalSource": "polymerelements/paper-ripple" 39 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-material/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-material", 3 | "version": "1.0.1", 4 | "description": "A material design container that looks like a lifted sheet of paper", 5 | "private": true, 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "keywords": [ 10 | "web-components", 11 | "web-component", 12 | "polymer", 13 | "paper", 14 | "container" 15 | ], 16 | "main": [ 17 | "paper-material.html" 18 | ], 19 | "repository": { 20 | "type": "git", 21 | "url": "git://github.com/PolymerElements/paper-material" 22 | }, 23 | "license": "http://polymer.github.io/LICENSE.txt", 24 | "homepage": "https://github.com/PolymerElements/paper-material", 25 | "ignore": [], 26 | "dependencies": { 27 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 28 | "polymer": "Polymer/polymer#^1.0.0" 29 | }, 30 | "devDependencies": { 31 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 32 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 33 | "web-component-tester": "*", 34 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 35 | }, 36 | "_release": "1.0.1", 37 | "_resolution": { 38 | "type": "version", 39 | "tag": "v1.0.1", 40 | "commit": "1663016f2b9f1deb197cfa93ef16d45d3de815c8" 41 | }, 42 | "_source": "git://github.com/polymerelements/paper-material.git", 43 | "_target": "^1.0.0", 44 | "_originalSource": "polymerelements/paper-material" 45 | } -------------------------------------------------------------------------------- /perffile/datasrclevelnum_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=DataSrcLevelNum"; DO NOT EDIT. 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func _() { 8 | // An "invalid array index" compiler error signifies that the constant values have changed. 9 | // Re-run the stringer command to generate them again. 10 | var x [1]struct{} 11 | _ = x[DataSrcLevelNumL1-1] 12 | _ = x[DataSrcLevelNumL2-2] 13 | _ = x[DataSrcLevelNumL3-3] 14 | _ = x[DataSrcLevelNumL4-4] 15 | _ = x[DataSrcLevelNumAnyCache-11] 16 | _ = x[DataSrcLevelNumLFB-12] 17 | _ = x[DataSrcLevelNumRAM-13] 18 | _ = x[DataSrcLevelNumPMEM-14] 19 | _ = x[DataSrcLevelNumNA-15] 20 | } 21 | 22 | const ( 23 | _DataSrcLevelNum_name_0 = "DataSrcLevelNumL1DataSrcLevelNumL2DataSrcLevelNumL3DataSrcLevelNumL4" 24 | _DataSrcLevelNum_name_1 = "DataSrcLevelNumAnyCacheDataSrcLevelNumLFBDataSrcLevelNumRAMDataSrcLevelNumPMEMDataSrcLevelNumNA" 25 | ) 26 | 27 | var ( 28 | _DataSrcLevelNum_index_0 = [...]uint8{0, 17, 34, 51, 68} 29 | _DataSrcLevelNum_index_1 = [...]uint8{0, 23, 41, 59, 78, 95} 30 | ) 31 | 32 | func (i DataSrcLevelNum) String() string { 33 | switch { 34 | case 1 <= i && i <= 4: 35 | i -= 1 36 | return _DataSrcLevelNum_name_0[_DataSrcLevelNum_index_0[i]:_DataSrcLevelNum_index_0[i+1]] 37 | case 11 <= i && i <= 15: 38 | i -= 11 39 | return _DataSrcLevelNum_name_1[_DataSrcLevelNum_index_1[i]:_DataSrcLevelNum_index_1[i+1]] 40 | default: 41 | return "DataSrcLevelNum(" + strconv.FormatInt(int64(i), 10) + ")" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-behaviors/test/test-elements.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 26 | 27 | 45 | 46 | 47 | 48 | 51 | 52 | 53 | 54 | 67 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-button/README.md: -------------------------------------------------------------------------------- 1 | paper-button 2 | ============ 3 | 4 | Material Design: Buttons 5 | 6 | `paper-button` is a button. When the user touches the button, a ripple effect emanates 7 | from the point of contact. It may be flat or raised. A raised button is styled with a 8 | shadow. 9 | 10 | Example: 11 | ```html 12 | flat button 13 | raised button 14 | No ripple effect 15 | ``` 16 | You may use custom DOM in the button body to create a variety of buttons. For example, to 17 | create a button with an icon and some text: 18 | 19 | ```html 20 | 21 | 22 | custom button content 23 | 24 | ``` 25 | ## Styling 26 | 27 | Style the button with CSS as you would a normal DOM element. 28 | 29 | ```css 30 | /* make #my-button green with yellow text */ 31 | #my-button { 32 | background: green; 33 | color: yellow; 34 | } 35 | ``` 36 | By default, the ripple is the same color as the foreground at 25% opacity. You may 37 | customize the color using this selector: 38 | 39 | ```css 40 | /* make #my-button use a blue ripple instead of foreground color */ 41 | #my-button::shadow paper-ripple { 42 | color: blue; 43 | } 44 | ``` 45 | The opacity of the ripple is not customizable via CSS. 46 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-menu-behavior/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-menu-behavior", 3 | "version": "1.0.1", 4 | "description": "Provides accessible menu behavior", 5 | "authors": "The Polymer Authors", 6 | "keywords": [ 7 | "web-components", 8 | "polymer", 9 | "behavior", 10 | "menu" 11 | ], 12 | "main": "iron-menu-behavior.html", 13 | "private": true, 14 | "repository": { 15 | "type": "git", 16 | "url": "git://github.com/PolymerElements/iron-menu-behavior" 17 | }, 18 | "license": "http://polymer.github.io/LICENSE.txt", 19 | "homepage": "https://github.com/PolymerElements/iron-menu-behavior", 20 | "ignore": [], 21 | "dependencies": { 22 | "iron-selector": "PolymerElements/iron-selector#^1.0.0", 23 | "polymer": "Polymer/polymer#^1.0.0", 24 | "iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0" 25 | }, 26 | "devDependencies": { 27 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 28 | "test-fixture": "PolymerElements/test-fixture#^1.0.0", 29 | "web-component-tester": "*", 30 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 31 | }, 32 | "_release": "1.0.1", 33 | "_resolution": { 34 | "type": "version", 35 | "tag": "v1.0.1", 36 | "commit": "3809f0eb7461c8ca63640aaa238775b3a25aa578" 37 | }, 38 | "_source": "git://github.com/polymerelements/iron-menu-behavior.git", 39 | "_target": "^1.0.0", 40 | "_originalSource": "polymerelements/iron-menu-behavior" 41 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-behaviors/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-behaviors", 3 | "version": "1.0.7", 4 | "description": "Provides a set of behaviors for the iron elements", 5 | "private": true, 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/PolymerElements/iron-behaviors.git" 12 | }, 13 | "main": [ 14 | "iron-button-state.html", 15 | "iron-control-state.html" 16 | ], 17 | "license": "http://polymer.github.io/LICENSE.txt", 18 | "dependencies": { 19 | "polymer": "Polymer/polymer#^1.0.0", 20 | "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" 21 | }, 22 | "devDependencies": { 23 | "paper-styles": "polymerelements/paper-styles#^1.0.2", 24 | "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", 25 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 26 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 27 | "web-component-tester": "*", 28 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 29 | }, 30 | "homepage": "https://github.com/PolymerElements/iron-behaviors", 31 | "_release": "1.0.7", 32 | "_resolution": { 33 | "type": "version", 34 | "tag": "v1.0.7", 35 | "commit": "033889b20c6b9ebb45a1ff153fbd667e153fe3f7" 36 | }, 37 | "_source": "git://github.com/PolymerElements/iron-behaviors.git", 38 | "_target": "^1.0.0", 39 | "_originalSource": "PolymerElements/iron-behaviors" 40 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-meta/README.md: -------------------------------------------------------------------------------- 1 | iron-meta 2 | ========= 3 | 4 | `iron-meta` is a generic element you can use for sharing information across the DOM tree. 5 | It uses [monostate pattern](http://c2.com/cgi/wiki?MonostatePattern) such that any 6 | instance of iron-meta has access to the shared 7 | information. You can use `iron-meta` to share whatever you want (or create an extension 8 | [like x-meta] for enhancements). 9 | 10 | The `iron-meta` instances containing your actual data can be loaded in an import, 11 | or constructed in any way you see fit. The only requirement is that you create them 12 | before you try to access them. 13 | 14 | Examples: 15 | 16 | If I create an instance like this: 17 | 18 | ```html 19 | 20 | ``` 21 | 22 | Note that value="foo/bar" is the metadata I've defined. I could define more 23 | attributes or use child nodes to define additional metadata. 24 | 25 | Now I can access that element (and it's metadata) from any iron-meta instance 26 | via the byKey method, e.g. 27 | 28 | ```javascript 29 | meta.byKey('info').getAttribute('value'); 30 | ``` 31 | 32 | Pure imperative form would be like: 33 | 34 | ```javascript 35 | document.createElement('iron-meta').byKey('info').getAttribute('value'); 36 | ``` 37 | 38 | Or, in a Polymer element, you can include a meta in your template: 39 | 40 | ```html 41 | 42 | ``` 43 | 44 | ```javascript 45 | this.$.meta.byKey('info').getAttribute('value'); 46 | ``` 47 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icon/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-icon", 3 | "private": true, 4 | "version": "1.0.3", 5 | "license": "http://polymer.github.io/LICENSE.txt", 6 | "description": "An element that supports displaying an icon", 7 | "main": "iron-icon.html", 8 | "author": [ 9 | "The Polymer Authors" 10 | ], 11 | "keywords": [ 12 | "web-components", 13 | "polymer", 14 | "icon" 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/PolymerElements/iron-icon.git" 19 | }, 20 | "dependencies": { 21 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 22 | "iron-meta": "polymerelements/iron-meta#^1.0.0", 23 | "polymer": "Polymer/polymer#^1.0.0" 24 | }, 25 | "devDependencies": { 26 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 27 | "iron-iconset": "polymerelements/iron-iconset#^1.0.0", 28 | "iron-icons": "polymerelements/iron-icons#^1.0.0", 29 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 30 | "web-component-tester": "*", 31 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 32 | }, 33 | "homepage": "https://github.com/polymerelements/iron-icon", 34 | "_release": "1.0.3", 35 | "_resolution": { 36 | "type": "version", 37 | "tag": "v1.0.3", 38 | "commit": "818c2d2af2d3287a444e4cf0a19c2b5717d480e8" 39 | }, 40 | "_source": "git://github.com/polymerelements/iron-icon.git", 41 | "_target": "^1.0.0", 42 | "_originalSource": "polymerelements/iron-icon" 43 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-pages/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-pages", 3 | "version": "1.0.3", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "Organizes a set of pages and shows one at a time", 6 | "main": "iron-pages.html", 7 | "private": true, 8 | "authors": [ 9 | "The Polymer Authors" 10 | ], 11 | "repository": { 12 | "type": "git", 13 | "url": "git://github.com/PolymerElements/iron-pages.git" 14 | }, 15 | "keywords": [ 16 | "web-components", 17 | "polymer", 18 | "container" 19 | ], 20 | "dependencies": { 21 | "iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0", 22 | "iron-selector": "polymerelements/iron-selector#^1.0.0", 23 | "polymer": "Polymer/polymer#^1.0.0" 24 | }, 25 | "devDependencies": { 26 | "paper-styles": "polymerelements/paper-styles#^1.0.2", 27 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 28 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 29 | "web-component-tester": "*", 30 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 31 | }, 32 | "homepage": "https://github.com/PolymerElements/iron-pages", 33 | "_release": "1.0.3", 34 | "_resolution": { 35 | "type": "version", 36 | "tag": "v1.0.3", 37 | "commit": "ca6e7892786d60d8cb6935d8376b27c3851fdbf5" 38 | }, 39 | "_source": "git://github.com/PolymerElements/iron-pages.git", 40 | "_target": "~1.0.3", 41 | "_originalSource": "PolymerElements/iron-pages", 42 | "_direct": true 43 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-a11y-keys-behavior/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-a11y-keys-behavior", 3 | "version": "1.0.5", 4 | "description": "A behavior that enables keybindings for greater a11y.", 5 | "keywords": [ 6 | "web-components", 7 | "web-component", 8 | "polymer", 9 | "a11y", 10 | "input" 11 | ], 12 | "authors": [ 13 | "The Polymer Authors" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git" 18 | }, 19 | "main": "iron-a11y-keys-behavior.html", 20 | "license": "http://polymer.github.io/LICENSE.txt", 21 | "dependencies": { 22 | "polymer": "Polymer/polymer#^1.0.0" 23 | }, 24 | "devDependencies": { 25 | "paper-styles": "PolymerElements/paper-styles#^1.0.2", 26 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 27 | "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", 28 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 29 | "web-component-tester": "*", 30 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 31 | }, 32 | "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", 33 | "_release": "1.0.5", 34 | "_resolution": { 35 | "type": "version", 36 | "tag": "v1.0.5", 37 | "commit": "cf833eab5c55a26c5aa92e56d3fcb079120ce66a" 38 | }, 39 | "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", 40 | "_target": "^1.0.0", 41 | "_originalSource": "polymerelements/iron-a11y-keys-behavior" 42 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-meta/test/basic.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | iron-meta-basic 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-behaviors/paper-inky-focus-behavior.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 45 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-header-panel/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-header-panel", 3 | "version": "1.0.4", 4 | "description": "A header and content wrapper for layout with headers", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "keywords": [ 9 | "web-components", 10 | "polymer", 11 | "layout" 12 | ], 13 | "main": [ 14 | "paper-header-panel.html" 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/PolymerElements/paper-header-panel.git" 19 | }, 20 | "private": true, 21 | "license": "http://polymer.github.io/LICENSE.txt", 22 | "homepage": "https://github.com/PolymerElements/paper-header-panel", 23 | "ignore": [], 24 | "dependencies": { 25 | "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", 26 | "polymer": "Polymer/polymer#^1.0.0" 27 | }, 28 | "devDependencies": { 29 | "web-component-tester": "*", 30 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 31 | "test-fixture": "PolymerElements/test-fixture#^1.0.0", 32 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", 33 | "paper-styles": "PolymerElements/paper-styles#^1.0.0" 34 | }, 35 | "_release": "1.0.4", 36 | "_resolution": { 37 | "type": "version", 38 | "tag": "v1.0.4", 39 | "commit": "e115448483684c30fb059afefbb944aa5fed7f24" 40 | }, 41 | "_source": "git://github.com/PolymerElements/paper-header-panel.git", 42 | "_target": "~1.0.4", 43 | "_originalSource": "PolymerElements/paper-header-panel", 44 | "_direct": true 45 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /perffile/branchsampletype_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "bitstringer -type=BranchSampleType"; DO NOT EDIT 2 | 3 | package perffile 4 | 5 | import "strconv" 6 | 7 | func (i BranchSampleType) String() string { 8 | if i == 0 { 9 | return "0" 10 | } 11 | s := "" 12 | if i&BranchSampleAbortTX != 0 { 13 | s += "AbortTX|" 14 | } 15 | if i&BranchSampleAny != 0 { 16 | s += "Any|" 17 | } 18 | if i&BranchSampleAnyCall != 0 { 19 | s += "AnyCall|" 20 | } 21 | if i&BranchSampleAnyReturn != 0 { 22 | s += "AnyReturn|" 23 | } 24 | if i&BranchSampleCall != 0 { 25 | s += "Call|" 26 | } 27 | if i&BranchSampleCallStack != 0 { 28 | s += "CallStack|" 29 | } 30 | if i&BranchSampleCond != 0 { 31 | s += "Cond|" 32 | } 33 | if i&BranchSampleHV != 0 { 34 | s += "HV|" 35 | } 36 | if i&BranchSampleHWIndex != 0 { 37 | s += "HWIndex|" 38 | } 39 | if i&BranchSampleInTX != 0 { 40 | s += "InTX|" 41 | } 42 | if i&BranchSampleIndCall != 0 { 43 | s += "IndCall|" 44 | } 45 | if i&BranchSampleIndJump != 0 { 46 | s += "IndJump|" 47 | } 48 | if i&BranchSampleKernel != 0 { 49 | s += "Kernel|" 50 | } 51 | if i&BranchSampleNoCycles != 0 { 52 | s += "NoCycles|" 53 | } 54 | if i&BranchSampleNoFlags != 0 { 55 | s += "NoFlags|" 56 | } 57 | if i&BranchSampleNoTX != 0 { 58 | s += "NoTX|" 59 | } 60 | if i&BranchSampleTypeSave != 0 { 61 | s += "TypeSave|" 62 | } 63 | if i&BranchSampleUser != 0 { 64 | s += "User|" 65 | } 66 | i &^= 262143 67 | if i == 0 { 68 | return s[:len(s)-1] 69 | } 70 | return s + "0x" + strconv.FormatUint(uint64(i), 16) 71 | } 72 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-meta/demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | iron-meta 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |

<iron-meta>

27 | 28 | The value stored at key="info" is . 29 |
30 | 31 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icons/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-icons", 3 | "version": "1.0.3", 4 | "description": "A set of icons for use with iron-icon", 5 | "authors": [ 6 | "The Polymer Authors" 7 | ], 8 | "keywords": [ 9 | "web-components", 10 | "polymer", 11 | "icon" 12 | ], 13 | "main": "iron-icons.html", 14 | "private": true, 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/PolymerElements/iron-icons" 18 | }, 19 | "license": "http://polymer.github.io/LICENSE.txt", 20 | "homepage": "https://github.com/PolymerElements/paper-icons", 21 | "dependencies": { 22 | "iron-icon": "polymerelements/iron-icon#^1.0.0", 23 | "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0", 24 | "polymer": "Polymer/polymer#^1.0.0" 25 | }, 26 | "devDependencies": { 27 | "paper-styles": "polymerelements/paper-styles#^1.0.2", 28 | "iron-component-page": "polymerelements/iron-component-page#1.0.0", 29 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 30 | "iron-meta": "polymerelements/iron-meta#^1.0.0", 31 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 32 | }, 33 | "ignore": [ 34 | "util", 35 | "update-icons.sh" 36 | ], 37 | "_release": "1.0.3", 38 | "_resolution": { 39 | "type": "version", 40 | "tag": "v1.0.3", 41 | "commit": "036325be99c33c052ac807a705aacad70be1127f" 42 | }, 43 | "_source": "git://github.com/polymerelements/iron-icons.git", 44 | "_target": "^1.0.0", 45 | "_originalSource": "polymerelements/iron-icons" 46 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-toolbar/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-toolbar", 3 | "version": "1.0.4", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "A material design toolbar that is easily customizable", 6 | "private": true, 7 | "main": [ 8 | "paper-toolbar.html" 9 | ], 10 | "authors": [ 11 | "The Polymer Authors" 12 | ], 13 | "keywords": [ 14 | "web-components", 15 | "polymer", 16 | "toolbar", 17 | "layout" 18 | ], 19 | "repository": { 20 | "type": "git", 21 | "url": "git://github.com/PolymerElements/paper-toolbar.git" 22 | }, 23 | "dependencies": { 24 | "paper-styles": "PolymerElements/paper-styles#^1.0.0", 25 | "polymer": "Polymer/polymer#^1.0.0" 26 | }, 27 | "devDependencies": { 28 | "iron-icons": "PolymerElements/iron-icons#^1.0.0", 29 | "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0", 30 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 31 | "test-fixture": "PolymerElements/test-fixture#^1.0.0", 32 | "web-component-tester": "*", 33 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 34 | }, 35 | "homepage": "https://github.com/PolymerElements/paper-toolbar", 36 | "_release": "1.0.4", 37 | "_resolution": { 38 | "type": "version", 39 | "tag": "v1.0.4", 40 | "commit": "15096d1c9ee6cc547eaf078b431f3e07d0968367" 41 | }, 42 | "_source": "git://github.com/PolymerElements/paper-toolbar.git", 43 | "_target": "~1.0.4", 44 | "_originalSource": "PolymerElements/paper-toolbar", 45 | "_direct": true 46 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-tabs/README.md: -------------------------------------------------------------------------------- 1 | paper-tabs 2 | ============ 3 | 4 | `paper-tabs` makes it easy to explore and switch between different views or functional aspects of 5 | an app, or to browse categorized data sets. 6 | 7 | Use `selected` property to get or set the selected tab. 8 | 9 | Example: 10 | 11 | ```html 12 | 13 | TAB 1 14 | TAB 2 15 | TAB 3 16 | 17 | ``` 18 | 19 | See paper-tab for more information about 20 | `paper-tab`. 21 | 22 | A common usage for `paper-tabs` is to use it along with `iron-pages` to switch 23 | between different views. 24 | 25 | ```html 26 | 27 | Tab 1 28 | Tab 2 29 | Tab 3 30 | 31 | 32 | 33 |
Page 1
34 |
Page 2
35 |
Page 3
36 |
37 | ``` 38 | 39 | To use links in tabs, add `link` attribute to `paper-tab` and put an `` 40 | element in `paper-tab`. 41 | 42 | Example: 43 | 44 | ```html 45 | 46 | 47 | TAB ONE 48 | 49 | 50 | TAB TWO 51 | 52 | 53 | TAB THREE 54 | 55 | 56 | ``` 57 | -------------------------------------------------------------------------------- /cmd/memheat/draw.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "fmt" 9 | "image/color" 10 | 11 | "github.com/aclements/go-perf/scale" 12 | ) 13 | 14 | type TicksFormat struct { 15 | tickLen, minorTickLen, textSep float64 16 | tickColor, labelColor color.Color 17 | labelFormat string 18 | } 19 | 20 | func (f *TicksFormat) HTicks(svg *SVG, scale scale.Interface, x scale.OutputScale, y float64) { 21 | x.Crop() 22 | 23 | major, minor := scale.Ticks(5) 24 | 25 | // Draw ticks 26 | if f.tickColor == nil { 27 | svg.SetStroke(color.Black) 28 | } else { 29 | svg.SetStroke(f.tickColor) 30 | } 31 | svg.NewPath() 32 | for _, sx := range major { 33 | if x, ok := x.Of(scale.Of(sx)); ok { 34 | svg.MoveTo(x, y) 35 | svg.LineToRel(0, -f.tickLen) 36 | } 37 | } 38 | for _, sx := range minor { 39 | if x, ok := x.Of(scale.Of(sx)); ok { 40 | svg.MoveTo(x, y) 41 | svg.LineToRel(0, -f.minorTickLen) 42 | } 43 | } 44 | svg.Stroke() 45 | svg.SetStroke(nil) 46 | 47 | // Draw labels 48 | lOpts := TextOpts{Anchor: AnchorMiddle} 49 | if f.labelFormat != "" { 50 | if f.labelColor == nil { 51 | svg.SetFill(color.Black) 52 | } else { 53 | svg.SetFill(f.labelColor) 54 | } 55 | for _, sx := range major { 56 | if x, ok := x.Of(scale.Of(sx)); ok { 57 | l := fmt.Sprintf(f.labelFormat, sx) 58 | svg.Text(x, y-f.tickLen-f.textSep, lOpts, l) 59 | } 60 | } 61 | svg.SetFill(nil) 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-icon-button/README.md: -------------------------------------------------------------------------------- 1 | paper-icon-button 2 | ================= 3 | 4 | Material Design: Buttons 5 | 6 | `paper-icon-button` is a button with an image placed at the center. When the user touches 7 | the button, a ripple effect emanates from the center of the button. 8 | 9 | `paper-icon-button` includes a default icon set. Use `icon` to specify which icon 10 | from the icon set to use. 11 | 12 | ```html 13 | 14 | ``` 15 | 16 | See [`iron-iconset`](#iron-iconset) for more information about 17 | how to use a custom icon set. 18 | 19 | Example: 20 | 21 | ```html 22 | 23 | 24 | 25 | 26 | ``` 27 | 28 | Styling 29 | ------- 30 | 31 | Style the button with CSS as you would a normal DOM element. If you are using the icons 32 | provided by `iron-icons`, they will inherit the foreground color of the button. 33 | 34 | ```html 35 | 36 | 37 | ``` 38 | 39 | By default, the ripple is the same color as the foreground at 25% opacity. You may 40 | customize the color using this selector: 41 | 42 | ```css 43 | /* make #my-button use a blue ripple instead of foreground color */ 44 | #my-button::shadow #ripple { 45 | color: blue; 46 | } 47 | ``` 48 | 49 | The opacity of the ripple is not customizable via CSS. 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | go-perf is a set of tools for working with Linux perf.data profiles, 2 | as well as a set of Go packages for parsing and interpreting such 3 | profiles. 4 | 5 | memlat 6 | ------ 7 | 8 | memlat is a web-based interactive browser for memory load latency 9 | profiles. Such profiles give deep and detailed insight in to the 10 | sources of memory stalls and conflicts, but are difficult to interpret 11 | using traditional profiling tools. See the 12 | [detailed documentation on godoc](http://godoc.org/github.com/aclements/go-perf/cmd/memlat). 13 | 14 | There is also a predecessor of memlat in `cmd/memheat`. This tool 15 | generates static SVG files summarizing memory load latency 16 | distributions by function and source line. This may be removed in the 17 | future. 18 | 19 | dump 20 | ---- 21 | 22 | dump prints the detailed decoded contents of a perf.data profile. It's 23 | similar to `perf report -D`, but is somewhat less mysterious. It's 24 | particularly useful when developing with the perffile library because 25 | it prints everything in terms of perffile structures. 26 | 27 | Libraries 28 | --------- 29 | 30 | This repository also contains two Go packages for parsing and 31 | interpreting perf.data files. 32 | 33 | [perffile](http://godoc.org/github.com/aclements/go-perf/perffile) 34 | provides a parser for perf.data files. It can interpret all current 35 | record types and almost all metadata fields. 36 | 37 | [perfsession](http://godoc.org/github.com/aclements/go-perf/perfsession) 38 | provides utilities for tracking session state while processing a 39 | perf.data file. Its API is still evolving and should be considered 40 | unstable. 41 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-ajax/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iron-ajax", 3 | "version": "1.0.4", 4 | "description": "Makes it easy to make ajax calls and parse the response", 5 | "private": true, 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "keywords": [ 10 | "web-components", 11 | "polymer", 12 | "ajax" 13 | ], 14 | "main": [ 15 | "iron-ajax.html", 16 | "iron-request.html" 17 | ], 18 | "repository": { 19 | "type": "git", 20 | "url": "git://github.com/PolymerElements/iron-ajax.git" 21 | }, 22 | "license": "http://polymer.github.io/LICENSE.txt", 23 | "homepage": "https://github.com/PolymerElements/iron-ajax", 24 | "ignore": [], 25 | "dependencies": { 26 | "promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0", 27 | "polymer": "Polymer/polymer#^1.0.0" 28 | }, 29 | "devDependencies": { 30 | "iron-component-page": "polymerelements/iron-component-page#^1.0.0", 31 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 32 | "iron-image": "polymerelements/iron-image#^1.0.0", 33 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 34 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 35 | "web-component-tester": "*", 36 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" 37 | }, 38 | "_release": "1.0.4", 39 | "_resolution": { 40 | "type": "version", 41 | "tag": "v1.0.4", 42 | "commit": "0aaba00fc2891040d2fbf35dcc9816b7655f2bed" 43 | }, 44 | "_source": "git://github.com/PolymerElements/iron-ajax.git", 45 | "_target": "~1.0.4", 46 | "_originalSource": "PolymerElements/iron-ajax", 47 | "_direct": true 48 | } -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-behaviors/demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | simple-button 18 | 19 | 20 | 21 | 22 | 23 | 30 | 31 | 32 | 33 |
34 |

Normal

35 | 36 | Hello World 37 | 38 |

Toggles

39 | 40 | Hello World 41 | 42 |

Disabled

43 | 44 | Hello World 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/iron-icons/hero.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/paper-tabs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-tabs", 3 | "version": "1.0.2", 4 | "license": "http://polymer.github.io/LICENSE.txt", 5 | "description": "Material design tabs", 6 | "private": true, 7 | "main": "paper-tabs.html", 8 | "authors": [ 9 | "The Polymer Authors" 10 | ], 11 | "keywords": [ 12 | "web-components", 13 | "polymer", 14 | "tabs", 15 | "control" 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/PolymerElements/paper-tabs.git" 20 | }, 21 | "dependencies": { 22 | "iron-behaviors": "polymerelements/iron-behaviors#^1.0.0", 23 | "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0", 24 | "iron-icon": "polymerelements/iron-icon#^1.0.0", 25 | "iron-iconset-svg": "polymerelements/iron-iconset-svg#^1.0.0", 26 | "iron-menu-behavior": "polymerelements/iron-menu-behavior#^1.0.0", 27 | "iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0", 28 | "paper-ripple": "polymerelements/paper-ripple#^1.0.0", 29 | "paper-styles": "polymerelements/paper-styles#^1.0.0", 30 | "polymer": "Polymer/polymer#^1.0.0", 31 | "paper-icon-button": "polymerelements/paper-icon-button#^1.0.0" 32 | }, 33 | "devDependencies": { 34 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 35 | "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", 36 | "paper-toolbar": "polymerelements/paper-toolbar#^1.0.0", 37 | "test-fixture": "polymerelements/test-fixture#^1.0.0", 38 | "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", 39 | "web-component-tester": "*" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /internal/cparse/pp.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cparse 6 | 7 | import ( 8 | "fmt" 9 | "io" 10 | "os" 11 | "os/exec" 12 | "regexp" 13 | "strings" 14 | ) 15 | 16 | type BuildEnv struct { 17 | CCArgs []string 18 | } 19 | 20 | var macroRe = regexp.MustCompile(`^#define ([_a-zA-Z][_a-zA-Z0-9]*)`) 21 | 22 | // FindMacros returns the names of all macros defined by the C source 23 | // in r. 24 | func FindMacros(env *BuildEnv, r io.Reader) ([]string, error) { 25 | ccArgs := append([]string(nil), env.CCArgs...) 26 | ccArgs = append(ccArgs, "-x", "c", "-E", "-dM", "-") 27 | cc := exec.Command("cc", ccArgs...) 28 | cc.Stdin = r 29 | cc.Stderr = os.Stderr 30 | out, err := cc.Output() 31 | if err != nil { 32 | return nil, err 33 | } 34 | var macros []string 35 | lines := strings.Split(string(out), "\n") 36 | for _, line := range lines { 37 | if line == "" { 38 | continue 39 | } 40 | m := macroRe.FindStringSubmatch(line) 41 | if m == nil { 42 | return nil, fmt.Errorf("failed to parse macro %q", line) 43 | } 44 | macros = append(macros, m[1]) 45 | } 46 | return macros, nil 47 | } 48 | 49 | // Preprocess invokes the C preprocessor to pre-process the C source 50 | // in r. 51 | func Preprocess(env *BuildEnv, r io.Reader) ([]byte, error) { 52 | // Invoke C compiler for pre-processing. 53 | ccArgs := append([]string(nil), env.CCArgs...) 54 | ccArgs = append(ccArgs, "-x", "c", "-E", "-") 55 | cc := exec.Command("cc", ccArgs...) 56 | cc.Stdin = r 57 | cc.Stderr = os.Stderr 58 | return cc.Output() 59 | } 60 | -------------------------------------------------------------------------------- /cmd/memlat/static/bower_components/polymer/LICENSE.txt: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 The Polymer Authors. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are 5 | // met: 6 | // 7 | // * Redistributions of source code must retain the above copyright 8 | // notice, this list of conditions and the following disclaimer. 9 | // * Redistributions in binary form must reproduce the above 10 | // copyright notice, this list of conditions and the following disclaimer 11 | // in the documentation and/or other materials provided with the 12 | // distribution. 13 | // * Neither the name of Google Inc. nor the names of its 14 | // contributors may be used to endorse or promote products derived from 15 | // this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /perffile/cpuset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package perffile 6 | 7 | import ( 8 | "fmt" 9 | "sort" 10 | "strconv" 11 | "strings" 12 | ) 13 | 14 | // A CPUSet represents a set of CPUs by CPU index. 15 | type CPUSet []int 16 | 17 | func parseCPUSet(str string) (CPUSet, error) { 18 | var err error 19 | out := CPUSet{} 20 | for _, r := range strings.Split(str, ",") { 21 | var lo, hi int 22 | dash := strings.Index(r, "-") 23 | if dash == -1 { 24 | lo, err = strconv.Atoi(r) 25 | if err != nil { 26 | return nil, err 27 | } 28 | hi = lo 29 | } else { 30 | lo, err = strconv.Atoi(r[:dash]) 31 | if err != nil { 32 | return nil, err 33 | } 34 | hi, err = strconv.Atoi(r[dash+1:]) 35 | if err != nil { 36 | return nil, err 37 | } 38 | } 39 | for cpu := lo; cpu <= hi; cpu++ { 40 | out = append(out, cpu) 41 | } 42 | } 43 | sort.Ints(out) 44 | i, j := 0, 0 45 | for ; i < len(out); i++ { 46 | if i != j && out[i] == out[j] { 47 | continue 48 | } 49 | out[j] = out[i] 50 | j++ 51 | } 52 | return out, nil 53 | } 54 | 55 | func (c CPUSet) String() string { 56 | if len(c) == 0 { 57 | return "" 58 | } 59 | 60 | out := "" 61 | lo, hi := c[0], c[0]-1 62 | flush := func() { 63 | if lo == hi { 64 | out = fmt.Sprintf("%s,%d", out, lo) 65 | } else { 66 | out = fmt.Sprintf("%s,%d-%d", out, lo, hi) 67 | } 68 | } 69 | for _, cpu := range c { 70 | if cpu == hi+1 { 71 | hi = cpu 72 | } else { 73 | flush() 74 | lo, hi = cpu, cpu 75 | } 76 | } 77 | flush() 78 | return out[1:] 79 | } 80 | --------------------------------------------------------------------------------