{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/corert/issues/6122","repository_url":"https://api.github.com/repos/dotnet/corert","labels_url":"https://api.github.com/repos/dotnet/corert/issues/6122/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corert/issues/6122/comments","events_url":"https://api.github.com/repos/dotnet/corert/issues/6122/events","html_url":"https://github.com/dotnet/corert/issues/6122","id":342944510,"node_id":"MDU6SXNzdWUzNDI5NDQ1MTA=","number":6122,"title":"Struct 'PERF_DATA_BLOCK' requires non-trivial marshalling that is not yet supported by this compiler.","user":{"login":"akinohana","id":29968862,"node_id":"MDQ6VXNlcjI5OTY4ODYy","avatar_url":"https://avatars1.githubusercontent.com/u/29968862?v=4","gravatar_id":"","url":"https://api.github.com/users/akinohana","html_url":"https://github.com/akinohana","followers_url":"https://api.github.com/users/akinohana/followers","following_url":"https://api.github.com/users/akinohana/following{/other_user}","gists_url":"https://api.github.com/users/akinohana/gists{/gist_id}","starred_url":"https://api.github.com/users/akinohana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akinohana/subscriptions","organizations_url":"https://api.github.com/users/akinohana/orgs","repos_url":"https://api.github.com/users/akinohana/repos","events_url":"https://api.github.com/users/akinohana/events{/privacy}","received_events_url":"https://api.github.com/users/akinohana/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-20T01:46:04Z","updated_at":"2018-07-20T09:47:04Z","closed_at":"2018-07-20T09:47:04Z","author_association":"NONE","body":"Just trying to read current CPU usage information with PerformanceCounter however, it seems some struct is not implemented. \r\n\r\nI did some search about this and it seems to need to modify src/Common/src/TypeSystem/Interop/IL/Marshaller.cs ,  however, I am not sure how to implement this and make it a new ilc.exe\r\n\r\nany guide about how to implement this or any other workaround will be appreciated!\r\n\r\nfollowing code is for reproducing this issue.\r\n```\r\n\r\n\t\tstatic private void updateCPUCounter()\r\n\t\t{\r\n\t\t\tPerformanceCounter cpuCounter = new PerformanceCounter();\r\n\t\t\tcpuCounter.CategoryName = \"Processor\";\r\n\t\t\tcpuCounter.CounterName = \"% Processor Time\";\r\n\t\t\tcpuCounter.InstanceName = \"_Total\";\r\n\r\n\t\t\t// will always start at 0\r\n\t\t\tdynamic firstValue = cpuCounter.NextValue();\r\n\t\t\tSystem.Threading.Thread.Sleep(1000);\r\n\t\t\t// now matches task manager reading\r\n\t\t\tdynamic secondValue = cpuCounter.NextValue();\r\n\r\n\t\t\tlastCPUUseage = (int)secondValue;\r\n\t\t}\r\n\r\n\r\n```"}}
{"actor":{"display_login":"akinohana"}}