Beispiel #1
0
 private void EnsureInitialized()
 {
     if (_gcInfo == null)
     {
         ParseRuntimeFunctions(true);
         if (GcInfoRva != 0)
         {
             int gcInfoOffset = _readyToRunReader.CompositeReader.GetOffset(GcInfoRva);
             if (_readyToRunReader.Machine == Machine.I386)
             {
                 _gcInfo = new x86.GcInfo(_readyToRunReader.Image, gcInfoOffset, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion);
             }
             else
             {
                 // Arm and Arm64 use the same GcInfo format as Amd64
                 _gcInfo = new Amd64.GcInfo(_readyToRunReader.Image, gcInfoOffset, _readyToRunReader.Machine, _readyToRunReader.ReadyToRunHeader.MajorVersion);
             }
         }
     }
     if (_pgoInfo == null)
     {
         _pgoInfo = _readyToRunReader.GetPgoInfoByKey(PgoInfoKey.FromReadyToRunMethod(this));
         if (_pgoInfo == null)
         {
             _pgoInfo = PgoInfo.EmptySingleton;
         }
     }
 }
Beispiel #2
0
 public PgoInfo(PgoInfoKey key, ReadyToRunReader r2rReader, int pgoFormatVersion, byte[] image, int offset)
 {
     PgoFormatVersion = pgoFormatVersion;
     Key        = key;
     Offset     = offset;
     Image      = image;
     _r2rReader = r2rReader;
 }