{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/15969","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/15969/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/15969/comments","events_url":"https://api.github.com/repos/golang/go/issues/15969/events","html_url":"https://github.com/golang/go/issues/15969","id":158611291,"number":15969,"title":"cmd/compile: Dtrace can't catch the return probe if go version is above 1.6","user":{"login":"chzyer","id":1464115,"avatar_url":"https://avatars.githubusercontent.com/u/1464115?v=3","gravatar_id":"","url":"https://api.github.com/users/chzyer","html_url":"https://github.com/chzyer","followers_url":"https://api.github.com/users/chzyer/followers","following_url":"https://api.github.com/users/chzyer/following{/other_user}","gists_url":"https://api.github.com/users/chzyer/gists{/gist_id}","starred_url":"https://api.github.com/users/chzyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chzyer/subscriptions","organizations_url":"https://api.github.com/users/chzyer/orgs","repos_url":"https://api.github.com/users/chzyer/repos","events_url":"https://api.github.com/users/chzyer/events{/privacy}","received_events_url":"https://api.github.com/users/chzyer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"randall77","id":6889504,"avatar_url":"https://avatars.githubusercontent.com/u/6889504?v=3","gravatar_id":"","url":"https://api.github.com/users/randall77","html_url":"https://github.com/randall77","followers_url":"https://api.github.com/users/randall77/followers","following_url":"https://api.github.com/users/randall77/following{/other_user}","gists_url":"https://api.github.com/users/randall77/gists{/gist_id}","starred_url":"https://api.github.com/users/randall77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randall77/subscriptions","organizations_url":"https://api.github.com/users/randall77/orgs","repos_url":"https://api.github.com/users/randall77/repos","events_url":"https://api.github.com/users/randall77/events{/privacy}","received_events_url":"https://api.github.com/users/randall77/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/40","html_url":"https://github.com/golang/go/milestones/Go1.7Maybe","labels_url":"https://api.github.com/repos/golang/go/milestones/40/labels","id":1714149,"number":40,"title":"Go1.7Maybe","description":"Things that might be okay for Go 1.7 if they get done in time.\r\n","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":27,"closed_issues":53,"state":"open","created_at":"2016-04-18T15:44:35Z","updated_at":"2016-06-12T18:27:15Z","due_on":"2016-07-31T07:00:00Z","closed_at":null},"comments":13,"created_at":"2016-06-06T06:52:17Z","updated_at":"2016-06-13T00:33:06Z","closed_at":null,"body":"> OS: darwin_amd64, OS X 10.11.4\r\n\r\nDtrace can't catch the `return` probe if go version is above 1.6, will it be fixed in the future versions?\r\n\r\n\r\n----\r\n\r\nsource code:\r\n```go\r\n// code.go\r\npackage main\r\n\r\nimport \"time\"\r\n\r\nfunc go1() {\r\n\r\n}\r\n\r\nfunc main() {\r\n\tfor _ = range time.Tick(time.Second) {\r\n\t\tgo1()\r\n\t}\r\n}\r\n```\r\n\r\nthen run it by\r\n```shell\r\n$ go run -gcflags -l code.go\r\n(press ctrl+T to get its pid)\r\nload: 1.46  cmd: code 63460 running 0.00u 0.00s\r\n```\r\n\r\nrun dtrace in another terminal\r\n```\r\ndtrace -n 'pid$1::main.go1:' 63460\r\n```\r\n\r\n----\r\n\r\nIn `go version go1.4.2 darwin/amd64`:\r\n```\r\ndtrace: description 'pid$1::main.go1:' matched 11 probes\r\nCPU     ID                    FUNCTION:NAME\r\n  0 1042341                   main.go1:entry\r\n  0 1042342                       main.go1:0\r\n  0 1042340                  main.go1:return\r\n  0 1042341                   main.go1:entry\r\n  0 1042342                       main.go1:0\r\n  0 1042340                  main.go1:return\r\n  0 1042341                   main.go1:entry\r\n  0 1042342                       main.go1:0\r\n  0 1042340                  main.go1:return\r\n^C\r\n```\r\n\r\nIn `go version go1.5.2 darwin/amd64`:\r\n```\r\ndtrace: description 'pid$1::main.go1:' matched 11 probes\r\nCPU     ID                    FUNCTION:NAME\r\n  0 1042341                   main.go1:entry\r\n  0 1042342                       main.go1:0\r\n  0 1042340                  main.go1:return\r\n  0 1042341                   main.go1:entry\r\n  0 1042342                       main.go1:0\r\n  0 1042340                  main.go1:return\r\n  0 1042341                   main.go1:entry\r\n  0 1042342                       main.go1:0\r\n  0 1042340                  main.go1:return\r\n^C\r\n```\r\n\r\nIn `go version go1.6.1 darwin/amd64`:\r\n```\r\ndtrace: description 'pid$1::main.go1:' matched 1 probe\r\nCPU     ID                    FUNCTION:NAME\r\n  0 1042340                   main.go1:entry\r\n  0 1042340                   main.go1:entry\r\n  0 1042340                   main.go1:entry\r\n  0 1042340                   main.go1:entry\r\n  0 1042340                   main.go1:entry\r\n^C\r\n```\r\n\r\nIn `go version go1.7beta1 darwin/amd64`:\r\n```\r\ndtrace: description 'pid$1::main.go1:' matched 1 probe\r\nCPU     ID                    FUNCTION:NAME\r\n  0 1042340                   main.go1:entry\r\n  0 1042340                   main.go1:entry\r\n  0 1042340                   main.go1:entry\r\n  0 1042340                   main.go1:entry\r\n^C\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/225469527","html_url":"https://github.com/golang/go/issues/15969#issuecomment-225469527","issue_url":"https://api.github.com/repos/golang/go/issues/15969","id":225469527,"user":{"login":"dr2chase","id":1928999,"avatar_url":"https://avatars.githubusercontent.com/u/1928999?v=3","gravatar_id":"","url":"https://api.github.com/users/dr2chase","html_url":"https://github.com/dr2chase","followers_url":"https://api.github.com/users/dr2chase/followers","following_url":"https://api.github.com/users/dr2chase/following{/other_user}","gists_url":"https://api.github.com/users/dr2chase/gists{/gist_id}","starred_url":"https://api.github.com/users/dr2chase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dr2chase/subscriptions","organizations_url":"https://api.github.com/users/dr2chase/orgs","repos_url":"https://api.github.com/users/dr2chase/repos","events_url":"https://api.github.com/users/dr2chase/events{/privacy}","received_events_url":"https://api.github.com/users/dr2chase/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T00:33:06Z","updated_at":"2016-06-13T00:33:06Z","body":"I just tested this on Darwin.  With CL24040:\r\n```\r\nsudo dtrace -n 'pid$1::main.go1:' 55567\r\ndtrace: description 'pid$1::main.go1:' matched 11 probes\r\nCPU     ID                    FUNCTION:NAME\r\n  0 227928                   main.go1:entry \r\n  0 227929                       main.go1:0 \r\n  0 227927                  main.go1:return \r\n  0 227928                   main.go1:entry \r\n  0 227929                       main.go1:0 \r\n  0 227927                  main.go1:return \r\n  0 227928                   main.go1:entry \r\n  0 227929                       main.go1:0 \r\n  0 227927                  main.go1:return \r\n  0 227928                   main.go1:entry \r\n  0 227929                       main.go1:0 \r\n```\r\n\r\nwithout:\r\n```\r\nsudo dtrace -n 'pid$1::main.go1:' 55623\r\ndtrace: description 'pid$1::main.go1:' matched 1 probe\r\nCPU     ID                    FUNCTION:NAME\r\n  0   3186                   main.go1:entry \r\n  0   3186                   main.go1:entry \r\n  0   3186                   main.go1:entry \r\n  0   3186                   main.go1:entry \r\n  0   3186                   main.go1:entry \r\n```\r\n\r\nSo, happy?\r\n"}}
{"actor":{"display_login":"dr2chase"}}