#include "hprof.h"#include "hprof_ioname.h"#include "hprof_b_spec.h"
Go to the source code of this file.
Defines | |
| #define | CPU_SAMPLES_RECORD_NAME ("CPU SAMPLES") |
| #define | CPU_TIMES_RECORD_NAME ("CPU TIME (ms)") |
Typedefs | |
| typedef TableIndex | HprofId |
Functions | |
| static void | dump_heap_segment_and_reset (jlong segment_size) |
| static void | not_implemented (void) |
| static IoNameIndex | get_name_index (char *name) |
| static char * | signature_to_name (char *sig) |
| static int | size_from_field_info (int size) |
| static void | type_from_signature (const char *sig, HprofType *kind, jint *size) |
| static void | type_array (const char *sig, HprofType *kind, jint *elem_size) |
| static void | system_error (const char *system_call, int rc, int errnum) |
| static void | system_write (int fd, void *buf, int len, jboolean socket) |
| static void | write_flush (void) |
| static void | heap_flush (void) |
| static void | write_raw (void *buf, int len) |
| static void | write_u4 (unsigned i) |
| static void | write_u8 (jlong t) |
| static void | write_u2 (unsigned short i) |
| static void | write_u1 (unsigned char i) |
| static void | write_id (HprofId i) |
| static void | write_current_ticks (void) |
| static void | write_header (unsigned char type, jint length) |
| static void | write_index_id (HprofId index) |
| static IoNameIndex | write_name_first (char *name) |
| static void | write_printf (char *fmt,...) |
| static void | write_thread_serial_number (SerialNumber thread_serial_num, int with_comma) |
| static void | heap_raw (void *buf, int len) |
| static void | heap_u4 (unsigned i) |
| static void | heap_u8 (jlong i) |
| static void | heap_u2 (unsigned short i) |
| static void | heap_u1 (unsigned char i) |
| static void | heap_tag (unsigned char tag) |
| static void | heap_id (HprofId i) |
| static void | heap_index_id (HprofId index) |
| static void | heap_name (char *name) |
| static void | heap_printf (char *fmt,...) |
| static void | heap_element (HprofType kind, jint size, jvalue value) |
| static void | heap_elements (HprofType kind, jint num_elements, jint elem_size, void *elements) |
| void | io_flush (void) |
| void | io_setup (void) |
| void | io_cleanup (void) |
| void | io_write_file_header (void) |
| void | io_write_file_footer (void) |
| void | io_write_class_load (SerialNumber class_serial_num, ObjectIndex index, SerialNumber trace_serial_num, char *sig) |
| void | io_write_class_unload (SerialNumber class_serial_num, ObjectIndex index) |
| void | io_write_sites_header (const char *comment_str, jint flags, double cutoff, jint total_live_bytes, jint total_live_instances, jlong total_alloced_bytes, jlong total_alloced_instances, jint count) |
| void | io_write_sites_elem (jint index, double ratio, double accum_percent, char *sig, SerialNumber class_serial_num, SerialNumber trace_serial_num, jint n_live_bytes, jint n_live_instances, jint n_alloced_bytes, jint n_alloced_instances) |
| void | io_write_sites_footer (void) |
| void | io_write_thread_start (SerialNumber thread_serial_num, ObjectIndex thread_obj_id, SerialNumber trace_serial_num, char *thread_name, char *thread_group_name, char *thread_parent_name) |
| void | io_write_thread_end (SerialNumber thread_serial_num) |
| void | io_write_frame (FrameIndex index, SerialNumber frame_serial_num, char *mname, char *msig, char *sname, SerialNumber class_serial_num, jint lineno) |
| void | io_write_trace_header (SerialNumber trace_serial_num, SerialNumber thread_serial_num, jint n_frames, char *phase_str) |
| void | io_write_trace_elem (SerialNumber trace_serial_num, FrameIndex frame_index, SerialNumber frame_serial_num, char *csig, char *mname, char *sname, jint lineno) |
| void | io_write_trace_footer (SerialNumber trace_serial_num, SerialNumber thread_serial_num, jint n_frames) |
| void | io_write_cpu_samples_header (jlong total_cost, jint n_items) |
| void | io_write_cpu_samples_elem (jint index, double percent, double accum, jint num_hits, jlong cost, SerialNumber trace_serial_num, jint n_frames, char *csig, char *mname) |
| void | io_write_cpu_samples_footer (void) |
| void | io_write_heap_summary (jlong total_live_bytes, jlong total_live_instances, jlong total_alloced_bytes, jlong total_alloced_instances) |
| void | io_write_oldprof_header (void) |
| void | io_write_oldprof_elem (jint num_hits, jint num_frames, char *csig_callee, char *mname_callee, char *msig_callee, char *csig_caller, char *mname_caller, char *msig_caller, jlong cost) |
| void | io_write_oldprof_footer (void) |
| void | io_write_monitor_header (jlong total_time) |
| void | io_write_monitor_elem (jint index, double percent, double accum, jint num_hits, SerialNumber trace_serial_num, char *sig) |
| void | io_write_monitor_footer (void) |
| void | io_write_monitor_sleep (jlong timeout, SerialNumber thread_serial_num) |
| void | io_write_monitor_wait (char *sig, jlong timeout, SerialNumber thread_serial_num) |
| void | io_write_monitor_waited (char *sig, jlong time_waited, SerialNumber thread_serial_num) |
| void | io_write_monitor_exit (char *sig, SerialNumber thread_serial_num) |
| void | io_write_monitor_dump_header (void) |
| void | io_write_monitor_dump_thread_state (SerialNumber thread_serial_num, SerialNumber trace_serial_num, jint threadState) |
| void | io_write_monitor_dump_state (char *sig, SerialNumber thread_serial_num, jint entry_count, SerialNumber *waiters, jint waiter_count, SerialNumber *notify_waiters, jint notify_waiter_count) |
| void | io_write_monitor_dump_footer (void) |
| void | io_heap_header (jlong total_live_instances, jlong total_live_bytes) |
| void | io_heap_root_thread_object (ObjectIndex thread_obj_id, SerialNumber thread_serial_num, SerialNumber trace_serial_num) |
| void | io_heap_root_unknown (ObjectIndex obj_id) |
| void | io_heap_root_jni_global (ObjectIndex obj_id, SerialNumber gref_serial_num, SerialNumber trace_serial_num) |
| void | io_heap_root_jni_local (ObjectIndex obj_id, SerialNumber thread_serial_num, jint frame_depth) |
| void | io_heap_root_system_class (ObjectIndex obj_id, char *sig, SerialNumber class_serial_num) |
| void | io_heap_root_monitor (ObjectIndex obj_id) |
| void | io_heap_root_thread (ObjectIndex obj_id, SerialNumber thread_serial_num) |
| void | io_heap_root_java_frame (ObjectIndex obj_id, SerialNumber thread_serial_num, jint frame_depth) |
| void | io_heap_root_native_stack (ObjectIndex obj_id, SerialNumber thread_serial_num) |
| static jboolean | is_static_field (jint modifiers) |
| static jboolean | is_inst_field (jint modifiers) |
| void | io_heap_class_dump (ClassIndex cnum, char *sig, ObjectIndex class_id, SerialNumber trace_serial_num, ObjectIndex super_id, ObjectIndex loader_id, ObjectIndex signers_id, ObjectIndex domain_id, jint size, jint n_cpool, ConstantPoolValue *cpool, jint n_fields, FieldInfo *fields, jvalue *fvalues) |
| static int | dump_instance_fields (ClassIndex cnum, FieldInfo *fields, jvalue *fvalues, jint n_fields) |
| void | io_heap_instance_dump (ClassIndex cnum, ObjectIndex obj_id, SerialNumber trace_serial_num, ObjectIndex class_id, jint size, char *sig, FieldInfo *fields, jvalue *fvalues, jint n_fields) |
| void | io_heap_object_array (ObjectIndex obj_id, SerialNumber trace_serial_num, jint size, jint num_elements, char *sig, ObjectIndex *values, ObjectIndex class_id) |
| void | io_heap_prim_array (ObjectIndex obj_id, SerialNumber trace_serial_num, jint size, jint num_elements, char *sig, void *elements) |
| static void | write_raw_from_file (int fd, jlong byteCount, void(*raw_interface)(void *, int)) |
| void | io_heap_footer (void) |
Variables | |
| static int | type_size [] = HPROF_TYPE_SIZES |
| #define CPU_SAMPLES_RECORD_NAME ("CPU SAMPLES") |
Definition at line 1018 of file hprof_io.c.
| #define CPU_TIMES_RECORD_NAME ("CPU TIME (ms)") |
Definition at line 1019 of file hprof_io.c.
| typedef TableIndex HprofId |
Definition at line 78 of file hprof_io.c.
| static void dump_heap_segment_and_reset | ( | jlong | segment_size | ) | [static] |
Definition at line 1905 of file hprof_io.c.


