Perf 可以获取的 PMU 事件

perf list 打印所有可以指定的事件,事件的数量非常非常多,每个子系统都有一组事件,要理解这些事件,需要对内核非常熟悉。

$ perf list
List of pre-defined events (to be used in -e):

  alignment-faults                                   [Software event]
  context-switches OR cs                             [Software event]
  cpu-clock                                          [Software event]
  cpu-migrations OR migrations                       [Software event]
  dummy                                              [Software event]
  emulation-faults                                   [Software event]
  major-faults                                       [Software event]
  minor-faults                                       [Software event]
  page-faults OR faults                              [Software event]
  task-clock                                         [Software event]

  msr/tsc/                                           [Kernel PMU event]

  rNNN                                               [Raw hardware event descriptor]
  cpu/t1=v1[,t2=v2,t3 ...]/modifier                  [Raw hardware event descriptor]
   (see 'man perf-list' on how to encode it)

  mem:<addr>[/len][:access]                          [Hardware breakpoint]

  alarmtimer:alarmtimer_cancel                       [Tracepoint event]
  alarmtimer:alarmtimer_fired                        [Tracepoint event]
  alarmtimer:alarmtimer_start                        [Tracepoint event]
  alarmtimer:alarmtimer_suspend                      [Tracepoint event]
  ...
  block:block_bio_backmerge                          [Tracepoint event]
  block:block_bio_backmerge                          [Tracepoint event]
  block:block_bio_bounce                             [Tracepoint event]
  block:block_bio_complete                           [Tracepoint event]
  block:block_bio_frontmerge                         [Tracepoint event]
  block:block_bio_queue                              [Tracepoint event]
  ...
  bridge:br_fdb_add                                  [Tracepoint event]
  bridge:br_fdb_external_learn_add                   [Tracepoint event]
  bridge:br_fdb_update                               [Tracepoint event]
  bridge:fdb_delete                                  [Tracepoint event]
  ...
  cgroup:cgroup_remount                              [Tracepoint event]
  cgroup:cgroup_rename                               [Tracepoint event]
  cgroup:cgroup_rmdir                                [Tracepoint event]
  cgroup:cgroup_setup_root                           [Tracepoint event]
  cgroup:cgroup_transfer_tasks                       [Tracepoint event]
  ...
  clk:clk_disable                                    [Tracepoint event]
  clk:clk_disable_complete                           [Tracepoint event]
  clk:clk_enable                                     [Tracepoint event]
  clk:clk_enable_complete                            [Tracepoint event]
  clk:clk_prepare                                    [Tracepoint event]
  clk:clk_prepare_complete                           [Tracepoint event]
  ...
  compaction:mm_compaction_begin                     [Tracepoint event]
  compaction:mm_compaction_defer_compaction          [Tracepoint event]
  compaction:mm_compaction_defer_reset               [Tracepoint event]
  compaction:mm_compaction_deferred                  [Tracepoint event]
  compaction:mm_compaction_end                       [Tracepoint event]
  compaction:mm_compaction_finished                  [Tracepoint event]
  compaction:mm_compaction_isolate_freepages         [Tracepoint event]
  ...
  context_tracking:user_enter                        [Tracepoint event]
  context_tracking:user_exit                         [Tracepoint event]
  ...
  cpuhp:cpuhp_enter                                  [Tracepoint event]
  cpuhp:cpuhp_exit                                   [Tracepoint event]
  cpuhp:cpuhp_multi_enter                            [Tracepoint event]
  ...  
  dma_fence:dma_fence_destroy                        [Tracepoint event]
  dma_fence:dma_fence_emit                           [Tracepoint event]
  dma_fence:dma_fence_enable_signal                  [Tracepoint event]
  ...
  exceptions:page_fault_kernel                       [Tracepoint event]
  exceptions:page_fault_user                         [Tracepoint event]
  ...
  fib6:fib6_table_lookup                             [Tracepoint event]
  fib:fib_table_lookup                               [Tracepoint event]
  ...
  filelock:break_lease_block                         [Tracepoint event]
  filelock:break_lease_noblock                       [Tracepoint event]
  filelock:break_lease_unblock                       [Tracepoint event]
  filelock:fcntl_setlk                               [Tracepoint event]
  ...
  filemap:file_check_and_advance_wb_err              [Tracepoint event]
  filemap:filemap_set_wb_err                         [Tracepoint event]
  filemap:mm_filemap_add_to_page_cache               [Tracepoint event]
  filemap:mm_filemap_delete_from_page_cache          [Tracepoint event]
  ...
  fs_dax:dax_insert_mapping                          [Tracepoint event]
  fs_dax:dax_insert_pfn_mkwrite                      [Tracepoint event]
  fs_dax:dax_insert_pfn_mkwrite_no_entry             [Tracepoint event]
  fs_dax:dax_load_hole                               [Tracepoint event]
  ...
  ftrace:function                                    [Tracepoint event]
  ftrace:print                                       [Tracepoint event]
  huge_memory:mm_collapse_huge_page                  [Tracepoint event]
  huge_memory:mm_collapse_huge_page_isolate          [Tracepoint event]
  huge_memory:mm_collapse_huge_page_swapin           [Tracepoint event]
  huge_memory:mm_khugepaged_scan_pmd                 [Tracepoint event]
  hwmon:hwmon_attr_show                              [Tracepoint event]
  hwmon:hwmon_attr_show_string                       [Tracepoint event]
  hwmon:hwmon_attr_store                             [Tracepoint event]
  hyperv:hyperv_mmu_flush_tlb_others                 [Tracepoint event]
  hyperv:hyperv_nested_flush_guest_mapping           [Tracepoint event]
  hyperv:hyperv_send_ipi_mask                        [Tracepoint event]
  i2c:i2c_read                                       [Tracepoint event]
  i2c:i2c_reply                                      [Tracepoint event]
  i2c:i2c_result                                     [Tracepoint event]
  i2c:i2c_write                                      [Tracepoint event]
  initcall:initcall_finish                           [Tracepoint event]
  initcall:initcall_level                            [Tracepoint event]
  initcall:initcall_start                            [Tracepoint event]
  iommu:add_device_to_group                          [Tracepoint event]
  iommu:attach_device_to_domain                      [Tracepoint event]
  iommu:detach_device_from_domain                    [Tracepoint event]
  iommu:io_page_fault                                [Tracepoint event]
  iommu:map                                          [Tracepoint event]
  iommu:remove_device_from_group                     [Tracepoint event]
  iommu:unmap                                        [Tracepoint event]
  irq:irq_handler_entry                              [Tracepoint event]
  irq:irq_handler_exit                               [Tracepoint event]
  irq:softirq_entry                                  [Tracepoint event]
  irq:softirq_exit                                   [Tracepoint event]
  irq:softirq_raise                                  [Tracepoint event]
  irq_matrix:irq_matrix_alloc                        [Tracepoint event]
  irq_matrix:irq_matrix_alloc_managed                [Tracepoint event]
  kmem:kfree                                         [Tracepoint event]
  kmem:kmalloc                                       [Tracepoint event]
  kmem:kmalloc_node                                  [Tracepoint event]
  kmem:kmem_cache_alloc                              [Tracepoint event]
  kmem:kmem_cache_alloc_node                         [Tracepoint event]
  kmem:kmem_cache_free                               [Tracepoint event]
  libata:ata_eh_link_autopsy                         [Tracepoint event]
  libata:ata_eh_link_autopsy_qc                      [Tracepoint event]
  libata:ata_qc_complete_done                        [Tracepoint event]
  mce:mce_record                                     [Tracepoint event]
  mdio:mdio_access                                   [Tracepoint event]
  migrate:mm_migrate_pages                           [Tracepoint event]
  module:module_free                                 [Tracepoint event]
  module:module_get                                  [Tracepoint event]
  module:module_load                                 [Tracepoint event]
  module:module_put                                  [Tracepoint event]
  module:module_request                              [Tracepoint event]
  msr:rdpmc                                          [Tracepoint event]
  msr:read_msr                                       [Tracepoint event]
  msr:write_msr                                      [Tracepoint event]
  napi:napi_poll                                     [Tracepoint event]
  net:napi_gro_frags_entry                           [Tracepoint event]
  net:napi_gro_receive_entry                         [Tracepoint event]
  net:net_dev_queue                                  [Tracepoint event]
  net:net_dev_start_xmit                             [Tracepoint event]
  nvme:nvme_async_event                              [Tracepoint event]
  nvme:nvme_complete_rq                              [Tracepoint event]
  nvme:nvme_setup_cmd                                [Tracepoint event]
  oom:compact_retry                                  [Tracepoint event]
  oom:finish_task_reaping                            [Tracepoint event]
  oom:mark_victim                                    [Tracepoint event]
  oom:oom_score_adj_update                           [Tracepoint event]
  oom:reclaim_retry_zone                             [Tracepoint event]
  oom:skip_task_reaping                              [Tracepoint event]
  oom:start_task_reaping                             [Tracepoint event]
  oom:wake_reaper                                    [Tracepoint event]
  page_isolation:test_pages_isolated                 [Tracepoint event]
  pagemap:mm_lru_activate                            [Tracepoint event]
  pagemap:mm_lru_insertion                           [Tracepoint event]
  percpu:percpu_alloc_percpu                         [Tracepoint event]
  percpu:percpu_alloc_percpu_fail                    [Tracepoint event]
  percpu:percpu_create_chunk                         [Tracepoint event]
  percpu:percpu_destroy_chunk                        [Tracepoint event]
  percpu:percpu_free_percpu                          [Tracepoint event]
  power:clock_disable                                [Tracepoint event]
  power:clock_enable                                 [Tracepoint event]
  power:clock_set_rate                               [Tracepoint event]
  printk:console                                     [Tracepoint event]
  qdisc:qdisc_dequeue                                [Tracepoint event]
  random:add_device_randomness                       [Tracepoint event]
  random:add_disk_randomness                         [Tracepoint event]
  random:add_input_randomness                        [Tracepoint event]
  random:credit_entropy_bits                         [Tracepoint event]
  random:debit_entropy                               [Tracepoint event]
  random:extract_entropy                             [Tracepoint event]
  ras:aer_event                                      [Tracepoint event]
  ras:arm_event                                      [Tracepoint event]
  ras:mc_event                                       [Tracepoint event]
  ras:memory_failure_event                           [Tracepoint event]
  ras:non_standard_event                             [Tracepoint event]
  raw_syscalls:sys_enter                             [Tracepoint event]
  raw_syscalls:sys_exit                              [Tracepoint event]
  rcu:rcu_utilization                                [Tracepoint event]
  regmap:regcache_drop_region                        [Tracepoint event]
  regmap:regcache_sync                               [Tracepoint event]
  regmap:regmap_async_complete_done                  [Tracepoint event]
  regmap:regmap_async_complete_start                 [Tracepoint event]
  regmap:regmap_async_io_complete                    [Tracepoint event]
  regmap:regmap_async_write_start                    [Tracepoint event]
  rseq:rseq_ip_fixup                                 [Tracepoint event]
  rseq:rseq_update                                   [Tracepoint event]
  rtc:rtc_alarm_irq_enable                           [Tracepoint event]
  rtc:rtc_irq_set_freq                               [Tracepoint event]
  rtc:rtc_irq_set_state                              [Tracepoint event]
  rtc:rtc_read_alarm                                 [Tracepoint event]
  rtc:rtc_read_offset                                [Tracepoint event]
  rtc:rtc_read_time                                  [Tracepoint event]
  rtc:rtc_set_alarm                                  [Tracepoint event]
  rtc:rtc_set_offset                                 [Tracepoint event]
  rtc:rtc_set_time                                   [Tracepoint event]
  rtc:rtc_timer_dequeue                              [Tracepoint event]
  rtc:rtc_timer_enqueue                              [Tracepoint event]
  rtc:rtc_timer_fired                                [Tracepoint event]
  sched:sched_kthread_stop                           [Tracepoint event]
  sched:sched_kthread_stop_ret                       [Tracepoint event]
  sched:sched_migrate_task                           [Tracepoint event]
  sched:sched_move_numa                              [Tracepoint event]
  smbus:smbus_write                                  [Tracepoint event]
  sock:inet_sock_set_state                           [Tracepoint event]
  sock:sock_exceed_buf_limit                         [Tracepoint event]
  sock:sock_rcvqueue_full                            [Tracepoint event]
  spi:spi_controller_busy                            [Tracepoint event]
  spi:spi_controller_idle                            [Tracepoint event]
  spi:spi_message_done                               [Tracepoint event]
  spi:spi_message_start                              [Tracepoint event]
  spi:spi_message_submit                             [Tracepoint event]
  spi:spi_transfer_start                             [Tracepoint event]
  spi:spi_transfer_stop                              [Tracepoint event]
  swiotlb:swiotlb_bounced                            [Tracepoint event]
  syscalls:sys_enter_accept                          [Tracepoint event]
  syscalls:sys_enter_accept4                         [Tracepoint event]
  syscalls:sys_enter_access                          [Tracepoint event]
  syscalls:sys_enter_acct                            [Tracepoint event]
  task:task_newtask                                  [Tracepoint event]
  task:task_rename                                   [Tracepoint event]
  tcp:tcp_destroy_sock                               [Tracepoint event]
  tcp:tcp_probe                                      [Tracepoint event]
  tcp:tcp_rcv_space_adjust                           [Tracepoint event]
  tcp:tcp_receive_reset                              [Tracepoint event]
  tcp:tcp_retransmit_skb                             [Tracepoint event]
  tcp:tcp_retransmit_synack                          [Tracepoint event]
  tcp:tcp_send_reset                                 [Tracepoint event]
  thermal:cdev_update                                [Tracepoint event]
  thermal:thermal_temperature                        [Tracepoint event]
  thermal:thermal_zone_trip                          [Tracepoint event]
  thermal_power_allocator:thermal_power_allocator    [Tracepoint event]
  thermal_power_allocator:thermal_power_allocator_pid [Tracepoint event]
  timer:hrtimer_cancel                               [Tracepoint event]
  timer:hrtimer_expire_entry                         [Tracepoint event]
  timer:hrtimer_expire_exit                          [Tracepoint event]
  vmscan:mm_vmscan_memcg_softlimit_reclaim_begin     [Tracepoint event]
  vmscan:mm_vmscan_memcg_softlimit_reclaim_end       [Tracepoint event]
  vmscan:mm_vmscan_wakeup_kswapd                     [Tracepoint event]
  vmscan:mm_vmscan_writepage                         [Tracepoint event]
  vsyscall:emulate_vsyscall                          [Tracepoint event]
  workqueue:workqueue_activate_work                  [Tracepoint event]
  workqueue:workqueue_execute_end                    [Tracepoint event]
  workqueue:workqueue_execute_start                  [Tracepoint event]
  workqueue:workqueue_queue_work                     [Tracepoint event]
  writeback:balance_dirty_pages                      [Tracepoint event]
  writeback:bdi_dirty_ratelimit                      [Tracepoint event]
  writeback:global_dirty_state                       [Tracepoint event]
  writeback:sb_clear_inode_writeback                 [Tracepoint event]
  x86_fpu:x86_fpu_copy_src                           [Tracepoint event]
  x86_fpu:x86_fpu_dropped                            [Tracepoint event]
  x86_fpu:x86_fpu_init_state                         [Tracepoint event]
  x86_fpu:x86_fpu_regs_activated                     [Tracepoint event]
  x86_fpu:x86_fpu_regs_deactivated                   [Tracepoint event]
  x86_fpu:x86_fpu_xstate_check_failed                [Tracepoint event]
  xdp:xdp_cpumap_enqueue                             [Tracepoint event]
  xdp:xdp_cpumap_kthread                             [Tracepoint event]
  xdp:xdp_devmap_xmit                                [Tracepoint event]
  xdp:xdp_exception                                  [Tracepoint event]
  xdp:xdp_redirect                                   [Tracepoint event]
  xdp:xdp_redirect_err                               [Tracepoint event]
  xen:xen_mmu_set_pte                                [Tracepoint event]
  xen:xen_mmu_set_pte_at                             [Tracepoint event]
  xen:xen_mmu_set_pud                                [Tracepoint event]
  xen:xen_mmu_write_cr3                              [Tracepoint event]
  xfs:xfs_ag_resv_alloc_extent                       [Tracepoint event]
  xfs:xfs_ag_resv_critical                           [Tracepoint event]
  xfs:xfs_ag_resv_free                               [Tracepoint event]
  xfs:xfs_ag_resv_free_error                         [Tracepoint event]
  xfs:xfs_ag_resv_free_extent                        [Tracepoint event]
  xfs:xfs_ag_resv_init                               [Tracepoint event]
  xfs:xfs_ag_resv_init_error                         [Tracepoint event]
  xhci-hcd:xhci_address_ctx                          [Tracepoint event]
  xhci-hcd:xhci_alloc_dev                            [Tracepoint event]
  xhci-hcd:xhci_alloc_virt_device                    [Tracepoint event]
  xhci-hcd:xhci_configure_endpoint                   [Tracepoint event]
  xhci-hcd:xhci_dbc_alloc_request                    [Tracepoint event]
  xhci-hcd:xhci_dbc_free_request                     [Tracepoint event]
  xhci-hcd:xhci_dbc_gadget_ep_queue                  [Tracepoint event]

参考


微信公众号:我的网课 微信公众号:我的资产

results matching ""

    No results matching ""