src/share/vm/runtime/vm_operations.cpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2007, 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 # include "incls/_precompiled.incl"
  26 # include "incls/_vm_operations.cpp.incl"



















  27 
  28 #define VM_OP_NAME_INITIALIZE(name) #name,
  29 
  30 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \
  31   { VM_OPS_DO(VM_OP_NAME_INITIALIZE) };
  32 
  33 void VM_Operation::set_calling_thread(Thread* thread, ThreadPriority priority) {
  34   _calling_thread = thread;
  35   assert(MinPriority <= priority && priority <= MaxPriority, "sanity check");
  36   _priority = priority;
  37 }
  38 
  39 
  40 void VM_Operation::evaluate() {
  41   ResourceMark rm;
  42   if (TraceVMOperation) {
  43     tty->print("[");
  44     NOT_PRODUCT(print();)
  45   }
  46   doit();


   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 #include "precompiled.hpp"
  26 #include "classfile/vmSymbols.hpp"
  27 #include "compiler/compileBroker.hpp"
  28 #include "compiler/compilerOracle.hpp"
  29 #include "gc_implementation/shared/isGCActiveMark.hpp"
  30 #include "memory/resourceArea.hpp"
  31 #include "runtime/arguments.hpp"
  32 #include "runtime/deoptimization.hpp"
  33 #include "runtime/interfaceSupport.hpp"
  34 #include "runtime/sweeper.hpp"
  35 #include "runtime/vm_operations.hpp"
  36 #include "services/threadService.hpp"
  37 #ifdef TARGET_OS_FAMILY_linux
  38 # include "thread_linux.inline.hpp"
  39 #endif
  40 #ifdef TARGET_OS_FAMILY_solaris
  41 # include "thread_solaris.inline.hpp"
  42 #endif
  43 #ifdef TARGET_OS_FAMILY_windows
  44 # include "thread_windows.inline.hpp"
  45 #endif
  46 
  47 #define VM_OP_NAME_INITIALIZE(name) #name,
  48 
  49 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \
  50   { VM_OPS_DO(VM_OP_NAME_INITIALIZE) };
  51 
  52 void VM_Operation::set_calling_thread(Thread* thread, ThreadPriority priority) {
  53   _calling_thread = thread;
  54   assert(MinPriority <= priority && priority <= MaxPriority, "sanity check");
  55   _priority = priority;
  56 }
  57 
  58 
  59 void VM_Operation::evaluate() {
  60   ResourceMark rm;
  61   if (TraceVMOperation) {
  62     tty->print("[");
  63     NOT_PRODUCT(print();)
  64   }
  65   doit();