zoukankan      html  css  js  c++  java
  • linux perf: 为什么采样频率设置成99Hz而不是100Hz

    早晨在linuxer看到文章,感觉挺有意思,最早研究perf的时候接触过这些概念,乍一看倍感亲切。

    sudo perf record -F  99 -a -g --sleep 20

    perf record中这么几个参数还蛮有意思:

        -F, --freq <n>        profile at this frequency
        -g                    enables call-graph recording
        -G, --cgroup <name>   monitor event in cgroup name only
    

     -g可以设置Cgroup,竟然用cgroup的名字做索引

    -F 是采样的频率?

    -F 99: sample at 99 Herz (samples per second), I'll sometimes sample faster than this (up to 999 Herz), but that also costs overhead. 99 Hert should be negligible. Also, the value '99' and not '100' is to avoid lockstep sampleing, which can produce skewed results.

    lockstep 采样!

    lockstep sampleing is when the profiling samples occur at the same frequency as a loop in the application. The result of this would be that the sample often occurs at the same place in the loop, so it will think that opration is the most common operation, and a likely bottleneck. An analogy would be if you were

  • 相关阅读:
    web端常见兼容性问题整理
    浏览器初始化样式
    html5特效库
    csshack
    进程与线程,并发、并行、异步、多线程
    js复制粘贴事件
    dom range相关
    vue和react在使用上的对比
    ListView往TreView里面拖拽
    ListView添加项目带序列
  • 原文地址:https://www.cnblogs.com/honpey/p/7907846.html
Copyright © 2011-2022 走看看