diff options
author | dotnet-bot <dotnet-bot@microsoft.com> | 2015-10-01 00:47:24 +0300 |
---|---|---|
committer | Scott Mosier <smosier@microsoft.com> | 2015-10-01 00:47:24 +0300 |
commit | ad0323ab91a7b1469b42ca5457ddd631b94294fe (patch) | |
tree | 88fae57e1ec3aae90288463dc07e58f7aebc1de8 /src/Native/Runtime/gcdump.h | |
parent | 6763d16387778f126ec510c0421783952602f8f7 (diff) |
Initial population of CoreRT Runtime files.
Diffstat (limited to 'src/Native/Runtime/gcdump.h')
-rw-r--r-- | src/Native/Runtime/gcdump.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/Native/Runtime/gcdump.h b/src/Native/Runtime/gcdump.h new file mode 100644 index 000000000..1ec5eb1f8 --- /dev/null +++ b/src/Native/Runtime/gcdump.h @@ -0,0 +1,79 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +/***************************************************************************** + * GCDump.h + * + * Defines functions to display the GCInfo as defined by the GC-encoding + * spec. The GC information may be either dynamically created by a + * Just-In-Time compiler conforming to the standard code-manager spec, + * or may be persisted by a managed native code compiler conforming + * to the standard code-manager spec. + */ + +/*****************************************************************************/ +#ifndef __GCDUMP_H__ +#define __GCDUMP_H__ +/*****************************************************************************/ + +struct GCInfoHeader; + +#ifndef FASTCALL +#define FASTCALL __fastcall +#endif + + +class GCDump +{ +public: + + struct Tables + { + PTR_UInt8 pbDeltaShortcutTable; + PTR_UInt8 pbUnwindInfoBlob; + PTR_UInt8 pbCallsiteInfoBlob; + }; + + + GCDump (); + + /*------------------------------------------------------------------------- + * Dumps the GCInfoHeader to 'stdout' + * gcInfo : Start of the GC info block + * Return value : Size in bytes of the header encoding + */ + + size_t FASTCALL DumpInfoHeader(PTR_UInt8 gcInfo, + Tables * pTables, + GCInfoHeader * header /* OUT */ + ); + + /*------------------------------------------------------------------------- + * Dumps the GC tables to 'stdout' + * gcInfo : Ptr to the start of the table part of the GC info. + * This immediately follows the GCinfo header + * Return value : Size in bytes of the GC table encodings + */ + + size_t FASTCALL DumpGCTable(PTR_UInt8 gcInfo, + Tables * pTables, + const GCInfoHeader& header + ); + + + typedef void (*printfFtn)(const char* fmt, ...); + printfFtn gcPrintf; + + + + //------------------------------------------------------------------------- +protected: + + void PrintLocalSlot(UInt32 slotNum, GCInfoHeader const * pHeader); + void DumpCallsiteString(UInt32 callsiteOffset, PTR_UInt8 pbCallsiteString, GCInfoHeader const * pHeader); +}; + +/*****************************************************************************/ +#endif // __GC_DUMP_H__ +/*****************************************************************************/ |