< prev index next >
src/share/vm/prims/jvmtiEventController.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 469,478 ****
--- 469,480 ----
switch (JvmtiEnv::get_phase()) {
case JVMTI_PHASE_DEAD:
// no events allowed when dead
now_enabled = 0;
break;
+ default:
+ break;
}
// if anything changed do update
if (now_enabled != was_enabled) {
*** 501,512 ****
if (state == NULL) {
// associated JavaThread is exiting
return (jlong)0;
}
! jlong was_any_env_enabled = state->thread_event_enable()->_event_enabled.get_bits();
! jlong any_env_enabled = 0;
{
// This iteration will include JvmtiEnvThreadStates whoses environments
// have been disposed. These JvmtiEnvThreadStates must not be filtered
// as recompute must be called on them to disable their events,
--- 503,514 ----
if (state == NULL) {
// associated JavaThread is exiting
return (jlong)0;
}
! julong was_any_env_enabled = state->thread_event_enable()->_event_enabled.get_bits();
! julong any_env_enabled = 0;
{
// This iteration will include JvmtiEnvThreadStates whoses environments
// have been disposed. These JvmtiEnvThreadStates must not be filtered
// as recompute must be called on them to disable their events,
*** 559,572 ****
void
JvmtiEventControllerPrivate::recompute_enabled() {
assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
// event enabled for any thread in any environment
! jlong was_any_env_thread_enabled = JvmtiEventController::_universal_global_event_enabled.get_bits();
! jlong any_env_thread_enabled = 0;
! EC_TRACE(("[-] # recompute enabled - before " UINT64_FORMAT_X, was_any_env_thread_enabled));
// compute non-thread-filters events.
// This must be done separately from thread-filtered events, since some
// events can occur before any threads exist.
JvmtiEnvIterator it;
--- 561,574 ----
void
JvmtiEventControllerPrivate::recompute_enabled() {
assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
// event enabled for any thread in any environment
! julong was_any_env_thread_enabled = JvmtiEventController::_universal_global_event_enabled.get_bits();
! julong any_env_thread_enabled = 0;
! EC_TRACE(("[-] # recompute enabled - before " JULONG_FORMAT_X, was_any_env_thread_enabled));
// compute non-thread-filters events.
// This must be done separately from thread-filtered events, since some
// events can occur before any threads exist.
JvmtiEnvIterator it;
*** 642,652 ****
// set global should_post_on_exceptions
JvmtiExport::set_should_post_on_exceptions((any_env_thread_enabled & SHOULD_POST_ON_EXCEPTIONS_BITS) != 0);
}
! EC_TRACE(("[-] # recompute enabled - after " UINT64_FORMAT_X, any_env_thread_enabled));
}
void
JvmtiEventControllerPrivate::thread_started(JavaThread *thread) {
--- 644,654 ----
// set global should_post_on_exceptions
JvmtiExport::set_should_post_on_exceptions((any_env_thread_enabled & SHOULD_POST_ON_EXCEPTIONS_BITS) != 0);
}
! EC_TRACE(("[-] # recompute enabled - after " JULONG_FORMAT_X, any_env_thread_enabled));
}
void
JvmtiEventControllerPrivate::thread_started(JavaThread *thread) {
< prev index next >