While running the program under valgrind/callgrind, I'm getting the results
"
# D1mr D1mr Source …
…
629 0.00 0.00 ulong sht = *p;
630 if (sht<l) memmove((byte*)pb+sht+lext,(byte*)pb+sht,l-sht);
631 0.00 0.00 memcpy((byte*)pb+sht,extb,lext);
|_ 0.00 0.00 7040002 call(s) to '__memcpy_ssse3_back…
632 0.09 0.09 memmove(p+1,p,l-((byte*)p-(byte*)pb)+lext);
|_ 36.62 36.62 7040002 call(s) to '__memmove_ssse3_back…
…
"
Being new to the tool, I have a couple of questions how to interpreted the
results:
1. First, about the line 632: `632 0.09 0.09…`
Do the the numbers 0.09 refers to the memmove() itself, WITHOUT the cost to
__memmove_ssse3_back() call?
2. Secondly, about the high rate within __memmove_ssse3_back() itself.
At initial call to memmove(), the variable `p` seems to be in cache. I think
so based on line 629.
I think that the implementation of the __memmove_ssse3_back() is using the
prefetch internally. So, even coping the memory 'backward' should not generate
the issues with cache miss.
(The above code was compiled and was run on Fedora 15, 64bit).
To this end, my question is what would be the proper interpretation of the
results above?
Is it 'normal'? Is it worth to try to improve it?
If it is worth to improve, is their 'known methods' how to do that?
Thanks.
Michael
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users