/*
* 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 "precompiled.hpp"
#include "jvmtifiles/jvmtiEnv.hpp"
#include "prims/jvmtiTrace.hpp"
//
// class JvmtiTrace
//
// Support for JVMTI tracing code
//
// ------------
// Usage:
// -XX:TraceJVMTI=DESC,DESC,DESC
//
// DESC is DOMAIN ACTION KIND
//
// DOMAIN is function name
// event name
// "all" (all functions and events)
// "func" (all functions except boring)
// "allfunc" (all functions)
// "event" (all events)
// "ec" (event controller)
//
// ACTION is "+" (add)
// "-" (remove)
//
// KIND is
// for func
// "i" (input params)
// "e" (error returns)
// "o" (output)
// for event
// "t" (event triggered aka posted)
// "s" (event sent)
//
// Example:
// -XX:TraceJVMTI=ec+,GetCallerFrame+ie,Breakpoint+s
#ifdef JVMTI_TRACE
if (_initialized) {
return;
}
const char *very_end;
const char *curr;
if (TraceJVMTI != NULL) {
curr = TraceJVMTI;
} else {
}
}
}
char op;
flags = "ies";
op = '+';
} else {
}
switch (*flags) {
case 'i':
break;
case 'I':
bits |= SHOW_IN_DETAIL;
break;
case 'e':
bits |= SHOW_ERROR;
break;
case 'o':
break;
case 'O':
bits |= SHOW_OUT_DETAIL;
break;
case 't':
break;
case 's':
bits |= SHOW_EVENT_SENT;
break;
default:
break;
}
}
int domain = 0;
_trace_event_controller = true;
} else {
}
int exclude_index = 0;
} else {
}
}
for (int i = 0; i <= _max_function_index; ++i) {
} else {
bool do_op = false;
do_op = true;
} else {
do_op = true;
}
}
}
if (do_op) {
if (op == '+') {
_trace_flags[i] |= bits;
} else {
_trace_flags[i] &= ~bits;
}
_on = true;
}
}
}
}
}
for (int i = 0; i <= _max_event_index; ++i) {
bool do_op = false;
do_op = true;
} else {
do_op = true;
}
}
}
if (do_op) {
if (op == '+') {
_event_trace_flags[i] |= bits;
} else {
_event_trace_flags[i] &= ~bits;
}
_on = true;
}
}
}
}
}
_initialized = true;
}
int i;
_on = false;
_trace_event_controller = false;
for (i = 0; i <= _max_function_index; ++i) {
_trace_flags[i] = 0;
}
for (i = 0; i <= _max_event_index; ++i) {
_event_trace_flags[i] = 0;
}
}
}
}
return "*INVALID-ENUM-VALUE*";
}
// return a valid string no matter what state the thread is in
return "NULL";
}
if (!thread->is_Java_thread()) {
}
return "NULL";
}
return "<NOT FILLED IN>";
}
}
// return the name of the current thread
if (JvmtiEnv::is_vm_live()) {
} else {
return "VM not live";
}
}
// return a valid string no matter what the state of k_mirror
return "primitive";
}
return "INVALID";
}
}
#endif /*JVMTI_TRACE */