{"action":"closed","number":1372,"pull_request":{"url":"https://api.github.com/repos/iovisor/bcc/pulls/1372","id":143999891,"html_url":"https://github.com/iovisor/bcc/pull/1372","diff_url":"https://github.com/iovisor/bcc/pull/1372.diff","patch_url":"https://github.com/iovisor/bcc/pull/1372.patch","issue_url":"https://api.github.com/repos/iovisor/bcc/issues/1372","number":1372,"state":"closed","locked":false,"title":"add debug option to dump asm insns embedded with source","user":{"login":"yonghong-song","id":12237474,"avatar_url":"https://avatars0.githubusercontent.com/u/12237474?v=4","gravatar_id":"","url":"https://api.github.com/users/yonghong-song","html_url":"https://github.com/yonghong-song","followers_url":"https://api.github.com/users/yonghong-song/followers","following_url":"https://api.github.com/users/yonghong-song/following{/other_user}","gists_url":"https://api.github.com/users/yonghong-song/gists{/gist_id}","starred_url":"https://api.github.com/users/yonghong-song/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yonghong-song/subscriptions","organizations_url":"https://api.github.com/users/yonghong-song/orgs","repos_url":"https://api.github.com/users/yonghong-song/repos","events_url":"https://api.github.com/users/yonghong-song/events{/privacy}","received_events_url":"https://api.github.com/users/yonghong-song/received_events","type":"User","site_admin":false},"body":"The patch adds a new debug option \"DEBUG_SOURCE = 8\" to\r\ndump insns embedded with source. In C++ API, users\r\ncan change BPF constructor \"flag\" value to enable debug output.\r\nIn Python API, users can change \"debug\" value to enable\r\ndebug output. For example, for python test program test_usdt.py,\r\nthe debug output looks like below:\r\n\r\n......\r\nDisassembly of section .bpf.fn.do_trace1:\r\ndo_trace1:\r\n; int do_trace1(struct pt_regs *ctx) { // Line 110\r\n   0:   bf 16 00 00 00 00 00 00         r6 = r1\r\n   1:   b7 01 00 00 00 00 00 00         r1 = 0\r\n; struct probe_result_t1 result = {}; // Line 111\r\n   2:   7b 1a f0 ff 00 00 00 00         *(u64 *)(r10 - 16) = r1\r\n; switch(ctx->ip) { // Line   5\r\n   3:   79 61 80 00 00 00 00 00         r1 = *(u64 *)(r6 + 128)\r\n   4:   15 01 04 00 d7 06 40 00         if r1 == 4196055 goto 4\r\n   5:   55 01 06 00 ce 06 40 00         if r1 != 4196046 goto 6\r\n; case 0x4006ceULL: *((int8_t *)dest) = ctx->ax; __asm__ __volatile__(\"\": : :\"memory\"); return 0; // Line   6\r\n   6:   79 61 50 00 00 00 00 00         r1 = *(u64 *)(r6 + 80)\r\n......\r\n\r\nFor asm insns, byte code is also dumped out (similar to objdump).\r\nFor source codes, only lines in the module file are printed (as expected).\r\nThe line number is added at the end of source code, which is\r\nespecially helpful for inlined functions.\r\n\r\nCurrently, the debug output only goes to stderr.\r\nA subsequent patch will dump the per-function output into\r\n<BCC_PROG_TAG_DIR>/bpf_prog_<tag>/ if it is available.\r\n\r\nSigned-off-by: Yonghong Song <yhs@fb.com>","created_at":"2017-09-29T23:34:22Z","updated_at":"2017-10-03T03:56:29Z","closed_at":"2017-10-03T03:56:29Z","merged_at":"2017-10-03T03:56:29Z","merge_commit_sha":"91837cacfbe74141d88efcd096ff8d33a1517d2d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"brendangregg","id":1101211,"avatar_url":"https://avatars3.githubusercontent.com/u/1101211?v=4","gravatar_id":"","url":"https://api.github.com/users/brendangregg","html_url":"https://github.com/brendangregg","followers_url":"https://api.github.com/users/brendangregg/followers","following_url":"https://api.github.com/users/brendangregg/following{/other_user}","gists_url":"https://api.github.com/users/brendangregg/gists{/gist_id}","starred_url":"https://api.github.com/users/brendangregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendangregg/subscriptions","organizations_url":"https://api.github.com/users/brendangregg/orgs","repos_url":"https://api.github.com/users/brendangregg/repos","events_url":"https://api.github.com/users/brendangregg/events{/privacy}","received_events_url":"https://api.github.com/users/brendangregg/received_events","type":"User","site_admin":false},{"login":"goldshtn","id":1685437,"avatar_url":"https://avatars1.githubusercontent.com/u/1685437?v=4","gravatar_id":"","url":"https://api.github.com/users/goldshtn","html_url":"https://github.com/goldshtn","followers_url":"https://api.github.com/users/goldshtn/followers","following_url":"https://api.github.com/users/goldshtn/following{/other_user}","gists_url":"https://api.github.com/users/goldshtn/gists{/gist_id}","starred_url":"https://api.github.com/users/goldshtn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldshtn/subscriptions","organizations_url":"https://api.github.com/users/goldshtn/orgs","repos_url":"https://api.github.com/users/goldshtn/repos","events_url":"https://api.github.com/users/goldshtn/events{/privacy}","received_events_url":"https://api.github.com/users/goldshtn/received_events","type":"User","site_admin":false},{"login":"4ast","id":12205493,"avatar_url":"https://avatars0.githubusercontent.com/u/12205493?v=4","gravatar_id":"","url":"https://api.github.com/users/4ast","html_url":"https://github.com/4ast","followers_url":"https://api.github.com/users/4ast/followers","following_url":"https://api.github.com/users/4ast/following{/other_user}","gists_url":"https://api.github.com/users/4ast/gists{/gist_id}","starred_url":"https://api.github.com/users/4ast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4ast/subscriptions","organizations_url":"https://api.github.com/users/4ast/orgs","repos_url":"https://api.github.com/users/4ast/repos","events_url":"https://api.github.com/users/4ast/events{/privacy}","received_events_url":"https://api.github.com/users/4ast/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/iovisor/bcc/pulls/1372/commits","review_comments_url":"https://api.github.com/repos/iovisor/bcc/pulls/1372/comments","review_comment_url":"https://api.github.com/repos/iovisor/bcc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iovisor/bcc/issues/1372/comments","statuses_url":"https://api.github.com/repos/iovisor/bcc/statuses/704367eeee0330870e51d9273e89393998792977","head":{"label":"iovisor:yhs_dev","ref":"yhs_dev","sha":"704367eeee0330870e51d9273e89393998792977","user":{"login":"iovisor","id":12766186,"avatar_url":"https://avatars3.githubusercontent.com/u/12766186?v=4","gravatar_id":"","url":"https://api.github.com/users/iovisor","html_url":"https://github.com/iovisor","followers_url":"https://api.github.com/users/iovisor/followers","following_url":"https://api.github.com/users/iovisor/following{/other_user}","gists_url":"https://api.github.com/users/iovisor/gists{/gist_id}","starred_url":"https://api.github.com/users/iovisor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iovisor/subscriptions","organizations_url":"https://api.github.com/users/iovisor/orgs","repos_url":"https://api.github.com/users/iovisor/repos","events_url":"https://api.github.com/users/iovisor/events{/privacy}","received_events_url":"https://api.github.com/users/iovisor/received_events","type":"Organization","site_admin":false},"repo":{"id":34921116,"name":"bcc","full_name":"iovisor/bcc","owner":{"login":"iovisor","id":12766186,"avatar_url":"https://avatars3.githubusercontent.com/u/12766186?v=4","gravatar_id":"","url":"https://api.github.com/users/iovisor","html_url":"https://github.com/iovisor","followers_url":"https://api.github.com/users/iovisor/followers","following_url":"https://api.github.com/users/iovisor/following{/other_user}","gists_url":"https://api.github.com/users/iovisor/gists{/gist_id}","starred_url":"https://api.github.com/users/iovisor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iovisor/subscriptions","organizations_url":"https://api.github.com/users/iovisor/orgs","repos_url":"https://api.github.com/users/iovisor/repos","events_url":"https://api.github.com/users/iovisor/events{/privacy}","received_events_url":"https://api.github.com/users/iovisor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iovisor/bcc","description":"BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more","fork":false,"url":"https://api.github.com/repos/iovisor/bcc","forks_url":"https://api.github.com/repos/iovisor/bcc/forks","keys_url":"https://api.github.com/repos/iovisor/bcc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iovisor/bcc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iovisor/bcc/teams","hooks_url":"https://api.github.com/repos/iovisor/bcc/hooks","issue_events_url":"https://api.github.com/repos/iovisor/bcc/issues/events{/number}","events_url":"https://api.github.com/repos/iovisor/bcc/events","assignees_url":"https://api.github.com/repos/iovisor/bcc/assignees{/user}","branches_url":"https://api.github.com/repos/iovisor/bcc/branches{/branch}","tags_url":"https://api.github.com/repos/iovisor/bcc/tags","blobs_url":"https://api.github.com/repos/iovisor/bcc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iovisor/bcc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iovisor/bcc/git/refs{/sha}","trees_url":"https://api.github.com/repos/iovisor/bcc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iovisor/bcc/statuses/{sha}","languages_url":"https://api.github.com/repos/iovisor/bcc/languages","stargazers_url":"https://api.github.com/repos/iovisor/bcc/stargazers","contributors_url":"https://api.github.com/repos/iovisor/bcc/contributors","subscribers_url":"https://api.github.com/repos/iovisor/bcc/subscribers","subscription_url":"https://api.github.com/repos/iovisor/bcc/subscription","commits_url":"https://api.github.com/repos/iovisor/bcc/commits{/sha}","git_commits_url":"https://api.github.com/repos/iovisor/bcc/git/commits{/sha}","comments_url":"https://api.github.com/repos/iovisor/bcc/comments{/number}","issue_comment_url":"https://api.github.com/repos/iovisor/bcc/issues/comments{/number}","contents_url":"https://api.github.com/repos/iovisor/bcc/contents/{+path}","compare_url":"https://api.github.com/repos/iovisor/bcc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iovisor/bcc/merges","archive_url":"https://api.github.com/repos/iovisor/bcc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iovisor/bcc/downloads","issues_url":"https://api.github.com/repos/iovisor/bcc/issues{/number}","pulls_url":"https://api.github.com/repos/iovisor/bcc/pulls{/number}","milestones_url":"https://api.github.com/repos/iovisor/bcc/milestones{/number}","notifications_url":"https://api.github.com/repos/iovisor/bcc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iovisor/bcc/labels{/name}","releases_url":"https://api.github.com/repos/iovisor/bcc/releases{/id}","deployments_url":"https://api.github.com/repos/iovisor/bcc/deployments","created_at":"2015-05-01T19:52:32Z","updated_at":"2017-10-02T18:00:15Z","pushed_at":"2017-10-03T03:56:29Z","git_url":"git://github.com/iovisor/bcc.git","ssh_url":"git@github.com:iovisor/bcc.git","clone_url":"https://github.com/iovisor/bcc.git","svn_url":"https://github.com/iovisor/bcc","homepage":"","size":6318,"stargazers_count":3605,"watchers_count":3605,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":523,"mirror_url":null,"open_issues_count":193,"forks":523,"open_issues":193,"watchers":3605,"default_branch":"master"}},"base":{"label":"iovisor:master","ref":"master","sha":"2a6a5c512b896e5446cef0c3a3266017cd92d4a0","user":{"login":"iovisor","id":12766186,"avatar_url":"https://avatars3.githubusercontent.com/u/12766186?v=4","gravatar_id":"","url":"https://api.github.com/users/iovisor","html_url":"https://github.com/iovisor","followers_url":"https://api.github.com/users/iovisor/followers","following_url":"https://api.github.com/users/iovisor/following{/other_user}","gists_url":"https://api.github.com/users/iovisor/gists{/gist_id}","starred_url":"https://api.github.com/users/iovisor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iovisor/subscriptions","organizations_url":"https://api.github.com/users/iovisor/orgs","repos_url":"https://api.github.com/users/iovisor/repos","events_url":"https://api.github.com/users/iovisor/events{/privacy}","received_events_url":"https://api.github.com/users/iovisor/received_events","type":"Organization","site_admin":false},"repo":{"id":34921116,"name":"bcc","full_name":"iovisor/bcc","owner":{"login":"iovisor","id":12766186,"avatar_url":"https://avatars3.githubusercontent.com/u/12766186?v=4","gravatar_id":"","url":"https://api.github.com/users/iovisor","html_url":"https://github.com/iovisor","followers_url":"https://api.github.com/users/iovisor/followers","following_url":"https://api.github.com/users/iovisor/following{/other_user}","gists_url":"https://api.github.com/users/iovisor/gists{/gist_id}","starred_url":"https://api.github.com/users/iovisor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iovisor/subscriptions","organizations_url":"https://api.github.com/users/iovisor/orgs","repos_url":"https://api.github.com/users/iovisor/repos","events_url":"https://api.github.com/users/iovisor/events{/privacy}","received_events_url":"https://api.github.com/users/iovisor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iovisor/bcc","description":"BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more","fork":false,"url":"https://api.github.com/repos/iovisor/bcc","forks_url":"https://api.github.com/repos/iovisor/bcc/forks","keys_url":"https://api.github.com/repos/iovisor/bcc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iovisor/bcc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iovisor/bcc/teams","hooks_url":"https://api.github.com/repos/iovisor/bcc/hooks","issue_events_url":"https://api.github.com/repos/iovisor/bcc/issues/events{/number}","events_url":"https://api.github.com/repos/iovisor/bcc/events","assignees_url":"https://api.github.com/repos/iovisor/bcc/assignees{/user}","branches_url":"https://api.github.com/repos/iovisor/bcc/branches{/branch}","tags_url":"https://api.github.com/repos/iovisor/bcc/tags","blobs_url":"https://api.github.com/repos/iovisor/bcc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iovisor/bcc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iovisor/bcc/git/refs{/sha}","trees_url":"https://api.github.com/repos/iovisor/bcc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iovisor/bcc/statuses/{sha}","languages_url":"https://api.github.com/repos/iovisor/bcc/languages","stargazers_url":"https://api.github.com/repos/iovisor/bcc/stargazers","contributors_url":"https://api.github.com/repos/iovisor/bcc/contributors","subscribers_url":"https://api.github.com/repos/iovisor/bcc/subscribers","subscription_url":"https://api.github.com/repos/iovisor/bcc/subscription","commits_url":"https://api.github.com/repos/iovisor/bcc/commits{/sha}","git_commits_url":"https://api.github.com/repos/iovisor/bcc/git/commits{/sha}","comments_url":"https://api.github.com/repos/iovisor/bcc/comments{/number}","issue_comment_url":"https://api.github.com/repos/iovisor/bcc/issues/comments{/number}","contents_url":"https://api.github.com/repos/iovisor/bcc/contents/{+path}","compare_url":"https://api.github.com/repos/iovisor/bcc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iovisor/bcc/merges","archive_url":"https://api.github.com/repos/iovisor/bcc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iovisor/bcc/downloads","issues_url":"https://api.github.com/repos/iovisor/bcc/issues{/number}","pulls_url":"https://api.github.com/repos/iovisor/bcc/pulls{/number}","milestones_url":"https://api.github.com/repos/iovisor/bcc/milestones{/number}","notifications_url":"https://api.github.com/repos/iovisor/bcc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iovisor/bcc/labels{/name}","releases_url":"https://api.github.com/repos/iovisor/bcc/releases{/id}","deployments_url":"https://api.github.com/repos/iovisor/bcc/deployments","created_at":"2015-05-01T19:52:32Z","updated_at":"2017-10-02T18:00:15Z","pushed_at":"2017-10-03T03:56:29Z","git_url":"git://github.com/iovisor/bcc.git","ssh_url":"git@github.com:iovisor/bcc.git","clone_url":"https://github.com/iovisor/bcc.git","svn_url":"https://github.com/iovisor/bcc","homepage":"","size":6318,"stargazers_count":3605,"watchers_count":3605,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":523,"mirror_url":null,"open_issues_count":193,"forks":523,"open_issues":193,"watchers":3605,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iovisor/bcc/pulls/1372"},"html":{"href":"https://github.com/iovisor/bcc/pull/1372"},"issue":{"href":"https://api.github.com/repos/iovisor/bcc/issues/1372"},"comments":{"href":"https://api.github.com/repos/iovisor/bcc/issues/1372/comments"},"review_comments":{"href":"https://api.github.com/repos/iovisor/bcc/pulls/1372/comments"},"review_comment":{"href":"https://api.github.com/repos/iovisor/bcc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iovisor/bcc/pulls/1372/commits"},"statuses":{"href":"https://api.github.com/repos/iovisor/bcc/statuses/704367eeee0330870e51d9273e89393998792977"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"drzaeus77","id":3770556,"avatar_url":"https://avatars2.githubusercontent.com/u/3770556?v=4","gravatar_id":"","url":"https://api.github.com/users/drzaeus77","html_url":"https://github.com/drzaeus77","followers_url":"https://api.github.com/users/drzaeus77/followers","following_url":"https://api.github.com/users/drzaeus77/following{/other_user}","gists_url":"https://api.github.com/users/drzaeus77/gists{/gist_id}","starred_url":"https://api.github.com/users/drzaeus77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drzaeus77/subscriptions","organizations_url":"https://api.github.com/users/drzaeus77/orgs","repos_url":"https://api.github.com/users/drzaeus77/repos","events_url":"https://api.github.com/users/drzaeus77/events{/privacy}","received_events_url":"https://api.github.com/users/drzaeus77/received_events","type":"User","site_admin":false},"comments":7,"review_comments":6,"maintainer_can_modify":false,"commits":1,"additions":344,"deletions":21,"changed_files":13}}
{"actor":{"display_login":"drzaeus77"}}