| static int dump_instance_fields | ( | ClassIndex | cnum, | |
| FieldInfo * | fields, | |||
| jvalue * | fvalues, | |||
| jint | n_fields | |||
| ) | [static] |
Definition at line 1695 of file hprof_io.c.


| static IoNameIndex get_name_index | ( | char * | name | ) | [static] |
Definition at line 93 of file hprof_io.c.


| static void heap_element | ( | HprofType | kind, | |
| jint | size, | |||
| jvalue | value | |||
| ) | [static] |
Definition at line 541 of file hprof_io.c.


| static void heap_elements | ( | HprofType | kind, | |
| jint | num_elements, | |||
| jint | elem_size, | |||
| void * | elements | |||
| ) | [static] |
Definition at line 578 of file hprof_io.c.


| static void heap_flush | ( | void | ) | [static] |
Definition at line 305 of file hprof_io.c.


| static void heap_id | ( | HprofId | i | ) | [static] |
Definition at line 511 of file hprof_io.c.


| static void heap_index_id | ( | HprofId | index | ) | [static] |
Definition at line 517 of file hprof_io.c.


| static void heap_name | ( | char * | name | ) | [static] |
Definition at line 523 of file hprof_io.c.


| static void heap_printf | ( | char * | fmt, | |
| ... | ||||
| ) | [static] |
Definition at line 529 of file hprof_io.c.


