src/share/vm/ci/ciEnv.hpp

Print this page




   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 CompileTask;
  26 
  27 // ciEnv
  28 //
  29 // This class is the top level broker for requests from the compiler
  30 // to the VM.
  31 class ciEnv : StackObj {
  32   CI_PACKAGE_ACCESS_TO
  33 
  34   friend class CompileBroker;
  35   friend class Dependencies;  // for get_object, during logging
  36 
  37 private:
  38   Arena*           _arena;       // Alias for _ciEnv_arena except in init_shared_objects()
  39   Arena            _ciEnv_arena;
  40   int              _system_dictionary_modification_counter;
  41   ciObjectFactory* _factory;
  42   OopRecorder*     _oop_recorder;
  43   DebugInformationRecorder* _debug_info;
  44   Dependencies*    _dependencies;


 367   void set_compiler_data(void* x) { _compiler_data = x; }
 368 
 369   // Notice that a method has been inlined in the current compile;
 370   // used only for statistics.
 371   void notice_inlined_method(ciMethod* method);
 372 
 373   // Total number of bytecodes in inlined methods in this compile
 374   int num_inlined_bytecodes() const;
 375 
 376   // Output stream for logging compilation info.
 377   CompileLog* log() { return _log; }
 378   void set_log(CompileLog* log) { _log = log; }
 379 
 380   // Check for changes to the system dictionary during compilation
 381   bool system_dictionary_modification_counter_changed();
 382 
 383   void record_failure(const char* reason);
 384   void record_method_not_compilable(const char* reason, bool all_tiers = true);
 385   void record_out_of_memory_failure();
 386 };




   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_CI_CIENV_HPP
  26 #define SHARE_VM_CI_CIENV_HPP
  27 
  28 #include "ci/ciClassList.hpp"
  29 #include "ci/ciObjectFactory.hpp"
  30 #include "classfile/systemDictionary.hpp"
  31 #include "code/debugInfoRec.hpp"
  32 #include "code/dependencies.hpp"
  33 #include "code/exceptionHandlerTable.hpp"
  34 #include "compiler/oopMap.hpp"
  35 #include "runtime/thread.hpp"
  36 
  37 class CompileTask;
  38 
  39 // ciEnv
  40 //
  41 // This class is the top level broker for requests from the compiler
  42 // to the VM.
  43 class ciEnv : StackObj {
  44   CI_PACKAGE_ACCESS_TO
  45 
  46   friend class CompileBroker;
  47   friend class Dependencies;  // for get_object, during logging
  48 
  49 private:
  50   Arena*           _arena;       // Alias for _ciEnv_arena except in init_shared_objects()
  51   Arena            _ciEnv_arena;
  52   int              _system_dictionary_modification_counter;
  53   ciObjectFactory* _factory;
  54   OopRecorder*     _oop_recorder;
  55   DebugInformationRecorder* _debug_info;
  56   Dependencies*    _dependencies;


 379   void set_compiler_data(void* x) { _compiler_data = x; }
 380 
 381   // Notice that a method has been inlined in the current compile;
 382   // used only for statistics.
 383   void notice_inlined_method(ciMethod* method);
 384 
 385   // Total number of bytecodes in inlined methods in this compile
 386   int num_inlined_bytecodes() const;
 387 
 388   // Output stream for logging compilation info.
 389   CompileLog* log() { return _log; }
 390   void set_log(CompileLog* log) { _log = log; }
 391 
 392   // Check for changes to the system dictionary during compilation
 393   bool system_dictionary_modification_counter_changed();
 394 
 395   void record_failure(const char* reason);
 396   void record_method_not_compilable(const char* reason, bool all_tiers = true);
 397   void record_out_of_memory_failure();
 398 };
 399 
 400 #endif // SHARE_VM_CI_CIENV_HPP