< prev index next > src/hotspot/share/prims/perf.cpp
Print this page
/*
* Implementation of class jdk.internal.perf.Perf
*/
-
- #define PERF_ENTRY(result_type, header) \
- JVM_ENTRY(result_type, header)
-
- #define PERF_END JVM_END
-
#define PerfWrapper(arg) /* Unimplemented at this time */
static char* jstr_to_utf(JNIEnv *env, jstring str, TRAPS) {
char* utfstr = nullptr;
env->GetStringUTFRegion(str, 0, unicode_len, utfstr);
return utfstr;
}
- PERF_ENTRY(jobject, Perf_Attach(JNIEnv *env, jobject unused, int vmid))
+ JVM_ENTRY(jobject, Perf_Attach(JNIEnv *env, jobject unused, int vmid))
PerfWrapper("Perf_Attach");
char* address = nullptr;
size_t capacity = 0;
{
ThreadToNativeFromVM ttnfv(thread);
return env->NewDirectByteBuffer(address, (jlong)capacity);
}
- PERF_END
+ JVM_END
- PERF_ENTRY(void, Perf_Detach(JNIEnv *env, jobject unused, jobject buffer))
+ JVM_ENTRY(void, Perf_Detach(JNIEnv *env, jobject unused, jobject buffer))
PerfWrapper("Perf_Detach");
if (!UsePerfData) {
// With -XX:-UsePerfData, detach is just a NOP
capacity = env->GetDirectBufferCapacity(buffer);
}
PerfMemory::detach((char*)address, capacity);
- PERF_END
+ JVM_END
- PERF_ENTRY(jobject, Perf_CreateLong(JNIEnv *env, jobject perf, jstring name,
+ JVM_ENTRY(jobject, Perf_CreateLong(JNIEnv *env, jobject perf, jstring name,
int variability, int units, jlong value))
PerfWrapper("Perf_CreateLong");
char* name_utf = nullptr;
{
ThreadToNativeFromVM ttnfv(thread);
return env->NewDirectByteBuffer(lp, sizeof(jlong));
}
- PERF_END
+ JVM_END
- PERF_ENTRY(jobject, Perf_CreateByteArray(JNIEnv *env, jobject perf,
+ JVM_ENTRY(jobject, Perf_CreateByteArray(JNIEnv *env, jobject perf,
jstring name, jint variability,
jint units, jbyteArray value,
jint maxlength))
PerfWrapper("Perf_CreateByteArray");
{
ThreadToNativeFromVM ttnfv(thread);
return env->NewDirectByteBuffer(cp, maxlength+1);
}
- PERF_END
+ JVM_END
- PERF_ENTRY(jlong, Perf_HighResCounter(JNIEnv *env, jobject perf))
+ JVM_ENTRY(jlong, Perf_HighResCounter(JNIEnv *env, jobject perf))
PerfWrapper("Perf_HighResCounter");
// this should be a method in java.lang.System. This value could
// be acquired through access to a PerfData performance counter, but
// doing so would require that the PerfData monitoring overhead be
// incurred by all Java applications, which is unacceptable.
return os::elapsed_counter();
- PERF_END
+ JVM_END
- PERF_ENTRY(jlong, Perf_HighResFrequency(JNIEnv *env, jobject perf))
+ JVM_ENTRY(jlong, Perf_HighResFrequency(JNIEnv *env, jobject perf))
PerfWrapper("Perf_HighResFrequency");
// this should be a method in java.lang.System. This value could
// be acquired through access to a PerfData performance counter, but
// doing so would require that the PerfData monitoring overhead be
// incurred by all Java applications, which is unacceptable.
return os::elapsed_frequency();
- PERF_END
+ JVM_END
/// JVM_RegisterPerfMethods
#define CC (char*) /*cast a literal from (const char*)*/
#define FN_PTR(f) CAST_FROM_FN_PTR(void*, &f)
< prev index next >