comparison src/share/vm/prims/jvm.h @ 116:018d5b58dd4f

6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes Summary: Initial checkin of JSDT code Reviewed-by: acorn, sbohne
author kamg
date Thu, 17 Apr 2008 22:18:15 -0400
parents a61af66fc99e
children d1605aabd0a1 d5ba4f8aa38a
comparison
equal deleted inserted replaced
115:e7a91a357527 116:018d5b58dd4f
603 JNIEXPORT jboolean JNICALL 603 JNIEXPORT jboolean JNICALL
604 JVM_SupportsCX8(void); 604 JVM_SupportsCX8(void);
605 605
606 JNIEXPORT jboolean JNICALL 606 JNIEXPORT jboolean JNICALL
607 JVM_CX8Field(JNIEnv *env, jobject obj, jfieldID fldID, jlong oldVal, jlong newVal); 607 JVM_CX8Field(JNIEnv *env, jobject obj, jfieldID fldID, jlong oldVal, jlong newVal);
608
609 /*
610 * com.sun.dtrace.jsdt support
611 */
612
613 #define JVM_TRACING_DTRACE_VERSION 1
614
615 /*
616 * Structure to pass one probe description to JVM.
617 *
618 * The VM will overwrite the definition of the referenced method with
619 * code that will fire the probe.
620 */
621 typedef struct {
622 jmethodID method;
623 jstring function;
624 jstring name;
625 void* reserved[4]; // for future use
626 } JVM_DTraceProbe;
627
628 /**
629 * Encapsulates the stability ratings for a DTrace provider field
630 */
631 typedef struct {
632 jint nameStability;
633 jint dataStability;
634 jint dependencyClass;
635 } JVM_DTraceInterfaceAttributes;
636
637 /*
638 * Structure to pass one provider description to JVM
639 */
640 typedef struct {
641 jstring name;
642 JVM_DTraceProbe* probes;
643 jint probe_count;
644 JVM_DTraceInterfaceAttributes providerAttributes;
645 JVM_DTraceInterfaceAttributes moduleAttributes;
646 JVM_DTraceInterfaceAttributes functionAttributes;
647 JVM_DTraceInterfaceAttributes nameAttributes;
648 JVM_DTraceInterfaceAttributes argsAttributes;
649 void* reserved[4]; // for future use
650 } JVM_DTraceProvider;
651
652 /*
653 * Get the version number the JVM was built with
654 */
655 JNIEXPORT jint JNICALL
656 JVM_DTraceGetVersion(JNIEnv* env);
657
658 /*
659 * Register new probe with given signature, return global handle
660 *
661 * The version passed in is the version that the library code was
662 * built with.
663 */
664 JNIEXPORT jlong JNICALL
665 JVM_DTraceActivate(JNIEnv* env, jint version, jstring module_name,
666 jint providers_count, JVM_DTraceProvider* providers);
667
668 /*
669 * Check JSDT probe
670 */
671 JNIEXPORT jboolean JNICALL
672 JVM_DTraceIsProbeEnabled(JNIEnv* env, jmethodID method);
673
674 /*
675 * Destroy custom DOF
676 */
677 JNIEXPORT void JNICALL
678 JVM_DTraceDispose(JNIEnv* env, jlong handle);
679
680 /*
681 * Check to see if DTrace is supported by OS
682 */
683 JNIEXPORT jboolean JNICALL
684 JVM_DTraceIsSupported(JNIEnv* env);
608 685
609 /************************************************************************* 686 /*************************************************************************
610 PART 2: Support for the Verifier and Class File Format Checker 687 PART 2: Support for the Verifier and Class File Format Checker
611 ************************************************************************/ 688 ************************************************************************/
612 /* 689 /*