src/cpu/sparc/vm/cppInterpreter_sparc.cpp

changeset 4936
aeaca88565e6
parent 4727
0094485b46c7
child 5225
603ca7e51354
     1.1 --- a/src/cpu/sparc/vm/cppInterpreter_sparc.cpp	Thu Apr 04 21:15:43 2013 -0700
     1.2 +++ b/src/cpu/sparc/vm/cppInterpreter_sparc.cpp	Tue Apr 09 17:17:41 2013 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -404,14 +404,20 @@
    1.11  // ??: invocation counter
    1.12  //
    1.13  void InterpreterGenerator::generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue) {
    1.14 +  Label done;
    1.15 +  const Register Rcounters = G3_scratch;
    1.16 +
    1.17 +  __ ld_ptr(STATE(_method), G5_method);
    1.18 +  __ get_method_counters(G5_method, Rcounters, done);
    1.19 +
    1.20    // Update standard invocation counters
    1.21 -  __ increment_invocation_counter(O0, G3_scratch);
    1.22 -  if (ProfileInterpreter) {  // %%% Merge this into MethodData*
    1.23 -    __ ld_ptr(STATE(_method), G3_scratch);
    1.24 -    Address interpreter_invocation_counter(G3_scratch, 0, in_bytes(Method::interpreter_invocation_counter_offset()));
    1.25 -    __ ld(interpreter_invocation_counter, G3_scratch);
    1.26 -    __ inc(G3_scratch);
    1.27 -    __ st(G3_scratch, interpreter_invocation_counter);
    1.28 +  __ increment_invocation_counter(Rcounters, O0, G4_scratch);
    1.29 +  if (ProfileInterpreter) {
    1.30 +    Address interpreter_invocation_counter(Rcounters, 0,
    1.31 +            in_bytes(MethodCounters::interpreter_invocation_counter_offset()));
    1.32 +    __ ld(interpreter_invocation_counter, G4_scratch);
    1.33 +    __ inc(G4_scratch);
    1.34 +    __ st(G4_scratch, interpreter_invocation_counter);
    1.35    }
    1.36  
    1.37    Address invocation_limit(G3_scratch, (address)&InvocationCounter::InterpreterInvocationLimit);
    1.38 @@ -420,7 +426,7 @@
    1.39    __ cmp(O0, G3_scratch);
    1.40    __ br(Assembler::greaterEqualUnsigned, false, Assembler::pn, *overflow);
    1.41    __ delayed()->nop();
    1.42 -
    1.43 +  __ bind(done);
    1.44  }
    1.45  
    1.46  address InterpreterGenerator::generate_empty_entry(void) {

mercurial