/* * Class: HelperSDT * Method: METHOD_STAP_PROBE1 * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V */ JNIEXPORT void JNICALL Java_org_systemtap_byteman_helper_HelperSDT_METHOD_1STAP_1PROBE1 (JNIEnv *env, jobject obj, jstring _rulename, jobject _arg1) { char* rulename = get_java_string(env, _rulename); _staparg arg1 = {0}; //initialize to zero so we don't get garbage the first time through arg1 = determine_java_type(env, _arg1, arg1); if(arg1.type == OTHER || arg1.type == NONE) arg1.vartype.c = get_java_string(env, _arg1); // we need to create some type of check for strings STAP_PROBE2(HelperSDT, method__1, arg1.vartype.d, rulename); }
int main (int argc, char **argv) { char char_var = '~'; STAP_PROBE1(provider,char_var,char_var); const char const_char_var = '!'; STAP_PROBE1(provider,const_char_var,const_char_var); volatile char volatile_char_var = '!'; STAP_PROBE1(provider,volatile_char_var,volatile_char_var); char *ptr_char_var = &char_var; STAP_PROBE2(provider,ptr_char_var,ptr_char_var,&char_var); const char *ptr_const_char_var = &char_var; STAP_PROBE2(provider,ptr_const_char_var,ptr_const_char_var,&char_var); char * const char_ptr_const_var = &char_var; STAP_PROBE2(provider,char_ptr_const_var,char_ptr_const_var,&char_var); volatile char *ptr_volatile_char_var = &char_var; STAP_PROBE2(provider,ptr_volatile_char_var,ptr_volatile_char_var,&char_var); char * volatile char_ptr_volatile_var = &char_var; STAP_PROBE2(provider,char_ptr_volatile_var,char_ptr_volatile_var,&char_var); short int short_int_var = 32767; STAP_PROBE1(provider,short_int_var,short_int_var); const short int const_short_int_var = -32767; STAP_PROBE1(provider,const_short_int_var,const_short_int_var); volatile short int volatile_short_int_var = -32767; STAP_PROBE1(provider,volatile_short_int_var,volatile_short_int_var); short int *ptr_short_int_var = &short_int_var; STAP_PROBE2(provider,ptr_short_int_var,ptr_short_int_var,&short_int_var); const short int *ptr_const_short_int_var = &short_int_var; STAP_PROBE2(provider,ptr_const_short_int_var,ptr_const_short_int_var,&short_int_var); short int * const short_int_ptr_const_var = &short_int_var; STAP_PROBE2(provider,short_int_ptr_const_var,short_int_ptr_const_var,&short_int_var); volatile short int *ptr_volatile_short_int_var = &short_int_var; STAP_PROBE2(provider,ptr_volatile_short_int_var,ptr_volatile_short_int_var,&short_int_var); short int * volatile short_int_ptr_volatile_var = &short_int_var; STAP_PROBE2(provider,short_int_ptr_volatile_var,short_int_ptr_volatile_var,&short_int_var); int int_var = 65536; STAP_PROBE1(provider,int_var,int_var); const int const_int_var = -65536; STAP_PROBE1(provider,const_int_var,const_int_var); volatile int volatile_int_var = -65536; STAP_PROBE1(provider,volatile_int_var,volatile_int_var); int *ptr_int_var = &int_var; STAP_PROBE2(provider,ptr_int_var,ptr_int_var,&int_var); const int *ptr_const_int_var = &int_var; STAP_PROBE2(provider,ptr_const_int_var,ptr_const_int_var,&int_var); int * const int_ptr_const_var = &int_var; STAP_PROBE2(provider,int_ptr_const_var,int_ptr_const_var,&int_var); volatile int *ptr_volatile_int_var = &int_var; STAP_PROBE2(provider,ptr_volatile_int_var,ptr_volatile_int_var,&int_var); int * volatile int_ptr_volatile_var = &int_var; STAP_PROBE2(provider,int_ptr_volatile_var,int_ptr_volatile_var,&int_var); long int long_int_var = 65536; STAP_PROBE1(provider,long_int_var,long_int_var); const long int const_long_int_var = -65536; STAP_PROBE1(provider,const_long_int_var,const_long_int_var); volatile long int volatile_long_int_var = -65536; STAP_PROBE1(provider,volatile_long_int_var,volatile_long_int_var); long int *ptr_long_int_var = &long_int_var; STAP_PROBE2(provider,ptr_long_int_var,ptr_long_int_var,&long_int_var); const long int *ptr_const_long_int_var = &long_int_var; STAP_PROBE2(provider,ptr_const_long_int_var,ptr_const_long_int_var,&long_int_var); long int * const long_int_ptr_const_var = &long_int_var; STAP_PROBE2(provider,long_int_ptr_const_var,long_int_ptr_const_var,&long_int_var); volatile long int *ptr_volatile_long_int_var = &long_int_var; STAP_PROBE2(provider,ptr_volatile_long_int_var,ptr_volatile_long_int_var,&long_int_var); long int * volatile long_int_ptr_volatile_var = &long_int_var; STAP_PROBE2(provider,long_int_ptr_volatile_var,long_int_ptr_volatile_var,&long_int_var); long long int long_long_int_var = 65536; STAP_PROBE1(provider,long_long_int_var,long_long_int_var); const long long int const_long_long_int_var = -65536; STAP_PROBE1(provider,const_long_long_int_var,const_long_long_int_var); volatile long long int volatile_long_long_int_var = -65536; STAP_PROBE1(provider,volatile_long_long_int_var,volatile_long_long_int_var); long long int *ptr_long_long_int_var = &long_long_int_var; STAP_PROBE2(provider,ptr_long_long_int_var,ptr_long_long_int_var,&long_long_int_var); const long long int *ptr_const_long_long_int_var = &long_long_int_var; STAP_PROBE2(provider,ptr_const_long_long_int_var,ptr_const_long_long_int_var,&long_long_int_var); long long int * const long_long_int_ptr_const_var = &long_long_int_var; STAP_PROBE2(provider,long_long_int_ptr_const_var,long_long_int_ptr_const_var,&long_long_int_var); volatile long long int *ptr_volatile_long_long_int_var = &long_long_int_var; STAP_PROBE2(provider,ptr_volatile_long_long_int_var,ptr_volatile_long_long_int_var,&long_long_int_var); long long int * volatile long_long_int_ptr_volatile_var = &long_long_int_var; STAP_PROBE2(provider,long_long_int_ptr_volatile_var,long_long_int_ptr_volatile_var,&long_long_int_var); char arr_char [] = "!~"; STAP_PROBE1(provider,arr_char,&arr_char); struct { int int_var; } arr_struct [2] = {{ .int_var=1, },{ .int_var=2,