| static void heap_raw | ( | void * | buf, | |
| int | len | |||
| ) | [static] |
Definition at line 442 of file hprof_io.c.


| static void heap_tag | ( | unsigned char | tag | ) | [static] |
Definition at line 486 of file hprof_io.c.


| static void heap_u1 | ( | unsigned char | i | ) | [static] |
Definition at line 479 of file hprof_io.c.


| static void heap_u2 | ( | unsigned short | i | ) | [static] |
Definition at line 472 of file hprof_io.c.


| static void heap_u4 | ( | unsigned | i | ) | [static] |
Definition at line 458 of file hprof_io.c.


| static void heap_u8 | ( | jlong | i | ) | [static] |
Definition at line 465 of file hprof_io.c.


| void io_cleanup | ( | void | ) |
Definition at line 669 of file hprof_io.c.


| void io_flush | ( | void | ) |
Definition at line 640 of file hprof_io.c.


| void io_heap_class_dump | ( | ClassIndex | cnum, | |
| char * | sig, | |||
| ObjectIndex | class_id, | |||
| SerialNumber | trace_serial_num, | |||
| ObjectIndex | super_id, | |||
| ObjectIndex | loader_id, | |||
| ObjectIndex | signers_id, | |||
| ObjectIndex | domain_id, | |||
| jint | size, | |||
| jint | n_cpool, | |||
| ConstantPoolValue * | cpool, | |||
| jint | n_fields, | |||
| FieldInfo * | fields, | |||
| jvalue * | fvalues | |||
| ) |
Definition at line 1528 of file hprof_io.c.


| void io_heap_footer | ( | void | ) |
Definition at line 1959 of file hprof_io.c.


| void io_heap_header | ( | jlong | total_live_instances, | |
| jlong | total_live_bytes | |||
| ) |
Definition at line 1364 of file hprof_io.c.


