Dear Mr. Collins,
On Mon, 1 Feb 2010, rickman posted on news:comp.arch.embedded : |----------------------------------------------------------------------| |"[..] | |[..] A code | |profiler won't be able to predict how code interacts with the real | |world. It only lets you see how the code runs under your "ideal" | |conditions of the simulation. Besides, a simulator can be setup | |incorrectly. If you are setting up the hardware incorrectly, at least| |it is consistent with the way you will be running the real code! | | | |Rick" | |----------------------------------------------------------------------|
Precisely.
I have been speeding up and profiling an unembedded program running on an Intel Core2. I was using a fast intrusive profiler but it is not of much use to me. I later used a very slow non-intrusive profiler which uses inaccurate simulations which do not show how long each instruction takes (for example, it shows no difference between an addition and a division, whose true differences are not documented by Intel for processors released in the second half of this decade), which was useful earlier but soon I will want a better proxy for measuring performance. We are considering paying to acquire a non-intrusive profiler provided with Intel VTune, but I am at liberty to investigate other options. I suspect that Intel VTune's non-intrusive profiler would be faster and less inaccurate than the non-intrusive profiler which I have not yet abandoned, but it would probably still be very slow and its model might still not be perfect.
|---------------------------------------------------------------------| |"If you *really* want to know the time spent in a section of code or | |even a single line, I would use an oscilloscope or better, a logic | |analyzer. I have used a parallel port on a PC to time and trace code| |using a logic analyzer. It not only tells you where the code is by | |the value written, it tells you *exactly* when it happens." | |---------------------------------------------------------------------|
I think this could be extremely difficult for analyzing an Intel Core2 (which I am aware was not what you were describing). I mentioned an idea like this to a company which I would have been interested to pay to develop a physical device to perform non-intrusive profiling of an Intel Core2, but who I spoke to was (quite possibly correctly) convinced that an external device cannot determine anything more internal than a cache of a recent Intel product.
Do you want to take the challenge to disprove this and how much will you charge?
Yours sincerely, Colin Paul Gloster in Portugal, telephone 00 351 239410663