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 {


 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 #ifndef _JAVA_JVMTIENVBASE_H_
  40 #define _JAVA_JVMTIENVBASE_H_
  41 
  42 //
  43 // Forward Declarations
  44 //
  45 
  46 class JvmtiEnv;
  47 class JvmtiThreadState;
  48 class JvmtiRawMonitor; // for jvmtiEnv.hpp
  49 class JvmtiEventControllerPrivate;
  50 class JvmtiTagMap;
  51 
  52 
  53 
  54 // One JvmtiEnv object is created per jvmti attachment;
  55 // done via JNI GetEnv() call. Multiple attachments are
  56 // allowed in jvmti.
  57 
  58 class JvmtiEnvBase : public CHeapObj {


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