| void io_heap_instance_dump | ( | ClassIndex | cnum, | |
| ObjectIndex | obj_id, | |||
| SerialNumber | trace_serial_num, | |||
| ObjectIndex | class_id, | |||
| jint | size, | |||
| char * | sig, | |||
| FieldInfo * | fields, | |||
| jvalue * | fvalues, | |||
| jint | n_fields | |||
| ) |
Definition at line 1726 of file hprof_io.c.


| void io_heap_object_array | ( | ObjectIndex | obj_id, | |
| SerialNumber | trace_serial_num, | |||
| jint | size, | |||
| jint | num_elements, | |||
| char * | sig, | |||
| ObjectIndex * | values, | |||
| ObjectIndex | class_id | |||
| ) |
Definition at line 1799 of file hprof_io.c.


| void io_heap_prim_array | ( | ObjectIndex | obj_id, | |
| SerialNumber | trace_serial_num, | |||
| jint | size, | |||
| jint | num_elements, | |||
| char * | sig, | |||
| void * | elements | |||
| ) |
Definition at line 1834 of file hprof_io.c.


| void io_heap_root_java_frame | ( | ObjectIndex | obj_id, | |
| SerialNumber | thread_serial_num, | |||
| jint | frame_depth | |||
| ) |
Definition at line 1479 of file hprof_io.c.


| void io_heap_root_jni_global | ( | ObjectIndex | obj_id, | |
| SerialNumber | gref_serial_num, | |||
| SerialNumber | trace_serial_num | |||
| ) |
Definition at line 1405 of file hprof_io.c.


| void io_heap_root_jni_local | ( | ObjectIndex | obj_id, | |
| SerialNumber | thread_serial_num, | |||
| jint | frame_depth | |||
| ) |
Definition at line 1421 of file hprof_io.c.


| void io_heap_root_monitor | ( | ObjectIndex | obj_id | ) |
Definition at line 1454 of file hprof_io.c.


| void io_heap_root_native_stack | ( | ObjectIndex | obj_id, | |
| SerialNumber | thread_serial_num | |||
| ) |
| void io_heap_root_system_class | ( | ObjectIndex | obj_id, | |
| char * | sig, | |||
| SerialNumber | class_serial_num | |||
| ) |
Definition at line 1438 of file hprof_io.c.


| void io_heap_root_thread | ( | ObjectIndex | obj_id, | |
| SerialNumber | thread_serial_num | |||
| ) |
Definition at line 1465 of file hprof_io.c.


| void io_heap_root_thread_object | ( | ObjectIndex | thread_obj_id, | |
| SerialNumber | thread_serial_num, | |||
| SerialNumber | trace_serial_num | |||
| ) |
Definition at line 1377 of file hprof_io.c.


| void io_heap_root_unknown | ( | ObjectIndex | obj_id | ) |
Definition at line 1394 of file hprof_io.c.


| void io_setup | ( | void | ) |
Definition at line 647 of file hprof_io.c.


| void io_write_class_load | ( | SerialNumber | class_serial_num, | |
| ObjectIndex | index, | |||
| SerialNumber | trace_serial_num, | |||
| char * | sig | |||
| ) |
Definition at line 775 of file hprof_io.c.


| void io_write_class_unload | ( | SerialNumber | class_serial_num, | |
| ObjectIndex | index | |||
| ) |
Definition at line 796 of file hprof_io.c.


| void io_write_cpu_samples_elem | ( | jint | index, | |
| double | percent, | |||
| double | accum, | |||
| jint | num_hits, | |||
| jlong | cost, | |||
| SerialNumber | trace_serial_num, | |||
| jint | n_frames, | |||
| char * | csig, | |||
| char * | mname | |||
| ) |
Definition at line 1048 of file hprof_io.c.


| void io_write_cpu_samples_footer | ( | void | ) |
Definition at line 1073 of file hprof_io.c.


| void io_write_cpu_samples_header | ( | jlong | total_cost, | |
| jint | n_items | |||
| ) |
Definition at line 1022 of file hprof_io.c.


| void io_write_file_footer | ( | void | ) |
| void io_write_file_header | ( | void | ) |
Definition at line 700 of file hprof_io.c.


| void io_write_frame | ( | FrameIndex | index, | |
| SerialNumber | frame_serial_num, | |||
| char * | mname, | |||
| char * | msig, | |||
| char * | sname, | |||
| SerialNumber | class_serial_num, | |||
| jint | lineno | |||
| ) |
Definition at line 930 of file hprof_io.c.


