Re: 回复: please help understanding what's the relationship of hotspot compiler c1 and c2 ?

David Holmes david.holmes at oracle.com
Thu Nov 3 19:39:35 UTC 2016


On 2/11/2016 7:40 PM, 恶灵骑士 wrote:
> Hi,
> Server VM will use C2, in this mode
> which method processes 'volatile' operations like method do_StoreField in  src/share/vm/c1/c1_LIRGenerator.cpp?

C2 definitions are in the .ad files (that get fed into Adlc to generate 
the compiler implementation).

Eg.

hotspot/src/cpu/x86/vm/x86_32.ad

  // Atomically load the volatile long
   enc_class enc_loadL_volatile( memory mem, stackSlotL dst ) %{
     emit_opcode(cbuf,0xDF);
     int rm_byte_opcode = 0x05;
     int base     = $mem$$base;
     int index    = $mem$$index;
     int scale    = $mem$$scale;
     int displace = $mem$$disp;
     relocInfo::relocType disp_reloc = $mem->disp_reloc(); // 
disp-as-oop when working with static globals
     encode_RegMem(cbuf, rm_byte_opcode, base, index, scale, displace, 
disp_reloc);
     store_to_stackslot( cbuf, 0x0DF, 0x07, $dst$$disp );
   %}

David
-----

>
> Thank you !
> ------------------ 原始邮件 ------------------
> 发件人: "亢伟楠";<hyperdak at gmail.com>;
> 发送时间: 2016年11月2日(星期三) 下午5:34
> 收件人: "恶灵骑士"<1072213404 at qq.com>;
> 抄送: "Krystal Mok"<rednaxelafx at gmail.com>; "hotspot-dev"<hotspot-dev at openjdk.java.net>;
> 主题: Re: please help understanding what's the relationship of hotspot compiler c1 and c2 ?
>
>
>
> Hi,
>     When use tiered compilation (default enable in jdk8),tiered  VM can use C1 and C2 both [1].Client VM will use C1 and Server VM will use C2.
>
>
> Thanks,
> hyperdak
>
>
> [1] http://docs.oracle.com/javase/7/docs/technotes/guides/vm/performance-enhancements-7.html#tieredcompilation
>


More information about the hotspot-dev mailing list