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_IO_H
00038 #define HPROF_IO_H
00039
00040 void io_flush(void);
00041 void io_setup(void);
00042 void io_cleanup(void);
00043
00044 void io_write_file_header(void);
00045 void io_write_file_footer(void);
00046
00047 void io_write_class_load(SerialNumber class_serial_num, ObjectIndex index,
00048 SerialNumber trace_serial_num, char *csig);
00049 void io_write_class_unload(SerialNumber class_serial_num, ObjectIndex index);
00050
00051 void io_write_sites_header(const char * comment_str, jint flags,
00052 double cutoff, jint total_live_bytes,
00053 jint total_live_instances, jlong total_alloced_bytes,
00054 jlong total_alloced_instances, jint count);
00055 void io_write_sites_elem(jint index, double ratio, double accum_percent,
00056 char *csig, SerialNumber class_serial_num,
00057 SerialNumber trace_serial_num,
00058 jint n_live_bytes, jint n_live_instances,
00059 jint n_alloced_bytes, jint n_alloced_instances);
00060 void io_write_sites_footer(void);
00061
00062 void io_write_thread_start(SerialNumber thread_serial_num, TlsIndex tls_index,
00063 SerialNumber trace_serial_num, char *thread_name,
00064 char *thread_group_name, char *thread_parent_name);
00065 void io_write_thread_end(SerialNumber thread_serial_num);
00066
00067 void io_write_frame(FrameIndex index, SerialNumber serial_num,
00068 char *mname, char *msig,
00069 char *sname, SerialNumber class_serial_num,
00070 jint lineno);
00071
00072 void io_write_trace_header(SerialNumber trace_serial_num,
00073 SerialNumber thread_serial_num, jint n_frames,
00074 char * phase_str);
00075 void io_write_trace_elem(SerialNumber trace_serial_num,
00076 FrameIndex frame_index, SerialNumber frame_serial_num,
00077 char *csig, char *mname,
00078 char *sname, jint lineno);
00079 void io_write_trace_footer(SerialNumber trace_serial_num,
00080 SerialNumber thread_serial_num, jint n_frames);
00081
00082 void io_write_cpu_samples_header(jlong total_cost, jint n_items);
00083 void io_write_cpu_samples_elem(jint index, double percent, double accum,
00084 jint num_hits, jlong cost,
00085 SerialNumber trace_serial_num, jint n_frames,
00086 char *csig, char *mname);
00087 void io_write_cpu_samples_footer(void);
00088
00089 void io_write_heap_summary(jlong total_live_bytes, jlong total_live_instances,
00090 jlong total_alloced_bytes,
00091 jlong total_alloced_instances);
00092
00093 void io_write_oldprof_header(void);
00094 void io_write_oldprof_elem(jint num_hits, jint num_frames, char *csig_callee,
00095 char *mname_callee, char *msig_callee,
00096 char *csig_caller, char *mname_caller,
00097 char *msig_caller, jlong cost);
00098 void io_write_oldprof_footer(void);
00099
00100 void io_write_monitor_header(jlong total_time);
00101 void io_write_monitor_elem(jint index, double percent, double accum,
00102 jint num_hits, SerialNumber trace_serial_num,
00103 char *sig);
00104 void io_write_monitor_footer(void);
00105
00106 void io_write_monitor_sleep(jlong timeout, SerialNumber thread_serial_num);
00107 void io_write_monitor_wait(char *sig, jlong timeout,
00108 SerialNumber thread_serial_num);
00109 void io_write_monitor_waited(char *sig, jlong time_waited,
00110 SerialNumber thread_serial_num);
00111 void io_write_monitor_exit(char *sig, SerialNumber thread_serial_num);
00112
00113 void io_write_monitor_dump_header(void);
00114 void io_write_monitor_dump_thread_state(SerialNumber thread_serial_num,
00115 SerialNumber trace_serial_num,
00116 jint threadState);
00117 void io_write_monitor_dump_state(char *sig,
00118 SerialNumber thread_serial_num, jint entry_count,
00119 SerialNumber *waiters, jint waiter_count,
00120 SerialNumber *notify_waiters, jint notify_waiter_count);
00121 void io_write_monitor_dump_footer(void);
00122
00123 void io_heap_header(jlong total_live_instances, jlong total_live_bytes);
00124
00125 void io_heap_root_thread_object(ObjectIndex thread_id,
00126 SerialNumber thread_serial_num,
00127 SerialNumber trace_serial_num);
00128 void io_heap_root_unknown(ObjectIndex obj_id);
00129 void io_heap_root_jni_global(ObjectIndex obj_id, SerialNumber gref_serial_num,
00130 SerialNumber trace_serial_num);
00131 void io_heap_root_jni_local(ObjectIndex obj_id,
00132 SerialNumber thread_serial_num, jint frame_depth);
00133 void io_heap_root_system_class(ObjectIndex obj_id, char *sig, SerialNumber class_serial_num);
00134 void io_heap_root_monitor(ObjectIndex obj_id);
00135 void io_heap_root_thread(ObjectIndex obj_id,
00136 SerialNumber thread_serial_num);
00137 void io_heap_root_java_frame(ObjectIndex obj_id,
00138 SerialNumber thread_serial_num, jint frame_depth);
00139 void io_heap_root_native_stack(ObjectIndex obj_id,
00140 SerialNumber thread_serial_num);
00141
00142 void io_heap_class_dump(ClassIndex cnum, char *sig, ObjectIndex class_id,
00143 SerialNumber trace_serial_num,
00144 ObjectIndex super_id, ObjectIndex loader_id,
00145 ObjectIndex signers_id, ObjectIndex domain_id,
00146 jint inst_size,
00147 jint n_cpool, ConstantPoolValue *cpool,
00148 jint n_fields, FieldInfo *fields, jvalue *fvalues);
00149
00150 void io_heap_instance_dump(ClassIndex cnum, ObjectIndex obj_id,
00151 SerialNumber trace_serial_num,
00152 ObjectIndex class_id, jint size,
00153 char *sig, FieldInfo *fields,
00154 jvalue *fvalues, jint n_fields);
00155
00156 void io_heap_object_array(ObjectIndex obj_id, SerialNumber trace_serial_num,
00157 jint size, jint num_elements, char *sig,
00158 ObjectIndex *values, ObjectIndex class_id);
00159 void io_heap_prim_array(ObjectIndex obj_id, SerialNumber trace_serial_num,
00160 jint size, jint num_elements, char *sig,
00161 void *elements);
00162
00163 void io_heap_footer(void);
00164
00165 #endif