| void io_write_heap_summary | ( | jlong | total_live_bytes, | |
| jlong | total_live_instances, | |||
| jlong | total_alloced_bytes, | |||
| jlong | total_alloced_instances | |||
| ) |
Definition at line 1090 of file hprof_io.c.


| void io_write_monitor_dump_footer | ( | void | ) |
Definition at line 1351 of file hprof_io.c.


| void io_write_monitor_dump_header | ( | void | ) |
Definition at line 1260 of file hprof_io.c.


| void io_write_monitor_dump_state | ( | char * | sig, | |
| SerialNumber | thread_serial_num, | |||
| jint | entry_count, | |||
| SerialNumber * | waiters, | |||
| jint | waiter_count, | |||
| SerialNumber * | notify_waiters, | |||
| jint | notify_waiter_count | |||
| ) |
Definition at line 1317 of file hprof_io.c.


| void io_write_monitor_dump_thread_state | ( | SerialNumber | thread_serial_num, | |
| SerialNumber | trace_serial_num, | |||
| jint | threadState | |||
| ) |
Definition at line 1270 of file hprof_io.c.


| void io_write_monitor_elem | ( | jint | index, | |
| double | percent, | |||
| double | accum, | |||
| jint | num_hits, | |||
| SerialNumber | trace_serial_num, | |||
| char * | sig | |||
| ) |
Definition at line 1163 of file hprof_io.c.


| void io_write_monitor_exit | ( | char * | sig, | |
| SerialNumber | thread_serial_num | |||
| ) |
| void io_write_monitor_footer | ( | void | ) |
Definition at line 1181 of file hprof_io.c.


| void io_write_monitor_header | ( | jlong | total_time | ) |
Definition at line 1146 of file hprof_io.c.


| void io_write_monitor_sleep | ( | jlong | timeout, | |
| SerialNumber | thread_serial_num | |||
| ) |
Definition at line 1191 of file hprof_io.c.


| void io_write_monitor_wait | ( | char * | sig, | |
| jlong | timeout, | |||
| SerialNumber | thread_serial_num | |||
| ) |
Definition at line 1208 of file hprof_io.c.


| void io_write_monitor_waited | ( | char * | sig, | |
| jlong | time_waited, | |||
| SerialNumber | thread_serial_num | |||
| ) |
Definition at line 1226 of file hprof_io.c.


| void io_write_oldprof_elem | ( | jint | num_hits, | |
| jint | num_frames, | |||
| char * | csig_callee, | |||
| char * | mname_callee, | |||
| char * | msig_callee, | |||
| char * | csig_caller, | |||
| char * | mname_caller, | |||
| char * | msig_caller, | |||
| jlong | cost | |||
| ) |
Definition at line 1111 of file hprof_io.c.


| void io_write_oldprof_footer | ( | void | ) |
| void io_write_oldprof_header | ( | void | ) |
Definition at line 1103 of file hprof_io.c.


| void io_write_sites_elem | ( | jint | index, | |
| double | ratio, | |||
| double | accum_percent, | |||
| char * | sig, | |||
| SerialNumber | class_serial_num, | |||
| SerialNumber | trace_serial_num, | |||
| jint | n_live_bytes, | |||
| jint | n_live_instances, | |||
| jint | n_alloced_bytes, | |||
| jint | n_alloced_instances | |||
| ) |
Definition at line 833 of file hprof_io.c.


| void io_write_sites_footer | ( | void | ) |
Definition at line 872 of file hprof_io.c.


| void io_write_sites_header | ( | const char * | comment_str, | |
| jint | flags, | |||
| double | cutoff, | |||
| jint | total_live_bytes, | |||
| jint | total_live_instances, | |||
| jlong | total_alloced_bytes, | |||
| jlong | total_alloced_instances, | |||
| jint | count | |||
| ) |
Definition at line 806 of file hprof_io.c.


| void io_write_thread_end | ( | SerialNumber | thread_serial_num | ) |
Definition at line 916 of file hprof_io.c.


