{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/110247303","pull_request_review_id":31408037,"id":110247303,"diff_hunk":"@@ -0,0 +1,155 @@\n+// Licensed to the .NET Foundation under one or more agreements.\n+// The .NET Foundation licenses this file to you under the MIT license.\n+// See the LICENSE file in the project root for more information.\n+\n+#include \"common.h\"\n+#include \"sampleprofiler.h\"\n+#include \"hosting.h\"\n+#include \"threadsuspend.h\"\n+\n+Volatile<BOOL> SampleProfiler::s_profilingEnabled = false;\n+Thread* SampleProfiler::s_pSamplingThread = NULL;\n+CLREventStatic SampleProfiler::s_threadShutdownEvent;\n+#ifdef FEATURE_PAL","path":"src/vm/sampleprofiler.cpp","position":13,"original_position":13,"commit_id":"a387696646a1aa7413c2082a430845844e496313","original_commit_id":"a387696646a1aa7413c2082a430845844e496313","user":{"login":"vancem","id":8459414,"avatar_url":"https://avatars1.githubusercontent.com/u/8459414?v=3","gravatar_id":"","url":"https://api.github.com/users/vancem","html_url":"https://github.com/vancem","followers_url":"https://api.github.com/users/vancem/followers","following_url":"https://api.github.com/users/vancem/following{/other_user}","gists_url":"https://api.github.com/users/vancem/gists{/gist_id}","starred_url":"https://api.github.com/users/vancem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vancem/subscriptions","organizations_url":"https://api.github.com/users/vancem/orgs","repos_url":"https://api.github.com/users/vancem/repos","events_url":"https://api.github.com/users/vancem/events{/privacy}","received_events_url":"https://api.github.com/users/vancem/received_events","type":"User","site_admin":false},"body":"Can we hide this 'fast wait' behind a common API?  I would like to have as few #if FEATURE_PAL ifdefs as possible. ","created_at":"2017-04-06T19:27:39Z","updated_at":"2017-04-06T19:27:39Z","html_url":"https://github.com/dotnet/coreclr/pull/10615#discussion_r110247303","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/10615","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/110247303"},"html":{"href":"https://github.com/dotnet/coreclr/pull/10615#discussion_r110247303"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/10615"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/10615","id":113707641,"html_url":"https://github.com/dotnet/coreclr/pull/10615","diff_url":"https://github.com/dotnet/coreclr/pull/10615.diff","patch_url":"https://github.com/dotnet/coreclr/pull/10615.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/10615","number":10615,"state":"closed","locked":false,"title":"Cross-Platform Sample-Based Profiler","user":{"login":"brianrob","id":6210322,"avatar_url":"https://avatars3.githubusercontent.com/u/6210322?v=3","gravatar_id":"","url":"https://api.github.com/users/brianrob","html_url":"https://github.com/brianrob","followers_url":"https://api.github.com/users/brianrob/followers","following_url":"https://api.github.com/users/brianrob/following{/other_user}","gists_url":"https://api.github.com/users/brianrob/gists{/gist_id}","starred_url":"https://api.github.com/users/brianrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianrob/subscriptions","organizations_url":"https://api.github.com/users/brianrob/orgs","repos_url":"https://api.github.com/users/brianrob/repos","events_url":"https://api.github.com/users/brianrob/events{/privacy}","received_events_url":"https://api.github.com/users/brianrob/received_events","type":"User","site_admin":false},"body":"Implement a sample-based profiler primarily targeted at non-Windows platforms.  It has been tested on Windows, Linux and OSX.  This PR contains:\r\n\r\n1. The profiler itself.\r\n2. The event pipe, which is responsible for sending profiler events to the configured source.  Right now, there is only a single source.\r\n3. Ability to enable the profiler using a COMPLUS variable for testing (actual configuration APIs will be implemented in a future PR).\r\n4. Ability to dump profile data to a JSON file for testing (production file format will be implemented in a future PR).\r\n5. Implementation of PAL_nanosleep for use by the profiler and event pipe.\r\n\r\nTesting performed:\r\n1. Functional testing of the PR changes.\r\n2. CoreCLR functional test pass.\r\n3. CoreCLR functional test pass with the profiler enabled.\r\n4. Some testing with the profiler and GCStress 1 enabled in an attempt to catch deadlocks in thread suspension.","created_at":"2017-03-31T18:35:54Z","updated_at":"2017-04-06T19:27:39Z","closed_at":"2017-04-05T23:21:39Z","merged_at":"2017-04-05T23:21:39Z","merge_commit_sha":"549c9960a8edcbe3930639e316616d35b22bca25","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/10615/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/10615/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/10615/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/a387696646a1aa7413c2082a430845844e496313","head":{"label":"brianrob:profiler","ref":"profiler","sha":"a387696646a1aa7413c2082a430845844e496313","user":{"login":"brianrob","id":6210322,"avatar_url":"https://avatars3.githubusercontent.com/u/6210322?v=3","gravatar_id":"","url":"https://api.github.com/users/brianrob","html_url":"https://github.com/brianrob","followers_url":"https://api.github.com/users/brianrob/followers","following_url":"https://api.github.com/users/brianrob/following{/other_user}","gists_url":"https://api.github.com/users/brianrob/gists{/gist_id}","starred_url":"https://api.github.com/users/brianrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianrob/subscriptions","organizations_url":"https://api.github.com/users/brianrob/orgs","repos_url":"https://api.github.com/users/brianrob/repos","events_url":"https://api.github.com/users/brianrob/events{/privacy}","received_events_url":"https://api.github.com/users/brianrob/received_events","type":"User","site_admin":false},"repo":{"id":30316731,"name":"coreclr","full_name":"brianrob/coreclr","owner":{"login":"brianrob","id":6210322,"avatar_url":"https://avatars3.githubusercontent.com/u/6210322?v=3","gravatar_id":"","url":"https://api.github.com/users/brianrob","html_url":"https://github.com/brianrob","followers_url":"https://api.github.com/users/brianrob/followers","following_url":"https://api.github.com/users/brianrob/following{/other_user}","gists_url":"https://api.github.com/users/brianrob/gists{/gist_id}","starred_url":"https://api.github.com/users/brianrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianrob/subscriptions","organizations_url":"https://api.github.com/users/brianrob/orgs","repos_url":"https://api.github.com/users/brianrob/repos","events_url":"https://api.github.com/users/brianrob/events{/privacy}","received_events_url":"https://api.github.com/users/brianrob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brianrob/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR. It is an execution engine for .NET apps, performing functions such as IL byte code loading, compilation to machine code and garbage collection. The repo contains the complete up-to-date CoreCLR codebase.","fork":true,"url":"https://api.github.com/repos/brianrob/coreclr","forks_url":"https://api.github.com/repos/brianrob/coreclr/forks","keys_url":"https://api.github.com/repos/brianrob/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brianrob/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brianrob/coreclr/teams","hooks_url":"https://api.github.com/repos/brianrob/coreclr/hooks","issue_events_url":"https://api.github.com/repos/brianrob/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/brianrob/coreclr/events","assignees_url":"https://api.github.com/repos/brianrob/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/brianrob/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/brianrob/coreclr/tags","blobs_url":"https://api.github.com/repos/brianrob/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brianrob/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brianrob/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/brianrob/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brianrob/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/brianrob/coreclr/languages","stargazers_url":"https://api.github.com/repos/brianrob/coreclr/stargazers","contributors_url":"https://api.github.com/repos/brianrob/coreclr/contributors","subscribers_url":"https://api.github.com/repos/brianrob/coreclr/subscribers","subscription_url":"https://api.github.com/repos/brianrob/coreclr/subscription","commits_url":"https://api.github.com/repos/brianrob/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/brianrob/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/brianrob/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/brianrob/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/brianrob/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/brianrob/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brianrob/coreclr/merges","archive_url":"https://api.github.com/repos/brianrob/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brianrob/coreclr/downloads","issues_url":"https://api.github.com/repos/brianrob/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/brianrob/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/brianrob/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/brianrob/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brianrob/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/brianrob/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/brianrob/coreclr/deployments","created_at":"2015-02-04T19:27:15Z","updated_at":"2016-02-08T22:45:55Z","pushed_at":"2017-04-06T18:10:51Z","git_url":"git://github.com/brianrob/coreclr.git","ssh_url":"git@github.com:brianrob/coreclr.git","clone_url":"https://github.com/brianrob/coreclr.git","svn_url":"https://github.com/brianrob/coreclr","homepage":"","size":148479,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"079b6856bbae83e76836af1e0ef7962cfc4bda03","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars3.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30092893,"name":"coreclr","full_name":"dotnet/coreclr","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars3.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/coreclr/deployments","created_at":"2015-01-30T22:10:02Z","updated_at":"2017-04-06T19:13:36Z","pushed_at":"2017-04-06T18:47:22Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"https://docs.microsoft.com/dotnet/","size":149960,"stargazers_count":7609,"watchers_count":7609,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1894,"mirror_url":null,"open_issues_count":1208,"forks":1894,"open_issues":1208,"watchers":7609,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/10615"},"html":{"href":"https://github.com/dotnet/coreclr/pull/10615"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/10615"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/10615/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/10615/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/10615/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/a387696646a1aa7413c2082a430845844e496313"}}}}
{"actor":{"display_login":"vancem"}}