/*
* Copyright (c) 2014, 2015, Dynatrace and/or its affiliates. All rights reserved.
*
* This file is part of the Lock Contention Tracing Subsystem for the HotSpot
* Virtual Machine, which is developed at Christian Doppler Laboratory on
* Monitoring and Evolution of Very-Large-Scale Software Systems. Please
* contact us at if you need additional information
* or have any questions.
*
* 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.
*
* 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, see .
*
*/
#ifndef SHARE_VM_EVTRACE_TRACETYPES_HPP
#define SHARE_VM_EVTRACE_TRACETYPES_HPP
#include "utilities/globalDefinitions.hpp"
#define TRACE_TYPES_DO(fun) \
fun(u1, event_type ) \
fun(s8, timestamp ) \
fun(s8, seq_num ) \
fun(s8, thread_id ) \
fun(s4, thread_state ) \
fun(s4, object_id ) \
fun(s8, objmonitor_id ) \
fun(s8, classloader_id ) \
fun(s8, class_id ) \
fun(s8, method_id ) \
fun(s4, method_bci ) \
fun(s8, stack_id )
// Scalar trace stream types
class TraceTypes {
public:
#define TRACE_TYPE_DECLARE(primitive, name) \
typedef primitive name;
TRACE_TYPES_DO(TRACE_TYPE_DECLARE)
#undef TRACE_TYPE_DECLARE
enum park_return_code {
_park_return_code_min = -1,
park_normal,
park_timedout,
park_immediate_fast,
park_interrupted_fast,
park_no_wait_time,
park_interrupted_slow,
park_locked,
park_immediate_slow,
park_unknown,
_park_return_code_max,
};
enum safepoint_reason {
_safepoint_reason_min = -1,
safepoint_periodic,
safepoint_for_vm_op,
_safepoint_reason_max,
};
enum monitor_enter_wait {
_monitor_enter_wait_min = -1,
enter_no_wait,
enter_after_wait_notify,
enter_after_wait_timeout,
enter_after_wait_other, // interrupt or spurious
_monitor_enter_wait_max,
};
enum monitor_entered_flags {
_monitor_entered_flags_min = -1,
entered_flags_none = 0,
entered_queued = (1 << 0),
entered_parked = (1 << 1),
_monitor_entered_flags_max,
};
enum event {
_event_min = -1,
event_thread_start,
event_thread_name_change,
event_thread_state_change,
event_thread_interrupt,
event_thread_exit,
event_thread_park_begin,
event_thread_park_end,
event_thread_unpark,
event_monitor_inflate,
event_monitor_deflate,
event_monitor_contended_enter,
event_monitor_contended_entered,
event_monitor_contended_exited,
event_monitor_dummy,
event_class_metadata,
event_method_metadata,
event_stack_metadata,
event_identical_stacks_metadata,
event_class_loader_unload,
event_safepoint_begin,
event_safepoint_end,
event_vm_end,
event_metadata_reset,
event_group,
// NOTE: native monitors and stack traces not implemented in this version
event_native_monitor_info,
event_native_monitor_contended_lock,
event_native_monitor_contended_locked,
event_native_monitor_contended_unlocked,
event_native_monitor_destroy,
event_native_monitor_dummy,
event_stack_metadata_extended,
event_native_symbol_metadata,
event_marker,
_event_max,
};
protected:
TraceTypes() { }
};
#endif /* SHARE_VM_EVTRACE_TRACETYPES_HPP */