GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — experimental fix for double profiling by Baraa-Hasheesh · Pull Request #1306 · async-profiler/async-profiler

Conversation

@Baraa-Hasheesh

@Baraa-Hasheesh Baraa-Hasheesh commented May 21, 2025

Copy link
Copy Markdown
Contributor

Description

When using 2 async-profilers one profiler will override the other, making only one profiler fully functional.
Furthermore when a profiler exists it will leave the remaining profiler in-complete state making not profile correctly

Related issues

#1304

Motivation and context

Make it possible to have multiple async-profilers living on same process

How has this been tested?

Manual tests by using the test here => https://github.com/Baraa-Hasheesh/asprof-reproducers/tree/main/javadoubleprofiler

Notes

This PR isn't ready for full review as it's only applied on specific hooks as POC & only created as a proposal to fix the problem.
If we're happy with this approach will extend to part of all hooks installed in the system

Pros:

  • This change will make profilers communicate with each other via callbacks
  • Will make sure that profilers are alive with proper hook installs

Cons:

  • If profilers are started/stopped in parallel some race conditions may happen making some profilers unable to install hooks
  • When exiting it's possible to end up in a state were hooks are never uninstalled, as each profiler do extra checks as to not break callback chain across profilers & not cause infinite loops

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Baraa-Hasheesh added 2 commits May 21, 2025 07:35
@Baraa-Hasheesh
experimental fix for double profiling
9abb141
@Baraa-Hasheesh
Don't break callback chain
89a2e01
@Baraa-Hasheesh

Baraa-Hasheesh commented May 30, 2025

Copy link
Copy Markdown
Contributor Author

Not needed => Fixed in #1323

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Baraa-Hasheesh Baraa-Hasheesh closed this May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Baraa-Hasheesh
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.