-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8356698: JFR: @Contextual #25249
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
8356698: JFR: @Contextual #25249
Conversation
|
👋 Welcome back egahlin! A progress list of the required criteria for merging this PR into |
|
@egahlin This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 30 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
mgronlun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very nice addition and an excellent demo example for showcasing the capabilities is provided in the test: TestPrintContextual.java
| @StackTrace(true) | ||
| public final class MethodTraceEvent extends AbstractJDKEvent { | ||
|
|
||
| @Contextual |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the MethodTraceEvent's method field really have this annotation? Or is it a remnant from testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be useful if a contextual GUI is created where users can drill down into tables and see all events that occur during a method call. For example, if you want to troubleshoot a slow login:
$ java -XX:StartFlightRecording:method-trace=LoginService::login ...
| Context Types |
|---|
| Order::id |
| MethodTrace::method (selected) |
| Trace::id |
| Trace::name |
| Start Time | Duration | Context Values |
|---|---|---|
| 20:05:02.10 | 5.0 s | LoginService::login(String, String) (selected) |
| 20:05:08.10 | 80 ms | LoginService::login(String, String) |
| 20:05:10.10 | 75 ms | LoginService::login(String, String) |
| Start Time | Event Name | Duration |
|---|---|---|
| 20:05:02.45 | Java Monitor Enter | 25 ms |
| 20:05:03.12 | JDBC Execute Query | 4.7 s |
or some other known aspect of the program that has been problematic in the past and now have been annotated, for example:
$ java -XX:StartFlightRecording:method-trace=@com.example.UpdateOrder ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be useful if a contextual GUI is created where users can drill down into tables and see all events that occur during a method call. For example, if you want to troubleshoot a slow login:
$ java -XX:StartFlightRecording:method-trace=LoginService::login ...Context Types
Order::id
MethodTrace::method (selected)
Trace::id
Trace::name
Start Time Duration Context Values
20:05:02.10 5.0 s LoginService::login(String, String) (selected)
20:05:08.10 80 ms LoginService::login(String, String)
20:05:10.10 75 ms LoginService::login(String, String)
Start Time Event Name Duration
20:05:02.45 Java Monitor Enter 25 ms
20:05:03.12 JDBC Execute Query 4.7 sor some other known aspect of the program that has been problematic in the past and now have been annotated, for example:
$ java -XX:StartFlightRecording:method-trace=@com.example.UpdateOrder ...
I could not agree more.
A GUI picking up these innovations, making them conveniently accessible and easily understandable to the end user would be fantastic.
|
/integrate |
|
Going to push as commit 1373ceb.
Your commit was automatically rebased without conflicts. |
Could I have a review of a new annotation that can be used to annotate a field as contextual.
Testing: jdk/jdk/jfr + tier1
Thanks
Erik
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25249/head:pull/25249$ git checkout pull/25249Update a local copy of the PR:
$ git checkout pull/25249$ git pull https://git.openjdk.org/jdk.git pull/25249/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25249View PR using the GUI difftool:
$ git pr show -t 25249Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25249.diff
Using Webrev
Link to Webrev Comment