RFR: 8271461: CompileCommand support for hidden class methods [v3]

Ioi Lam iklam at openjdk.java.net
Tue Aug 3 03:48:35 UTC 2021


On Tue, 3 Aug 2021 01:28:40 GMT, Jie Fu <jiefu at openjdk.org> wrote:

> > Maybe PrintCompilation should be changed to print `+` instead of `/`?
> 
> But `sf.getDeclaringClass().getName()` in your example also prints `/`.
> 
> It seems easier to make CompileCommand accept the current hidden class name.
> 
> So I think it would make life easier and let `CompileCommand` to be more friendly to people with this change.
> Thanks.

I think it's OK to make `MethodMatcher::canonicalize` recognize the pattern generated by `-XX:+PrintCompilation`. Although it doesn't solve the general problem of reliably and uniquely identifying the hidden classes, it's still useful for quick-and-dirty testing, when you cut-and-paste the output of `-XX:+PrintCompilation`.

As Dean said, the current implementation also unintentionally transforms `/` in the package names. I don't think it's OK to say "oh it won't make anything worse". This makes the behavior hard to understand, and complicates future evolution of the code.

Instead, it's better to tighten up the implementation to transform only the class name. I.e., between the `/` and `"::"`

- the first character must be `0` or `*`
- the second character must be `x` or `*`
- all remaining characters must be 0-9a-f, or `*`

-------------

PR: https://git.openjdk.java.net/jdk/pull/4926


More information about the hotspot-compiler-dev mailing list