| void io_write_thread_start | ( | SerialNumber | thread_serial_num, | |
| ObjectIndex | thread_obj_id, | |||
| SerialNumber | trace_serial_num, | |||
| char * | thread_name, | |||
| char * | thread_group_name, | |||
| char * | thread_parent_name | |||
| ) |
Definition at line 882 of file hprof_io.c.


| void io_write_trace_elem | ( | SerialNumber | trace_serial_num, | |
| FrameIndex | frame_index, | |||
| SerialNumber | frame_serial_num, | |||
| char * | csig, | |||
| char * | mname, | |||
| char * | sname, | |||
| jint | lineno | |||
| ) |
Definition at line 980 of file hprof_io.c.


| void io_write_trace_footer | ( | SerialNumber | trace_serial_num, | |
| SerialNumber | thread_serial_num, | |||
| jint | n_frames | |||
| ) |
| void io_write_trace_header | ( | SerialNumber | trace_serial_num, | |
| SerialNumber | thread_serial_num, | |||
| jint | n_frames, | |||
| char * | phase_str | |||
| ) |
Definition at line 955 of file hprof_io.c.


| static jboolean is_inst_field | ( | jint | modifiers | ) | [static] |
| static jboolean is_static_field | ( | jint | modifiers | ) | [static] |
| static void not_implemented | ( | void | ) | [static] |
| static char* signature_to_name | ( | char * | sig | ) | [static] |
| static int size_from_field_info | ( | int | size | ) | [static] |
| static void system_error | ( | const char * | system_call, | |
| int | rc, | |||
| int | errnum | |||
| ) | [static] |
Definition at line 255 of file hprof_io.c.


| static void system_write | ( | int | fd, | |
| void * | buf, | |||
| int | len, | |||
| jboolean | socket | |||
| ) | [static] |
Definition at line 275 of file hprof_io.c.


| static void type_array | ( | const char * | sig, | |
| HprofType * | kind, | |||
| jint * | elem_size | |||
| ) | [static] |
Definition at line 243 of file hprof_io.c.


| static void type_from_signature | ( | const char * | sig, | |
| HprofType * | kind, | |||
| jint * | size | |||
| ) | [static] |
| static void write_current_ticks | ( | void | ) | [static] |
Definition at line 365 of file hprof_io.c.


| static void write_flush | ( | void | ) | [static] |
Definition at line 294 of file hprof_io.c.


| static void write_header | ( | unsigned char | type, | |
| jint | length | |||
| ) | [static] |
Definition at line 371 of file hprof_io.c.


| static void write_id | ( | HprofId | i | ) | [static] |
Definition at line 359 of file hprof_io.c.


| static void write_index_id | ( | HprofId | index | ) | [static] |
Definition at line 379 of file hprof_io.c.


| static IoNameIndex write_name_first | ( | char * | name | ) | [static] |
Definition at line 385 of file hprof_io.c.


| static void write_printf | ( | char * | fmt, | |
| ... | ||||
| ) | [static] |
Definition at line 411 of file hprof_io.c.


| static void write_raw | ( | void * | buf, | |
| int | len | |||
| ) | [static] |
Definition at line 317 of file hprof_io.c.


| static void write_raw_from_file | ( | int | fd, | |
| jlong | byteCount, | |||
| void(*)(void *, int) | raw_interface | |||
| ) | [static] |
Definition at line 1862 of file hprof_io.c.


| static void write_thread_serial_number | ( | SerialNumber | thread_serial_num, | |
| int | with_comma | |||
| ) | [static] |
Definition at line 423 of file hprof_io.c.


| static void write_u1 | ( | unsigned char | i | ) | [static] |
Definition at line 353 of file hprof_io.c.


| static void write_u2 | ( | unsigned short | i | ) | [static] |
Definition at line 346 of file hprof_io.c.


| static void write_u4 | ( | unsigned | i | ) | [static] |
Definition at line 332 of file hprof_io.c.


| static void write_u8 | ( | jlong | t | ) | [static] |
Definition at line 339 of file hprof_io.c.


int type_size[] = HPROF_TYPE_SIZES [static] |
Definition at line 83 of file hprof_io.c.
1.6.1