--- a/hotspot/src/share/vm/prims/jvmtiEventController.cpp Tue Apr 19 12:30:00 2016 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiEventController.cpp Tue Apr 19 14:14:04 2016 +0200
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "interpreter/interpreter.hpp"
#include "jvmtifiles/jvmtiEnv.hpp"
+#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
#include "prims/jvmtiEventController.hpp"
#include "prims/jvmtiEventController.inline.hpp"
@@ -42,7 +43,7 @@
#define EC_TRACE(out) do { \
if (JvmtiTrace::trace_event_controller()) { \
SafeResourceMark rm; \
- tty->print_cr out; \
+ log_trace(jvmti) out; \
} \
} while (0)
#else
@@ -344,7 +345,7 @@
void JvmtiEventControllerPrivate::enter_interp_only_mode(JvmtiThreadState *state) {
- EC_TRACE(("JVMTI [%s] # Entering interpreter only mode",
+ EC_TRACE(("[%s] # Entering interpreter only mode",
JvmtiTrace::safe_get_thread_name(state->get_thread())));
VM_EnterInterpOnlyMode op(state);
@@ -354,7 +355,7 @@
void
JvmtiEventControllerPrivate::leave_interp_only_mode(JvmtiThreadState *state) {
- EC_TRACE(("JVMTI [%s] # Leaving interpreter only mode",
+ EC_TRACE(("[%s] # Leaving interpreter only mode",
JvmtiTrace::safe_get_thread_name(state->get_thread())));
state->leave_interp_only_mode();
}
@@ -370,7 +371,7 @@
jlong bit = JvmtiEventEnabled::bit_for((jvmtiEvent)ei);
if (changed & bit) {
// it changed, print it
- tty->print_cr("JVMTI [%s] # %s event %s",
+ log_trace(jvmti)("[%s] # %s event %s",
JvmtiTrace::safe_get_thread_name(state->get_thread()),
(now_enabled & bit)? "Enabling" : "Disabling", JvmtiTrace::event_name((jvmtiEvent)ei));
}
@@ -390,7 +391,7 @@
jlong bit = JvmtiEventEnabled::bit_for((jvmtiEvent)ei);
if (changed & bit) {
// it changed, print it
- tty->print_cr("JVMTI [-] # %s event %s",
+ log_trace(jvmti)("[-] # %s event %s",
(now_enabled & bit)? "Enabling" : "Disabling", JvmtiTrace::event_name((jvmtiEvent)ei));
}
}
@@ -563,7 +564,7 @@
jlong was_any_env_thread_enabled = JvmtiEventController::_universal_global_event_enabled.get_bits();
jlong any_env_thread_enabled = 0;
- EC_TRACE(("JVMTI [-] # recompute enabled - before " UINT64_FORMAT_X, was_any_env_thread_enabled));
+ 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
@@ -643,7 +644,7 @@
}
- EC_TRACE(("JVMTI [-] # recompute enabled - after " UINT64_FORMAT_X, any_env_thread_enabled));
+ EC_TRACE(("[-] # recompute enabled - after " UINT64_FORMAT_X, any_env_thread_enabled));
}
@@ -653,7 +654,7 @@
assert(thread == Thread::current(), "must be current thread");
assert(JvmtiEnvBase::environments_might_exist(), "to enter event controller, JVM TI environments must exist");
- EC_TRACE(("JVMTI [%s] # thread started", JvmtiTrace::safe_get_thread_name(thread)));
+ EC_TRACE(("[%s] # thread started", JvmtiTrace::safe_get_thread_name(thread)));
// if we have any thread filtered events globally enabled, create/update the thread state
if ((JvmtiEventController::_universal_global_event_enabled.get_bits() & THREAD_FILTERED_EVENT_BITS) != 0) {
@@ -673,7 +674,7 @@
// May be called after all environments have been disposed.
assert(JvmtiThreadState_lock->is_locked(), "sanity check");
- EC_TRACE(("JVMTI [%s] # thread ended", JvmtiTrace::safe_get_thread_name(thread)));
+ EC_TRACE(("[%s] # thread ended", JvmtiTrace::safe_get_thread_name(thread)));
JvmtiThreadState *state = thread->jvmti_thread_state();
assert(state != NULL, "else why are we here?");
@@ -684,7 +685,7 @@
const jvmtiEventCallbacks* callbacks,
jint size_of_callbacks) {
assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
- EC_TRACE(("JVMTI [*] # set event callbacks"));
+ EC_TRACE(("[*] # set event callbacks"));
env->set_event_callbacks(callbacks, size_of_callbacks);
jlong enabled_bits = 0;
@@ -704,7 +705,7 @@
jvmtiExtensionEvent callback)
{
assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
- EC_TRACE(("JVMTI [*] # set extension event callback"));
+ EC_TRACE(("[*] # set extension event callback"));
// extension events are allocated below JVMTI_MIN_EVENT_TYPE_VAL
assert(extension_event_index >= (jint)EXT_MIN_EVENT_TYPE_VAL &&
@@ -750,7 +751,7 @@
void
JvmtiEventControllerPrivate::env_initialize(JvmtiEnvBase *env) {
assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
- EC_TRACE(("JVMTI [*] # env initialize"));
+ EC_TRACE(("[*] # env initialize"));
if (JvmtiEnvBase::is_vm_live()) {
// if we didn't initialize event info already (this is a late
@@ -772,7 +773,7 @@
void
JvmtiEventControllerPrivate::env_dispose(JvmtiEnvBase *env) {
assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
- EC_TRACE(("JVMTI [*] # env dispose"));
+ EC_TRACE(("[*] # env dispose"));
// Before the environment is marked disposed, disable all events on this
// environment (by zapping the callbacks). As a result, the disposed
@@ -794,7 +795,7 @@
jvmtiEvent event_type, bool enabled) {
assert(Threads::number_of_threads() == 0 || JvmtiThreadState_lock->is_locked(), "sanity check");
- EC_TRACE(("JVMTI [%s] # user %s event %s",
+ EC_TRACE(("[%s] # user %s event %s",
thread==NULL? "ALL": JvmtiTrace::safe_get_thread_name(thread),
enabled? "enabled" : "disabled", JvmtiTrace::event_name(event_type)));
@@ -813,7 +814,7 @@
void
JvmtiEventControllerPrivate::set_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
- EC_TRACE(("JVMTI [%s] # set frame pop - frame=%d",
+ EC_TRACE(("[%s] # set frame pop - frame=%d",
JvmtiTrace::safe_get_thread_name(ets->get_thread()),
fpop.frame_number() ));
@@ -824,7 +825,7 @@
void
JvmtiEventControllerPrivate::clear_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
- EC_TRACE(("JVMTI [%s] # clear frame pop - frame=%d",
+ EC_TRACE(("[%s] # clear frame pop - frame=%d",
JvmtiTrace::safe_get_thread_name(ets->get_thread()),
fpop.frame_number() ));
@@ -837,7 +838,7 @@
JvmtiEventControllerPrivate::clear_to_frame_pop(JvmtiEnvThreadState *ets, JvmtiFramePop fpop) {
int cleared_cnt = ets->get_frame_pops()->clear_to(fpop);
- EC_TRACE(("JVMTI [%s] # clear to frame pop - frame=%d, count=%d",
+ EC_TRACE(("[%s] # clear to frame pop - frame=%d, count=%d",
JvmtiTrace::safe_get_thread_name(ets->get_thread()),
fpop.frame_number(),
cleared_cnt ));
@@ -863,7 +864,7 @@
return;
}
- EC_TRACE(("JVMTI [-] # change field watch - %s %s count=%d",
+ EC_TRACE(("[-] # change field watch - %s %s count=%d",
event_type==JVMTI_EVENT_FIELD_MODIFICATION? "modification" : "access",
added? "add" : "remove",
*count_addr));
@@ -893,7 +894,7 @@
return;
}
- EC_TRACE(("JVMTI [-] # VM live"));
+ EC_TRACE(("[-] # VM live"));
#ifdef ASSERT
// check that our idea and the spec's idea of threaded events match
--- a/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Apr 19 12:30:00 2016 +0200
+++ b/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Apr 19 14:14:04 2016 +0200
@@ -29,6 +29,8 @@
#include "code/scopeDesc.hpp"
#include "interpreter/interpreter.hpp"
#include "jvmtifiles/jvmtiEnv.hpp"
+#include "logging/log.hpp"
+#include "logging/logStream.hpp"
#include "memory/resourceArea.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.hpp"
@@ -60,8 +62,8 @@
#endif // INCLUDE_ALL_GCS
#ifdef JVMTI_TRACE
-#define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; tty->print_cr out; }
-#define EVT_TRIG_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_TRIGGER) != 0) { SafeResourceMark rm; tty->print_cr out; }
+#define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; log_trace(jvmti) out; }
+#define EVT_TRIG_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_TRIGGER) != 0) { SafeResourceMark rm; log_trace(jvmti) out; }
#else
#define EVT_TRIG_TRACE(evt,out)
#define EVT_TRACE(evt,out)
@@ -423,7 +425,9 @@
THREAD);
if (HAS_PENDING_EXCEPTION) {
- java_lang_Throwable::print(PENDING_EXCEPTION, tty);
+ LogTarget(Trace, jvmti) log;
+ LogStreamCHeap log_stream(log);
+ java_lang_Throwable::print(PENDING_EXCEPTION, &log_stream);
CLEAR_PENDING_EXCEPTION;
return;
}
@@ -465,7 +469,7 @@
//
void JvmtiExport::post_early_vm_start() {
- EVT_TRIG_TRACE(JVMTI_EVENT_VM_START, ("JVMTI Trg Early VM start event triggered" ));
+ EVT_TRIG_TRACE(JVMTI_EVENT_VM_START, ("Trg Early VM start event triggered" ));
// can now enable some events
JvmtiEventController::vm_start();
@@ -474,7 +478,7 @@
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
// Only early vmstart envs post early VMStart event
if (env->early_vmstart_env() && env->is_enabled(JVMTI_EVENT_VM_START)) {
- EVT_TRACE(JVMTI_EVENT_VM_START, ("JVMTI Evt Early VM start event sent" ));
+ EVT_TRACE(JVMTI_EVENT_VM_START, ("Evt Early VM start event sent" ));
JavaThread *thread = JavaThread::current();
JvmtiThreadEventMark jem(thread);
JvmtiJavaThreadEventTransition jet(thread);
@@ -487,7 +491,7 @@
}
void JvmtiExport::post_vm_start() {
- EVT_TRIG_TRACE(JVMTI_EVENT_VM_START, ("JVMTI Trg VM start event triggered" ));
+ EVT_TRIG_TRACE(JVMTI_EVENT_VM_START, ("Trg VM start event triggered" ));
// can now enable some events
JvmtiEventController::vm_start();
@@ -496,7 +500,7 @@
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
// Early vmstart envs do not post normal VMStart event
if (!env->early_vmstart_env() && env->is_enabled(JVMTI_EVENT_VM_START)) {
- EVT_TRACE(JVMTI_EVENT_VM_START, ("JVMTI Evt VM start event sent" ));
+ EVT_TRACE(JVMTI_EVENT_VM_START, ("Evt VM start event sent" ));
JavaThread *thread = JavaThread::current();
JvmtiThreadEventMark jem(thread);
@@ -511,7 +515,7 @@
void JvmtiExport::post_vm_initialized() {
- EVT_TRIG_TRACE(JVMTI_EVENT_VM_INIT, ("JVMTI Trg VM init event triggered" ));
+ EVT_TRIG_TRACE(JVMTI_EVENT_VM_INIT, ("Trg VM init event triggered" ));
// can now enable events
JvmtiEventController::vm_init();
@@ -519,7 +523,7 @@
JvmtiEnvIterator it;
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
if (env->is_enabled(JVMTI_EVENT_VM_INIT)) {
- EVT_TRACE(JVMTI_EVENT_VM_INIT, ("JVMTI Evt VM init event sent" ));
+ EVT_TRACE(JVMTI_EVENT_VM_INIT, ("Evt VM init event sent" ));
JavaThread *thread = JavaThread::current();
JvmtiThreadEventMark jem(thread);
@@ -534,12 +538,12 @@
void JvmtiExport::post_vm_death() {
- EVT_TRIG_TRACE(JVMTI_EVENT_VM_DEATH, ("JVMTI Trg VM death event triggered" ));
+ EVT_TRIG_TRACE(JVMTI_EVENT_VM_DEATH, ("Trg VM death event triggered" ));
JvmtiEnvIterator it;
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
if (env->is_enabled(JVMTI_EVENT_VM_DEATH)) {
- EVT_TRACE(JVMTI_EVENT_VM_DEATH, ("JVMTI Evt VM death event sent" ));
+ EVT_TRACE(JVMTI_EVENT_VM_DEATH, ("Evt VM death event sent" ));
JavaThread *thread = JavaThread::current();
JvmtiEventMark jem(thread);
@@ -632,9 +636,6 @@
}
void post() {
-// EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
-// ("JVMTI [%s] class file load hook event triggered",
-// JvmtiTrace::safe_get_thread_name(_thread)));
post_all_envs();
copy_modified_data();
}
@@ -670,11 +671,6 @@
}
unsigned char *new_data = NULL;
jint new_len = 0;
-// EVT_TRACE(JVMTI_EVENT_CLASS_FILE_LOAD_HOOK,
-// ("JVMTI [%s] class file load hook event sent %s data_ptr = %d, data_len = %d",
-// JvmtiTrace::safe_get_thread_name(_thread),
-// _h_name == NULL ? "NULL" : _h_name->as_utf8(),
-// _curr_data, _curr_len ));
JvmtiClassFileLoadEventMark jem(_thread, _h_name, _class_loader,
_h_protection_domain,
_h_class_being_redefined);
@@ -840,7 +836,7 @@
}
JavaThread* thread = JavaThread::current();
EVT_TRIG_TRACE(JVMTI_EVENT_COMPILED_METHOD_UNLOAD,
- ("JVMTI [%s] method compile unload event triggered",
+ ("[%s] method compile unload event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
// post the event for each environment that has this event enabled.
@@ -851,7 +847,7 @@
continue;
}
EVT_TRACE(JVMTI_EVENT_COMPILED_METHOD_UNLOAD,
- ("JVMTI [%s] class compile method unload event sent jmethodID " PTR_FORMAT,
+ ("[%s] class compile method unload event sent jmethodID " PTR_FORMAT,
JvmtiTrace::safe_get_thread_name(thread), p2i(method)));
ResourceMark rm(thread);
@@ -879,7 +875,7 @@
if (state == NULL) {
return;
}
- EVT_TRIG_TRACE(JVMTI_EVENT_BREAKPOINT, ("JVMTI [%s] Trg Breakpoint triggered",
+ EVT_TRIG_TRACE(JVMTI_EVENT_BREAKPOINT, ("[%s] Trg Breakpoint triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvThreadStateIterator it(state);
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
@@ -887,7 +883,7 @@
if (!ets->breakpoint_posted() && ets->is_enabled(JVMTI_EVENT_BREAKPOINT)) {
ThreadState old_os_state = thread->osthread()->get_state();
thread->osthread()->set_state(BREAKPOINTED);
- EVT_TRACE(JVMTI_EVENT_BREAKPOINT, ("JVMTI [%s] Evt Breakpoint sent %s.%s @ " INTX_FORMAT,
+ EVT_TRACE(JVMTI_EVENT_BREAKPOINT, ("[%s] Evt Breakpoint sent %s.%s @ " INTX_FORMAT,
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -965,7 +961,7 @@
if (state == NULL) {
return;
}
- EVT_TRIG_TRACE(JVMTI_EVENT_SINGLE_STEP, ("JVMTI [%s] Trg Single Step triggered",
+ EVT_TRIG_TRACE(JVMTI_EVENT_SINGLE_STEP, ("[%s] Trg Single Step triggered",
JvmtiTrace::safe_get_thread_name(thread)));
if (!state->hide_single_stepping()) {
if (state->is_pending_step_for_popframe()) {
@@ -1004,7 +1000,7 @@
HandleMark hm(thread);
KlassHandle kh(thread, klass);
- EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_LOAD, ("JVMTI [%s] Trg Class Load triggered",
+ EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_LOAD, ("[%s] Trg Class Load triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiThreadState* state = thread->jvmti_thread_state();
if (state == NULL) {
@@ -1017,7 +1013,7 @@
if (env->phase() == JVMTI_PHASE_PRIMORDIAL) {
continue;
}
- EVT_TRACE(JVMTI_EVENT_CLASS_LOAD, ("JVMTI [%s] Evt Class Load sent %s",
+ EVT_TRACE(JVMTI_EVENT_CLASS_LOAD, ("[%s] Evt Class Load sent %s",
JvmtiTrace::safe_get_thread_name(thread),
kh()==NULL? "NULL" : kh()->external_name() ));
JvmtiClassEventMark jem(thread, kh());
@@ -1038,7 +1034,7 @@
HandleMark hm(thread);
KlassHandle kh(thread, klass);
- EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_PREPARE, ("JVMTI [%s] Trg Class Prepare triggered",
+ EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_PREPARE, ("[%s] Trg Class Prepare triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiThreadState* state = thread->jvmti_thread_state();
if (state == NULL) {
@@ -1051,7 +1047,7 @@
if (env->phase() == JVMTI_PHASE_PRIMORDIAL) {
continue;
}
- EVT_TRACE(JVMTI_EVENT_CLASS_PREPARE, ("JVMTI [%s] Evt Class Prepare sent %s",
+ EVT_TRACE(JVMTI_EVENT_CLASS_PREPARE, ("[%s] Evt Class Prepare sent %s",
JvmtiTrace::safe_get_thread_name(thread),
kh()==NULL? "NULL" : kh()->external_name() ));
JvmtiClassEventMark jem(thread, kh());
@@ -1072,7 +1068,7 @@
HandleMark hm(thread);
KlassHandle kh(thread, klass);
- EVT_TRIG_TRACE(EXT_EVENT_CLASS_UNLOAD, ("JVMTI [?] Trg Class Unload triggered" ));
+ EVT_TRIG_TRACE(EXT_EVENT_CLASS_UNLOAD, ("[?] Trg Class Unload triggered" ));
if (JvmtiEventController::is_enabled((jvmtiEvent)EXT_EVENT_CLASS_UNLOAD)) {
assert(thread->is_VM_thread(), "wrong thread");
@@ -1086,7 +1082,7 @@
continue;
}
if (env->is_enabled((jvmtiEvent)EXT_EVENT_CLASS_UNLOAD)) {
- EVT_TRACE(EXT_EVENT_CLASS_UNLOAD, ("JVMTI [?] Evt Class Unload sent %s",
+ EVT_TRACE(EXT_EVENT_CLASS_UNLOAD, ("[?] Evt Class Unload sent %s",
kh()==NULL? "NULL" : kh()->external_name() ));
// do everything manually, since this is a proxy - needs special care
@@ -1125,7 +1121,7 @@
}
assert(thread->thread_state() == _thread_in_vm, "must be in vm state");
- EVT_TRIG_TRACE(JVMTI_EVENT_THREAD_START, ("JVMTI [%s] Trg Thread Start event triggered",
+ EVT_TRIG_TRACE(JVMTI_EVENT_THREAD_START, ("[%s] Trg Thread Start event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
// do JVMTI thread initialization (if needed)
@@ -1140,7 +1136,7 @@
continue;
}
if (env->is_enabled(JVMTI_EVENT_THREAD_START)) {
- EVT_TRACE(JVMTI_EVENT_THREAD_START, ("JVMTI [%s] Evt Thread Start event sent",
+ EVT_TRACE(JVMTI_EVENT_THREAD_START, ("[%s] Evt Thread Start event sent",
JvmtiTrace::safe_get_thread_name(thread) ));
JvmtiThreadEventMark jem(thread);
@@ -1159,7 +1155,7 @@
if (JvmtiEnv::get_phase() < JVMTI_PHASE_PRIMORDIAL) {
return;
}
- EVT_TRIG_TRACE(JVMTI_EVENT_THREAD_END, ("JVMTI [%s] Trg Thread End event triggered",
+ EVT_TRIG_TRACE(JVMTI_EVENT_THREAD_END, ("[%s] Trg Thread End event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiThreadState *state = thread->jvmti_thread_state();
@@ -1178,7 +1174,7 @@
if (env->phase() == JVMTI_PHASE_PRIMORDIAL) {
continue;
}
- EVT_TRACE(JVMTI_EVENT_THREAD_END, ("JVMTI [%s] Evt Thread End event sent",
+ EVT_TRACE(JVMTI_EVENT_THREAD_END, ("[%s] Evt Thread End event sent",
JvmtiTrace::safe_get_thread_name(thread) ));
JvmtiThreadEventMark jem(thread);
@@ -1196,8 +1192,8 @@
assert(SafepointSynchronize::is_at_safepoint(), "must be executed at safepoint");
assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE), "checking");
- EVT_TRIG_TRACE(JVMTI_EVENT_OBJECT_FREE, ("JVMTI [?] Trg Object Free triggered" ));
- EVT_TRACE(JVMTI_EVENT_OBJECT_FREE, ("JVMTI [?] Evt Object Free sent"));
+ EVT_TRIG_TRACE(JVMTI_EVENT_OBJECT_FREE, ("[?] Trg Object Free triggered" ));
+ EVT_TRACE(JVMTI_EVENT_OBJECT_FREE, ("[?] Evt Object Free sent"));
jvmtiEventObjectFree callback = env->callbacks()->ObjectFree;
if (callback != NULL) {
@@ -1206,12 +1202,12 @@
}
void JvmtiExport::post_resource_exhausted(jint resource_exhausted_flags, const char* description) {
- EVT_TRIG_TRACE(JVMTI_EVENT_RESOURCE_EXHAUSTED, ("JVMTI Trg resource exhausted event triggered" ));
+ EVT_TRIG_TRACE(JVMTI_EVENT_RESOURCE_EXHAUSTED, ("Trg resource exhausted event triggered" ));
JvmtiEnvIterator it;
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
if (env->is_enabled(JVMTI_EVENT_RESOURCE_EXHAUSTED)) {
- EVT_TRACE(JVMTI_EVENT_RESOURCE_EXHAUSTED, ("JVMTI Evt resource exhausted event sent" ));
+ EVT_TRACE(JVMTI_EVENT_RESOURCE_EXHAUSTED, ("Evt resource exhausted event sent" ));
JavaThread *thread = JavaThread::current();
JvmtiThreadEventMark jem(thread);
@@ -1229,7 +1225,7 @@
HandleMark hm(thread);
methodHandle mh(thread, method);
- EVT_TRIG_TRACE(JVMTI_EVENT_METHOD_ENTRY, ("JVMTI [%s] Trg Method Entry triggered %s.%s",
+ EVT_TRIG_TRACE(JVMTI_EVENT_METHOD_ENTRY, ("[%s] Trg Method Entry triggered %s.%s",
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
@@ -1246,7 +1242,7 @@
JvmtiEnvThreadStateIterator it(state);
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
if (ets->is_enabled(JVMTI_EVENT_METHOD_ENTRY)) {
- EVT_TRACE(JVMTI_EVENT_METHOD_ENTRY, ("JVMTI [%s] Evt Method Entry sent %s.%s",
+ EVT_TRACE(JVMTI_EVENT_METHOD_ENTRY, ("[%s] Evt Method Entry sent %s.%s",
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
@@ -1267,7 +1263,7 @@
HandleMark hm(thread);
methodHandle mh(thread, method);
- EVT_TRIG_TRACE(JVMTI_EVENT_METHOD_EXIT, ("JVMTI [%s] Trg Method Exit triggered %s.%s",
+ EVT_TRIG_TRACE(JVMTI_EVENT_METHOD_EXIT, ("[%s] Trg Method Exit triggered %s.%s",
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
@@ -1303,7 +1299,7 @@
JvmtiEnvThreadStateIterator it(state);
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
if (ets->is_enabled(JVMTI_EVENT_METHOD_EXIT)) {
- EVT_TRACE(JVMTI_EVENT_METHOD_EXIT, ("JVMTI [%s] Evt Method Exit sent %s.%s",
+ EVT_TRACE(JVMTI_EVENT_METHOD_EXIT, ("[%s] Evt Method Exit sent %s.%s",
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
@@ -1332,7 +1328,7 @@
// we have a NotifyFramePop entry for this frame.
// now check that this env/thread wants this event
if (ets->is_enabled(JVMTI_EVENT_FRAME_POP)) {
- EVT_TRACE(JVMTI_EVENT_FRAME_POP, ("JVMTI [%s] Evt Frame Pop sent %s.%s",
+ EVT_TRACE(JVMTI_EVENT_FRAME_POP, ("[%s] Evt Frame Pop sent %s.%s",
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string() ));
@@ -1370,7 +1366,7 @@
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
ets->compare_and_set_current_location(mh(), location, JVMTI_EVENT_SINGLE_STEP);
if (!ets->single_stepping_posted() && ets->is_enabled(JVMTI_EVENT_SINGLE_STEP)) {
- EVT_TRACE(JVMTI_EVENT_SINGLE_STEP, ("JVMTI [%s] Evt Single Step sent %s.%s @ " INTX_FORMAT,
+ EVT_TRACE(JVMTI_EVENT_SINGLE_STEP, ("[%s] Evt Single Step sent %s.%s @ " INTX_FORMAT,
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1401,7 +1397,7 @@
return;
}
- EVT_TRIG_TRACE(JVMTI_EVENT_EXCEPTION, ("JVMTI [%s] Trg Exception thrown triggered",
+ EVT_TRIG_TRACE(JVMTI_EVENT_EXCEPTION, ("[%s] Trg Exception thrown triggered",
JvmtiTrace::safe_get_thread_name(thread)));
if (!state->is_exception_detected()) {
state->set_exception_detected();
@@ -1410,7 +1406,7 @@
if (ets->is_enabled(JVMTI_EVENT_EXCEPTION) && (exception != NULL)) {
EVT_TRACE(JVMTI_EVENT_EXCEPTION,
- ("JVMTI [%s] Evt Exception thrown sent %s.%s @ " INTX_FORMAT,
+ ("[%s] Evt Exception thrown sent %s.%s @ " INTX_FORMAT,
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1486,7 +1482,7 @@
return;
}
EVT_TRIG_TRACE(JVMTI_EVENT_EXCEPTION_CATCH,
- ("JVMTI [%s] Trg unwind_due_to_exception triggered %s.%s @ %s" INTX_FORMAT " - %s",
+ ("[%s] Trg unwind_due_to_exception triggered %s.%s @ %s" INTX_FORMAT " - %s",
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1521,7 +1517,7 @@
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
if (ets->is_enabled(JVMTI_EVENT_EXCEPTION_CATCH) && (exception_handle() != NULL)) {
EVT_TRACE(JVMTI_EVENT_EXCEPTION_CATCH,
- ("JVMTI [%s] Evt ExceptionCatch sent %s.%s @ " INTX_FORMAT,
+ ("[%s] Evt ExceptionCatch sent %s.%s @ " INTX_FORMAT,
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1610,12 +1606,12 @@
if (state == NULL) {
return;
}
- EVT_TRIG_TRACE(JVMTI_EVENT_FIELD_ACCESS, ("JVMTI [%s] Trg Field Access event triggered",
+ EVT_TRIG_TRACE(JVMTI_EVENT_FIELD_ACCESS, ("[%s] Trg Field Access event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvThreadStateIterator it(state);
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
if (ets->is_enabled(JVMTI_EVENT_FIELD_ACCESS)) {
- EVT_TRACE(JVMTI_EVENT_FIELD_ACCESS, ("JVMTI [%s] Evt Field Access event sent %s.%s @ " INTX_FORMAT,
+ EVT_TRACE(JVMTI_EVENT_FIELD_ACCESS, ("[%s] Evt Field Access event sent %s.%s @ " INTX_FORMAT,
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1772,14 +1768,14 @@
return;
}
EVT_TRIG_TRACE(JVMTI_EVENT_FIELD_MODIFICATION,
- ("JVMTI [%s] Trg Field Modification event triggered",
+ ("[%s] Trg Field Modification event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvThreadStateIterator it(state);
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
if (ets->is_enabled(JVMTI_EVENT_FIELD_MODIFICATION)) {
EVT_TRACE(JVMTI_EVENT_FIELD_MODIFICATION,
- ("JVMTI [%s] Evt Field Modification event sent %s.%s @ " INTX_FORMAT,
+ ("[%s] Evt Field Modification event sent %s.%s @ " INTX_FORMAT,
JvmtiTrace::safe_get_thread_name(thread),
(mh() == NULL) ? "NULL" : mh()->klass_name()->as_C_string(),
(mh() == NULL) ? "NULL" : mh()->name()->as_C_string(),
@@ -1807,14 +1803,14 @@
HandleMark hm(thread);
methodHandle mh(thread, method);
- EVT_TRIG_TRACE(JVMTI_EVENT_NATIVE_METHOD_BIND, ("JVMTI [%s] Trg Native Method Bind event triggered",
+ EVT_TRIG_TRACE(JVMTI_EVENT_NATIVE_METHOD_BIND, ("[%s] Trg Native Method Bind event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
if (JvmtiEventController::is_enabled(JVMTI_EVENT_NATIVE_METHOD_BIND)) {
JvmtiEnvIterator it;
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
if (env->is_enabled(JVMTI_EVENT_NATIVE_METHOD_BIND)) {
- EVT_TRACE(JVMTI_EVENT_NATIVE_METHOD_BIND, ("JVMTI [%s] Evt Native Method Bind event sent",
+ EVT_TRACE(JVMTI_EVENT_NATIVE_METHOD_BIND, ("[%s] Evt Native Method Bind event sent",
JvmtiTrace::safe_get_thread_name(thread) ));
JvmtiMethodEventMark jem(thread, mh);
@@ -1878,7 +1874,7 @@
JavaThread* thread = JavaThread::current();
EVT_TRIG_TRACE(JVMTI_EVENT_COMPILED_METHOD_LOAD,
- ("JVMTI [%s] method compile load event triggered",
+ ("[%s] method compile load event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvIterator it;
@@ -1888,7 +1884,7 @@
continue;
}
EVT_TRACE(JVMTI_EVENT_COMPILED_METHOD_LOAD,
- ("JVMTI [%s] class compile method load event sent %s.%s ",
+ ("[%s] class compile method load event sent %s.%s ",
JvmtiTrace::safe_get_thread_name(thread),
(nm->method() == NULL) ? "NULL" : nm->method()->klass_name()->as_C_string(),
(nm->method() == NULL) ? "NULL" : nm->method()->name()->as_C_string()));
@@ -1921,12 +1917,12 @@
}
JavaThread* thread = JavaThread::current();
EVT_TRIG_TRACE(JVMTI_EVENT_COMPILED_METHOD_LOAD,
- ("JVMTI [%s] method compile load event triggered (by GenerateEvents)",
+ ("[%s] method compile load event triggered (by GenerateEvents)",
JvmtiTrace::safe_get_thread_name(thread)));
if (env->is_enabled(JVMTI_EVENT_COMPILED_METHOD_LOAD)) {
EVT_TRACE(JVMTI_EVENT_COMPILED_METHOD_LOAD,
- ("JVMTI [%s] class compile method load event sent (by GenerateEvents), jmethodID=" PTR_FORMAT,
+ ("[%s] class compile method load event sent (by GenerateEvents), jmethodID=" PTR_FORMAT,
JvmtiTrace::safe_get_thread_name(thread), p2i(method)));
JvmtiEventMark jem(thread);
@@ -1949,13 +1945,13 @@
ThreadInVMfromUnknown __tiv;
EVT_TRIG_TRACE(JVMTI_EVENT_DYNAMIC_CODE_GENERATED,
- ("JVMTI [%s] method dynamic code generated event triggered",
+ ("[%s] method dynamic code generated event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvIterator it;
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
if (env->is_enabled(JVMTI_EVENT_DYNAMIC_CODE_GENERATED)) {
EVT_TRACE(JVMTI_EVENT_DYNAMIC_CODE_GENERATED,
- ("JVMTI [%s] dynamic code generated event sent for %s",
+ ("[%s] dynamic code generated event sent for %s",
JvmtiTrace::safe_get_thread_name(thread), name));
JvmtiEventMark jem(thread);
JvmtiJavaThreadEventTransition jet(thread);
@@ -1991,11 +1987,11 @@
{
JavaThread* thread = JavaThread::current();
EVT_TRIG_TRACE(JVMTI_EVENT_DYNAMIC_CODE_GENERATED,
- ("JVMTI [%s] dynamic code generated event triggered (by GenerateEvents)",
+ ("[%s] dynamic code generated event triggered (by GenerateEvents)",
JvmtiTrace::safe_get_thread_name(thread)));
if (env->is_enabled(JVMTI_EVENT_DYNAMIC_CODE_GENERATED)) {
EVT_TRACE(JVMTI_EVENT_DYNAMIC_CODE_GENERATED,
- ("JVMTI [%s] dynamic code generated event sent for %s",
+ ("[%s] dynamic code generated event sent for %s",
JvmtiTrace::safe_get_thread_name(thread), name));
JvmtiEventMark jem(thread);
JvmtiJavaThreadEventTransition jet(thread);
@@ -2048,13 +2044,13 @@
void JvmtiExport::post_garbage_collection_finish() {
Thread *thread = Thread::current(); // this event is posted from VM-Thread.
EVT_TRIG_TRACE(JVMTI_EVENT_GARBAGE_COLLECTION_FINISH,
- ("JVMTI [%s] garbage collection finish event triggered",
+ ("[%s] garbage collection finish event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvIterator it;
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
if (env->is_enabled(JVMTI_EVENT_GARBAGE_COLLECTION_FINISH)) {
EVT_TRACE(JVMTI_EVENT_GARBAGE_COLLECTION_FINISH,
- ("JVMTI [%s] garbage collection finish event sent ",
+ ("[%s] garbage collection finish event sent",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiThreadEventTransition jet(thread);
// JNIEnv is NULL here because this event is posted from VM Thread
@@ -2069,13 +2065,13 @@
void JvmtiExport::post_garbage_collection_start() {
Thread* thread = Thread::current(); // this event is posted from vm-thread.
EVT_TRIG_TRACE(JVMTI_EVENT_GARBAGE_COLLECTION_START,
- ("JVMTI [%s] garbage collection start event triggered",
+ ("[%s] garbage collection start event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvIterator it;
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
if (env->is_enabled(JVMTI_EVENT_GARBAGE_COLLECTION_START)) {
EVT_TRACE(JVMTI_EVENT_GARBAGE_COLLECTION_START,
- ("JVMTI [%s] garbage collection start event sent ",
+ ("[%s] garbage collection start event sent",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiThreadEventTransition jet(thread);
// JNIEnv is NULL here because this event is posted from VM Thread
@@ -2090,13 +2086,13 @@
void JvmtiExport::post_data_dump() {
Thread *thread = Thread::current();
EVT_TRIG_TRACE(JVMTI_EVENT_DATA_DUMP_REQUEST,
- ("JVMTI [%s] data dump request event triggered",
+ ("[%s] data dump request event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvIterator it;
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
if (env->is_enabled(JVMTI_EVENT_DATA_DUMP_REQUEST)) {
EVT_TRACE(JVMTI_EVENT_DATA_DUMP_REQUEST,
- ("JVMTI [%s] data dump request event sent ",
+ ("[%s] data dump request event sent",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiThreadEventTransition jet(thread);
// JNIEnv is NULL here because this event is posted from VM Thread
@@ -2123,14 +2119,14 @@
Handle h(thread, object);
EVT_TRIG_TRACE(JVMTI_EVENT_MONITOR_CONTENDED_ENTER,
- ("JVMTI [%s] montior contended enter event triggered",
+ ("[%s] montior contended enter event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvThreadStateIterator it(state);
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
if (ets->is_enabled(JVMTI_EVENT_MONITOR_CONTENDED_ENTER)) {
EVT_TRACE(JVMTI_EVENT_MONITOR_CONTENDED_ENTER,
- ("JVMTI [%s] monitor contended enter event sent",
+ ("[%s] monitor contended enter event sent",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiMonitorEventMark jem(thread, h());
JvmtiEnv *env = ets->get_env();
@@ -2158,14 +2154,14 @@
Handle h(thread, object);
EVT_TRIG_TRACE(JVMTI_EVENT_MONITOR_CONTENDED_ENTERED,
- ("JVMTI [%s] montior contended entered event triggered",
+ ("[%s] montior contended entered event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvThreadStateIterator it(state);
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
if (ets->is_enabled(JVMTI_EVENT_MONITOR_CONTENDED_ENTERED)) {
EVT_TRACE(JVMTI_EVENT_MONITOR_CONTENDED_ENTERED,
- ("JVMTI [%s] monitor contended enter event sent",
+ ("[%s] monitor contended enter event sent",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiMonitorEventMark jem(thread, h());
JvmtiEnv *env = ets->get_env();
@@ -2189,14 +2185,14 @@
Handle h(thread, object);
EVT_TRIG_TRACE(JVMTI_EVENT_MONITOR_WAIT,
- ("JVMTI [%s] montior wait event triggered",
+ ("[%s] montior wait event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvThreadStateIterator it(state);
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
if (ets->is_enabled(JVMTI_EVENT_MONITOR_WAIT)) {
EVT_TRACE(JVMTI_EVENT_MONITOR_WAIT,
- ("JVMTI [%s] monitor wait event sent ",
+ ("[%s] monitor wait event sent",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiMonitorEventMark jem(thread, h());
JvmtiEnv *env = ets->get_env();
@@ -2225,14 +2221,14 @@
Handle h(thread, object);
EVT_TRIG_TRACE(JVMTI_EVENT_MONITOR_WAITED,
- ("JVMTI [%s] montior waited event triggered",
+ ("[%s] montior waited event triggered",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiEnvThreadStateIterator it(state);
for (JvmtiEnvThreadState* ets = it.first(); ets != NULL; ets = it.next(ets)) {
if (ets->is_enabled(JVMTI_EVENT_MONITOR_WAITED)) {
EVT_TRACE(JVMTI_EVENT_MONITOR_WAITED,
- ("JVMTI [%s] monitor waited event sent ",
+ ("[%s] monitor waited event sent",
JvmtiTrace::safe_get_thread_name(thread)));
JvmtiMonitorEventMark jem(thread, h());
JvmtiEnv *env = ets->get_env();
@@ -2248,7 +2244,7 @@
void JvmtiExport::post_vm_object_alloc(JavaThread *thread, oop object) {
- EVT_TRIG_TRACE(JVMTI_EVENT_VM_OBJECT_ALLOC, ("JVMTI [%s] Trg vm object alloc triggered",
+ EVT_TRIG_TRACE(JVMTI_EVENT_VM_OBJECT_ALLOC, ("[%s] Trg vm object alloc triggered",
JvmtiTrace::safe_get_thread_name(thread)));
if (object == NULL) {
return;
@@ -2258,7 +2254,7 @@
JvmtiEnvIterator it;
for (JvmtiEnv* env = it.first(); env != NULL; env = it.next(env)) {
if (env->is_enabled(JVMTI_EVENT_VM_OBJECT_ALLOC)) {
- EVT_TRACE(JVMTI_EVENT_VM_OBJECT_ALLOC, ("JVMTI [%s] Evt vmobject alloc sent %s",
+ EVT_TRACE(JVMTI_EVENT_VM_OBJECT_ALLOC, ("[%s] Evt vmobject alloc sent %s",
JvmtiTrace::safe_get_thread_name(thread),
object==NULL? "NULL" : object->klass()->external_name()));