perf事件文档 [英] perf events documentation

查看:233
本文介绍了perf事件文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了perf stat命令监控的每个事件的含义的详尽解释;

I've searched for an exhaustive explanation of the meaning of each event monitored by the perf stat command;

我发现了一个教程,它很好地解释了如何使用perf工具的不同功能。然而,它并没有解释可以观察到的几个事件的意义(并且有很多!!)。

I've found a tutorial which explains quite well how to use different the features of the perf tool. However, it doesn't explain the meaning of several events that can be observed (and there are a lot!!).

有人知道哪里是一个非常简单和完整的关于perf列表命令列出的事件的文档?

Someone know where is a quite simple and complete documentation about the events listed by the perf list command?

特别是,我有兴趣了解我写的一些应用程序使用的cpu的百分比。
我可以通过cpu-clock还是task-clock直接测量?
这两个事件的含义是什么?

In particular, I'm interested in finding out the percentage of cpu used by some application I wrote. Can i measure it directly through cpu-clock or task-clock? What's the meaning of these two events?

提前感谢

推荐答案

perf工具使用性能计数器,其含义记录在处理器手册中。对于intel处理器,这是英特尔®64和IA-32架构开发人员手册:Vol。 3B,附录A。

The perf tool uses performance counters whose meanings are documented in processor manuals. For intel processors, this is Intel® 64 and IA-32 Architectures Developer's Manual: Vol. 3B, Appendix A.

http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

有些复杂的事情是,perf使用象征性的名字。这些名称和处理器事件类型之间的映射可以在内核源中找到。对于intel处理器,这是在arch / x86 / kernel / cpu / perf_event_intel.c中。

What complicates matters somewhat is that perf uses a "symbolic" name. The mapping between those names and the processor event type can be found in the kernel source. For intel processors once again, this is in arch/x86/kernel/cpu/perf_event_intel.c.

https://git.kernel.org/cgit/linux/ kernel / git / torvalds / linux.git / tree / arch / x86 / kernel / cpu / perf_event_intel.c?id = dea4f48a0a301b23c65af8e4fe8ccf360c272fbf#n2367

,perf事件stalled-cycles-frontend映射到

For example, perf event "stalled-cycles-frontend" maps to

    /* UOPS_ISSUED.STALLED_CYCLES */
    intel_perfmon_event_map[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] =
        X86_CONFIG(.event=0x0e, .umask=0x01, .inv=1, .cmask=1);

记录为

Counts the number of cycles no Uops issued by the Register Allocation
Table to the Reservation Station, i.e. the UOPs issued from the front
end to the back end.

这篇关于perf事件文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