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

Command-line profiler could be cheaper and more transparent #3747

Open
headius opened this issue Mar 19, 2016 · 0 comments
Open

Command-line profiler could be cheaper and more transparent #3747

headius opened this issue Mar 19, 2016 · 0 comments

Comments

@headius
Copy link
Member

headius commented Mar 19, 2016

Currently, turning on the command-line timing profiler wraps all method objects in the system with a timing wrapper. This work well enough, but by being in the call path it tends to interfere with optimization, changing the execution behavior of the code under profile.

There's a few ways we could improve this:

  • Call sites could contain the logic necessary for profiling. Rather than wrapping the target method, we'd just use a different call site. This would also fit into invokedynamic mode, allowing us to patch profiling into the call chain without breaking optimization and inlining.
  • We could switch all dispatch to use invokedynamic call sites and do the same instrumentation above
  • We could force code to JIT immediately, allowing more use of JVM profiling features. This does have the down side that unjittable code would not profile the same way.

In any case, I'd like to see us get a little more creative about how to inject profiling into an application without changing how it optimizes as much as we do now.

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

No branches or pull requests

1 participant