United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7104561 UseRDPCForConstantTableBase doesn't work after shorten branches changes
7104561 : UseRDPCForConstantTableBase doesn't work after shorten branches changes

Details
Type:
Bug
Submit Date:
2011-10-25
Status:
Closed
Updated Date:
2012-03-22
Project Name:
JDK
Resolved Date:
2012-01-23
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs23
Fixed Versions:
hs23

Related Reports
Backport:
Backport:
Relates:
Relates:

Sub Tasks

Description
I was trying to push the changes to enable flags and it failed on sparc.  I think the changes Vladimir made around shorten branches on sparc don't work well with UseRDPCForConstantTableBase.  When it's turned on we only compute the table base during emit but shorten branches calls emit to compute sizes so it dies during this phase.  Here's the stack trace:

 [1] report_vm_error(file = 0xffffffff7dec850c "/net/smite.us.oracle.com/export/ws/baseline/src/share/vm/opto/compile.hpp", line = 195, error_msg = 0xffffffff7dec8556 "assert(_table_base_offset != -1) failed", detail_msg = 0xffffffff7dec857e "table base offset not yet set"), line 217 in "debug.cpp"
 [2] Compile::ConstantTable::table_base_offset(this = 0xffffffff6f2feb60), line 195 in "compile.hpp"
 [3] MachConstantNode::constant_offset(this = 0x1037c7220), line 487 in "machnode.cpp"
 [4] MachConstantNode::constant_offset(this = 0x1037c7220), line 397 in "machnode.hpp"
=>[5] loadConDNode::emit(this = 0x1037c7220, cbuf = CLASS, ra_ = 0xffffffff6f2fc808), line 6289 in "sparc.ad"
 [6] Compile::scratch_emit_size(this = 0xffffffff6f2fe988, n = 0x1037c7220), line 531 in "compile.cpp"
 [7] MachNode::emit_size(this = 0x1037c7220, ra_ = 0xffffffff6f2fc808), line 150 in "machnode.cpp"
 [8] MachNode::size(this = 0x1037c7220, ra_ = 0xffffffff6f2fc808), line 142 in "machnode.cpp"
 [9] Compile::shorten_branches(this = 0xffffffff6f2fe988, blk_starts = 0x10393db48, code_size = 0, reloc_size = 20, stub_size = 0), line 435 in "output.cpp"
 [10] Compile::init_buffer(this = 0xffffffff6f2fe988, blk_starts = 0x10393db48), line 1175 in "output.cpp"
 [11] Compile::Output(this = 0xffffffff6f2fe988), line 135 in "output.cpp"
 [12] Compile::Code_Gen(this = 0xffffffff6f2fe988), line 1909 in "compile.cpp"
 [13] Compile::Compile(this = 0xffffffff6f2fe988, ci_env = 0xffffffff6f2ff4a8, compiler = 0x1034fe5c8, target = 0x1038d6228, osr_bci = -1, subsume_loads = true, do_escape_analysis = true), line 791 in "compile.cpp"

I'm not really sure how to fix it.  Does shorten branches need to force the MachConstantBaseNode location to be emitted?  Or do the emit routines need to be made robust in the face of it?  Anyway, I'm going to push the other changes and we can deal with the UseRDPCForConstantTableBase problems later.  Can you take a look?

tom

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/e3b0dcc327b9
                                     
2012-03-22
EVALUATION

See main CR
                                     
2011-11-30
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-emb/hotspot/rev/e3b0dcc327b9
                                     
2011-11-29
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/e3b0dcc327b9
                                     
2011-11-15
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/e3b0dcc327b9
                                     
2011-10-31
EVALUATION

Before 7063629 Compile::shorten_branches was not used on SPARC.  Now all architectures call that method and we need to take care of that fact in MachConstantNode::constant_offset when called from Compile::scratch_emit_size.
                                     
2011-10-27



Hardware and Software, Engineered to Work Together