栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Linux:性能分析域

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Linux:性能分析域

文章目录
  • 参考
  • 工具
    • perf
    • BPF
    • 高速缓存相关
    • 编译器相关
      • 数组与指针
      • inline 函数

参考

【1】深入理解计算机系统

工具 perf BPF 域 高速缓存相关

【1】如果程序,同时访问多个数组,而且发生冲突不命中的情况时,性能损耗比例是:L1与L2的访问时间比。冲突不命中的场景是:多个数组映射到了相同的高速缓存位置。这样导致高速缓存来回切换内容。

编译器相关 数组与指针

但是如果循环处理时,还是有性能的区别(在这本书中有详细的解释Computer architecture and design the hardware and software interface,是MIPS平台):
The first program uses the expression (array[index] != 0). This requires the compiler to generate an index operation, which takes longer than a simple pointer de-reference: ((*array_ptr) != 0). The expression at the end of this program, array_ptr - array, computes how far array_ptr is into the array.

inline 函数

The most common high-level transformation is probably procedure inlining, which replaces a call to a function by the body of the function, substituting the caller’s arguments for the procedure’s parameters.
The downside of the inlining optimization is that the compiled code would be bigger if the inlined procedure is called from several locations. Such a code expansion might turn into lower performance if it increased the cache miss rate;
缺点是如果增加了缓存脱靶几率,会降低性能。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/309083.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号