graal icon indicating copy to clipboard operation
graal copied to clipboard

Extend PrintAnalysisCallTree option

Open ziyilin opened this issue 4 years ago • 10 comments

Current -H:+PrintAnalysisCallTree option prints call trees for all entries. However, the resulting file is too large to look for the method that user is interested in.

This PR extends the option to -H:PrintAnalysisCallTree=<comma-separated method list>. Only the specified entry methods' call tree will be printed out. And -H:PrintAnalysisCallTree= prints call tree for all entry methods, just like previous -H:+PrintAnalysisCallTree does.

The method name is the qualified name including parameter types, such as sun.nio.fs.UnixNativeDispatcher.<clinit>().

ziyilin avatar Feb 19 '21 13:02 ziyilin

Hi @mcraj017, could you please assign this to someone for a review?

zakkak avatar Apr 14 '21 14:04 zakkak

@zakkak thanks for the PR, I have assigned reviwers for this

munishchouhan avatar Apr 15 '21 03:04 munishchouhan

@zakkak thanks for the PR, I have assigned reviwers for this

Well, the thanks for the PR go to @ziyilin. I didn't put any effort in this, I would just like to see it merged :) Thanks for pushing it forward.

zakkak avatar Apr 15 '21 12:04 zakkak

@christianwimmer @vjovanov are there any updates on this?

zakkak avatar May 13 '21 03:05 zakkak

Please document the new option format in /docs/reference-manual/native-image/Reports.md. Is this supposed to work only for entry points, or any method can be selected?

Updated the reference file. It should report for any method selected.@cstancu please have a review. Thanks.

ziyilin avatar Jul 13 '21 04:07 ziyilin

Hi @ziyilin, it looks like now that https://github.com/oracle/graal/pull/3128 got merged there are some conflicts in this PR, could you please have a look?

zakkak avatar Sep 21 '21 11:09 zakkak

Hi @ziyilin, it looks like now that #3128 got merged there are some conflicts in this PR, could you please have a look?

@zakkak I've fixed the conflicts

ziyilin avatar Sep 23 '21 02:09 ziyilin

Please consider my comment https://github.com/oracle/graal/issues/3843#issuecomment-932188028 before integrating this. I'd rather PrintAnalysisCallTree be set to either text or csv, and then have a complementary option for the filter itself.

galderz avatar Oct 01 '21 12:10 galderz

Hello @cstancu, are there any updates on this?

zakkak avatar Dec 03 '21 09:12 zakkak

This PR fell between cracks. If it's still relevant for you I have a few suggestions:

  • instead of using a custom filter format I would use the same method filter format as jdk.graal.MethodFilter, we used that recently also for AbortOnMethodReachable for example.
  • instead of using having -H:PrintAnalysisCallTreeFilter= set -H:+PrintAnalysisCallTree I would just make AnalysisCallTreeMethodFilter as a separate option, that's by default empty.

cstancu avatar Jun 07 '24 14:06 cstancu