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

java: async-profiler: include method modifiers in name #570

Closed
Jongy opened this issue Nov 2, 2022 · 0 comments
Closed

java: async-profiler: include method modifiers in name #570

Jongy opened this issue Nov 2, 2022 · 0 comments
Assignees
Labels
defined-and-prioritized Tickets that have fully defined the desired outcome & are prioritized to be developed. enhancement New feature or request runtime/java

Comments

@Jongy
Copy link
Contributor

Jongy commented Nov 2, 2022

Method modifiers (ACC_* values such as static, public etc) are interesting and can provide useful insights for profile readers. It's easy to get them with jvmti->GetMethodModifiers.

For MVP, I'd like it this way:

  • We add an option --java-include-method-modifiers, disabled by default.
  • If above option is given, we pass a matching option to async-profiler (that we add in async-profiler) - includemm (mm for method modifiers).
  • When includemm is given, we will call GetMethodModifiers and append the data to the frame name as a prefix, in a format that would match the way it was defined in the Java file. So if we got the modifiers ACC_PUBLIC, ACC_FINAL, ACC_STATIC - we will add public static final (maintain the same order as common in Java files), e.g public final String.replace(....); (just an example).
  • When includemm is not in use, async-profiler's behavior should not be changed at all (i.e avoid calling any new methods unless necessary).
@Jongy Jongy added enhancement New feature or request runtime/java labels Nov 2, 2022
@Jongy Jongy added the defined-and-prioritized Tickets that have fully defined the desired outcome & are prioritized to be developed. label Jan 31, 2023
@mpozniak95 mpozniak95 self-assigned this Feb 27, 2023
Jongy pushed a commit to Granulate/async-profiler that referenced this issue Mar 15, 2023
@Jongy Jongy closed this as completed in bb72c19 Mar 15, 2023
Jongy pushed a commit to Granulate/async-profiler that referenced this issue Apr 25, 2023
Jongy pushed a commit to Granulate/async-profiler that referenced this issue Apr 27, 2023
Jongy pushed a commit to Granulate/async-profiler that referenced this issue Oct 8, 2023
Jongy pushed a commit to Granulate/async-profiler that referenced this issue Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defined-and-prioritized Tickets that have fully defined the desired outcome & are prioritized to be developed. enhancement New feature or request runtime/java
Projects
None yet
Development

No branches or pull requests

2 participants