< prev index next >

src/share/vm/runtime/icache.cpp

Print this page




   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 #include "precompiled.hpp"
  26 #include "memory/resourceArea.hpp"
  27 #include "runtime/icache.hpp"

  28 
  29 // The flush stub function address
  30 AbstractICache::flush_icache_stub_t AbstractICache::_flush_icache_stub = NULL;
  31 
  32 void AbstractICache::initialize() {
  33   // Making this stub must be FIRST use of assembler
  34   ResourceMark rm;
  35 
  36   BufferBlob* b = BufferBlob::create("flush_icache_stub", ICache::stub_size);
  37   if (b == NULL) {
  38     vm_exit_out_of_memory(ICache::stub_size, OOM_MALLOC_ERROR, "CodeCache: no space for flush_icache_stub");
  39   }
  40   CodeBuffer c(b);
  41 
  42   ICacheStubGenerator g(&c);
  43   g.generate_icache_flush(&_flush_icache_stub);
  44 
  45   // The first use of flush_icache_stub must apply it to itself.
  46   // The StubCodeMark destructor in generate_icache_flush will
  47   // call Assembler::flush, which in turn will call invalidate_range,




   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 #include "precompiled.hpp"
  26 #include "memory/resourceArea.hpp"
  27 #include "runtime/icache.hpp"
  28 #include "utilities/align.hpp"
  29 
  30 // The flush stub function address
  31 AbstractICache::flush_icache_stub_t AbstractICache::_flush_icache_stub = NULL;
  32 
  33 void AbstractICache::initialize() {
  34   // Making this stub must be FIRST use of assembler
  35   ResourceMark rm;
  36 
  37   BufferBlob* b = BufferBlob::create("flush_icache_stub", ICache::stub_size);
  38   if (b == NULL) {
  39     vm_exit_out_of_memory(ICache::stub_size, OOM_MALLOC_ERROR, "CodeCache: no space for flush_icache_stub");
  40   }
  41   CodeBuffer c(b);
  42 
  43   ICacheStubGenerator g(&c);
  44   g.generate_icache_flush(&_flush_icache_stub);
  45 
  46   // The first use of flush_icache_stub must apply it to itself.
  47   // The StubCodeMark destructor in generate_icache_flush will
  48   // call Assembler::flush, which in turn will call invalidate_range,


< prev index next >