hotspot/src/share/vm/code/compiledIC.hpp
changeset 38133 78b95467b9f1
parent 33593 60764a78fa5c
child 42650 1f304d0c888b
equal deleted inserted replaced
38132:ba888a4f352a 38133:78b95467b9f1
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   133  private:
   133  private:
   134   NativeCall*   _ic_call;       // the call instruction
   134   NativeCall*   _ic_call;       // the call instruction
   135   NativeMovConstReg* _value;    // patchable value cell for this IC
   135   NativeMovConstReg* _value;    // patchable value cell for this IC
   136   bool          _is_optimized;  // an optimized virtual call (i.e., no compiled IC)
   136   bool          _is_optimized;  // an optimized virtual call (i.e., no compiled IC)
   137 
   137 
   138   CompiledIC(nmethod* nm, NativeCall* ic_call);
   138   CompiledIC(CompiledMethod* cm, NativeCall* ic_call);
   139   CompiledIC(RelocIterator* iter);
   139   CompiledIC(RelocIterator* iter);
   140 
   140 
   141   void initialize_from_iter(RelocIterator* iter);
   141   void initialize_from_iter(RelocIterator* iter);
   142 
   142 
   143   static bool is_icholder_entry(address entry);
   143   static bool is_icholder_entry(address entry);
   167   address stub_address() const;
   167   address stub_address() const;
   168   bool is_in_transition_state() const;  // Use InlineCacheBuffer
   168   bool is_in_transition_state() const;  // Use InlineCacheBuffer
   169 
   169 
   170  public:
   170  public:
   171   // conversion (machine PC to CompiledIC*)
   171   // conversion (machine PC to CompiledIC*)
   172   friend CompiledIC* CompiledIC_before(nmethod* nm, address return_addr);
   172   friend CompiledIC* CompiledIC_before(CompiledMethod* nm, address return_addr);
   173   friend CompiledIC* CompiledIC_at(nmethod* nm, address call_site);
   173   friend CompiledIC* CompiledIC_at(CompiledMethod* nm, address call_site);
   174   friend CompiledIC* CompiledIC_at(Relocation* call_site);
   174   friend CompiledIC* CompiledIC_at(Relocation* call_site);
   175   friend CompiledIC* CompiledIC_at(RelocIterator* reloc_iter);
   175   friend CompiledIC* CompiledIC_at(RelocIterator* reloc_iter);
   176 
   176 
   177   // This is used to release CompiledICHolder*s from nmethods that
   177   // This is used to release CompiledICHolder*s from nmethods that
   178   // are about to be freed.  The callsite might contain other stale
   178   // are about to be freed.  The callsite might contain other stale
   232   void print()             PRODUCT_RETURN;
   232   void print()             PRODUCT_RETURN;
   233   void print_compiled_ic() PRODUCT_RETURN;
   233   void print_compiled_ic() PRODUCT_RETURN;
   234   void verify()            PRODUCT_RETURN;
   234   void verify()            PRODUCT_RETURN;
   235 };
   235 };
   236 
   236 
   237 inline CompiledIC* CompiledIC_before(nmethod* nm, address return_addr) {
   237 inline CompiledIC* CompiledIC_before(CompiledMethod* nm, address return_addr) {
   238   CompiledIC* c_ic = new CompiledIC(nm, nativeCall_before(return_addr));
   238   CompiledIC* c_ic = new CompiledIC(nm, nativeCall_before(return_addr));
   239   c_ic->verify();
   239   c_ic->verify();
   240   return c_ic;
   240   return c_ic;
   241 }
   241 }
   242 
   242 
   243 inline CompiledIC* CompiledIC_at(nmethod* nm, address call_site) {
   243 inline CompiledIC* CompiledIC_at(CompiledMethod* nm, address call_site) {
   244   CompiledIC* c_ic = new CompiledIC(nm, nativeCall_at(call_site));
   244   CompiledIC* c_ic = new CompiledIC(nm, nativeCall_at(call_site));
   245   c_ic->verify();
   245   c_ic->verify();
   246   return c_ic;
   246   return c_ic;
   247 }
   247 }
   248 
   248