interface CallTreeRecord {
id: number;
name: string;
time: number;
children?: CallTreeRecord[];
parent_id?: number;
}
Demonstrate an example icicle and sunburst visualization of an aggregated call tree.
The Icicle
and Sunburst
are used to visualize a hierarchical call tree
of aggregated funciton times.
Interface for how the Call Tree records are structured. The Call Tree is provided as either a tree with each node specifying its children or as a list of nodes that specify their parent. Either approach can be used, this example tests both.
interface CallTreeRecord {
id: number;
name: string;
time: number;
children?: CallTreeRecord[];
parent_id?: number;
}
Sample call tree data stored inline this example for simplicity. Both alternatives of the call tree are here, either storing a root with children or a list of leaves and their parents.
var calltree_root: CallTreeRecord = { "id": 1285, "time": 15, "name": "schedule", "children": [{ "id": 1284, "time": 309, "name": "__schedule", "children": [{ "id": 1018, "time": 8, "name": "schedule_preempt_disabled", "children": [{ "id": 1017, "time": 208, "name": "__schedule", "children": [{ "id": 971, "time": 49, "name": "finish_task_switch", "children": [{ "id": 970, "time": 14, "name": "vtime_common_task_switch", "children": [{ "id": 962, "time": 30, "name": "arch_vtime_task_switch", "children": [{ "id": 954, "time": 7, "name": "_raw_spin_unlock", "children": [] }, { "id": 958, "time": 20, "name": "sched_clock_cpu", "children": [{ "id": 957, "time": 6, "name": "sched_clock", "children": [{ "id": 956, "time": 22, "name": "native_sched_clock", "children": [{ "id": 955, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }, { "id": 959, "time": 11, "name": "_raw_spin_lock", "children": [] }, { "id": 960, "time": 7, "name": "_raw_spin_unlock", "children": [] }, { "id": 961, "time": 11, "name": "_raw_spin_lock", "children": [] }] }, { "id": 969, "time": 14, "name": "vtime_account_idle", "children": [{ "id": 968, "time": 23, "name": "get_vtime_delta", "children": [{ "id": 967, "time": 20, "name": "local_clock", "children": [{ "id": 966, "time": 20, "name": "sched_clock_cpu", "children": [{ "id": 965, "time": 6, "name": "sched_clock", "children": [{ "id": 964, "time": 22, "name": "native_sched_clock", "children": [{ "id": 963, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }] }] }] }] }, { "id": 975, "time": 135, "name": "__switch_to", "children": [{ "id": 972, "time": 8, "name": "native_write_msr_safe", "children": [] }, { "id": 973, "time": 13, "name": "native_load_tls", "children": [] }, { "id": 974, "time": 6, "name": "native_load_sp0", "children": [] }] }, { "id": 976, "time": 9, "name": "__context_tracking_task_switch", "children": [] }, { "id": 977, "time": 14, "name": "perf_event_task_sched_out", "children": [] }, { "id": 984, "time": 22, "name": "probe_sched_switch", "children": [{ "id": 980, "time": 17, "name": "tracing_record_cmdline", "children": [{ "id": 979, "time": 8, "name": "tracing_is_on", "children": [{ "id": 978, "time": 8, "name": "ring_buffer_record_is_on", "children": [] }] }] }, { "id": 983, "time": 21, "name": "tracing_record_cmdline", "children": [{ "id": 982, "time": 8, "name": "tracing_is_on", "children": [{ "id": 981, "time": 8, "name": "ring_buffer_record_is_on", "children": [] }] }] }] }, { "id": 1005, "time": 62, "name": "probe_sched_switch", "children": [{ "id": 1003, "time": 64, "name": "ftrace_raw_event_switch_in", "children": [{ "id": 988, "time": 21, "name": "trace_buffer_unlock_commit", "children": [{ "id": 985, "time": 3, "name": "ftrace_trace_userstack", "children": [] }, { "id": 987, "time": 72, "name": "ring_buffer_unlock_commit", "children": [{ "id": 986, "time": 25, "name": "rb_update_write_stamp", "children": [] }] }] }, { "id": 989, "time": 4, "name": "filter_check_discard", "children": [] }, { "id": 991, "time": 5, "name": "ring_buffer_event_data", "children": [{ "id": 990, "time": 18, "name": "rb_event_data", "children": [] }] }, { "id": 1002, "time": 14, "name": "trace_event_buffer_lock_reserve", "children": [{ "id": 1001, "time": 31, "name": "trace_buffer_lock_reserve", "children": [{ "id": 992, "time": 38, "name": "tracing_generic_entry_update", "children": [] }, { "id": 994, "time": 5, "name": "ring_buffer_event_data", "children": [{ "id": 993, "time": 18, "name": "rb_event_data", "children": [] }] }, { "id": 1000, "time": 37, "name": "ring_buffer_lock_reserve", "children": [{ "id": 999, "time": 102, "name": "rb_reserve_next_event", "children": [{ "id": 998, "time": 5, "name": "trace_clock_local", "children": [{ "id": 997, "time": 6, "name": "sched_clock", "children": [{ "id": 996, "time": 22, "name": "native_sched_clock", "children": [{ "id": 995, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }] }] }] }] }, { "id": 1004, "time": 44, "name": "poor_mans_ptwrite_pid", "children": [] }] }, { "id": 1011, "time": 72, "name": "pick_next_task_fair", "children": [{ "id": 1009, "time": 78, "name": "set_next_entity", "children": [{ "id": 1006, "time": 42, "name": "rb_erase", "children": [] }, { "id": 1007, "time": 28, "name": "rb_next", "children": [] }, { "id": 1008, "time": 66, "name": "update_stats_wait_end", "children": [] }] }, { "id": 1010, "time": 24, "name": "clear_buddies", "children": [] }] }, { "id": 1012, "time": 5, "name": "put_prev_task_idle", "children": [] }, { "id": 1014, "time": 11, "name": "pre_schedule_idle", "children": [{ "id": 1013, "time": 38, "name": "idle_exit_fair", "children": [] }] }, { "id": 1015, "time": 13, "name": "_raw_spin_lock_irq", "children": [] }, { "id": 1016, "time": 19, "name": "rcu_note_context_switch", "children": [] }] }] }, { "id": 1068, "time": 52, "name": "tick_nohz_idle_exit", "children": [{ "id": 1054, "time": 30, "name": "tick_nohz_restart", "children": [{ "id": 1034, "time": 7, "name": "hrtimer_start_range_ns", "children": [{ "id": 1033, "time": 115, "name": "__hrtimer_start_range_ns", "children": [{ "id": 1019, "time": 17, "name": "_raw_spin_unlock_irqrestore", "children": [] }, { "id": 1027, "time": 12, "name": "tick_program_event", "children": [{ "id": 1026, "time": 39, "name": "clockevents_program_event", "children": [{ "id": 1022, "time": 21, "name": "lapic_next_deadline", "children": [{ "id": 1020, "time": 8, "name": "native_write_msr_safe", "children": [] }, { "id": 1021, "time": 9, "name": "native_read_tsc", "children": [] }] }, { "id": 1025, "time": 37, "name": "ktime_get", "children": [{ "id": 1024, "time": 9, "name": "read_tsc", "children": [{ "id": 1023, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }, { "id": 1030, "time": 26, "name": "enqueue_hrtimer", "children": [{ "id": 1029, "time": 59, "name": "timerqueue_add", "children": [{ "id": 1028, "time": 10, "name": "rb_insert_color", "children": [] }] }] }, { "id": 1032, "time": 22, "name": "lock_hrtimer_base.isra.19", "children": [{ "id": 1031, "time": 18, "name": "_raw_spin_lock_irqsave", "children": [] }] }] }] }, { "id": 1035, "time": 10, "name": "hrtimer_forward", "children": [] }, { "id": 1053, "time": 13, "name": "hrtimer_cancel", "children": [{ "id": 1052, "time": 42, "name": "hrtimer_try_to_cancel", "children": [{ "id": 1036, "time": 17, "name": "_raw_spin_unlock_irqrestore", "children": [] }, { "id": 1049, "time": 43, "name": "__remove_hrtimer", "children": [{ "id": 1045, "time": 54, "name": "hrtimer_force_reprogram", "children": [{ "id": 1044, "time": 12, "name": "tick_program_event", "children": [{ "id": 1043, "time": 39, "name": "clockevents_program_event", "children": [{ "id": 1039, "time": 21, "name": "lapic_next_deadline", "children": [{ "id": 1037, "time": 8, "name": "native_write_msr_safe", "children": [] }, { "id": 1038, "time": 9, "name": "native_read_tsc", "children": [] }] }, { "id": 1042, "time": 37, "name": "ktime_get", "children": [{ "id": 1041, "time": 9, "name": "read_tsc", "children": [{ "id": 1040, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }] }, { "id": 1048, "time": 22, "name": "timerqueue_del", "children": [{ "id": 1046, "time": 20, "name": "rb_erase", "children": [] }, { "id": 1047, "time": 16, "name": "rb_next", "children": [] }] }] }, { "id": 1051, "time": 22, "name": "lock_hrtimer_base.isra.19", "children": [{ "id": 1050, "time": 18, "name": "_raw_spin_lock_irqsave", "children": [] }] }] }] }] }, { "id": 1055, "time": 6, "name": "touch_softlockup_watchdog", "children": [] }, { "id": 1056, "time": 10, "name": "calc_load_exit_idle", "children": [] }, { "id": 1057, "time": 14, "name": "update_cpu_load_nohz", "children": [] }, { "id": 1058, "time": 12, "name": "tick_do_update_jiffies64", "children": [] }, { "id": 1064, "time": 17, "name": "tick_nohz_stop_idle", "children": [{ "id": 1061, "time": 9, "name": "sched_clock_idle_wakeup_event", "children": [{ "id": 1059, "time": 6, "name": "touch_softlockup_watchdog", "children": [] }, { "id": 1060, "time": 4, "name": "sched_clock_tick", "children": [] }] }, { "id": 1063, "time": 29, "name": "update_ts_time_stats", "children": [{ "id": 1062, "time": 9, "name": "nr_iowait_cpu", "children": [] }] }] }, { "id": 1067, "time": 37, "name": "ktime_get", "children": [{ "id": 1066, "time": 9, "name": "read_tsc", "children": [{ "id": 1065, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }, { "id": 1071, "time": 13, "name": "arch_cpu_idle_exit", "children": [{ "id": 1070, "time": 9, "name": "atomic_notifier_call_chain", "children": [{ "id": 1069, "time": 6, "name": "notifier_call_chain", "children": [] }] }] }, { "id": 1076, "time": 23, "name": "rcu_idle_exit", "children": [{ "id": 1073, "time": 24, "name": "rcu_sysidle_exit", "children": [{ "id": 1072, "time": 9, "name": "rcu_sysidle_force_exit", "children": [] }] }, { "id": 1075, "time": 25, "name": "rcu_eqs_exit", "children": [{ "id": 1074, "time": 30, "name": "rcu_eqs_exit_common.isra.48", "children": [] }] }] }, { "id": 1092, "time": 10, "name": "arch_cpu_idle", "children": [{ "id": 1091, "time": 53, "name": "cpuidle_idle_call", "children": [{ "id": 1080, "time": 45, "name": "reschedule_interrupt", "children": [{ "id": 1079, "time": 11, "name": "smp_reschedule_interrupt", "children": [{ "id": 1077, "time": 30, "name": "scheduler_ipi", "children": [] }, { "id": 1078, "time": 6, "name": "native_apic_mem_write", "children": [] }] }] }, { "id": 1081, "time": 11, "name": "menu_reflect", "children": [] }, { "id": 1089, "time": 770, "name": "menu_select", "children": [{ "id": 1082, "time": 730, "name": "int_sqrt", "children": [] }, { "id": 1083, "time": 9, "name": "nr_iowait_cpu", "children": [] }, { "id": 1084, "time": 8, "name": "this_cpu_load", "children": [] }, { "id": 1085, "time": 9, "name": "nr_iowait_cpu", "children": [] }, { "id": 1086, "time": 25, "name": "ns_to_timespec", "children": [] }, { "id": 1087, "time": 8, "name": "tick_nohz_get_sleep_length", "children": [] }, { "id": 1088, "time": 9, "name": "pm_qos_request", "children": [] }] }, { "id": 1090, "time": 11, "name": "cpuidle_get_cpu_driver", "children": [] }] }] }, { "id": 1096, "time": 23, "name": "rcu_idle_enter", "children": [{ "id": 1093, "time": 24, "name": "rcu_sysidle_enter", "children": [] }, { "id": 1095, "time": 24, "name": "rcu_eqs_enter", "children": [{ "id": 1094, "time": 44, "name": "rcu_eqs_enter_common.isra.47", "children": [] }] }] }, { "id": 1097, "time": 9, "name": "tick_check_broadcast_expired", "children": [] }, { "id": 1101, "time": 11, "name": "arch_cpu_idle_enter", "children": [{ "id": 1099, "time": 9, "name": "atomic_notifier_call_chain", "children": [{ "id": 1098, "time": 6, "name": "notifier_call_chain", "children": [] }] }, { "id": 1100, "time": 6, "name": "local_touch_nmi", "children": [] }] }, { "id": 1154, "time": 19, "name": "tick_nohz_idle_enter", "children": [{ "id": 1152, "time": 56, "name": "__tick_nohz_idle_enter", "children": [{ "id": 1143, "time": 110, "name": "tick_nohz_stop_sched_tick", "children": [{ "id": 1130, "time": 9, "name": "hrtimer_start", "children": [{ "id": 1129, "time": 129, "name": "__hrtimer_start_range_ns", "children": [{ "id": 1102, "time": 17, "name": "_raw_spin_unlock_irqrestore", "children": [] }, { "id": 1110, "time": 12, "name": "tick_program_event", "children": [{ "id": 1109, "time": 39, "name": "clockevents_program_event", "children": [{ "id": 1105, "time": 21, "name": "lapic_next_deadline", "children": [{ "id": 1103, "time": 8, "name": "native_write_msr_safe", "children": [] }, { "id": 1104, "time": 9, "name": "native_read_tsc", "children": [] }] }, { "id": 1108, "time": 37, "name": "ktime_get", "children": [{ "id": 1107, "time": 9, "name": "read_tsc", "children": [{ "id": 1106, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }, { "id": 1113, "time": 26, "name": "enqueue_hrtimer", "children": [{ "id": 1112, "time": 59, "name": "timerqueue_add", "children": [{ "id": 1111, "time": 10, "name": "rb_insert_color", "children": [] }] }] }, { "id": 1126, "time": 43, "name": "__remove_hrtimer", "children": [{ "id": 1122, "time": 54, "name": "hrtimer_force_reprogram", "children": [{ "id": 1121, "time": 12, "name": "tick_program_event", "children": [{ "id": 1120, "time": 39, "name": "clockevents_program_event", "children": [{ "id": 1116, "time": 21, "name": "lapic_next_deadline", "children": [{ "id": 1114, "time": 8, "name": "native_write_msr_safe", "children": [] }, { "id": 1115, "time": 9, "name": "native_read_tsc", "children": [] }] }, { "id": 1119, "time": 37, "name": "ktime_get", "children": [{ "id": 1118, "time": 9, "name": "read_tsc", "children": [{ "id": 1117, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }] }, { "id": 1125, "time": 22, "name": "timerqueue_del", "children": [{ "id": 1123, "time": 20, "name": "rb_erase", "children": [] }, { "id": 1124, "time": 16, "name": "rb_next", "children": [] }] }] }, { "id": 1128, "time": 22, "name": "lock_hrtimer_base.isra.19", "children": [{ "id": 1127, "time": 18, "name": "_raw_spin_lock_irqsave", "children": [] }] }] }] }, { "id": 1131, "time": 12, "name": "calc_load_enter_idle", "children": [] }, { "id": 1132, "time": 18, "name": "nohz_balance_enter_idle", "children": [] }, { "id": 1138, "time": 48, "name": "get_next_timer_interrupt", "children": [{ "id": 1135, "time": 31, "name": "hrtimer_get_next_event", "children": [{ "id": 1133, "time": 17, "name": "_raw_spin_unlock_irqrestore", "children": [] }, { "id": 1134, "time": 18, "name": "_raw_spin_lock_irqsave", "children": [] }] }, { "id": 1136, "time": 7, "name": "_raw_spin_unlock", "children": [] }, { "id": 1137, "time": 11, "name": "_raw_spin_lock", "children": [] }] }, { "id": 1139, "time": 7, "name": "irq_work_needs_cpu", "children": [] }, { "id": 1141, "time": 20, "name": "rcu_needs_cpu", "children": [{ "id": 1140, "time": 33, "name": "rcu_cpu_has_callbacks", "children": [] }] }, { "id": 1142, "time": 12, "name": "timekeeping_max_deferment", "children": [] }] }, { "id": 1148, "time": 6, "name": "sched_clock_idle_sleep_event", "children": [{ "id": 1147, "time": 20, "name": "sched_clock_cpu", "children": [{ "id": 1146, "time": 6, "name": "sched_clock", "children": [{ "id": 1145, "time": 22, "name": "native_sched_clock", "children": [{ "id": 1144, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }, { "id": 1151, "time": 37, "name": "ktime_get", "children": [{ "id": 1150, "time": 9, "name": "read_tsc", "children": [{ "id": 1149, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }, { "id": 1153, "time": 12, "name": "set_cpu_sd_state_idle", "children": [] }] }, { "id": 1155, "time": 17, "name": "_raw_spin_unlock_irqrestore", "children": [] }, { "id": 1157, "time": 6, "name": "post_schedule_idle", "children": [{ "id": 1156, "time": 40, "name": "idle_enter_fair", "children": [] }] }, { "id": 1158, "time": 18, "name": "_raw_spin_lock_irqsave", "children": [] }, { "id": 1184, "time": 47, "name": "finish_task_switch", "children": [{ "id": 1183, "time": 14, "name": "vtime_common_task_switch", "children": [{ "id": 1167, "time": 30, "name": "arch_vtime_task_switch", "children": [{ "id": 1159, "time": 7, "name": "_raw_spin_unlock", "children": [] }, { "id": 1163, "time": 20, "name": "sched_clock_cpu", "children": [{ "id": 1162, "time": 6, "name": "sched_clock", "children": [{ "id": 1161, "time": 22, "name": "native_sched_clock", "children": [{ "id": 1160, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }, { "id": 1164, "time": 11, "name": "_raw_spin_lock", "children": [] }, { "id": 1165, "time": 7, "name": "_raw_spin_unlock", "children": [] }, { "id": 1166, "time": 11, "name": "_raw_spin_lock", "children": [] }] }, { "id": 1182, "time": 19, "name": "vtime_account_system", "children": [{ "id": 1168, "time": 7, "name": "_raw_spin_unlock", "children": [] }, { "id": 1180, "time": 15, "name": "__vtime_account_system", "children": [{ "id": 1173, "time": 44, "name": "account_system_time", "children": [{ "id": 1171, "time": 8, "name": "acct_account_cputime", "children": [{ "id": 1170, "time": 39, "name": "__acct_update_integrals", "children": [{ "id": 1169, "time": 20, "name": "jiffies_to_timeval", "children": [] }] }] }, { "id": 1172, "time": 11, "name": "cpuacct_account_field", "children": [] }] }, { "id": 1179, "time": 23, "name": "get_vtime_delta", "children": [{ "id": 1178, "time": 20, "name": "local_clock", "children": [{ "id": 1177, "time": 20, "name": "sched_clock_cpu", "children": [{ "id": 1176, "time": 6, "name": "sched_clock", "children": [{ "id": 1175, "time": 22, "name": "native_sched_clock", "children": [{ "id": 1174, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }] }] }, { "id": 1181, "time": 11, "name": "_raw_spin_lock", "children": [] }] }] }] }, { "id": 1187, "time": 132, "name": "__switch_to", "children": [{ "id": 1185, "time": 13, "name": "native_load_tls", "children": [] }, { "id": 1186, "time": 6, "name": "native_load_sp0", "children": [] }] }, { "id": 1188, "time": 9, "name": "__context_tracking_task_switch", "children": [] }, { "id": 1189, "time": 14, "name": "perf_event_task_sched_out", "children": [] }, { "id": 1196, "time": 22, "name": "probe_sched_switch", "children": [{ "id": 1192, "time": 17, "name": "tracing_record_cmdline", "children": [{ "id": 1191, "time": 8, "name": "tracing_is_on", "children": [{ "id": 1190, "time": 8, "name": "ring_buffer_record_is_on", "children": [] }] }] }, { "id": 1195, "time": 50, "name": "tracing_record_cmdline", "children": [{ "id": 1194, "time": 8, "name": "tracing_is_on", "children": [{ "id": 1193, "time": 8, "name": "ring_buffer_record_is_on", "children": [] }] }] }] }, { "id": 1217, "time": 63, "name": "probe_sched_switch", "children": [{ "id": 1215, "time": 64, "name": "ftrace_raw_event_switch_out", "children": [{ "id": 1200, "time": 21, "name": "trace_buffer_unlock_commit", "children": [{ "id": 1197, "time": 3, "name": "ftrace_trace_userstack", "children": [] }, { "id": 1199, "time": 72, "name": "ring_buffer_unlock_commit", "children": [{ "id": 1198, "time": 25, "name": "rb_update_write_stamp", "children": [] }] }] }, { "id": 1201, "time": 4, "name": "filter_check_discard", "children": [] }, { "id": 1203, "time": 5, "name": "ring_buffer_event_data", "children": [{ "id": 1202, "time": 18, "name": "rb_event_data", "children": [] }] }, { "id": 1214, "time": 14, "name": "trace_event_buffer_lock_reserve", "children": [{ "id": 1213, "time": 31, "name": "trace_buffer_lock_reserve", "children": [{ "id": 1204, "time": 38, "name": "tracing_generic_entry_update", "children": [] }, { "id": 1206, "time": 5, "name": "ring_buffer_event_data", "children": [{ "id": 1205, "time": 18, "name": "rb_event_data", "children": [] }] }, { "id": 1212, "time": 37, "name": "ring_buffer_lock_reserve", "children": [{ "id": 1211, "time": 102, "name": "rb_reserve_next_event", "children": [{ "id": 1210, "time": 5, "name": "trace_clock_local", "children": [{ "id": 1209, "time": 6, "name": "sched_clock", "children": [{ "id": 1208, "time": 22, "name": "native_sched_clock", "children": [{ "id": 1207, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }] }] }] }] }, { "id": 1216, "time": 44, "name": "poor_mans_ptwrite_prev_pid", "children": [] }] }, { "id": 1218, "time": 8, "name": "pick_next_task_idle", "children": [] }, { "id": 1219, "time": 23, "name": "pick_next_task_fair", "children": [] }, { "id": 1220, "time": 23, "name": "pick_next_task_rt", "children": [] }, { "id": 1221, "time": 12, "name": "pick_next_task_stop", "children": [] }, { "id": 1222, "time": 23, "name": "pick_next_task_fair", "children": [] }, { "id": 1223, "time": 63, "name": "put_prev_task_fair", "children": [] }, { "id": 1258, "time": 129, "name": "idle_balance", "children": [{ "id": 1224, "time": 11, "name": "_raw_spin_lock", "children": [] }, { "id": 1227, "time": 22, "name": "msecs_to_jiffies", "children": [] }, { "id": 1231, "time": 40, "name": "sched_clock_cpu", "children": [{ "id": 1230, "time": 12, "name": "sched_clock", "children": [{ "id": 1229, "time": 44, "name": "native_sched_clock", "children": [{ "id": 1228, "time": 18, "name": "native_read_tsc", "children": [] }] }] }] }, { "id": 1242, "time": 276, "name": "load_balance", "children": [{ "id": 1226, "time": 70, "name": "cpumask_next_and", "children": [{ "id": 1225, "time": 106, "name": "find_next_bit", "children": [] }] }, { "id": 1241, "time": 754, "name": "find_busiest_group", "children": [{ "id": 1232, "time": 33, "name": "source_load", "children": [] }, { "id": 1233, "time": 86, "name": "idle_cpu", "children": [] }, { "id": 1234, "time": 33, "name": "target_load", "children": [] }, { "id": 1236, "time": 230, "name": "cpumask_next_and", "children": [{ "id": 1235, "time": 374, "name": "find_next_bit", "children": [] }] }, { "id": 1240, "time": 89, "name": "update_group_power", "children": [{ "id": 1237, "time": 6, "name": "sched_cfs_period_timer", "children": [] }, { "id": 1238, "time": 9, "name": "sched_cfs_period_timer", "children": [] }, { "id": 1239, "time": 11, "name": "msecs_to_jiffies", "children": [] }] }] }] }, { "id": 1246, "time": 40, "name": "sched_clock_cpu", "children": [{ "id": 1245, "time": 12, "name": "sched_clock", "children": [{ "id": 1244, "time": 44, "name": "native_sched_clock", "children": [{ "id": 1243, "time": 18, "name": "native_read_tsc", "children": [] }] }] }] }, { "id": 1256, "time": 287, "name": "update_blocked_averages", "children": [{ "id": 1247, "time": 17, "name": "_raw_spin_unlock_irqrestore", "children": [] }, { "id": 1248, "time": 109, "name": "update_cfs_rq_blocked_load", "children": [] }, { "id": 1254, "time": 9, "name": "update_rq_clock", "children": [{ "id": 1253, "time": 14, "name": "update_rq_clock.part.63", "children": [{ "id": 1252, "time": 20, "name": "sched_clock_cpu", "children": [{ "id": 1251, "time": 6, "name": "sched_clock", "children": [{ "id": 1250, "time": 22, "name": "native_sched_clock", "children": [{ "id": 1249, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }] }, { "id": 1255, "time": 18, "name": "_raw_spin_lock_irqsave", "children": [] }] }, { "id": 1257, "time": 7, "name": "_raw_spin_unlock", "children": [] }] }, { "id": 1281, "time": 12, "name": "deactivate_task", "children": [{ "id": 1280, "time": 33, "name": "dequeue_task", "children": [{ "id": 1274, "time": 94, "name": "dequeue_task_fair", "children": [{ "id": 1259, "time": 4, "name": "hrtick_update", "children": [] }, { "id": 1273, "time": 191, "name": "dequeue_entity", "children": [{ "id": 1265, "time": 72, "name": "update_cfs_shares", "children": [{ "id": 1260, "time": 17, "name": "account_entity_enqueue", "children": [] }, { "id": 1261, "time": 17, "name": "account_entity_dequeue", "children": [] }, { "id": 1264, "time": 49, "name": "update_curr", "children": [{ "id": 1262, "time": 18, "name": "update_min_vruntime", "children": [] }, { "id": 1263, "time": 46, "name": "__calc_delta", "children": [] }] }] }, { "id": 1266, "time": 38, "name": "update_min_vruntime", "children": [] }, { "id": 1267, "time": 51, "name": "account_entity_dequeue", "children": [] }, { "id": 1268, "time": 24, "name": "clear_buddies", "children": [] }, { "id": 1269, "time": 34, "name": "update_cfs_rq_blocked_load", "children": [] }, { "id": 1272, "time": 83, "name": "update_curr", "children": [{ "id": 1270, "time": 16, "name": "cpuacct_charge", "children": [] }, { "id": 1271, "time": 18, "name": "update_min_vruntime", "children": [] }] }] }] }, { "id": 1279, "time": 14, "name": "update_rq_clock.part.63", "children": [{ "id": 1278, "time": 20, "name": "sched_clock_cpu", "children": [{ "id": 1277, "time": 6, "name": "sched_clock", "children": [{ "id": 1276, "time": 22, "name": "native_sched_clock", "children": [{ "id": 1275, "time": 9, "name": "native_read_tsc", "children": [] }] }] }] }] }] }] }, { "id": 1282, "time": 13, "name": "_raw_spin_lock_irq", "children": [] }, { "id": 1283, "time": 19, "name": "rcu_note_context_switch", "children": [] }] }] };
var calltree_leaves: CallTreeRecord[] = [{ "id": 954, "time": 7, "name": "_raw_spin_unlock", "parent_id": 962 }, { "id": 955, "time": 9, "name": "native_read_tsc", "parent_id": 956 }, { "id": 956, "time": 22, "name": "native_sched_clock", "parent_id": 957 }, { "id": 957, "time": 6, "name": "sched_clock", "parent_id": 958 }, { "id": 958, "time": 20, "name": "sched_clock_cpu", "parent_id": 962 }, { "id": 959, "time": 11, "name": "_raw_spin_lock", "parent_id": 962 }, { "id": 960, "time": 7, "name": "_raw_spin_unlock", "parent_id": 962 }, { "id": 961, "time": 11, "name": "_raw_spin_lock", "parent_id": 962 }, { "id": 962, "time": 30, "name": "arch_vtime_task_switch", "parent_id": 970 }, { "id": 963, "time": 9, "name": "native_read_tsc", "parent_id": 964 }, { "id": 964, "time": 22, "name": "native_sched_clock", "parent_id": 965 }, { "id": 965, "time": 6, "name": "sched_clock", "parent_id": 966 }, { "id": 966, "time": 20, "name": "sched_clock_cpu", "parent_id": 967 }, { "id": 967, "time": 20, "name": "local_clock", "parent_id": 968 }, { "id": 968, "time": 23, "name": "get_vtime_delta", "parent_id": 969 }, { "id": 969, "time": 14, "name": "vtime_account_idle", "parent_id": 970 }, { "id": 970, "time": 14, "name": "vtime_common_task_switch", "parent_id": 971 }, { "id": 971, "time": 49, "name": "finish_task_switch", "parent_id": 1017 }, { "id": 972, "time": 8, "name": "native_write_msr_safe", "parent_id": 975 }, { "id": 973, "time": 13, "name": "native_load_tls", "parent_id": 975 }, { "id": 974, "time": 6, "name": "native_load_sp0", "parent_id": 975 }, { "id": 975, "time": 135, "name": "__switch_to", "parent_id": 1017 }, { "id": 976, "time": 9, "name": "__context_tracking_task_switch", "parent_id": 1017 }, { "id": 977, "time": 14, "name": "perf_event_task_sched_out", "parent_id": 1017 }, { "id": 978, "time": 8, "name": "ring_buffer_record_is_on", "parent_id": 979 }, { "id": 979, "time": 8, "name": "tracing_is_on", "parent_id": 980 }, { "id": 980, "time": 17, "name": "tracing_record_cmdline", "parent_id": 984 }, { "id": 981, "time": 8, "name": "ring_buffer_record_is_on", "parent_id": 982 }, { "id": 982, "time": 8, "name": "tracing_is_on", "parent_id": 983 }, { "id": 983, "time": 21, "name": "tracing_record_cmdline", "parent_id": 984 }, { "id": 984, "time": 22, "name": "probe_sched_switch", "parent_id": 1017 }, { "id": 985, "time": 3, "name": "ftrace_trace_userstack", "parent_id": 988 }, { "id": 986, "time": 25, "name": "rb_update_write_stamp", "parent_id": 987 }, { "id": 987, "time": 72, "name": "ring_buffer_unlock_commit", "parent_id": 988 }, { "id": 988, "time": 21, "name": "trace_buffer_unlock_commit", "parent_id": 1003 }, { "id": 989, "time": 4, "name": "filter_check_discard", "parent_id": 1003 }, { "id": 990, "time": 18, "name": "rb_event_data", "parent_id": 991 }, { "id": 991, "time": 5, "name": "ring_buffer_event_data", "parent_id": 1003 }, { "id": 992, "time": 38, "name": "tracing_generic_entry_update", "parent_id": 1001 }, { "id": 993, "time": 18, "name": "rb_event_data", "parent_id": 994 }, { "id": 994, "time": 5, "name": "ring_buffer_event_data", "parent_id": 1001 }, { "id": 995, "time": 9, "name": "native_read_tsc", "parent_id": 996 }, { "id": 996, "time": 22, "name": "native_sched_clock", "parent_id": 997 }, { "id": 997, "time": 6, "name": "sched_clock", "parent_id": 998 }, { "id": 998, "time": 5, "name": "trace_clock_local", "parent_id": 999 }, { "id": 999, "time": 102, "name": "rb_reserve_next_event", "parent_id": 1000 }, { "id": 1000, "time": 37, "name": "ring_buffer_lock_reserve", "parent_id": 1001 }, { "id": 1001, "time": 31, "name": "trace_buffer_lock_reserve", "parent_id": 1002 }, { "id": 1002, "time": 14, "name": "trace_event_buffer_lock_reserve", "parent_id": 1003 }, { "id": 1003, "time": 64, "name": "ftrace_raw_event_switch_in", "parent_id": 1005 }, { "id": 1004, "time": 44, "name": "poor_mans_ptwrite_pid", "parent_id": 1005 }, { "id": 1005, "time": 62, "name": "probe_sched_switch", "parent_id": 1017 }, { "id": 1006, "time": 42, "name": "rb_erase", "parent_id": 1009 }, { "id": 1007, "time": 28, "name": "rb_next", "parent_id": 1009 }, { "id": 1008, "time": 66, "name": "update_stats_wait_end", "parent_id": 1009 }, { "id": 1009, "time": 78, "name": "set_next_entity", "parent_id": 1011 }, { "id": 1010, "time": 24, "name": "clear_buddies", "parent_id": 1011 }, { "id": 1011, "time": 72, "name": "pick_next_task_fair", "parent_id": 1017 }, { "id": 1012, "time": 5, "name": "put_prev_task_idle", "parent_id": 1017 }, { "id": 1013, "time": 38, "name": "idle_exit_fair", "parent_id": 1014 }, { "id": 1014, "time": 11, "name": "pre_schedule_idle", "parent_id": 1017 }, { "id": 1015, "time": 13, "name": "_raw_spin_lock_irq", "parent_id": 1017 }, { "id": 1016, "time": 19, "name": "rcu_note_context_switch", "parent_id": 1017 }, { "id": 1017, "time": 208, "name": "__schedule", "parent_id": 1018 }, { "id": 1018, "time": 8, "name": "schedule_preempt_disabled", "parent_id": 1284 }, { "id": 1019, "time": 17, "name": "_raw_spin_unlock_irqrestore", "parent_id": 1033 }, { "id": 1020, "time": 8, "name": "native_write_msr_safe", "parent_id": 1022 }, { "id": 1021, "time": 9, "name": "native_read_tsc", "parent_id": 1022 }, { "id": 1022, "time": 21, "name": "lapic_next_deadline", "parent_id": 1026 }, { "id": 1023, "time": 9, "name": "native_read_tsc", "parent_id": 1024 }, { "id": 1024, "time": 9, "name": "read_tsc", "parent_id": 1025 }, { "id": 1025, "time": 37, "name": "ktime_get", "parent_id": 1026 }, { "id": 1026, "time": 39, "name": "clockevents_program_event", "parent_id": 1027 }, { "id": 1027, "time": 12, "name": "tick_program_event", "parent_id": 1033 }, { "id": 1028, "time": 10, "name": "rb_insert_color", "parent_id": 1029 }, { "id": 1029, "time": 59, "name": "timerqueue_add", "parent_id": 1030 }, { "id": 1030, "time": 26, "name": "enqueue_hrtimer", "parent_id": 1033 }, { "id": 1031, "time": 18, "name": "_raw_spin_lock_irqsave", "parent_id": 1032 }, { "id": 1032, "time": 22, "name": "lock_hrtimer_base.isra.19", "parent_id": 1033 }, { "id": 1033, "time": 115, "name": "__hrtimer_start_range_ns", "parent_id": 1034 }, { "id": 1034, "time": 7, "name": "hrtimer_start_range_ns", "parent_id": 1054 }, { "id": 1035, "time": 10, "name": "hrtimer_forward", "parent_id": 1054 }, { "id": 1036, "time": 17, "name": "_raw_spin_unlock_irqrestore", "parent_id": 1052 }, { "id": 1037, "time": 8, "name": "native_write_msr_safe", "parent_id": 1039 }, { "id": 1038, "time": 9, "name": "native_read_tsc", "parent_id": 1039 }, { "id": 1039, "time": 21, "name": "lapic_next_deadline", "parent_id": 1043 }, { "id": 1040, "time": 9, "name": "native_read_tsc", "parent_id": 1041 }, { "id": 1041, "time": 9, "name": "read_tsc", "parent_id": 1042 }, { "id": 1042, "time": 37, "name": "ktime_get", "parent_id": 1043 }, { "id": 1043, "time": 39, "name": "clockevents_program_event", "parent_id": 1044 }, { "id": 1044, "time": 12, "name": "tick_program_event", "parent_id": 1045 }, { "id": 1045, "time": 54, "name": "hrtimer_force_reprogram", "parent_id": 1049 }, { "id": 1046, "time": 20, "name": "rb_erase", "parent_id": 1048 }, { "id": 1047, "time": 16, "name": "rb_next", "parent_id": 1048 }, { "id": 1048, "time": 22, "name": "timerqueue_del", "parent_id": 1049 }, { "id": 1049, "time": 43, "name": "__remove_hrtimer", "parent_id": 1052 }, { "id": 1050, "time": 18, "name": "_raw_spin_lock_irqsave", "parent_id": 1051 }, { "id": 1051, "time": 22, "name": "lock_hrtimer_base.isra.19", "parent_id": 1052 }, { "id": 1052, "time": 42, "name": "hrtimer_try_to_cancel", "parent_id": 1053 }, { "id": 1053, "time": 13, "name": "hrtimer_cancel", "parent_id": 1054 }, { "id": 1054, "time": 30, "name": "tick_nohz_restart", "parent_id": 1068 }, { "id": 1055, "time": 6, "name": "touch_softlockup_watchdog", "parent_id": 1068 }, { "id": 1056, "time": 10, "name": "calc_load_exit_idle", "parent_id": 1068 }, { "id": 1057, "time": 14, "name": "update_cpu_load_nohz", "parent_id": 1068 }, { "id": 1058, "time": 12, "name": "tick_do_update_jiffies64", "parent_id": 1068 }, { "id": 1059, "time": 6, "name": "touch_softlockup_watchdog", "parent_id": 1061 }, { "id": 1060, "time": 4, "name": "sched_clock_tick", "parent_id": 1061 }, { "id": 1061, "time": 9, "name": "sched_clock_idle_wakeup_event", "parent_id": 1064 }, { "id": 1062, "time": 9, "name": "nr_iowait_cpu", "parent_id": 1063 }, { "id": 1063, "time": 29, "name": "update_ts_time_stats", "parent_id": 1064 }, { "id": 1064, "time": 17, "name": "tick_nohz_stop_idle", "parent_id": 1068 }, { "id": 1065, "time": 9, "name": "native_read_tsc", "parent_id": 1066 }, { "id": 1066, "time": 9, "name": "read_tsc", "parent_id": 1067 }, { "id": 1067, "time": 37, "name": "ktime_get", "parent_id": 1068 }, { "id": 1068, "time": 52, "name": "tick_nohz_idle_exit", "parent_id": 1284 }, { "id": 1069, "time": 6, "name": "notifier_call_chain", "parent_id": 1070 }, { "id": 1070, "time": 9, "name": "atomic_notifier_call_chain", "parent_id": 1071 }, { "id": 1071, "time": 13, "name": "arch_cpu_idle_exit", "parent_id": 1284 }, { "id": 1072, "time": 9, "name": "rcu_sysidle_force_exit", "parent_id": 1073 }, { "id": 1073, "time": 24, "name": "rcu_sysidle_exit", "parent_id": 1076 }, { "id": 1074, "time": 30, "name": "rcu_eqs_exit_common.isra.48", "parent_id": 1075 }, { "id": 1075, "time": 25, "name": "rcu_eqs_exit", "parent_id": 1076 }, { "id": 1076, "time": 23, "name": "rcu_idle_exit", "parent_id": 1284 }, { "id": 1077, "time": 30, "name": "scheduler_ipi", "parent_id": 1079 }, { "id": 1078, "time": 6, "name": "native_apic_mem_write", "parent_id": 1079 }, { "id": 1079, "time": 11, "name": "smp_reschedule_interrupt", "parent_id": 1080 }, { "id": 1080, "time": 45, "name": "reschedule_interrupt", "parent_id": 1091 }, { "id": 1081, "time": 11, "name": "menu_reflect", "parent_id": 1091 }, { "id": 1082, "time": 730, "name": "int_sqrt", "parent_id": 1089 }, { "id": 1083, "time": 9, "name": "nr_iowait_cpu", "parent_id": 1089 }, { "id": 1084, "time": 8, "name": "this_cpu_load", "parent_id": 1089 }, { "id": 1085, "time": 9, "name": "nr_iowait_cpu", "parent_id": 1089 }, { "id": 1086, "time": 25, "name": "ns_to_timespec", "parent_id": 1089 }, { "id": 1087, "time": 8, "name": "tick_nohz_get_sleep_length", "parent_id": 1089 }, { "id": 1088, "time": 9, "name": "pm_qos_request", "parent_id": 1089 }, { "id": 1089, "time": 770, "name": "menu_select", "parent_id": 1091 }, { "id": 1090, "time": 11, "name": "cpuidle_get_cpu_driver", "parent_id": 1091 }, { "id": 1091, "time": 53, "name": "cpuidle_idle_call", "parent_id": 1092 }, { "id": 1092, "time": 10, "name": "arch_cpu_idle", "parent_id": 1284 }, { "id": 1093, "time": 24, "name": "rcu_sysidle_enter", "parent_id": 1096 }, { "id": 1094, "time": 44, "name": "rcu_eqs_enter_common.isra.47", "parent_id": 1095 }, { "id": 1095, "time": 24, "name": "rcu_eqs_enter", "parent_id": 1096 }, { "id": 1096, "time": 23, "name": "rcu_idle_enter", "parent_id": 1284 }, { "id": 1097, "time": 9, "name": "tick_check_broadcast_expired", "parent_id": 1284 }, { "id": 1098, "time": 6, "name": "notifier_call_chain", "parent_id": 1099 }, { "id": 1099, "time": 9, "name": "atomic_notifier_call_chain", "parent_id": 1101 }, { "id": 1100, "time": 6, "name": "local_touch_nmi", "parent_id": 1101 }, { "id": 1101, "time": 11, "name": "arch_cpu_idle_enter", "parent_id": 1284 }, { "id": 1102, "time": 17, "name": "_raw_spin_unlock_irqrestore", "parent_id": 1129 }, { "id": 1103, "time": 8, "name": "native_write_msr_safe", "parent_id": 1105 }, { "id": 1104, "time": 9, "name": "native_read_tsc", "parent_id": 1105 }, { "id": 1105, "time": 21, "name": "lapic_next_deadline", "parent_id": 1109 }, { "id": 1106, "time": 9, "name": "native_read_tsc", "parent_id": 1107 }, { "id": 1107, "time": 9, "name": "read_tsc", "parent_id": 1108 }, { "id": 1108, "time": 37, "name": "ktime_get", "parent_id": 1109 }, { "id": 1109, "time": 39, "name": "clockevents_program_event", "parent_id": 1110 }, { "id": 1110, "time": 12, "name": "tick_program_event", "parent_id": 1129 }, { "id": 1111, "time": 10, "name": "rb_insert_color", "parent_id": 1112 }, { "id": 1112, "time": 59, "name": "timerqueue_add", "parent_id": 1113 }, { "id": 1113, "time": 26, "name": "enqueue_hrtimer", "parent_id": 1129 }, { "id": 1114, "time": 8, "name": "native_write_msr_safe", "parent_id": 1116 }, { "id": 1115, "time": 9, "name": "native_read_tsc", "parent_id": 1116 }, { "id": 1116, "time": 21, "name": "lapic_next_deadline", "parent_id": 1120 }, { "id": 1117, "time": 9, "name": "native_read_tsc", "parent_id": 1118 }, { "id": 1118, "time": 9, "name": "read_tsc", "parent_id": 1119 }, { "id": 1119, "time": 37, "name": "ktime_get", "parent_id": 1120 }, { "id": 1120, "time": 39, "name": "clockevents_program_event", "parent_id": 1121 }, { "id": 1121, "time": 12, "name": "tick_program_event", "parent_id": 1122 }, { "id": 1122, "time": 54, "name": "hrtimer_force_reprogram", "parent_id": 1126 }, { "id": 1123, "time": 20, "name": "rb_erase", "parent_id": 1125 }, { "id": 1124, "time": 16, "name": "rb_next", "parent_id": 1125 }, { "id": 1125, "time": 22, "name": "timerqueue_del", "parent_id": 1126 }, { "id": 1126, "time": 43, "name": "__remove_hrtimer", "parent_id": 1129 }, { "id": 1127, "time": 18, "name": "_raw_spin_lock_irqsave", "parent_id": 1128 }, { "id": 1128, "time": 22, "name": "lock_hrtimer_base.isra.19", "parent_id": 1129 }, { "id": 1129, "time": 129, "name": "__hrtimer_start_range_ns", "parent_id": 1130 }, { "id": 1130, "time": 9, "name": "hrtimer_start", "parent_id": 1143 }, { "id": 1131, "time": 12, "name": "calc_load_enter_idle", "parent_id": 1143 }, { "id": 1132, "time": 18, "name": "nohz_balance_enter_idle", "parent_id": 1143 }, { "id": 1133, "time": 17, "name": "_raw_spin_unlock_irqrestore", "parent_id": 1135 }, { "id": 1134, "time": 18, "name": "_raw_spin_lock_irqsave", "parent_id": 1135 }, { "id": 1135, "time": 31, "name": "hrtimer_get_next_event", "parent_id": 1138 }, { "id": 1136, "time": 7, "name": "_raw_spin_unlock", "parent_id": 1138 }, { "id": 1137, "time": 11, "name": "_raw_spin_lock", "parent_id": 1138 }, { "id": 1138, "time": 48, "name": "get_next_timer_interrupt", "parent_id": 1143 }, { "id": 1139, "time": 7, "name": "irq_work_needs_cpu", "parent_id": 1143 }, { "id": 1140, "time": 33, "name": "rcu_cpu_has_callbacks", "parent_id": 1141 }, { "id": 1141, "time": 20, "name": "rcu_needs_cpu", "parent_id": 1143 }, { "id": 1142, "time": 12, "name": "timekeeping_max_deferment", "parent_id": 1143 }, { "id": 1143, "time": 110, "name": "tick_nohz_stop_sched_tick", "parent_id": 1152 }, { "id": 1144, "time": 9, "name": "native_read_tsc", "parent_id": 1145 }, { "id": 1145, "time": 22, "name": "native_sched_clock", "parent_id": 1146 }, { "id": 1146, "time": 6, "name": "sched_clock", "parent_id": 1147 }, { "id": 1147, "time": 20, "name": "sched_clock_cpu", "parent_id": 1148 }, { "id": 1148, "time": 6, "name": "sched_clock_idle_sleep_event", "parent_id": 1152 }, { "id": 1149, "time": 9, "name": "native_read_tsc", "parent_id": 1150 }, { "id": 1150, "time": 9, "name": "read_tsc", "parent_id": 1151 }, { "id": 1151, "time": 37, "name": "ktime_get", "parent_id": 1152 }, { "id": 1152, "time": 56, "name": "__tick_nohz_idle_enter", "parent_id": 1154 }, { "id": 1153, "time": 12, "name": "set_cpu_sd_state_idle", "parent_id": 1154 }, { "id": 1154, "time": 19, "name": "tick_nohz_idle_enter", "parent_id": 1284 }, { "id": 1155, "time": 17, "name": "_raw_spin_unlock_irqrestore", "parent_id": 1284 }, { "id": 1156, "time": 40, "name": "idle_enter_fair", "parent_id": 1157 }, { "id": 1157, "time": 6, "name": "post_schedule_idle", "parent_id": 1284 }, { "id": 1158, "time": 18, "name": "_raw_spin_lock_irqsave", "parent_id": 1284 }, { "id": 1159, "time": 7, "name": "_raw_spin_unlock", "parent_id": 1167 }, { "id": 1160, "time": 9, "name": "native_read_tsc", "parent_id": 1161 }, { "id": 1161, "time": 22, "name": "native_sched_clock", "parent_id": 1162 }, { "id": 1162, "time": 6, "name": "sched_clock", "parent_id": 1163 }, { "id": 1163, "time": 20, "name": "sched_clock_cpu", "parent_id": 1167 }, { "id": 1164, "time": 11, "name": "_raw_spin_lock", "parent_id": 1167 }, { "id": 1165, "time": 7, "name": "_raw_spin_unlock", "parent_id": 1167 }, { "id": 1166, "time": 11, "name": "_raw_spin_lock", "parent_id": 1167 }, { "id": 1167, "time": 30, "name": "arch_vtime_task_switch", "parent_id": 1183 }, { "id": 1168, "time": 7, "name": "_raw_spin_unlock", "parent_id": 1182 }, { "id": 1169, "time": 20, "name": "jiffies_to_timeval", "parent_id": 1170 }, { "id": 1170, "time": 39, "name": "__acct_update_integrals", "parent_id": 1171 }, { "id": 1171, "time": 8, "name": "acct_account_cputime", "parent_id": 1173 }, { "id": 1172, "time": 11, "name": "cpuacct_account_field", "parent_id": 1173 }, { "id": 1173, "time": 44, "name": "account_system_time", "parent_id": 1180 }, { "id": 1174, "time": 9, "name": "native_read_tsc", "parent_id": 1175 }, { "id": 1175, "time": 22, "name": "native_sched_clock", "parent_id": 1176 }, { "id": 1176, "time": 6, "name": "sched_clock", "parent_id": 1177 }, { "id": 1177, "time": 20, "name": "sched_clock_cpu", "parent_id": 1178 }, { "id": 1178, "time": 20, "name": "local_clock", "parent_id": 1179 }, { "id": 1179, "time": 23, "name": "get_vtime_delta", "parent_id": 1180 }, { "id": 1180, "time": 15, "name": "__vtime_account_system", "parent_id": 1182 }, { "id": 1181, "time": 11, "name": "_raw_spin_lock", "parent_id": 1182 }, { "id": 1182, "time": 19, "name": "vtime_account_system", "parent_id": 1183 }, { "id": 1183, "time": 14, "name": "vtime_common_task_switch", "parent_id": 1184 }, { "id": 1184, "time": 47, "name": "finish_task_switch", "parent_id": 1284 }, { "id": 1185, "time": 13, "name": "native_load_tls", "parent_id": 1187 }, { "id": 1186, "time": 6, "name": "native_load_sp0", "parent_id": 1187 }, { "id": 1187, "time": 132, "name": "__switch_to", "parent_id": 1284 }, { "id": 1188, "time": 9, "name": "__context_tracking_task_switch", "parent_id": 1284 }, { "id": 1189, "time": 14, "name": "perf_event_task_sched_out", "parent_id": 1284 }, { "id": 1190, "time": 8, "name": "ring_buffer_record_is_on", "parent_id": 1191 }, { "id": 1191, "time": 8, "name": "tracing_is_on", "parent_id": 1192 }, { "id": 1192, "time": 17, "name": "tracing_record_cmdline", "parent_id": 1196 }, { "id": 1193, "time": 8, "name": "ring_buffer_record_is_on", "parent_id": 1194 }, { "id": 1194, "time": 8, "name": "tracing_is_on", "parent_id": 1195 }, { "id": 1195, "time": 50, "name": "tracing_record_cmdline", "parent_id": 1196 }, { "id": 1196, "time": 22, "name": "probe_sched_switch", "parent_id": 1284 }, { "id": 1197, "time": 3, "name": "ftrace_trace_userstack", "parent_id": 1200 }, { "id": 1198, "time": 25, "name": "rb_update_write_stamp", "parent_id": 1199 }, { "id": 1199, "time": 72, "name": "ring_buffer_unlock_commit", "parent_id": 1200 }, { "id": 1200, "time": 21, "name": "trace_buffer_unlock_commit", "parent_id": 1215 }, { "id": 1201, "time": 4, "name": "filter_check_discard", "parent_id": 1215 }, { "id": 1202, "time": 18, "name": "rb_event_data", "parent_id": 1203 }, { "id": 1203, "time": 5, "name": "ring_buffer_event_data", "parent_id": 1215 }, { "id": 1204, "time": 38, "name": "tracing_generic_entry_update", "parent_id": 1213 }, { "id": 1205, "time": 18, "name": "rb_event_data", "parent_id": 1206 }, { "id": 1206, "time": 5, "name": "ring_buffer_event_data", "parent_id": 1213 }, { "id": 1207, "time": 9, "name": "native_read_tsc", "parent_id": 1208 }, { "id": 1208, "time": 22, "name": "native_sched_clock", "parent_id": 1209 }, { "id": 1209, "time": 6, "name": "sched_clock", "parent_id": 1210 }, { "id": 1210, "time": 5, "name": "trace_clock_local", "parent_id": 1211 }, { "id": 1211, "time": 102, "name": "rb_reserve_next_event", "parent_id": 1212 }, { "id": 1212, "time": 37, "name": "ring_buffer_lock_reserve", "parent_id": 1213 }, { "id": 1213, "time": 31, "name": "trace_buffer_lock_reserve", "parent_id": 1214 }, { "id": 1214, "time": 14, "name": "trace_event_buffer_lock_reserve", "parent_id": 1215 }, { "id": 1215, "time": 64, "name": "ftrace_raw_event_switch_out", "parent_id": 1217 }, { "id": 1216, "time": 44, "name": "poor_mans_ptwrite_prev_pid", "parent_id": 1217 }, { "id": 1217, "time": 63, "name": "probe_sched_switch", "parent_id": 1284 }, { "id": 1218, "time": 8, "name": "pick_next_task_idle", "parent_id": 1284 }, { "id": 1219, "time": 23, "name": "pick_next_task_fair", "parent_id": 1284 }, { "id": 1220, "time": 23, "name": "pick_next_task_rt", "parent_id": 1284 }, { "id": 1221, "time": 12, "name": "pick_next_task_stop", "parent_id": 1284 }, { "id": 1222, "time": 23, "name": "pick_next_task_fair", "parent_id": 1284 }, { "id": 1223, "time": 63, "name": "put_prev_task_fair", "parent_id": 1284 }, { "id": 1224, "time": 11, "name": "_raw_spin_lock", "parent_id": 1258 }, { "id": 1225, "time": 106, "name": "find_next_bit", "parent_id": 1226 }, { "id": 1226, "time": 70, "name": "cpumask_next_and", "parent_id": 1242 }, { "id": 1227, "time": 22, "name": "msecs_to_jiffies", "parent_id": 1258 }, { "id": 1228, "time": 18, "name": "native_read_tsc", "parent_id": 1229 }, { "id": 1229, "time": 44, "name": "native_sched_clock", "parent_id": 1230 }, { "id": 1230, "time": 12, "name": "sched_clock", "parent_id": 1231 }, { "id": 1231, "time": 40, "name": "sched_clock_cpu", "parent_id": 1258 }, { "id": 1232, "time": 33, "name": "source_load", "parent_id": 1241 }, { "id": 1233, "time": 86, "name": "idle_cpu", "parent_id": 1241 }, { "id": 1234, "time": 33, "name": "target_load", "parent_id": 1241 }, { "id": 1235, "time": 374, "name": "find_next_bit", "parent_id": 1236 }, { "id": 1236, "time": 230, "name": "cpumask_next_and", "parent_id": 1241 }, { "id": 1237, "time": 6, "name": "sched_cfs_period_timer", "parent_id": 1240 }, { "id": 1238, "time": 9, "name": "sched_cfs_period_timer", "parent_id": 1240 }, { "id": 1239, "time": 11, "name": "msecs_to_jiffies", "parent_id": 1240 }, { "id": 1240, "time": 89, "name": "update_group_power", "parent_id": 1241 }, { "id": 1241, "time": 754, "name": "find_busiest_group", "parent_id": 1242 }, { "id": 1242, "time": 276, "name": "load_balance", "parent_id": 1258 }, { "id": 1243, "time": 18, "name": "native_read_tsc", "parent_id": 1244 }, { "id": 1244, "time": 44, "name": "native_sched_clock", "parent_id": 1245 }, { "id": 1245, "time": 12, "name": "sched_clock", "parent_id": 1246 }, { "id": 1246, "time": 40, "name": "sched_clock_cpu", "parent_id": 1258 }, { "id": 1247, "time": 17, "name": "_raw_spin_unlock_irqrestore", "parent_id": 1256 }, { "id": 1248, "time": 109, "name": "update_cfs_rq_blocked_load", "parent_id": 1256 }, { "id": 1249, "time": 9, "name": "native_read_tsc", "parent_id": 1250 }, { "id": 1250, "time": 22, "name": "native_sched_clock", "parent_id": 1251 }, { "id": 1251, "time": 6, "name": "sched_clock", "parent_id": 1252 }, { "id": 1252, "time": 20, "name": "sched_clock_cpu", "parent_id": 1253 }, { "id": 1253, "time": 14, "name": "update_rq_clock.part.63", "parent_id": 1254 }, { "id": 1254, "time": 9, "name": "update_rq_clock", "parent_id": 1256 }, { "id": 1255, "time": 18, "name": "_raw_spin_lock_irqsave", "parent_id": 1256 }, { "id": 1256, "time": 287, "name": "update_blocked_averages", "parent_id": 1258 }, { "id": 1257, "time": 7, "name": "_raw_spin_unlock", "parent_id": 1258 }, { "id": 1258, "time": 129, "name": "idle_balance", "parent_id": 1284 }, { "id": 1259, "time": 4, "name": "hrtick_update", "parent_id": 1274 }, { "id": 1260, "time": 17, "name": "account_entity_enqueue", "parent_id": 1265 }, { "id": 1261, "time": 17, "name": "account_entity_dequeue", "parent_id": 1265 }, { "id": 1262, "time": 18, "name": "update_min_vruntime", "parent_id": 1264 }, { "id": 1263, "time": 46, "name": "__calc_delta", "parent_id": 1264 }, { "id": 1264, "time": 49, "name": "update_curr", "parent_id": 1265 }, { "id": 1265, "time": 72, "name": "update_cfs_shares", "parent_id": 1273 }, { "id": 1266, "time": 38, "name": "update_min_vruntime", "parent_id": 1273 }, { "id": 1267, "time": 51, "name": "account_entity_dequeue", "parent_id": 1273 }, { "id": 1268, "time": 24, "name": "clear_buddies", "parent_id": 1273 }, { "id": 1269, "time": 34, "name": "update_cfs_rq_blocked_load", "parent_id": 1273 }, { "id": 1270, "time": 16, "name": "cpuacct_charge", "parent_id": 1272 }, { "id": 1271, "time": 18, "name": "update_min_vruntime", "parent_id": 1272 }, { "id": 1272, "time": 83, "name": "update_curr", "parent_id": 1273 }, { "id": 1273, "time": 191, "name": "dequeue_entity", "parent_id": 1274 }, { "id": 1274, "time": 94, "name": "dequeue_task_fair", "parent_id": 1280 }, { "id": 1275, "time": 9, "name": "native_read_tsc", "parent_id": 1276 }, { "id": 1276, "time": 22, "name": "native_sched_clock", "parent_id": 1277 }, { "id": 1277, "time": 6, "name": "sched_clock", "parent_id": 1278 }, { "id": 1278, "time": 20, "name": "sched_clock_cpu", "parent_id": 1279 }, { "id": 1279, "time": 14, "name": "update_rq_clock.part.63", "parent_id": 1280 }, { "id": 1280, "time": 33, "name": "dequeue_task", "parent_id": 1281 }, { "id": 1281, "time": 12, "name": "deactivate_task", "parent_id": 1284 }, { "id": 1282, "time": 13, "name": "_raw_spin_lock_irq", "parent_id": 1284 }, { "id": 1283, "time": 19, "name": "rcu_note_context_switch", "parent_id": 1284 }, { "id": 1284, "time": 309, "name": "__schedule", "parent_id": 1285 }, { "id": 1285, "time": 15, "name": "schedule" }];
var function_color = d3.scale.category20();
Create Plot
for aggregated hierarchical Icicle layer to visualize a call tree.
var icicle_layer: c3.Plot.Layer.Swimlane.Icicle<CallTreeRecord>;
var icicle_calltree = new c3.Plot.Zoomable
var icicle_calltree = new c3.Plot<void>({
anchor: '#icicle_example',
zoomable: ‘h’,
Create a single Icicle layer.
layers: [
icicle_layer = new c3.Plot.Layer.Swimlane.Icicle<CallTreeRecord>({
data: calltree_leaves,
A key accessor is required for Sunburst layers
key: (d) => d.id,
This example data provides the time of each node as that node’s self time instead of
its total time. You can define either value
or self_value
. If you define
self_value
then the layer will create a value
accessor function for you that you
can use to get the total value of a node after it has been drawn.
self_value: (d) => d.time,
The hierarchy can be described by the user either providing the children, children_keys_ or the _parent_key for each node. This example defaults to specifying the _parent_key_.
parent_key: (d) => d.parent_id,
You can sort by providing an accessor function or by simply specifying true
it
will sort by the “total value“ of the node (as oppose to the “self value“).
sort: true,
The height of each swimlane row in pixels
dy: 20,
HTML hover “tooltip” to display the function name.
hover: (d) => d ? d.name : '',
Style each segment with a color based on the function name.
rect_options: {
styles: {
'fill': (d) => function_color(d.name),
'stroke': 'black',
'stroke-opacity': 0.5,
},
Animate the segments if their value changes or the user navigates to a new root node.
animate: true,
duration: 2000,
},
Add a text label of the function name in segments that are large enough.
label_options: {
text: (d) => d.name,
styles: {
'font-size': 'small',
'font-weight': 'bold',
},
},
}),
],
}).render();
Create a Polar
chart for a hierarchical sunburst visualization of the call tree.
var sunburst_layer: c3.Polar.Layer.Sunburst<CallTreeRecord>;
var sunburst_calltree = new c3.Polar<void>({
anchor: '#sunburst_example',
Setup the radial scale to go from -1 (the parent node) to 8 levels deeper then the current root node
r: d3.scale.linear().domain([-1, 8]),
Allow user to zoom the sunburst with the mouse wheel or finger pinching.
zoomable: true,
zoom_extent: [0.5, 2],
Create a single Sunburst layer
layers: [
sunburst_layer = new c3.Polar.Layer.Sunburst<CallTreeRecord>({
data: calltree_leaves,
A key accessor is required for Sunburst layers
key: (d) => d.id,
This example data provides the time of each node as that node’s self time instead of
its total time. You can define either value
or self_value
. If you define
self_value
then the layer will create a value
accessor function for you that you
can use to get the total value of a node after it has been drawn.
self_value: (d) => d.time,
The hierarchy can be described by the user either providing the children, children_keys_, or the _parent_key for each node. This example defaults to specifying the _parent_key_, but it can be toggled to test both.
parent_key: (d) => d.parent_id,
You can sort by providing an accessor function or by simply specifying true
it
will sort by the “total value“ of the node (as oppose to the “self value“).
sort: true,
Style the rects with color and tooltips.
arc_options: {
title: (d) => d.name,
styles: {
'fill': (d) => function_color(d.name),
'stroke': 'black',
'stroke-opacity': 0.5,
},
Animate the segments if their value changes or the user navigates to a new root node.
animate: true,
duration: 2000,
},
}),
],
}).render();
Resize charts if the window is resized.
window.onresize = function () {
icicle_calltree.resize();
sunburst_calltree.resize();
}
for (let event_name of ['input', 'change']) { // 'input' event is not supported in IE
Decimate the number of elements drawn in the Call Tree
$('#limit_icicle_elements').on(event_name, function () {
icicle_layer.rect_options.animate = false;
icicle_layer.limit_elements = +$(this).val();
icicle_calltree.redraw();
icicle_layer.rect_options.animate = true;
});
$('#limit_icicle_min_percent').on(event_name, function () {
icicle_layer.rect_options.animate = false;
icicle_layer.limit_min_percent = +$(this).val();
icicle_calltree.redraw();
icicle_layer.rect_options.animate = true;
});
$('#limit_sunburst_elements').on(event_name, function () {
sunburst_layer.arc_options.animate = false;
sunburst_layer.limit_elements = +$(this).val();
sunburst_calltree.redraw();
sunburst_layer.arc_options.animate = true;
});
$('#limit_sunburst_min_percent').on(event_name, function () {
sunburst_layer.arc_options.animate = false;
sunburst_layer.limit_min_percent = +$(this).val();
sunburst_calltree.redraw();
sunburst_layer.arc_options.animate = true;
});
}
Test organizing the sample data by either providing the children or the parent of each node.
$('input[name=hierarchy]').on('change', function () {
if ($('input[name=hierarchy]:checked').val() === 'parents') {
sunburst_layer.data = calltree_leaves;
sunburst_layer.parent_key = (d) => d.parent_id;
delete sunburst_layer.children;
sunburst_layer.redraw();
} else {
sunburst_layer.data = [calltree_root];
sunburst_layer.children = (d) => d.children;
delete sunburst_layer.parent_key;
sunburst_layer.redraw();
}
});
document.querySelector('#revalue').addEventListener('click', () => {
let revalue_node = (node) => {
if (Math.random() < 0.1) {
node.time *= Math.random() < 0.5
? Math.random() * 4 + 1
: Math.random() / 2 + 0.5;
}
};
for (const node of calltree_leaves) {
revalue_node(node);
}
let revalue_recurse = (node) => {
revalue_node(node);
for (const child of node.children) {
revalue_recurse(child);
}
}
revalue_recurse(calltree_root);
icicle_calltree.redraw('revalue');
sunburst_calltree.redraw('revalue');
});