00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef HPROF_TLS_H
00038 #define HPROF_TLS_H
00039
00040 void tls_init(void);
00041 TlsIndex tls_find_or_create(JNIEnv *env, jthread thread);
00042 void tls_agent_thread(JNIEnv *env, jthread thread);
00043 SerialNumber tls_get_thread_serial_number(TlsIndex index);
00044 void tls_list(void);
00045 void tls_delete_global_references(JNIEnv *env);
00046 void tls_garbage_collect(JNIEnv *env);
00047 void tls_cleanup(void);
00048 void tls_thread_ended(JNIEnv *env, TlsIndex index);
00049 void tls_sample_all_threads(JNIEnv *env);
00050
00051 MonitorIndex tls_get_monitor(TlsIndex index);
00052 void tls_set_monitor(TlsIndex index, MonitorIndex monitor_index);
00053
00054 void tls_set_thread_object_index(TlsIndex index,
00055 ObjectIndex thread_object_index);
00056
00057 jint tls_get_tracker_status(JNIEnv *env, jthread thread,
00058 jboolean skip_init, jint **ppstatus, TlsIndex* pindex,
00059 SerialNumber *pthread_serial_num,
00060 TraceIndex *ptrace_index);
00061
00062 void tls_set_sample_status(ObjectIndex object_index, jint sample_status);
00063 jint tls_sum_sample_status(void);
00064
00065 void tls_dump_traces(JNIEnv *env);
00066
00067 void tls_monitor_start_timer(TlsIndex index);
00068 jlong tls_monitor_stop_timer(TlsIndex index);
00069
00070 void tls_dump_monitor_state(JNIEnv *env);
00071
00072 void tls_push_method(TlsIndex index, jmethodID method);
00073 void tls_pop_method(TlsIndex index, jthread thread, jmethodID method);
00074 void tls_pop_exception_catch(TlsIndex index, jthread thread, jmethodID method);
00075
00076 TraceIndex tls_get_trace(TlsIndex index, JNIEnv *env,
00077 int depth, jboolean skip_init);
00078
00079 void tls_set_in_heap_dump(TlsIndex index, jint in_heap_dump);
00080 jint tls_get_in_heap_dump(TlsIndex index);
00081 void tls_clear_in_heap_dump(void);
00082
00083 TlsIndex tls_find(SerialNumber thread_serial_num);
00084
00085 #endif