Skip to content
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

Prejit support on FunctionsNetHost #2711

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Prejit support on FunctionsNetHost #2711

wants to merge 8 commits into from

Conversation

kshyju
Copy link
Member

@kshyju kshyju commented Sep 13, 2024

Fixes #2637

This PR adds support for pre-jitting framework methods during placeholder mode. Currently this is enabled only for net8 onwards. This behavior can be explicitly disabled by setting AZURE_FUNCTIONS_FUNCTIONSNETHOST_DISABLE_PREJIT environment variable value to 0.

See internal wiki page for more context.

I will have a separate follow up PR for fixing the build pipeline & nuget packaging needed for this change. Also included the build pipeline changes to include the new artifacts in the final package.

Did a minor version bump.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

@kshyju
Copy link
Member Author

kshyju commented Sep 13, 2024

@steveisok @ivdiazsa FYI.

@kshyju
Copy link
Member Author

kshyju commented Sep 13, 2024

@khkh-ms FYI. I used a previously generated trace for this PR. Once your changes are done, we could replace this file with that. Let's merge both traces to single file (like what we do for host)

@kshyju
Copy link
Member Author

kshyju commented Sep 18, 2024

@steveisok @ivdiazsa Appreciate if you could do review the changes.

Copy link
Member

@liliankasem liliankasem left a comment

Choose a reason for hiding this comment

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

Can you added unit tests where possible?

host/src/FunctionsNetHost.Shared/EnvironmentVariables.cs Outdated Show resolved Hide resolved
host/src/FunctionsNetHost/PreJit/PreJitManager.cs Outdated Show resolved Hide resolved
host/src/FunctionsNetHost/PreJit/PreJitManager.cs Outdated Show resolved Hide resolved
host/src/FunctionsNetHost/PreJit/PreJitManager.cs Outdated Show resolved Hide resolved
host/src/PlaceholderApp/JitTrace/JitTraceRuntime.cs Outdated Show resolved Hide resolved
host/src/PlaceholderApp/StartupHook.cs Show resolved Hide resolved
host/src/global.json Show resolved Hide resolved
host/src/PlaceholderApp/StartupHook.cs Outdated Show resolved Hide resolved
@ivdiazsa
Copy link

I don't have further comments other than addressing the ones that have been pointed out so far.

@kshyju
Copy link
Member Author

kshyju commented Sep 19, 2024

Can you add unit tests where possible?

We don't have any tests as of today as what we want to validate is the native output. There has been discussion about adding an E2E test which simulates the linux scenarios as part of build pipeline (potentially a nightly build). Never got a chance to create a work item until now. #2724

I think that should be the priority. We can certainly revisit as we have more cycles to work on this.

@steveisok
Copy link

Looks good to me! Glad you were able to work this in 👍

Copy link

@safihamid safihamid left a comment

Choose a reason for hiding this comment

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

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prejit support on FunctionsNetHost
5 participants