/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "jvmtifiles/jvmti.h"
#include "memory/allocation.hpp"
#include "memory/allocation.inline.hpp"
#include "utilities/globalDefinitions.hpp"
// forward declaration
class JvmtiEventControllerPrivate;
class JvmtiEventController;
class JvmtiEnvThreadState;
class JvmtiFramePop;
class JvmtiEnvBase;
// Extension event support
//
// jvmtiExtEvent is the extensions equivalent of jvmtiEvent
// jvmtiExtCallbacks is the extensions equivalent of jvmtiEventCallbacks
// Extension events start JVMTI_MIN_EVENT_TYPE_VAL-1 and work towards 0.
typedef enum {
typedef struct {
// The complete range of events is EXT_MIN_EVENT_TYPE_VAL to
// JVMTI_MAX_EVENT_TYPE_VAL (inclusive and contiguous).
///////////////////////////////////////////////////////////////
//
// JvmtiEventEnabled
//
// Utility class
//
// A boolean array indexed by event_type, used as an internal
// data structure to track what JVMTI event types are enabled.
// Used for user set enabling and disabling (globally and on a
// per thread basis), and for computed merges across environments,
// threads and the VM as a whole.
//
// for inlines see jvmtiEventController_inline.hpp
//
private:
friend class JvmtiEventControllerPrivate;
#ifndef PRODUCT
enum {
} _init_guard;
#endif
public:
void clear();
};
///////////////////////////////////////////////////////////////
//
// JvmtiEnvThreadEventEnable
//
// JvmtiEventController data specific to a particular environment and thread.
//
// for inlines see jvmtiEventController_inline.hpp
//
private:
friend class JvmtiEventControllerPrivate;
public:
};
///////////////////////////////////////////////////////////////
//
// JvmtiThreadEventEnable
//
// JvmtiEventController data specific to a particular thread.
//
// for inlines see jvmtiEventController_inline.hpp
//
private:
friend class JvmtiEventControllerPrivate;
public:
};
///////////////////////////////////////////////////////////////
//
// JvmtiEnvEventEnable
//
// JvmtiEventController data specific to a particular environment.
//
// for inlines see jvmtiEventController_inline.hpp
//
private:
friend class JvmtiEventControllerPrivate;
// user set global event enablement indexed by jvmtiEvent
// this flag indicates the presence (true) or absence (false) of event callbacks
// it is indexed by jvmtiEvent
// indexed by jvmtiEvent true if enabled globally or on any thread.
// True only if there is a callback for it.
public:
};
///////////////////////////////////////////////////////////////
//
// JvmtiEventController
//
// The class is the access point for all actions that change
// which events are active, this include:
// enabling and disabling events
// setting and clearing field watchpoints
// setting frame pops
// encountering frame pops
//
// for inlines see jvmtiEventController_inline.hpp
//
private:
friend class JvmtiEventControllerPrivate;
// for all environments, global array indexed by jvmtiEvent
public:
// is the event_type valid?
// to do: check against valid event array
return ((int)event_type >= TOTAL_MIN_EVENT_TYPE_VAL)
&& ((int)event_type <= TOTAL_MAX_EVENT_TYPE_VAL);
}
// thread is ignored for events that can only be specified globally
// Setting callbacks changes computed enablement and must be done
// at a safepoint otherwise a NULL callback could be attempted
const jvmtiEventCallbacks* callbacks,
// Sets the callback function for a single extension event and enables
// (or disables it).
static void vm_start();
static void vm_init();
static void vm_death();
};
#endif // SHARE_VM_PRIMS_JVMTIEVENTCONTROLLER_HPP