src/share/vm/opto/parse.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2009, 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  *
  23  */
  24 











  25 class BytecodeParseHistogram;
  26 class InlineTree;
  27 class Parse;
  28 class SwitchRange;
  29 
  30 
  31 //------------------------------InlineTree-------------------------------------
  32 class InlineTree : public ResourceObj {
  33   Compile*    C;                  // cache
  34   JVMState*   _caller_jvms;       // state of caller
  35   ciMethod*   _method;            // method being called by the caller_jvms
  36   InlineTree* _caller_tree;
  37   uint        _count_inline_bcs;  // Accumulated count of inlined bytecodes
  38   // Call-site count / interpreter invocation count, scaled recursively.
  39   // Always between 0.0 and 1.0.  Represents the percentage of the method's
  40   // total execution time used at this call site.
  41   const float _site_invoke_ratio;
  42   const int   _site_depth_adjust;
  43   float compute_callee_frequency( int caller_bci ) const;
  44 


 550   void catch_call_exceptions(ciExceptionHandlerStream&);
 551 
 552   // Handle all exceptions thrown by the inlined method.
 553   // Also handles exceptions for individual bytecodes.
 554   void catch_inline_exceptions(SafePointNode* ex_map);
 555 
 556   // Merge the given map into correct exceptional exit state.
 557   // Assumes that there is no applicable local handler.
 558   void throw_to_exit(SafePointNode* ex_map);
 559 
 560  public:
 561 #ifndef PRODUCT
 562   // Handle PrintOpto, etc.
 563   void show_parse_info();
 564   void dump_map_adr_mem() const;
 565   static void print_statistics(); // Print some performance counters
 566   void dump();
 567   void dump_bci(int bci);
 568 #endif
 569 };


   1 /*
   2  * Copyright (c) 1997, 2010, 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  *
  23  */
  24 
  25 #ifndef SHARE_VM_OPTO_PARSE_HPP
  26 #define SHARE_VM_OPTO_PARSE_HPP
  27 
  28 #include "ci/ciMethodData.hpp"
  29 #include "ci/ciTypeFlow.hpp"
  30 #include "compiler/methodLiveness.hpp"
  31 #include "libadt/vectset.hpp"
  32 #include "oops/generateOopMap.hpp"
  33 #include "opto/graphKit.hpp"
  34 #include "opto/subnode.hpp"
  35 
  36 class BytecodeParseHistogram;
  37 class InlineTree;
  38 class Parse;
  39 class SwitchRange;
  40 
  41 
  42 //------------------------------InlineTree-------------------------------------
  43 class InlineTree : public ResourceObj {
  44   Compile*    C;                  // cache
  45   JVMState*   _caller_jvms;       // state of caller
  46   ciMethod*   _method;            // method being called by the caller_jvms
  47   InlineTree* _caller_tree;
  48   uint        _count_inline_bcs;  // Accumulated count of inlined bytecodes
  49   // Call-site count / interpreter invocation count, scaled recursively.
  50   // Always between 0.0 and 1.0.  Represents the percentage of the method's
  51   // total execution time used at this call site.
  52   const float _site_invoke_ratio;
  53   const int   _site_depth_adjust;
  54   float compute_callee_frequency( int caller_bci ) const;
  55 


 561   void catch_call_exceptions(ciExceptionHandlerStream&);
 562 
 563   // Handle all exceptions thrown by the inlined method.
 564   // Also handles exceptions for individual bytecodes.
 565   void catch_inline_exceptions(SafePointNode* ex_map);
 566 
 567   // Merge the given map into correct exceptional exit state.
 568   // Assumes that there is no applicable local handler.
 569   void throw_to_exit(SafePointNode* ex_map);
 570 
 571  public:
 572 #ifndef PRODUCT
 573   // Handle PrintOpto, etc.
 574   void show_parse_info();
 575   void dump_map_adr_mem() const;
 576   static void print_statistics(); // Print some performance counters
 577   void dump();
 578   void dump_bci(int bci);
 579 #endif
 580 };
 581 
 582 #endif // SHARE_VM_OPTO_PARSE_HPP