summaryrefslogtreecommitdiff
path: root/src/vm/threads.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/threads.h')
-rw-r--r--src/vm/threads.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/vm/threads.h b/src/vm/threads.h
index 34fca24c4f..74b239d776 100644
--- a/src/vm/threads.h
+++ b/src/vm/threads.h
@@ -185,6 +185,10 @@ typedef DPTR(PTR_ThreadLocalBlock) PTR_PTR_ThreadLocalBlock;
#include "interoputil.h"
#include "eventtrace.h"
+#ifdef FEATURE_PERFTRACING
+class EventPipeBufferList;
+#endif // FEATURE_PERFTRACING
+
#ifdef CROSSGEN_COMPILE
#include "asmconstants.h"
@@ -5334,6 +5338,61 @@ public:
m_pAllLoggedTypes = pAllLoggedTypes;
}
+#ifdef FEATURE_PERFTRACING
+private:
+ // The object that contains the list write buffers used by this thread.
+ Volatile<EventPipeBufferList*> m_pEventPipeBufferList;
+
+ // Whether or not the thread is currently writing an event.
+ Volatile<bool> m_eventWriteInProgress;
+
+ // SampleProfiler thread state. This is set on suspension and cleared before restart.
+ // True if the thread was in cooperative mode. False if it was in preemptive when the suspension started.
+ Volatile<ULONG> m_gcModeOnSuspension;
+
+public:
+ EventPipeBufferList* GetEventPipeBufferList()
+ {
+ LIMITED_METHOD_CONTRACT;
+ return m_pEventPipeBufferList;
+ }
+
+ void SetEventPipeBufferList(EventPipeBufferList *pList)
+ {
+ LIMITED_METHOD_CONTRACT;
+ m_pEventPipeBufferList = pList;
+ }
+
+ bool GetEventWriteInProgress() const
+ {
+ LIMITED_METHOD_CONTRACT;
+ return m_eventWriteInProgress;
+ }
+
+ void SetEventWriteInProgress(bool value)
+ {
+ LIMITED_METHOD_CONTRACT;
+ m_eventWriteInProgress = value;
+ }
+
+ bool GetGCModeOnSuspension()
+ {
+ LIMITED_METHOD_CONTRACT;
+ return m_gcModeOnSuspension;
+ }
+
+ void SaveGCModeOnSuspension()
+ {
+ LIMITED_METHOD_CONTRACT;
+ m_gcModeOnSuspension = m_fPreemptiveGCDisabled;
+ }
+
+ void ClearGCModeOnSuspension()
+ {
+ m_gcModeOnSuspension = 0;
+ }
+#endif // FEATURE_PERFTRACING
+
#ifdef FEATURE_HIJACK
private: