summaryrefslogtreecommitdiff
path: root/src/inc/gcinfodecoder.h
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 07:46:08 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 07:46:08 (GMT)
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/inc/gcinfodecoder.h
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/inc/gcinfodecoder.h')
-rw-r--r--src/inc/gcinfodecoder.h91
1 files changed, 57 insertions, 34 deletions
diff --git a/src/inc/gcinfodecoder.h b/src/inc/gcinfodecoder.h
index c77c359..6d4850a 100644
--- a/src/inc/gcinfodecoder.h
+++ b/src/inc/gcinfodecoder.h
@@ -11,16 +11,47 @@
#ifndef _GC_INFO_DECODER_
#define _GC_INFO_DECODER_
-#include "gcinfotypes.h"
-
#define _max(a, b) (((a) > (b)) ? (a) : (b))
#define _min(a, b) (((a) < (b)) ? (a) : (b))
-#ifndef GCINFODECODER_NO_EE
+#if !defined(_TARGET_X86_)
+#define USE_GC_INFO_DECODER
+#endif
+
+#if !defined(GCINFODECODER_NO_EE)
#include "eetwain.h"
-#else // GCINFODECODER_NO_EE
+#else
+
+#ifdef FEATURE_REDHAWK
+
+typedef ArrayDPTR(const uint8_t) PTR_CBYTE;
+
+#define LIMITED_METHOD_CONTRACT
+#define SUPPORTS_DAC
+
+#define LOG(x)
+#define LOG_PIPTR(pObjRef, gcFlags, hCallBack)
+#define DAC_ARG(x)
+
+#define VALIDATE_ROOT(isInterior, hCallBack, pObjRef)
+
+#define _ASSERTE(x) assert(x)
+
+#define UINT32 UInt32
+#define INT32 Int32
+#define UINT16 UInt16
+#define UINT UInt32
+#define SIZE_T UIntNative
+#define SSIZE_T IntNative
+#define LPVOID void*
+
+typedef void * OBJECTREF;
+
+#define GET_CALLER_SP(pREGDISPLAY) ((TADDR)0)
+
+#else // FEATURE_REDHAWK
// Stuff from cgencpu.h:
@@ -112,11 +143,17 @@ inline BOOL IS_ALIGNED( void* val, size_t alignment )
#ifndef _EETWAIN_H
typedef void (*GCEnumCallback)(
- LPVOID hCallback, // callback data
+ void * hCallback, // callback data
OBJECTREF* pObject, // address of obect-reference we are reporting
uint32_t flags // is this a pinned and/or interior pointer
);
+#endif // !_EETWAIN_H
+
+#include "regdisp.h"
+
+#endif // FEATURE_REDHAWK
+
#ifndef _strike_h
enum ICodeManagerFlags
@@ -135,16 +172,9 @@ enum ICodeManagerFlags
#endif // !_strike_h
-#if !defined(_TARGET_X86_)
-#define USE_GC_INFO_DECODER
-#endif
-
-#include "regdisp.h"
-
-#endif // !_EETWAIN_H
-
#endif // GCINFODECODER_NO_EE
+
#include "gcinfotypes.h"
#ifdef _DEBUG
@@ -153,10 +183,6 @@ enum ICodeManagerFlags
#define MAX_PREDECODED_SLOTS 64
#endif
-#if defined(FEATURE_PAL) && !defined(STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY)
-#define STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY
-#endif
-
enum GcInfoDecoderFlags
@@ -286,8 +312,6 @@ public:
__forceinline void SetCurrentPos( size_t pos )
{
- STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY; // note: this will set only the host instance, not the target instance
-
size_t adjPos = pos + m_InitialRelPos;
m_pCurrent = m_pBuffer + adjPos / BITS_PER_SIZE_T;
m_RelPos = (int)(adjPos % BITS_PER_SIZE_T);
@@ -431,7 +455,7 @@ class GcInfoDecoder
{
public:
- // If you are not insterested in interruptibility or gc lifetime information, pass 0 as instructionOffset
+ // If you are not interested in interruptibility or gc lifetime information, pass 0 as instructionOffset
GcInfoDecoder(
GCInfoToken gcInfoToken,
GcInfoDecoderFlags flags = DECODE_EVERYTHING,
@@ -448,16 +472,16 @@ public:
// This is used for gccoverage
bool IsSafePoint(UINT32 codeOffset);
- typedef void EnumerateSafePointsCallback (UINT32 offset, LPVOID hCallback);
- void EnumerateSafePoints(EnumerateSafePointsCallback *pCallback, LPVOID hCallback);
+ typedef void EnumerateSafePointsCallback (UINT32 offset, void * hCallback);
+ void EnumerateSafePoints(EnumerateSafePointsCallback * pCallback, void * hCallback);
#endif
// Returns true to stop enumerating.
- typedef bool EnumerateInterruptibleRangesCallback (UINT32 startOffset, UINT32 stopOffset, LPVOID hCallback);
+ typedef bool EnumerateInterruptibleRangesCallback (UINT32 startOffset, UINT32 stopOffset, void * hCallback);
void EnumerateInterruptibleRanges (
EnumerateInterruptibleRangesCallback *pCallback,
- LPVOID hCallback);
+ void * hCallback);
//------------------------------------------------------------------------
// GC lifetime information
@@ -468,7 +492,7 @@ public:
bool reportScratchSlots,
unsigned flags,
GCEnumCallback pCallBack,
- LPVOID hCallBack
+ void * hCallBack
);
// Public for the gc info dumper
@@ -476,7 +500,7 @@ public:
PREGDISPLAY pRD,
unsigned flags,
GCEnumCallback pCallBack,
- LPVOID hCallBack
+ void * hCallBack
);
//------------------------------------------------------------------------
@@ -490,7 +514,7 @@ public:
UINT32 GetPrologSize();
INT32 GetPSPSymStackSlot();
INT32 GetGenericsInstContextStackSlot();
- INT32 GetReversePInvokeStackSlot();
+ INT32 GetReversePInvokeFrameStackSlot();
bool HasMethodDescGenericsInstContext();
bool HasMethodTableGenericsInstContext();
bool GetIsVarArg();
@@ -518,7 +542,7 @@ private:
bool m_WantsReportOnlyLeaf;
INT32 m_SecurityObjectStackSlot;
INT32 m_GSCookieStackSlot;
- INT32 m_ReversePInvokeStackSlot;
+ INT32 m_ReversePInvokeFrameStackSlot;
UINT32 m_ValidRangeStart;
UINT32 m_ValidRangeEnd;
INT32 m_PSPSymStackSlot;
@@ -526,7 +550,6 @@ private:
UINT32 m_CodeLength;
UINT32 m_StackBaseRegister;
UINT32 m_SizeOfEditAndContinuePreservedArea;
- INT32 m_ReversePInvokeFrameSlot;
ReturnKind m_ReturnKind;
#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
UINT32 m_NumSafePoints;
@@ -545,7 +568,7 @@ private:
#endif
UINT32 m_Version;
- static bool SetIsInterruptibleCB (UINT32 startOffset, UINT32 stopOffset, LPVOID hCallback);
+ static bool SetIsInterruptibleCB (UINT32 startOffset, UINT32 stopOffset, void * hCallback);
OBJECTREF* GetRegisterSlot(
int regNum,
@@ -577,7 +600,7 @@ private:
PREGDISPLAY pRD,
unsigned flags,
GCEnumCallback pCallBack,
- LPVOID hCallBack
+ void * hCallBack
);
void ReportRegisterToGC(
@@ -586,7 +609,7 @@ private:
PREGDISPLAY pRD,
unsigned flags,
GCEnumCallback pCallBack,
- LPVOID hCallBack
+ void * hCallBack
);
void ReportStackSlotToGC(
@@ -596,7 +619,7 @@ private:
PREGDISPLAY pRD,
unsigned flags,
GCEnumCallback pCallBack,
- LPVOID hCallBack
+ void * hCallBack
);
@@ -607,7 +630,7 @@ private:
bool reportScratchSlots,
unsigned inputFlags,
GCEnumCallback pCallBack,
- LPVOID hCallBack
+ void * hCallBack
)
{
_ASSERTE(slotIndex < slotDecoder.GetNumSlots());