Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-tools: add CO-RE profile (#3782)
It is based on Brendan Gregg's BCC profile and much of the code for it is borrowed from offcputime.c and ruqlen.c. This is an example of usage. # ./profile -iK Sampling at 49 Hertz of all threads by kernel stack... Hit Ctrl-C to end. ^C _raw_spin_unlock_irq finish_task_switch __schedule schedule schedule_timeout msleep HDMI21_Tx_EARC_MainThread kthread ret_from_fork - hdmi21_earc_eng (1427) 1 __pi___clean_dcache_area_poc dma_direct_map_page dma_direct_map_sg dma_buf_unified_map dma_buf_map_attachment kbase_mem_umm_map_attachment kbase_mem_import kbase_ioctl __arm64_compat_sys_ioctl el0_svc_common.constprop.0 el0_svc_compat_handler el0_svc_compat - surface-manager (1911) 4 __pi___clean_dcache_area_poc dma_direct_map_page dma_direct_map_sg dma_buf_unified_map dma_buf_map_attachment kbase_mem_umm_map_attachment kbase_mem_import kbase_ioctl __arm64_compat_sys_ioctl el0_svc_common.constprop.0 el0_svc_compat_handler el0_svc_compat - tAiToneService (2141) 12 [Missed Kernel Stack] - WebAppMgr (3624) 1 ... This is the result of using the -f (folded) option. # ./profile -fdK ... tCMState;low_mem_notify_threshold;__alloc_pages_nodemask;__get_free_pages;__pollwait;unix_poll;sock_poll;do_sys_poll;__arm64_sys_poll;el0_svc_common.constprop.0;el0_svc_compat_handler;el0_svc_compat 2 surface-manager;sock_poll;do_sys_poll;__arm64_sys_poll;el0_svc_common.constprop.0;el0_svc_compat_handler;el0_svc_compat 1 qml-runner;sock_poll;do_sys_poll;__arm64_sys_poll;el0_svc_common.constprop.0;el0_svc_compat_handler;el0_svc_compat 96 mali-cmar-backe;_raw_spin_unlock_irqrestore;kbase_pm_update_cores_state;kbase_pm_do_poweron;kbase_pm_update_active;kbase_hwaccess_pm_gpu_active;kbase_pm_context_active_handle_suspend;kbase_js_sched;kbase_jd_submit;kbase_ioctl;__arm64_compat_sys_ioctl;el0_svc_common.constprop.0;el0_svc_compat_handler;el0_svc_compat 2 surface-manager;__fget;__fget_light;__fdget;sockfd_lookup_light;__sys_sendmsg;__arm64_compat_sys_sendmsg;el0_svc_common.constprop.0;el0_svc_compat_handler;el0_svc_compat 1 ... WARNING: 4 stack traces could not be displayed. Consider increasing --stack-storage-size. Signed-off-by: Eunseon Lee [email protected]
- Loading branch information