Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 5.6k
Implement getClassAssemblyName#106959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Implement getClassAssemblyName #106959
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e485a96
Add getClassAssemblyName
hez2010 8ca0c21
Format
hez2010 b0630e4
Handle nullptrs
hez2010 350f131
Remove CORINFO_ASSEMBLY_HANDLE
hez2010 ebbea4e
Address feedbacks
hez2010 d28e074
Cast to unsigned
hez2010 0f0c7ef
Address feedbacks
hez2010 ad22e33
Leftovers cleanup
hez2010 e6e558b
Update src/coreclr/inc/corinfo.h
hez2010 0f82112
Merge branch 'main' into diag-interfaces
hez2010 4526254
Merge branch 'main' into diag-interfaces
jkotas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -2586,8 +2586,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags) | ||
| // We have an exclusion list. See if this method is in an assembly that is on the list. | ||
| // Note that we check this for every method, since we might inline across modules, and | ||
| // if the inlinee module is on the list, we don't want to use the altjit for it. | ||
| const char* methodAssemblyName = info.compCompHnd->getAssemblyName( | ||
| info.compCompHnd->getModuleAssembly(info.compCompHnd->getClassModule(info.compClassHnd))); | ||
| const char* methodAssemblyName = eeGetClassAssemblyName(info.compClassHnd); | ||
| if (s_pAltJitExcludeAssembliesList->IsInList(methodAssemblyName)) | ||
| { | ||
| opts.altJit = false; | ||
| @@ -2614,8 +2613,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags) | ||
| bool assemblyInIncludeList = true; // assume we'll dump, if there's not an include list (or it's empty). | ||
| if (s_pJitDisasmIncludeAssembliesList != nullptr && !s_pJitDisasmIncludeAssembliesList->IsEmpty()) | ||
| { | ||
| const char* assemblyName = info.compCompHnd->getAssemblyName( | ||
| info.compCompHnd->getModuleAssembly(info.compCompHnd->getClassModule(info.compClassHnd))); | ||
| const char* assemblyName = eeGetClassAssemblyName(info.compClassHnd); | ||
| if (!s_pJitDisasmIncludeAssembliesList->IsInList(assemblyName)) | ||
| { | ||
hez2010 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| // We have a list, and the current assembly is not in it, so we won't dump. | ||
| @@ -6335,39 +6333,29 @@ int Compiler::compCompile(CORINFO_MODULE_HANDLE classPtr, | ||
| #ifdef DEBUG | ||
| if (JitConfig.EnableExtraSuperPmiQueries()) | ||
| { | ||
| // This call to getClassModule/getModuleAssembly/getAssemblyName fails in crossgen2 due to these | ||
| // APIs being unimplemented. So disable this extra info for pre-jit mode. See | ||
| // https://github.com/dotnet/runtime/issues/48888. | ||
| // | ||
| // Ditto for some of the class name queries for generic params. | ||
| // | ||
| if (!compileFlags->IsSet(JitFlags::JIT_FLAG_PREJIT)) | ||
| { | ||
| // Get the assembly name, to aid finding any particular SuperPMI method context function | ||
| (void)info.compCompHnd->getAssemblyName( | ||
| info.compCompHnd->getModuleAssembly(info.compCompHnd->getClassModule(info.compClassHnd))); | ||
| // Get the assembly name, to aid finding any particular SuperPMI method context function | ||
| (void)eeGetClassAssemblyName(info.compClassHnd); | ||
| // Fetch class names for the method's generic parameters. | ||
| // | ||
| CORINFO_SIG_INFO sig; | ||
| info.compCompHnd->getMethodSig(info.compMethodHnd, &sig, nullptr); | ||
| // Fetch class names for the method's generic parameters. | ||
| // | ||
| CORINFO_SIG_INFO sig; | ||
| info.compCompHnd->getMethodSig(info.compMethodHnd, &sig, nullptr); | ||
| const unsigned classInst = sig.sigInst.classInstCount; | ||
| if (classInst > 0) | ||
| const unsigned classInst = sig.sigInst.classInstCount; | ||
| if (classInst > 0) | ||
| { | ||
| for (unsigned i = 0; i < classInst; i++) | ||
| { | ||
| for (unsigned i = 0; i < classInst; i++) | ||
| { | ||
| eeGetClassName(sig.sigInst.classInst[i]); | ||
| } | ||
| eeGetClassName(sig.sigInst.classInst[i]); | ||
| } | ||
| } | ||
| const unsigned methodInst = sig.sigInst.methInstCount; | ||
| if (methodInst > 0) | ||
| const unsigned methodInst = sig.sigInst.methInstCount; | ||
| if (methodInst > 0) | ||
| { | ||
| for (unsigned i = 0; i < methodInst; i++) | ||
| { | ||
| for (unsigned i = 0; i < methodInst; i++) | ||
| { | ||
| eeGetClassName(sig.sigInst.methInst[i]); | ||
| } | ||
| eeGetClassName(sig.sigInst.methInst[i]); | ||
| } | ||
| } | ||
| } | ||
| @@ -9221,8 +9209,7 @@ void JitTimer::PrintCsvMethodStats(Compiler* comp) | ||
| } | ||
| else | ||
| { | ||
| const char* methodAssemblyName = comp->info.compCompHnd->getAssemblyName( | ||
| comp->info.compCompHnd->getModuleAssembly(comp->info.compCompHnd->getClassModule(comp->info.compClassHnd))); | ||
| const char* methodAssemblyName = comp->eeGetClassAssemblyName(comp->info.compClassHnd); | ||
| fprintf(s_csvFile, "\"%s\",", methodAssemblyName); | ||
| } | ||
| fprintf(s_csvFile, "%u,", comp->info.compILCodeSize); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.