gpt4 book ai didi

linux - "cpu/mem-loads/pp"和 "cpu/mem-loads/"有什么区别?

转载 作者:太空狗 更新时间:2023-10-29 12:02:55 30 4
gpt4 key购买 nike

我看了perf list的手册,找到了memory load/storePMU事件定义:

mem-loads OR cpu/mem-loads/                        [Kernel PMU event]
mem-stores OR cpu/mem-stores/ [Kernel PMU event]

但我总是阅读使用“cpu/mem-loads/pp”而不是“cpu/mem-loads/”的perf脚本”。它们之间有什么区别?它们是一样的吗?我试图用谷歌搜索答案,但找不到解释。

最佳答案

p修饰符代表精确级别 在做采样的时候,它用来表示你可以容忍的skid:t报告的指令距离生成的有效指令有多远例子。 pp 表示要求 SAMPLE_IP 具有 0 skid。换句话说,当您进行内存访问采样时,您想确切地知道是哪条指令生成了访问。

参见man perf list:

p - precise level
....
The p modifier can be used for specifying how precise the instruction address should be. The p modifier can be specified multiple times:

0 - SAMPLE_IP can have arbitrary skid
1 - SAMPLE_IP must have constant skid
2 - SAMPLE_IP requested to have 0 skid
3 - SAMPLE_IP must have 0 skid

For Intel systems precise event sampling is implemented with PEBS which supports up to precise-level 2.

On AMD systems it is implemented using IBS (up to precise-level 2). The precise modifier works with event types 0x76 (cpu-cycles, CPU clocks not halted) and 0xC1 (micro-ops
retired). Both events map to IBS execution sampling (IBS op) with the IBS Op Counter Control bit (IbsOpCntCtl) set respectively (see AMD64 Architecture Programmer’s Manual Volume
2: System Programming, 13.3 Instruction-Based Sampling). Examples to use IBS:

perf record -a -e cpu-cycles:p ... # use ibs op counting cycles
perf record -a -e r076:p ... # same as -e cpu-cycles:p
perf record -a -e r0C1:p ... # use ibs op counting micro-ops

关于linux - "cpu/mem-loads/pp"和 "cpu/mem-loads/"有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28358001/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com