Adding compiler optimization to open jdk
Krystal Mok
rednaxelafx at gmail.com
Thu Oct 16 23:10:20 UTC 2014
Hi Mandar,
I would suggest starting with the IR visualizers for HotSpot's two
compilers: c1visualizer [1] for C1 and IdealGraphVisualizer [2] for C2.
Download them, read their user manual and related papers, and then try them
in your experiments. They come in really handy.
(By the way, if you're developing features in the VM you're most certainly
going to use one of the debug build variants, e.g. fastdebug. Use that when
you're doing experiments, it gives you a lot more information then a
product build.)
If you actually prefer text-based stuff, then you can get the IRs from C1
and C2 via various "Print" VM flags, e.g. -XX:+PrintHIR for C1's HIR, and
-XX:+PrintIdeal for C2's IR.
- Kris
[1]: https://java.net/projects/c1visualizer/
[2]: http://ssw.jku.at/General/Staff/TW/igv.html
On Thu, Oct 16, 2014 at 8:38 AM, Mandar Shinde <mandars at cse.iitb.ac.in>
wrote:
> Hi,
>
> I want to add an optimization to openjdk 6 (like some modifications to
> existing constant folding or CSE optimization), for which i have downloaded
> the source bundle.
>
> However I am not able to figure out where to add the optimization and see
> my changes reflected in the code.
>
> Also in some file like for
>
> Eg.: hotspot/src/share/vm/c1/c1_Canonicalizer.cpp there are statements
> like /tty->print_cr(<some-statement>).
>
> My question is where can we see these statements printed once we send our
> java source file to the compiler?
>
> Thanks,
> ~Mandar
>
>
More information about the hotspot-dev
mailing list