On Thu, 22 Oct 2020 07:09:47 GMT, Nick Gasson <ngas...@openjdk.org> wrote:
>> Hi Nick, >> >> this is a very useful idea! I missed this in the past. >> >> Some remarks. I'll try to keep bikeshedding to a minimum since you already >> have enough input. Mostly ergonomics. >> >> 1) Like Alexey, I would really wish for an print-at-exit switch. The common >> naming seems to be xxxAtExit (so not, OnExit). "PrintXxx" seems to be >> printing stuff out to tty, "DumpXxxx" for writing separate files (e.g. CDS >> map). So I would name it DumpPerfMapAtExit. >> >> 2) Dumping to /tmp is unexpected for me, I would prefer if the default were >> dumping to the current directory. That seems to be the default for other >> files too (cds map, hs-err file etc). >> >> 3) Not necessary but nice would be a an option to specify location of the >> dump file. >> >> 4) I think it would be nice to have these switches always available, so real >> product switches. Which would require you to write up a small CSR but I >> still think it would make sense. >> >> Cheers, Thomas > >> >> 1. Like Alexey, I would really wish for an print-at-exit switch. The >> common naming seems to be xxxAtExit (so not, OnExit). "PrintXxx" seems to be >> printing stuff out to tty, "DumpXxxx" for writing separate files (e.g. CDS >> map). So I would name it DumpPerfMapAtExit. >> > > OK, makes sense. > >> 2. Dumping to /tmp is unexpected for me, I would prefer if the default >> were dumping to the current directory. That seems to be the default for >> other files too (cds map, hs-err file etc). >> >> 3. Not necessary but nice would be a an option to specify location of >> the dump file. >> > > The `/tmp/perf-<pid>.map` is hardcoded into perf though ([see > here](https://github.com/torvalds/linux/blob/master/tools/perf/util/map.c#L155)), > so I don't think it's useful for the user to be able to change the location. > > I think we should use this option carefully because nmethod might be > unloaded. So we should use this with `-XX:-UseCodeCacheFlushing`. > Thanks for the information. `-XX:+DumpPerfMapAtExit` will turn on `UseCodeCacheFlushing` if it's set to default. ------------- PR: https://git.openjdk.java.net/jdk/pull/760