< prev index next >

src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp

Print this page
@@ -985,13 +985,13 @@
  }
  
  // Interpreter stub for calling a native method. (asm interpreter)
  // This sets up a somewhat different looking stack for calling the
  // native method than the typical interpreter frame setup.
- address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
+ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized, bool runtime_upcalls) {
    // determine code generation flags
-   bool inc_counter = UseCompiler || CountCompiledCalls;
+   bool inc_counter = (UseCompiler || CountCompiledCalls) && !PreloadOnly;
  
    // x11: Method*
    // x30: sender sp
  
    address entry_point = __ pc();

@@ -1408,14 +1408,14 @@
  }
  
  //
  // Generic interpreted method entry to (asm) interpreter
  //
- address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized) {
+ address TemplateInterpreterGenerator::generate_normal_entry(bool synchronized, bool runtime_upcalls) {
  
    // determine code generation flags
-   const bool inc_counter  = UseCompiler || CountCompiledCalls;
+   const bool inc_counter = (UseCompiler || CountCompiledCalls) && !PreloadOnly;
  
    // t0: sender sp
    address entry_point = __ pc();
  
    const Address constMethod(xmethod, Method::const_offset());

@@ -1841,10 +1841,11 @@
    __ pop_reg(ra);
    __ ret();                                   // return from result handler
  
    return entry;
  }
+ #endif // PRODUCT
  
  void TemplateInterpreterGenerator::count_bytecode() {
    __ mv(x7, (address) &BytecodeCounter::_counter_value);
    __ atomic_add(noreg, 1, x7);
  }

@@ -1852,10 +1853,11 @@
  void TemplateInterpreterGenerator::histogram_bytecode(Template* t) {
    __ mv(x7, (address) &BytecodeHistogram::_counters[t->bytecode()]);
    __ atomic_addw(noreg, 1, x7);
  }
  
+ #ifndef PRODUCT
  void TemplateInterpreterGenerator::histogram_bytecode_pair(Template* t) {
    // Calculate new index for counter:
    //   _index = (_index >> log2_number_of_codes) |
    //            (bytecode << log2_number_of_codes);
    Register index_addr = t1;
< prev index next >