Example #1
0
void StubRoutines::initialize2() {
  if (_code2 == NULL) {
    ResourceMark rm;
    TraceTime timer("StubRoutines generation 2", TraceStartupTime);
    _code2 = BufferBlob::create("StubRoutines (2)", code_size2);
    if( _code2 == NULL) vm_exit_out_of_memory1(code_size2, "CodeCache: no room for %s", "StubRoutines (2)");
    CodeBuffer buffer(_code2->instructions_begin(), _code2->instructions_size());
    StubGenerator_generate(&buffer, true);
  }

#ifdef ASSERT

#define TEST_ARRAYCOPY(type)                                                    \
  test_arraycopy_func(          type##_arraycopy(),          sizeof(type));     \
  test_arraycopy_func(          type##_disjoint_arraycopy(), sizeof(type));     \
  test_arraycopy_func(arrayof_##type##_arraycopy(),          sizeof(HeapWord)); \
  test_arraycopy_func(arrayof_##type##_disjoint_arraycopy(), sizeof(HeapWord))

  // Make sure all the arraycopy stubs properly handle zeros
  TEST_ARRAYCOPY(jbyte);
  TEST_ARRAYCOPY(jshort);
  TEST_ARRAYCOPY(jint);
  TEST_ARRAYCOPY(jlong);

#undef TEST_ARRAYCOPY

#endif
}
Example #2
0
void StubRoutines::initialize1() {
  if (_code1 == NULL) {
    ResourceMark rm;
    TraceTime timer("StubRoutines generation 1", TraceStartupTime);
    _code1 = BufferBlob::create("StubRoutines (1)", code_size1);
    if( _code1 == NULL) vm_exit_out_of_memory1(code_size1, "CodeCache: no room for %s", "StubRoutines (1)");
    CodeBuffer buffer(_code1->instructions_begin(), _code1->instructions_size());
    StubGenerator_generate(&buffer, false);
  }
}
Example #3
0
AbstractAssembler::AbstractAssembler(CodeBuffer* code) {
  if (code == NULL)  return;
  CodeSection* cs = code->insts();
  cs->clear_mark();   // new assembler kills old mark
  _code_section = cs;
  _code_begin  = cs->start();
  _code_limit  = cs->limit();
  _code_pos    = cs->end();
  _oop_recorder= code->oop_recorder();
  if (_code_begin == NULL)  {
    vm_exit_out_of_memory1(0, "CodeCache: no room for %s", code->name());
  }
}