Skip to content

Instantly share code, notes, and snippets.

I am working on Go stuff

David Chase dr2chase

I am working on Go stuff
Block or report user

Report or block dr2chase

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dr2chase / gogollvm3.log
Created Jul 9, 2019
Raw compilation and benchmark results, Go vs Gollvm -O3 (including stdlib)
View gogollvm3.log
This file has been truncated, but you can view the full file.
( GOPATH=/usr/local/google/home/drchase/work/bent/gopath GO111MODULE=auto go get -d -t -v )
( GOPATH=/usr/local/google/home/drchase/work/bent/gopath GO111MODULE=auto go get -d -t -v )
There was an error running 'go get', stderr = (download)
package cannot find package "" in any of:
/usr/local/google/home/drchase/work/go/src/ (from $GOROOT)
/usr/local/google/home/drchase/work/bent/gopath/src/ (from $GOPATH)
DISABLING benchmark ethereum_storage
( GOPATH=/usr/local/google/home/drchase/work/bent/gopath GO111MODULE=auto go get -d -t -v )
dr2chase /
Created Jun 28, 2017
Notes from the Golang Boston Meetup 2017-06-27 debugging meeting

Here are my notes from the Golang Boston Meetup 2017-06-27 debugging meeting, such as they are. Corrections/elaborations welcome.

Notes from debugging group. TLDR: fmt.Println is still very common; nobody in the room knew everything -- i.e., there's debugging tricks and techniques that you probably don't know; there's ever so much "upside potential" in the current tools.

Techniques mentioned:

  • fmt.Println
View Evaluation of loop rotation in layout phase.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
dr2chase / ex3.bash
Created May 26, 2017
Sample script for running experiment.bash on several branches
View ex3.bash
git change master
variant=master_2017_05_24 bash -x ./experiment.bash
git change rotate_in_layout
variant=rotate_in_layout bash -x ./experiment.bash
dr2chase / experiment.bash
Last active May 26, 2017
Script for running a number of benchmarks comparing performance of GOEXPERIMENT=preemptibleloops
View experiment.bash
# Run with environment variable "variant" set to some useful string legal in a file name.
if [[ `arch` == "ppc64le" ]] ; then
View bench2ss
# filter output of multiple benchmarking experiments into a spreadsheet-friendly form
egrep '^[[a-zA-Z/]' "$1" | egrep -v "B/s|old speed" | \
sed -e '1,$s/[^0-9]*s ±[ 0-9]*%//g' | sed -e '1,$s/(p.*)//g' | \
sed -e '1,$s?[-_.a-z/]*git-codereview: changed to branch ?,?g' | \
sed -e '1,$s/ * /,/g' | \
sed -e '1,$s/,~//g' | \
sed -e '1,$s/,[-+][0-9.]*%//g' | \
dr2chase / javabugdemo.bash
Created May 15, 2017
Shell script that unpacks and runs a Java bug. Verification does not ensure static correctness of interface types.
View javabugdemo.bash
echo "interface I1 { }" >
echo "interface I2 { }" >
echo "interface I3 { }" >
echo "class I1I2 implements I1, I2 { }" > I1I2.java_good
echo "class I1I2 implements I1 { }" > I1I2.java_bad
echo "class I1I3I2 implements I1, I3, I2 { }" >
cat > <<'//EOF'
class tricky {
I2 i2;
dr2chase /
Last active Oct 5, 2017
Browsable copy of golang proposal CL 35054

Proposal: Passing Go arguments and results in registers.

Author(s): David Chase

Last updated: 2017-01-10

Discussion at


View duffsteptest_bug_updated.txt
~/GoogleDrive/work/tmp/ttmp$ dlv debug
Type 'help' for list of commands.
(dlv) b
Breakpoint 1 set at 0x2058 for ./step_hide.go:12
(dlv) c
> ./step_hide.go:12 (hits goroutine(11):1 total:3) (PC: 0x2058)
> ./step_hide.go:12 (hits goroutine(7):1 total:3) (PC: 0x2058)
> ./step_hide.go:12 (hits goroutine(5):1 total:3) (PC: 0x2058)
8: var v int = 99
View dlv_step_goroutine_change.log
dlv debug
Type 'help' for list of commands.
(dlv) b step_hide.go:35
Breakpoint 1 set at 0x237c for main.main() ./step_hide.go:35
(dlv) c
> main.main() ./step_hide.go:35 (hits goroutine(1):1 total:1) (PC: 0x237c)
30: x := v
31: y := x * x
32: var z int
33: threads()
You can’t perform that action at this time.