2009-04-07 09:55:02 Optimizing muldi3 and oprofile strange results
Pavel Frolov (BELARUS)
Message: 72328
During some tests with my application I noticed that it uses ~58% cpu usage (results of top command). Oprofile shows:
000bcee4 11737 69.1429 ___muldi3
000710e8 1141 6.7216 _myfunction1
0006fb34 952 5.6082 _myfunction2
000a6d44 585 3.4462 _myfunction3
I found muldi3 sources (written in C on my old linux version) and changed linux/arch/blackfin/lib/muldi3.c with the muldi3.S from SVN rev 5958. Now I can see cpu usage decreasing (top result for my application is about 35%).
But the results of oprofile is too strange:
00089e64 11754 81.6760 ___muldi3
00058bbc 537 3.7315 _myfunction1
0007bff8 408 2.8351 _myfunction2
00055ef4 329 2.2862 _myfunction3
I supposed persantage for ___muldi3 should be less, then it was before. Could anybody explain me such result, please?
QuoteReplyEditDelete
2009-04-07 15:35:19 Re: Optimizing muldi3 and oprofile strange results
Mike Frysinger (UNITED STATES)
Message: 72352
are you looking at the muldi symbol that is in the kernel or is in userspace ? if the kernel is doing less work on behalf of "myfunction#" because it is faster, then the time for the userspace muldi3 instruction would be the same in raw cycles, but be more in percentage.
QuoteReplyEditDelete
2009-04-08 03:34:17 Re: Optimizing muldi3 and oprofile strange results
Pavel Frolov (BELARUS)
Message: 72386
I'm looking at muldi3 symbol in user space. I launched
/usr/bin/bfin_opcontrol --init
/usr/bin/oprofiled -e '' --no-vmlinux --image=/bin/myapplication
/usr/bin/bfin_opcontrol --start
/bin/myapplication
/usr/bin/bfin_opcontrol --dump
/usr/bin/opreport -lw