Generated compiler command file overrides user specified compiler command file
Nitsan Wakart
nitsanw at azulsystems.com
Tue May 27 19:07:23 UTC 2014
>> Open issues:
>> 1. This leaves the question of behavior for the default
>> ".hotspot_compiler" file open.
>
> We should merge in .hotspot_compiler as well. May be done later.
>
Will do for second revision.
>> 2. The merge expects 0 or one CompileCommandFile to be specified by the
>> user. Only the first file is merged. Others are ignored.
>
> Merging the first file is OK, since Hotspot will normally ignore
> multiple -XX:CCF.
>
You are right, but it will take the last, not the first. I think we should do what the JVM should have done here and not allow it(preferred) OR merge them all.
> * Let's move the .hgignore out of the picture for now. We can push
> Eclipse ignores as the separate changeset.
My bad, didn't mean to drag it in.
> * What's the reason hintsFile and hintsFile(String) are almost
> identical? Can we merge them together? Also, RunnerTest.tempFileWithLine
> is also similar. Should we introduce the utility method? Get that into
> Utils.
You are right on code smell. The difference here is that the hints file is cached when default but notionally needs rebuilding when merging is required(could introduce a map if cache is required). I'll come up with a better solution, but clarification on the need for caching is appreciated.
> * Please avoid "import static", it only introduces ambiguities for the
> readers, with questionable improvement for a code size.
Your code base, your rules :)
> * "compileCommandFile == null": parentheses over ternary operator
> predicate is advised. Try to also fold the entire condition into the
> CompilerHints.
Will do.
More information about the jmh-dev
mailing list