diff options
author | Swaroop Sridhar <swaroops@microsoft.com> | 2016-07-15 00:41:30 -0700 |
---|---|---|
committer | Swaroop Sridhar <swaroops@microsoft.com> | 2016-07-20 19:51:50 -0700 |
commit | f915aebaf5db0b829f062dc9940e23bb5c38d575 (patch) | |
tree | f1eafbb504ba2a0fa0253ffcce362ed81a0add80 /src/gcinfo | |
parent | 34e1626bc3a49b50900ca192bed1f97524d81e6a (diff) | |
download | coreclr-f915aebaf5db0b829f062dc9940e23bb5c38d575.tar.gz coreclr-f915aebaf5db0b829f062dc9940e23bb5c38d575.tar.bz2 coreclr-f915aebaf5db0b829f062dc9940e23bb5c38d575.zip |
GCInfo: Support versioning.
This change enables the VM to support multiple versions GCInfo concurrently.
This is necessary in light of upcoming work to add ReturnType and other
modifications to the GCInfo format -- so that existing ReadyToRun images
will continue to run correctly.
The version# is not stored in the GcInfo structure -- because it is
wasteful to store the version once for every method. Instead, it is
tracked per range-section of generated/loaded methods.
The GCInfo version is computed as:
1) The current GCINFO_VERSION for JITted and Ngened images
2) A function of the Ready-to-run major version stored in READYTORUN_HEADER
for ready-to-run images. ReadyToRunJitManager::JitTokenToGCInfoVersion()
provides the GcInfo version for any Method. Currently, there's only one
version of GCInfo.
An abstraction GCInfoToken is added to the GcInfo interface, which tracks the
{GcInfo, Version} pair in-memory. Several GcInfo APIs are
modified to use GCInfoToken in place of GcInfo pointers.
Notes:
1) SOS GcDump: The GCDump API has separate dump routines for Header and the
pointer-liveness information (DumpGCTable and DumpGCHeader) each of which
advance a pointer to the GCInfo block. These APIs are not changed to
recieve a GCInfoToken in place of the GcInfo block pointer. Instead, they
recieve the GcInfo version at the time of construction.
2) Some routines that are specific to x86 gcInfo (ex: crackMethodInfoHdr)
are not yet updated to use versioning, since the development plan is to
update the Non-x86 GcInfo structure first.
3) The x86 specific structs defining GcInfo headers are moved to GcInfoTypes.h,
along with the non-x86 GcInfo type definitions.
Diffstat (limited to 'src/gcinfo')
-rw-r--r-- | src/gcinfo/gcinfodumper.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gcinfo/gcinfodumper.cpp b/src/gcinfo/gcinfodumper.cpp index 432e7066ce..4e31871f67 100644 --- a/src/gcinfo/gcinfodumper.cpp +++ b/src/gcinfo/gcinfodumper.cpp @@ -21,9 +21,9 @@ #error pick suitable ADDRESS_SPACING for platform #endif -GcInfoDumper::GcInfoDumper (PTR_CBYTE pbGCInfo) +GcInfoDumper::GcInfoDumper (GCInfoToken gcInfoToken) { - m_pbGCInfo = pbGCInfo; + m_gcTable = gcInfoToken; m_pRecords = NULL; m_gcInfoSize = 0; } @@ -492,7 +492,7 @@ GcInfoDumper::EnumerateStateChangesResults GcInfoDumper::EnumerateStateChanges ( // // Decode header information // - GcInfoDecoder hdrdecoder(m_pbGCInfo, + GcInfoDecoder hdrdecoder(m_gcTable, (GcInfoDecoderFlags)( DECODE_SECURITY_OBJECT | DECODE_CODE_LENGTH | DECODE_GC_LIFETIMES @@ -617,11 +617,11 @@ PORTABILITY_ASSERT("GcInfoDumper::EnumerateStateChanges is not implemented on th // #ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED - GcInfoDecoder safePointDecoder(m_pbGCInfo, (GcInfoDecoderFlags)0, 0); + GcInfoDecoder safePointDecoder(m_gcTable, (GcInfoDecoderFlags)0, 0); #endif { - GcInfoDecoder untrackedDecoder(m_pbGCInfo, DECODE_GC_LIFETIMES, 0); + GcInfoDecoder untrackedDecoder(m_gcTable, DECODE_GC_LIFETIMES, 0); untrackedDecoder.EnumerateUntrackedSlots(®disp, 0, &LivePointerCallback, @@ -646,7 +646,7 @@ PORTABILITY_ASSERT("GcInfoDumper::EnumerateStateChanges is not implemented on th { BOOL fNewInterruptible = FALSE; - GcInfoDecoder decoder1(m_pbGCInfo, + GcInfoDecoder decoder1(m_gcTable, (GcInfoDecoderFlags)( DECODE_SECURITY_OBJECT | DECODE_CODE_LENGTH | DECODE_VARARG @@ -680,7 +680,7 @@ PORTABILITY_ASSERT("GcInfoDumper::EnumerateStateChanges is not implemented on th } #endif - GcInfoDecoder decoder2(m_pbGCInfo, + GcInfoDecoder decoder2(m_gcTable, (GcInfoDecoderFlags)( DECODE_SECURITY_OBJECT | DECODE_CODE_LENGTH | DECODE_VARARG |