Skip to content

Instantly share code, notes, and snippets.

@chrisnas
Created February 11, 2019 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisnas/419e8637d4b9a7d010aea6c611a4e143 to your computer and use it in GitHub Desktop.
Save chrisnas/419e8637d4b9a7d010aea6c611a4e143 to your computer and use it in GitHub Desktop.
public static EtwGcLog GetProcessGcLog(int pid)
{
EtwGcLog gcLog = null;
try
{
var process = Process.GetProcessById(pid);
process.Dispose();
gcLog = new EtwGcLog(pid);
}
catch (System.ArgumentException)
{
// there is no running process with the given pid
}
return gcLog;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment