< prev index next >

src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp

Print this page
@@ -1768,10 +1768,20 @@
    generate_and_dispatch(t);
  }
  
  //-----------------------------------------------------------------------------
  
+ void TemplateInterpreterGenerator::count_bytecode() {
+   __ mv(x7, (address) &BytecodeCounter::_counter_value);
+   __ atomic_addw(noreg, 1, x7);
+ }
+ 
+ void TemplateInterpreterGenerator::histogram_bytecode(Template* t) {
+   __ mv(x7, (address) &BytecodeHistogram::_counters[t->bytecode()]);
+   __ atomic_addw(noreg, 1, x7);
+ }
+ 
  // Non-product code
  #ifndef PRODUCT
  address TemplateInterpreterGenerator::generate_trace_code(TosState state) {
    address entry = __ pc();
  

@@ -1786,20 +1796,10 @@
    __ ret();                                   // return from result handler
  
    return entry;
  }
  
- void TemplateInterpreterGenerator::count_bytecode() {
-   __ mv(x7, (address) &BytecodeCounter::_counter_value);
-   __ atomic_addw(noreg, 1, x7);
- }
- 
- void TemplateInterpreterGenerator::histogram_bytecode(Template* t) {
-   __ mv(x7, (address) &BytecodeHistogram::_counters[t->bytecode()]);
-   __ atomic_addw(noreg, 1, x7);
- }
- 
  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 >