src/share/vm/prims/jvmtiEnvBase.hpp

Print this page


   1 /*
   2  * Copyright (c) 2003, 2009, 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 _JAVA_JVMTIENVBASE_H_
  26 #define _JAVA_JVMTIENVBASE_H_











  27 
  28 //
  29 // Forward Declarations
  30 //
  31 
  32 class JvmtiEnv;
  33 class JvmtiThreadState;
  34 class JvmtiRawMonitor; // for jvmtiEnv.hpp
  35 class JvmtiEventControllerPrivate;
  36 class JvmtiTagMap;
  37 
  38 
  39 
  40 // One JvmtiEnv object is created per jvmti attachment;
  41 // done via JNI GetEnv() call. Multiple attachments are
  42 // allowed in jvmti.
  43 
  44 class JvmtiEnvBase : public CHeapObj {
  45 
  46  private:


 580   JavaThread *_java_thread;
 581   JavaThread *_calling_thread;
 582   GrowableArray<jvmtiMonitorStackDepthInfo*> *_owned_monitors_list;
 583   jvmtiError _error;
 584   JvmtiEnvBase *_env;
 585 
 586  public:
 587   JvmtiMonitorClosure(JavaThread* thread, JavaThread *calling_thread,
 588                       GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors,
 589                       JvmtiEnvBase *env) {
 590     _java_thread = thread;
 591     _calling_thread = calling_thread;
 592     _owned_monitors_list = owned_monitors;
 593     _error = JVMTI_ERROR_NONE;
 594     _env = env;
 595   }
 596   void do_monitor(ObjectMonitor* mon);
 597   jvmtiError error() { return _error;}
 598 };
 599 
 600 #endif   /* _JAVA_JVMTIENVBASE_H_ */
   1 /*
   2  * Copyright (c) 2003, 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_JVMTIENVBASE_HPP
  26 #define SHARE_VM_PRIMS_JVMTIENVBASE_HPP
  27 
  28 #include "classfile/classLoader.hpp"
  29 #include "prims/jvmtiEnvThreadState.hpp"
  30 #include "prims/jvmtiEventController.hpp"
  31 #include "prims/jvmtiThreadState.hpp"
  32 #include "runtime/fieldDescriptor.hpp"
  33 #include "runtime/frame.hpp"
  34 #include "runtime/handles.inline.hpp"
  35 #include "runtime/thread.hpp"
  36 #include "runtime/vm_operations.hpp"
  37 #include "utilities/growableArray.hpp"
  38 
  39 //
  40 // Forward Declarations
  41 //
  42 
  43 class JvmtiEnv;
  44 class JvmtiThreadState;
  45 class JvmtiRawMonitor; // for jvmtiEnv.hpp
  46 class JvmtiEventControllerPrivate;
  47 class JvmtiTagMap;
  48 
  49 
  50 
  51 // One JvmtiEnv object is created per jvmti attachment;
  52 // done via JNI GetEnv() call. Multiple attachments are
  53 // allowed in jvmti.
  54 
  55 class JvmtiEnvBase : public CHeapObj {
  56 
  57  private:


 591   JavaThread *_java_thread;
 592   JavaThread *_calling_thread;
 593   GrowableArray<jvmtiMonitorStackDepthInfo*> *_owned_monitors_list;
 594   jvmtiError _error;
 595   JvmtiEnvBase *_env;
 596 
 597  public:
 598   JvmtiMonitorClosure(JavaThread* thread, JavaThread *calling_thread,
 599                       GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors,
 600                       JvmtiEnvBase *env) {
 601     _java_thread = thread;
 602     _calling_thread = calling_thread;
 603     _owned_monitors_list = owned_monitors;
 604     _error = JVMTI_ERROR_NONE;
 605     _env = env;
 606   }
 607   void do_monitor(ObjectMonitor* mon);
 608   jvmtiError error() { return _error;}
 609 };
 610 
 611 #endif // SHARE_VM_PRIMS_JVMTIENVBASE_HPP