{"action":"created","comment":{"url":"https://api.github.com/repos/iovisor/bcc/pulls/comments/183612423","pull_request_review_id":114641237,"id":183612423,"diff_hunk":"@@ -214,10 +218,22 @@ def positive_nonzero_int(val):\n bpf_text = bpf_text.replace('USER_STACK_GET', user_stack_get)\n bpf_text = bpf_text.replace('KERNEL_STACK_GET', kernel_stack_get)\n \n+sample_freq = 0\n+sample_period = 0\n+if args.frequency:\n+    sample_freq = args.frequency\n+elif args.count:\n+    sample_period = args.count\n+else:","path":"tools/profile.py","position":32,"original_position":32,"commit_id":"86df2b8b562cb83152fc050d1eabd8dbd4302115","original_commit_id":"86df2b8b562cb83152fc050d1eabd8dbd4302115","user":{"login":"palmtenor","id":944419,"avatar_url":"https://avatars0.githubusercontent.com/u/944419?v=4","gravatar_id":"","url":"https://api.github.com/users/palmtenor","html_url":"https://github.com/palmtenor","followers_url":"https://api.github.com/users/palmtenor/followers","following_url":"https://api.github.com/users/palmtenor/following{/other_user}","gists_url":"https://api.github.com/users/palmtenor/gists{/gist_id}","starred_url":"https://api.github.com/users/palmtenor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palmtenor/subscriptions","organizations_url":"https://api.github.com/users/palmtenor/orgs","repos_url":"https://api.github.com/users/palmtenor/repos","events_url":"https://api.github.com/users/palmtenor/events{/privacy}","received_events_url":"https://api.github.com/users/palmtenor/received_events","type":"User","site_admin":false},"body":"The `argparser` makes sure that user can only specify at most one (by using `add_mutually_exclusive_group`). We also have check in `libbpf` (in `bpf_attach_perf_event`) to check only one is specified.","created_at":"2018-04-24T06:00:33Z","updated_at":"2018-04-24T06:00:33Z","html_url":"https://github.com/iovisor/bcc/pull/1699#discussion_r183612423","pull_request_url":"https://api.github.com/repos/iovisor/bcc/pulls/1699","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/iovisor/bcc/pulls/comments/183612423"},"html":{"href":"https://github.com/iovisor/bcc/pull/1699#discussion_r183612423"},"pull_request":{"href":"https://api.github.com/repos/iovisor/bcc/pulls/1699"}},"in_reply_to_id":183600587},"pull_request":{"url":"https://api.github.com/repos/iovisor/bcc/pulls/1699","id":183536009,"html_url":"https://github.com/iovisor/bcc/pull/1699","diff_url":"https://github.com/iovisor/bcc/pull/1699.diff","patch_url":"https://github.com/iovisor/bcc/pull/1699.patch","issue_url":"https://api.github.com/repos/iovisor/bcc/issues/1699","number":1699,"state":"open","locked":false,"title":"Add -c option for profile.py","user":{"login":"palmtenor","id":944419,"avatar_url":"https://avatars0.githubusercontent.com/u/944419?v=4","gravatar_id":"","url":"https://api.github.com/users/palmtenor","html_url":"https://github.com/palmtenor","followers_url":"https://api.github.com/users/palmtenor/followers","following_url":"https://api.github.com/users/palmtenor/following{/other_user}","gists_url":"https://api.github.com/users/palmtenor/gists{/gist_id}","starred_url":"https://api.github.com/users/palmtenor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palmtenor/subscriptions","organizations_url":"https://api.github.com/users/palmtenor/orgs","repos_url":"https://api.github.com/users/palmtenor/repos","events_url":"https://api.github.com/users/palmtenor/events{/privacy}","received_events_url":"https://api.github.com/users/palmtenor/received_events","type":"User","site_admin":false},"body":"This gives better feature parity with `perf record`, and it's useful when people want to do fixed-rate sampling.","created_at":"2018-04-23T19:38:07Z","updated_at":"2018-04-24T06:00:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79db16484fd21f9a2be4bc340b611fc58e712371","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}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/iovisor/bcc/pulls/1699/commits","review_comments_url":"https://api.github.com/repos/iovisor/bcc/pulls/1699/comments","review_comment_url":"https://api.github.com/repos/iovisor/bcc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iovisor/bcc/issues/1699/comments","statuses_url":"https://api.github.com/repos/iovisor/bcc/statuses/86df2b8b562cb83152fc050d1eabd8dbd4302115","head":{"label":"palmtenor:profile-sample","ref":"profile-sample","sha":"86df2b8b562cb83152fc050d1eabd8dbd4302115","user":{"login":"palmtenor","id":944419,"avatar_url":"https://avatars0.githubusercontent.com/u/944419?v=4","gravatar_id":"","url":"https://api.github.com/users/palmtenor","html_url":"https://github.com/palmtenor","followers_url":"https://api.github.com/users/palmtenor/followers","following_url":"https://api.github.com/users/palmtenor/following{/other_user}","gists_url":"https://api.github.com/users/palmtenor/gists{/gist_id}","starred_url":"https://api.github.com/users/palmtenor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palmtenor/subscriptions","organizations_url":"https://api.github.com/users/palmtenor/orgs","repos_url":"https://api.github.com/users/palmtenor/repos","events_url":"https://api.github.com/users/palmtenor/events{/privacy}","received_events_url":"https://api.github.com/users/palmtenor/received_events","type":"User","site_admin":false},"repo":{"id":63634880,"name":"bcc","full_name":"palmtenor/bcc","owner":{"login":"palmtenor","id":944419,"avatar_url":"https://avatars0.githubusercontent.com/u/944419?v=4","gravatar_id":"","url":"https://api.github.com/users/palmtenor","html_url":"https://github.com/palmtenor","followers_url":"https://api.github.com/users/palmtenor/followers","following_url":"https://api.github.com/users/palmtenor/following{/other_user}","gists_url":"https://api.github.com/users/palmtenor/gists{/gist_id}","starred_url":"https://api.github.com/users/palmtenor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palmtenor/subscriptions","organizations_url":"https://api.github.com/users/palmtenor/orgs","repos_url":"https://api.github.com/users/palmtenor/repos","events_url":"https://api.github.com/users/palmtenor/events{/privacy}","received_events_url":"https://api.github.com/users/palmtenor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/palmtenor/bcc","description":"BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more","fork":true,"url":"https://api.github.com/repos/palmtenor/bcc","forks_url":"https://api.github.com/repos/palmtenor/bcc/forks","keys_url":"https://api.github.com/repos/palmtenor/bcc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palmtenor/bcc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palmtenor/bcc/teams","hooks_url":"https://api.github.com/repos/palmtenor/bcc/hooks","issue_events_url":"https://api.github.com/repos/palmtenor/bcc/issues/events{/number}","events_url":"https://api.github.com/repos/palmtenor/bcc/events","assignees_url":"https://api.github.com/repos/palmtenor/bcc/assignees{/user}","branches_url":"https://api.github.com/repos/palmtenor/bcc/branches{/branch}","tags_url":"https://api.github.com/repos/palmtenor/bcc/tags","blobs_url":"https://api.github.com/repos/palmtenor/bcc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palmtenor/bcc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palmtenor/bcc/git/refs{/sha}","trees_url":"https://api.github.com/repos/palmtenor/bcc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palmtenor/bcc/statuses/{sha}","languages_url":"https://api.github.com/repos/palmtenor/bcc/languages","stargazers_url":"https://api.github.com/repos/palmtenor/bcc/stargazers","contributors_url":"https://api.github.com/repos/palmtenor/bcc/contributors","subscribers_url":"https://api.github.com/repos/palmtenor/bcc/subscribers","subscription_url":"https://api.github.com/repos/palmtenor/bcc/subscription","commits_url":"https://api.github.com/repos/palmtenor/bcc/commits{/sha}","git_commits_url":"https://api.github.com/repos/palmtenor/bcc/git/commits{/sha}","comments_url":"https://api.github.com/repos/palmtenor/bcc/comments{/number}","issue_comment_url":"https://api.github.com/repos/palmtenor/bcc/issues/comments{/number}","contents_url":"https://api.github.com/repos/palmtenor/bcc/contents/{+path}","compare_url":"https://api.github.com/repos/palmtenor/bcc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palmtenor/bcc/merges","archive_url":"https://api.github.com/repos/palmtenor/bcc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palmtenor/bcc/downloads","issues_url":"https://api.github.com/repos/palmtenor/bcc/issues{/number}","pulls_url":"https://api.github.com/repos/palmtenor/bcc/pulls{/number}","milestones_url":"https://api.github.com/repos/palmtenor/bcc/milestones{/number}","notifications_url":"https://api.github.com/repos/palmtenor/bcc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palmtenor/bcc/labels{/name}","releases_url":"https://api.github.com/repos/palmtenor/bcc/releases{/id}","deployments_url":"https://api.github.com/repos/palmtenor/bcc/deployments","created_at":"2016-07-18T20:29:37Z","updated_at":"2018-04-20T18:00:24Z","pushed_at":"2018-04-23T19:37:02Z","git_url":"git://github.com/palmtenor/bcc.git","ssh_url":"git@github.com:palmtenor/bcc.git","clone_url":"https://github.com/palmtenor/bcc.git","svn_url":"https://github.com/palmtenor/bcc","homepage":"","size":6249,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"iovisor:master","ref":"master","sha":"7f22495b58fc809f145e1149383e7e4923d82504","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":"2018-04-24T04:14:04Z","pushed_at":"2018-04-24T04:14:00Z","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":7107,"stargazers_count":4597,"watchers_count":4597,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":706,"mirror_url":null,"archived":false,"open_issues_count":225,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":706,"open_issues":225,"watchers":4597,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iovisor/bcc/pulls/1699"},"html":{"href":"https://github.com/iovisor/bcc/pull/1699"},"issue":{"href":"https://api.github.com/repos/iovisor/bcc/issues/1699"},"comments":{"href":"https://api.github.com/repos/iovisor/bcc/issues/1699/comments"},"review_comments":{"href":"https://api.github.com/repos/iovisor/bcc/pulls/1699/comments"},"review_comment":{"href":"https://api.github.com/repos/iovisor/bcc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iovisor/bcc/pulls/1699/commits"},"statuses":{"href":"https://api.github.com/repos/iovisor/bcc/statuses/86df2b8b562cb83152fc050d1eabd8dbd4302115"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"palmtenor"}}