简体   繁体   中英

perf report showing “__libm_pow_l9”

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM