src/share/vm/prims/jvmtiImpl.hpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 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 //
  26 // Forward Declarations
  27 //
  28 
  29 class JvmtiRawMonitor;
  30 class JvmtiBreakpoint;
  31 class JvmtiBreakpoints;
  32 
  33 
  34 ///////////////////////////////////////////////////////////////
  35 //
  36 // class GrowableCache, GrowableElement
  37 // Used by              : JvmtiBreakpointCache
  38 // Used by JVMTI methods: none directly.
  39 //
  40 // GrowableCache is a permanent CHeap growable array of <GrowableElement *>
  41 //
  42 // In addition, the GrowableCache maintains a NULL terminated cache array of type address
  43 // that's created from the element array using the function:
  44 //     address GrowableElement::getCacheValue().


 458 //
 459 // Convenience routines for suspending and resuming threads.
 460 //
 461 // All attempts by JVMTI to suspend and resume threads must go through the
 462 // JvmtiSuspendControl interface.
 463 //
 464 // methods return true if successful
 465 //
 466 class JvmtiSuspendControl : public AllStatic {
 467 public:
 468   // suspend the thread, taking it to a safepoint
 469   static bool suspend(JavaThread *java_thread);
 470   // resume the thread
 471   static bool resume(JavaThread *java_thread);
 472 
 473   static void print();
 474 };
 475 
 476 // Utility macro that checks for NULL pointers:
 477 #define NULL_CHECK(X, Y) if ((X) == NULL) { return (Y); }


   1 /*
   2  * Copyright (c) 1999, 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 #ifndef SHARE_VM_PRIMS_JVMTIIMPL_HPP
  26 #define SHARE_VM_PRIMS_JVMTIIMPL_HPP
  27 
  28 #ifndef KERNEL
  29 #include "classfile/systemDictionary.hpp"
  30 #include "jvmtifiles/jvmti.h"
  31 #include "oops/objArrayOop.hpp"
  32 #include "prims/jvmtiEnvThreadState.hpp"
  33 #include "prims/jvmtiEventController.hpp"
  34 #include "prims/jvmtiTrace.hpp"
  35 #include "prims/jvmtiUtil.hpp"
  36 #include "runtime/stackValueCollection.hpp"
  37 #include "runtime/vm_operations.hpp"
  38 #endif
  39 
  40 //
  41 // Forward Declarations
  42 //
  43 
  44 class JvmtiRawMonitor;
  45 class JvmtiBreakpoint;
  46 class JvmtiBreakpoints;
  47 
  48 
  49 ///////////////////////////////////////////////////////////////
  50 //
  51 // class GrowableCache, GrowableElement
  52 // Used by              : JvmtiBreakpointCache
  53 // Used by JVMTI methods: none directly.
  54 //
  55 // GrowableCache is a permanent CHeap growable array of <GrowableElement *>
  56 //
  57 // In addition, the GrowableCache maintains a NULL terminated cache array of type address
  58 // that's created from the element array using the function:
  59 //     address GrowableElement::getCacheValue().


 473 //
 474 // Convenience routines for suspending and resuming threads.
 475 //
 476 // All attempts by JVMTI to suspend and resume threads must go through the
 477 // JvmtiSuspendControl interface.
 478 //
 479 // methods return true if successful
 480 //
 481 class JvmtiSuspendControl : public AllStatic {
 482 public:
 483   // suspend the thread, taking it to a safepoint
 484   static bool suspend(JavaThread *java_thread);
 485   // resume the thread
 486   static bool resume(JavaThread *java_thread);
 487 
 488   static void print();
 489 };
 490 
 491 // Utility macro that checks for NULL pointers:
 492 #define NULL_CHECK(X, Y) if ((X) == NULL) { return (Y); }
 493 
 494 #endif // SHARE_VM_PRIMS_JVMTIIMPL_HPP