Skip to content

Conversation

@mdh1418
Copy link
Member

@mdh1418 mdh1418 commented Jul 29, 2022

This PR allows the MonoAOTCompiler to skip compiling methods from a .mibc profile that can not be found. This case can occur when one uses a .mibc profile based on a different app.

/cc: @jonathanpeppers

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this end up as an MSBuild warning? I think we should log it, as long as it doesn't show up as a warning for users.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it should make it through as an MSBuild warning. I tested locally and I could only get the warning to pop up when running the mono aot compiler manually. dotnet publish doesn't surface the log. I've been told by @akoeplinger that through a certain format, it would end up as a MSBuild warning, but I believe this message shouldn't.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The profile not matching the app is normal behavior so I don't think this should cause a warning.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a scenario where a profile not matching the app is problematic and should be noted? What countermeasure do/should we have for this? I originally encountered an unfound method when accidentally profiling an app that was untrimmed and then used the corresponding .mibc to Profiled AOT a trimmed version. Though I suppose thats not problematic as the methods in the trimmed version should be in the profile anyways?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be useful to have some kind of functionality to show the user when the profile doesn't match the app any more, but it should be done in some kind of user friendly way not a g_warning ().

@mdh1418 mdh1418 force-pushed the update_mono_aot_compiler_ignore_missing_profile_methods branch from 6cc9c1d to 8f109f4 Compare July 29, 2022 19:37
@mdh1418
Copy link
Member Author

mdh1418 commented Aug 1, 2022

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mdh1418
Copy link
Member Author

mdh1418 commented Aug 2, 2022

The failures on runtime-extra-platforms should be unrelated as this PR only touches the .mibc Profiled AOT scenario, which doesn't have tests yet.

@mdh1418 mdh1418 merged commit 1e7e914 into dotnet:main Aug 2, 2022
@mdh1418 mdh1418 deleted the update_mono_aot_compiler_ignore_missing_profile_methods branch August 2, 2022 15:28
@ghost ghost locked as resolved and limited conversation to collaborators Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants