< prev index next >

src/hotspot/share/prims/jvmtiThreadState.cpp

Print this page
rev 50392 : JEP 331
   1 /*
   2  * Copyright (c) 2003, 2015, 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  *


  43 // Instances of JvmtiThreadState hang off of each thread.
  44 // Thread local storage for JVMTI.
  45 //
  46 
  47 JvmtiThreadState *JvmtiThreadState::_head = NULL;
  48 
  49 JvmtiThreadState::JvmtiThreadState(JavaThread* thread)
  50   : _thread_event_enable() {
  51   assert(JvmtiThreadState_lock->is_locked(), "sanity check");
  52   _thread               = thread;
  53   _exception_state      = ES_CLEARED;
  54   _debuggable           = true;
  55   _hide_single_stepping = false;
  56   _hide_level           = 0;
  57   _pending_step_for_popframe = false;
  58   _class_being_redefined = NULL;
  59   _class_load_kind = jvmti_class_load_kind_load;
  60   _head_env_thread_state = NULL;
  61   _dynamic_code_event_collector = NULL;
  62   _vm_object_alloc_event_collector = NULL;

  63   _the_class_for_redefinition_verification = NULL;
  64   _scratch_class_for_redefinition_verification = NULL;
  65   _cur_stack_depth = UNKNOWN_STACK_DEPTH;
  66 
  67   // JVMTI ForceEarlyReturn support
  68   _pending_step_for_earlyret = false;
  69   _earlyret_state = earlyret_inactive;
  70   _earlyret_tos = ilgl;
  71   _earlyret_value.j = 0L;
  72   _earlyret_oop = NULL;
  73 
  74   // add all the JvmtiEnvThreadState to the new JvmtiThreadState
  75   {
  76     JvmtiEnvIterator it;
  77     for (JvmtiEnvBase* env = it.first(); env != NULL; env = it.next(env)) {
  78       if (env->is_valid()) {
  79         add_env(env);
  80       }
  81     }
  82   }


   1 /*
   2  * Copyright (c) 2003, 2018, 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  *


  43 // Instances of JvmtiThreadState hang off of each thread.
  44 // Thread local storage for JVMTI.
  45 //
  46 
  47 JvmtiThreadState *JvmtiThreadState::_head = NULL;
  48 
  49 JvmtiThreadState::JvmtiThreadState(JavaThread* thread)
  50   : _thread_event_enable() {
  51   assert(JvmtiThreadState_lock->is_locked(), "sanity check");
  52   _thread               = thread;
  53   _exception_state      = ES_CLEARED;
  54   _debuggable           = true;
  55   _hide_single_stepping = false;
  56   _hide_level           = 0;
  57   _pending_step_for_popframe = false;
  58   _class_being_redefined = NULL;
  59   _class_load_kind = jvmti_class_load_kind_load;
  60   _head_env_thread_state = NULL;
  61   _dynamic_code_event_collector = NULL;
  62   _vm_object_alloc_event_collector = NULL;
  63   _sampled_object_alloc_event_collector = NULL;
  64   _the_class_for_redefinition_verification = NULL;
  65   _scratch_class_for_redefinition_verification = NULL;
  66   _cur_stack_depth = UNKNOWN_STACK_DEPTH;
  67 
  68   // JVMTI ForceEarlyReturn support
  69   _pending_step_for_earlyret = false;
  70   _earlyret_state = earlyret_inactive;
  71   _earlyret_tos = ilgl;
  72   _earlyret_value.j = 0L;
  73   _earlyret_oop = NULL;
  74 
  75   // add all the JvmtiEnvThreadState to the new JvmtiThreadState
  76   {
  77     JvmtiEnvIterator it;
  78     for (JvmtiEnvBase* env = it.first(); env != NULL; env = it.next(env)) {
  79       if (env->is_valid()) {
  80         add_env(env);
  81       }
  82     }
  83   }


< prev index next >