Skip to content

Commit

Permalink
[Release/3.1] Fixes for profiler stack sampling (dotnet#27300)
Browse files Browse the repository at this point in the history
* only set THREAD_IS_SUSPENDED if we are truly doing an async stack walk (dotnet#26985)

* Use a new COR_PRF_SUSPEND_FOR_PROFILER in ICorProfilerCallback::RuntimeThreadSuspended() when requested by profiler (dotnet#27041)

Fixes https://github.com/dotnet/coreclr/issues/26576
  • Loading branch information
davmason authored Oct 21, 2019
1 parent 89091b5 commit a43e0c2
Show file tree
Hide file tree
Showing 4 changed files with 1,892 additions and 1,874 deletions.
3 changes: 3 additions & 0 deletions src/inc/corprof.idl
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ typedef enum
COR_PRF_SUSPEND_FOR_INPROC_DEBUGGER = 6,
COR_PRF_SUSPEND_FOR_GC_PREP = 7,
COR_PRF_SUSPEND_FOR_REJIT = 8,
COR_PRF_SUSPEND_FOR_PROFILER = 9,
} COR_PRF_SUSPEND_REASON;

/*
Expand Down Expand Up @@ -1431,6 +1432,8 @@ interface ICorProfilerCallback : IUnknown
* the runtime is preparing for a GC.
* COR_PRF_SUSPEND_FOR_INPROC_DEBUGGER
* the runtime is suspending for in-process debugging.
* COR_PRF_SUSPEND_FOR_PROFILER
* the runtime is suspending because of ICorProfilerInfo10::SuspendRuntime.
* COR_PRF_SUSPEND_OTHER
* the runtime is suspending for a reason other than those above.
*/
Expand Down
Loading

0 comments on commit a43e0c2

Please sign in to comment.