Skip to content

Adding support for collecting cross-platform perf traces and generating PGO JIT traces #11066

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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

kshyju
Copy link
Member

@kshyju kshyju commented May 16, 2025

Enable cross-platform performance trace collection and PGO JIT trace generation.

  1. Introduced a Node.js HTTP application to the test matrix for performance trace collection. This app is disabled by default, but can be enabled when running the pipeline.
  2. Added a pipeline stage to merge and deduplicate JIT traces generated from multiple applications (currently supporting three apps).

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • Backporting to the in-proc branch is not required
    • Otherwise: Link to backporting PR
  • 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
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

@kshyju kshyju requested a review from a team as a code owner May 16, 2025 17:18
@safihamid
Copy link
Contributor

safihamid commented May 16, 2025

Looking at specialization urls for Flex we do need a call to /admin/instance/assign as well to include in PGO.

Here are all the calls to the Host during cold start and specialization:

url
'GET', 'userAgent': 'Go-http-client/1.1', 'uri': '/api/warmup' }
'POST', 'userAgent': 'NestedNodeAgent...'', 'uri': '/admin/instance/assign' }
'GET', 'userAgent': 'RunnersV3 Functions_ColdSite....', 'uri': '/api/hellohttp' }

Looks like we are doing 1 and 3 but not 2

@kshyju kshyju force-pushed the shkr/jittrace-gen branch from 8eb3bca to f0be9e0 Compare May 16, 2025 18:16
@kshyju kshyju force-pushed the shkr/jittrace-gen branch from 60a71bf to 6b05a2a Compare May 16, 2025 23:31
@kshyju
Copy link
Member Author

kshyju commented May 17, 2025

/admin/instance/assign

Looking at specialization urls for Flex we do need a call to /admin/instance/assign as well to include in PGO.

Here are all the calls to the Host during cold start and specialization:

url 'GET', 'userAgent': 'Go-http-client/1.1', 'uri': '/api/warmup' } 'POST', 'userAgent': 'NestedNodeAgent...'', 'uri': '/admin/instance/assign' } 'GET', 'userAgent': 'RunnersV3 Functions_ColdSite....', 'uri': '/api/hellohttp' }

Looks like we are doing 1 and 3 but not 2

I reviewed the code for the admin/instance/assign endpoint and want to understand which code paths are actually executed during specialization in PROD. I’m also curious if the same paths apply to other Linux Consumption SKUs. This will help me replicate the right environment setup in lab runs.

I'll handle that setup in a separate change to keep this PR focused and easier to review. It will also involve modifying the placeholder simulation logic — for example, this line needs to be removed, since the code only checks for the existence of the environment variable, not whether its value is "1".

Copy link
Contributor

@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.

3 participants