性能报告显示“__libm_pow_l9" [英] perf report showing "__libm_pow_l9"
问题描述
我正在使用 perf 来分析我的程序,这涉及大量使用 exp() 和 pow().代码编译使用
I am using perf to profile my program, which involves loads of use of exp() and pow(). The code was compiled use
icc -g -fno-omit-frame-pointer test.c
并通过以下方式进行分析:
and profiled with:
perf record -g ./a.out
后面跟着:
perf report -g 'graph,0.5,caller'
和 perf 给出:
__libm_exp_l9() 和 __libm_pow_l9() 两个函数消耗了大量的计算能力.
the two functions __libm_exp_l9() and __libm_pow_l9() are consuming considerable amount of computational power.
所以我想知道它们是否分别是 exp() 和 pow() 的别名?或者有什么建议可以阅读这里的报告?谢谢.
So I am wondering if they are just alias to exp() and pow(), respectively? Or any suggestions to read in the report here? Thanks.
推荐答案
它们不是别名,而是函数的内部实现.数学库通常具有多个版本的函数,具体取决于使用的处理器、指令集或参数.
They are not aliases, but internal implementation of the functions. Mathematical libraries have usually several versions of the functions depending on used processor, instruction set, or arguments.
没有什么可担心的.Exp 和 Pow 是比指令(通常)更复杂的函数,因此它们需要一些时间.不幸的是,我没有找到对它们的任何引用(英特尔数学库可能不是开源的),但这是对函数使用内部命名空间名称的常见做法.
There is nothing to worry about. Exp and Pow are functions that are more complex than just an instructions (usually) and therefore they take some time. Unfortunately I didn't find any reference to them (Intel mathematical library is probably not opensource), but this is common practice to use internal, namespaced names for function.
这篇关于性能报告显示“__libm_pow_l9"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!