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


 387 //
 388 // Convenience routines for suspending and resuming threads.
 389 //
 390 // All attempts by JVMTI to suspend and resume threads must go through the
 391 // JvmtiSuspendControl interface.
 392 //
 393 // methods return true if successful
 394 //
 395 class JvmtiSuspendControl : public AllStatic {
 396 public:
 397   // suspend the thread, taking it to a safepoint
 398   static bool suspend(JavaThread *java_thread);
 399   // resume the thread
 400   static bool resume(JavaThread *java_thread);
 401 
 402   static void print();
 403 };
 404 
 405 // Utility macro that checks for NULL pointers:
 406 #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 JVMTI_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 JvmtiBreakpoint;
  45 class JvmtiBreakpoints;
  46 
  47 
  48 ///////////////////////////////////////////////////////////////
  49 //
  50 // class GrowableCache, GrowableElement
  51 // Used by              : JvmtiBreakpointCache
  52 // Used by JVMTI methods: none directly.
  53 //
  54 // GrowableCache is a permanent CHeap growable array of <GrowableElement *>
  55 //
  56 // In addition, the GrowableCache maintains a NULL terminated cache array of type address
  57 // that's created from the element array using the function:
  58 //     address GrowableElement::getCacheValue().
  59 //


 402 //
 403 // Convenience routines for suspending and resuming threads.
 404 //
 405 // All attempts by JVMTI to suspend and resume threads must go through the
 406 // JvmtiSuspendControl interface.
 407 //
 408 // methods return true if successful
 409 //
 410 class JvmtiSuspendControl : public AllStatic {
 411 public:
 412   // suspend the thread, taking it to a safepoint
 413   static bool suspend(JavaThread *java_thread);
 414   // resume the thread
 415   static bool resume(JavaThread *java_thread);
 416 
 417   static void print();
 418 };
 419 
 420 // Utility macro that checks for NULL pointers:
 421 #define NULL_CHECK(X, Y) if ((X) == NULL) { return (Y); }
 422 
 423 #endif // SHARE_VM_PRIMS_JVMTIIMPL_HPP