Skip to content

Instantly share code, notes, and snippets.

View grantseltzer's full-sized avatar

grantseltzer grantseltzer

View GitHub Profile
package main
import (
"debug/dwarf"
"debug/elf"
"fmt"
"io"
"log"
"os"
)
package main
import (
"debug/dwarf"
"debug/elf"
"fmt"
"io"
"log"
"os"
)
@grantseltzer
grantseltzer / main.go
Created October 6, 2020 15:21
Using Go BCC for instrumenting tail calls
package main
import (
"io/ioutil"
"log"
"time"
"github.com/iovisor/gobpf/bcc"
)
package main
//go:noinline
func parseMe(a int, b bool, c float32) {
// some code
}
func main() {
parseMe(1, true, 96.69)
package main
//go:noinline
func simpleFunction(x int) {
// some code
}
func main() {
simpleFunction(99)
}
@grantseltzer
grantseltzer / keybase.md
Last active March 14, 2020 00:37
keybase.md

Keybase proof

I hereby claim:

  • I am grantseltzer on github.
  • I am grantseltzer (https://keybase.io/grantseltzer) on keybase.
  • I have a public key ASAHcxmnVSLzcZ4MWTGettrpMzUkzvHSzC52uuB3xS_Pggo

To claim this, I am signing this object:

[
{
"functionName": "main.test_single_byte",
"args": [
{
"type": "BYTE",
"value": "dec=97\tchar='a'"
}
],
"procInfo": {
package main
import (
"fmt"
"log"
"os"
"os/signal"
"github.com/iovisor/gobpf/bcc"
)
package main
import (
"fmt"
"log"
"net/http"
)
//go:noinline
func handlerFunction(w http.ResponseWriter, r *http.Request) {
package switchers
import "testing"
func TestSwitch(t *testing.T) {
var (
a int
b int
c = &b