-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8314029: Add file name parameter to Compiler.perfmap #15871
Conversation
👋 Welcome back yftsai! A progress list of the required criteria for merging this PR into |
Webrevs
|
src/jdk.jcmd/share/man/jcmd.1
Outdated
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.
The actual markdown source for this file needs to be updated with these changes. Those sources are not open-source unfortunately. Please either coordinate to get the sources updated with an Oracle developer as part of this PR (they will integrate the internal part), or else please defer this to a subtask and let an Oracle developer update the source and output at the same time. Thanks.
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 filed JDK-8320556 to update the closed source. It's assigned to me. I'll do the update after these changes are pushed. In the meantime I'll make sure the current jcmd.1 changes are correct and match the closed changes I'll be making.
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've applied the doc changes in the CSR to our closed markup file and generated a new jcmd.1 file with it. You can apply this diff to this PR to get the open changes checked in:
diff --git a/src/jdk.jcmd/share/man/jcmd.1 b/src/jdk.jcmd/share/man/jcmd.1
index 4157cf600e1..af8d3e61b86 100644
--- a/src/jdk.jcmd/share/man/jcmd.1
+++ b/src/jdk.jcmd/share/man/jcmd.1
@@ -178,11 +178,21 @@ Prints all compiled methods in code cache that are alive.
Impact: Medium
.RE
.TP
-\f[V]Compiler.perfmap\f[R] (Linux only)
+\f[V]Compiler.perfmap\f[R] [\f[I]arguments\f[R]] (Linux only)
Write map file for Linux perf tool.
.RS
.PP
Impact: Low
+.PP
+\f[I]arguments\f[R]:
+.IP \[bu] 2
+\f[V]filename\f[R]: (Optional) Name of the map file (STRING, no default
+value)
+.PP
+If \f[V]filename\f[R] is not specified, a default file name is chosen
+using the pid of the target JVM process.
+For example, if the pid is \f[V]12345\f[R], then the default
+\f[V]filename\f[R] will be \f[V]/tmp/perf-12345.map\f[R].
.RE
.TP
\f[V]Compiler.queue\f[R]
This will also need a CSR request created and approved. /csr needed |
@dholmes-ora has indicated that a compatibility and specification (CSR) request is needed for this pull request. @yftsai please create a CSR request for issue JDK-8314029 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
src/hotspot/share/code/codeCache.cpp
Outdated
// Perf expects to find the map file at /tmp/perf-<pid>.map. | ||
char fname[32]; | ||
jio_snprintf(fname, sizeof(fname), "/tmp/perf-%d.map", os::current_process_id()); | ||
jio_snprintf(_name, sizeof(_name), "/tmp/perf-%d.map", os::current_process_id()); |
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.
Please change the comment to:
// Perf expects to find the map file at /tmp/perf-<pid>.map.
// It is used as the default file name.
@yftsai This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@yftsai This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
@yftsai Since you requested a CSR review, I assume you want this PR re-opened. Can you please re-open it in that case. |
/open |
@yftsai This pull request is now open |
/csr notneeded |
@dholmes-ora usage: |
/csr unneeded |
@dholmes-ora The CSR requirement cannot be removed as CSR issues already exist. Please withdraw JDK-8316922 and then use the command |
/csr unneeded |
@plummercj determined that a CSR request is not needed for this pull request. |
/reviewers 2 |
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.
The test needs a copyright update. Otherwise the changes look good.
@yftsai 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 1305 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@plummercj, @eastig) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@plummercj |
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.
lgtm
/integrate |
The man page says "no default value" but then right below describes the default value, which is confusing. I would remove "no default value". |
This was copied from VM.cds, which pretty much does the same thing (says "no default value" and then explains the default value below). Since the default is based on the pid, and we probably don't want a long description here, maybe just say |
/sponsor |
Going to push as commit a5122d7.
Your commit was automatically rebased without conflicts. |
@phohensee @yftsai Pushed as commit a5122d7. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
@phohensee Although this PR had 2 reviews, there was still some unresolved discussion. It should not have been pushed. |
Shall I revert it? |
If we do settle on some additional changes, I think probably a follow-up CR would be cleaner than a BACKOUT and REDO. |
Thanks. |
jcmd Compiler.perfmap
uses the hard-coded file name for a perf map:/tmp/perf-%d.map
. This change adds an optional argument for specifying a file name.jcmd PID help Compiler.perfmap
shows the following usage.The following section of man page is also updated. (
man -l src/jdk.jcmd/share/man/jcmd.1
)Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15871/head:pull/15871
$ git checkout pull/15871
Update a local copy of the PR:
$ git checkout pull/15871
$ git pull https://git.openjdk.org/jdk.git pull/15871/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15871
View PR using the GUI difftool:
$ git pr show -t 15871
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15871.diff
Webrev
Link to Webrev Comment