perf report showing “__libm_pow_l9”

和自甴很熟 提交于 2019-12-13 07:17:36

问题


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

which is followed by:

perf report -g 'graph,0.5,caller'

and perf gave:

the two functions __libm_exp_l9() and __libm_pow_l9() are consuming considerable amount of computational power.

So I am wondering if they are just alias to exp() and pow(), respectively? Or any suggestions to read in the report here? Thanks.


回答1:


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.

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.



来源:https://stackoverflow.com/questions/37239753/perf-report-showing-libm-pow-l9

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!