More SuperPmi Tweaks (#35875)
authorCarol Eidt <carol.eidt@microsoft.com>
Wed, 6 May 2020 17:31:29 +0000 (10:31 -0700)
committerGitHub <noreply@github.com>
Wed, 6 May 2020 17:31:29 +0000 (10:31 -0700)
* Add more queries for SuperPmi
* Support crossgen collection

src/coreclr/scripts/superpmi.py
src/coreclr/src/jit/lclvars.cpp

index ba6537d..8bef741 100755 (executable)
@@ -588,6 +588,7 @@ class SuperPMICollect:
             env_copy["SuperPMIShimLogPath"] = self.temp_location
             env_copy["SuperPMIShimPath"] = self.jit_path
             env_copy["COMPlus_AltJit"] = "*"
+            env_copy["COMPlus_AltJitNgen"] = "*"
             env_copy["COMPlus_AltJitName"] = self.collection_shim_name
             env_copy["COMPlus_EnableExtraSuperPmiQueries"] = "1"
 
@@ -600,6 +601,7 @@ class SuperPMICollect:
             print_platform_specific_environment_vars(self.coreclr_args, "SuperPMIShimPath", self.jit_path)
             print_platform_specific_environment_vars(self.coreclr_args, "COMPlus_AltJit", "*")
             print_platform_specific_environment_vars(self.coreclr_args, "COMPlus_AltJitName", self.collection_shim_name)
+            print_platform_specific_environment_vars(self.coreclr_args, "COMPlus_AltJitNgen", "*")
             print("")
 
             if self.collection_command != None:
index 68490d0..ab3280b 100644 (file)
@@ -2697,6 +2697,10 @@ void Compiler::makeExtraStructQueries(CORINFO_CLASS_HANDLE structHandle, int lev
     assert(structHandle != NO_CLASS_HANDLE);
     (void)typGetObjLayout(structHandle);
     unsigned fieldCnt = info.compCompHnd->getClassNumInstanceFields(structHandle);
+    impNormStructType(structHandle);
+#ifdef TARGET_ARMARCH
+    GetHfaType(structHandle);
+#endif
     for (unsigned int i = 0; i < fieldCnt; i++)
     {
         CORINFO_FIELD_HANDLE fieldHandle      = info.compCompHnd->getFieldInClass(structHandle, i);
@@ -2708,7 +2712,6 @@ void Compiler::makeExtraStructQueries(CORINFO_CLASS_HANDLE structHandle, int lev
         {
             if (varTypeIsStruct(fieldVarType))
             {
-                fieldVarType = impNormStructType(fieldClassHandle);
                 makeExtraStructQueries(fieldClassHandle, level - 1);
             }
         }