src/share/vm/runtime/stubRoutines.hpp

Print this page
rev 4773 : 8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
   1 /*
   2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 206 
 207   // These are versions of the java.lang.Math methods which perform
 208   // the same operations as the intrinsic version.  They are used for
 209   // constant folding in the compiler to ensure equivalence.  If the
 210   // intrinsic version returns the same result as the strict version
 211   // then they can be set to the appropriate function from
 212   // SharedRuntime.
 213   static double (*_intrinsic_log)(double);
 214   static double (*_intrinsic_log10)(double);
 215   static double (*_intrinsic_exp)(double);
 216   static double (*_intrinsic_pow)(double, double);
 217   static double (*_intrinsic_sin)(double);
 218   static double (*_intrinsic_cos)(double);
 219   static double (*_intrinsic_tan)(double);
 220 
 221  public:
 222   // Initialization/Testing
 223   static void    initialize1();                            // must happen before universe::genesis
 224   static void    initialize2();                            // must happen after  universe::genesis
 225 


 226   static bool contains(address addr) {
 227     return
 228       (_code1 != NULL && _code1->blob_contains(addr)) ||
 229       (_code2 != NULL && _code2->blob_contains(addr)) ;
 230   }
 231 
 232   static CodeBlob* code1() { return _code1; }
 233   static CodeBlob* code2() { return _code2; }
 234 
 235   // Debugging
 236   static jint    verify_oop_count()                        { return _verify_oop_count; }
 237   static jint*   verify_oop_count_addr()                   { return &_verify_oop_count; }
 238   // a subroutine for debugging the GC
 239   static address verify_oop_subroutine_entry_address()    { return (address)&_verify_oop_subroutine_entry; }
 240 
 241   static address catch_exception_entry()                   { return _catch_exception_entry; }
 242 
 243   // Calls to Java
 244   typedef void (*CallStub)(
 245     address   link,


   1 /*
   2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 206 
 207   // These are versions of the java.lang.Math methods which perform
 208   // the same operations as the intrinsic version.  They are used for
 209   // constant folding in the compiler to ensure equivalence.  If the
 210   // intrinsic version returns the same result as the strict version
 211   // then they can be set to the appropriate function from
 212   // SharedRuntime.
 213   static double (*_intrinsic_log)(double);
 214   static double (*_intrinsic_log10)(double);
 215   static double (*_intrinsic_exp)(double);
 216   static double (*_intrinsic_pow)(double, double);
 217   static double (*_intrinsic_sin)(double);
 218   static double (*_intrinsic_cos)(double);
 219   static double (*_intrinsic_tan)(double);
 220 
 221  public:
 222   // Initialization/Testing
 223   static void    initialize1();                            // must happen before universe::genesis
 224   static void    initialize2();                            // must happen after  universe::genesis
 225 
 226   static bool is_stub_code(address addr)                   { return contains(addr); }
 227 
 228   static bool contains(address addr) {
 229     return
 230       (_code1 != NULL && _code1->blob_contains(addr)) ||
 231       (_code2 != NULL && _code2->blob_contains(addr)) ;
 232   }
 233 
 234   static CodeBlob* code1() { return _code1; }
 235   static CodeBlob* code2() { return _code2; }
 236 
 237   // Debugging
 238   static jint    verify_oop_count()                        { return _verify_oop_count; }
 239   static jint*   verify_oop_count_addr()                   { return &_verify_oop_count; }
 240   // a subroutine for debugging the GC
 241   static address verify_oop_subroutine_entry_address()    { return (address)&_verify_oop_subroutine_entry; }
 242 
 243   static address catch_exception_entry()                   { return _catch_exception_entry; }
 244 
 245   // Calls to Java
 246   typedef void (*CallStub)(
 247     address   link,