src/share/vm/shark/sharkCacheDecache.hpp

Print this page


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









  26 // Class hierarchy:
  27 // - SharkStateScanner
  28 //   - SharkCacherDecacher
  29 //     - SharkDecacher
  30 //       - SharkJavaCallDecacher
  31 //       - SharkVMCallDecacher
  32 //       - SharkTrapDecacher
  33 //     - SharkCacher
  34 //       - SharkJavaCallCacher
  35 //       - SharkVMCallCacher
  36 //       - SharkFunctionEntryCacher
  37 //         - SharkNormalEntryCacher
  38 //         - SharkOSREntryCacher
  39 
  40 class SharkCacherDecacher : public SharkStateScanner {
  41  protected:
  42   SharkCacherDecacher(SharkFunction* function)
  43     : SharkStateScanner(function) {}
  44 
  45   // Helper


 398               SharkType::intptr_type(),
 399               max_locals() + max_monitors() * 2)))) {}
 400 
 401  private:
 402   llvm::Value* _osr_buf;
 403 
 404  private:
 405   llvm::Value* osr_buf() const {
 406     return _osr_buf;
 407   }
 408 
 409   // Callbacks
 410  protected:
 411   void process_monitor(int index, int box_offset, int obj_offset);
 412   void process_local_slot(int index, SharkValue** value, int offset);
 413 
 414   // Helper
 415  private:
 416   llvm::Value* CreateAddressOfOSRBufEntry(int offset, const llvm::Type* type);
 417 };


   1 /*
   2  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2008, 2009 Red Hat, Inc.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #ifndef SHARE_VM_SHARK_SHARKCACHEDECACHE_HPP
  27 #define SHARE_VM_SHARK_SHARKCACHEDECACHE_HPP
  28 
  29 #include "ci/ciMethod.hpp"
  30 #include "code/debugInfoRec.hpp"
  31 #include "shark/sharkBuilder.hpp"
  32 #include "shark/sharkFunction.hpp"
  33 #include "shark/sharkStateScanner.hpp"
  34 
  35 // Class hierarchy:
  36 // - SharkStateScanner
  37 //   - SharkCacherDecacher
  38 //     - SharkDecacher
  39 //       - SharkJavaCallDecacher
  40 //       - SharkVMCallDecacher
  41 //       - SharkTrapDecacher
  42 //     - SharkCacher
  43 //       - SharkJavaCallCacher
  44 //       - SharkVMCallCacher
  45 //       - SharkFunctionEntryCacher
  46 //         - SharkNormalEntryCacher
  47 //         - SharkOSREntryCacher
  48 
  49 class SharkCacherDecacher : public SharkStateScanner {
  50  protected:
  51   SharkCacherDecacher(SharkFunction* function)
  52     : SharkStateScanner(function) {}
  53 
  54   // Helper


 407               SharkType::intptr_type(),
 408               max_locals() + max_monitors() * 2)))) {}
 409 
 410  private:
 411   llvm::Value* _osr_buf;
 412 
 413  private:
 414   llvm::Value* osr_buf() const {
 415     return _osr_buf;
 416   }
 417 
 418   // Callbacks
 419  protected:
 420   void process_monitor(int index, int box_offset, int obj_offset);
 421   void process_local_slot(int index, SharkValue** value, int offset);
 422 
 423   // Helper
 424  private:
 425   llvm::Value* CreateAddressOfOSRBufEntry(int offset, const llvm::Type* type);
 426 };
 427 
 428 #endif // SHARE_VM_SHARK_SHARKCACHEDECACHE_HPP