|
| From: | Marius Monton |
| Subject: | Re: [Qemu-devel] time inside qemu |
| Date: | Tue, 17 Apr 2007 16:05:54 +0200 |
| User-agent: | Mozilla Thunderbird 1.5.0.10 (X11/20070403) |
|
En/na Paul Brook ha escrit: It's possible, but I think that roughly speaking, more code implies more time:On Monday 16 April 2007 15:41, Marius Monton wrote: code (a) : for (int i = 0; i< 1000000; i++) c[i] = a[i] * b[i]; code (b) : for (int i = 0; i< 1000; i++) for(int j = 0; j < b[i]; j++) c[i] += a[i]; code (c) : for (int i = 0; i< 1000; i++) c[i] = HW_MUL(a[i], b[i]); I'm sure that code (b) will execute much longer that code (a) inside qemu (sure that different that in real platform), and I'd like to compute executing time for code (c) in some way. So, how can I trap time information/calculation inside qemu? Sure, but this can be avoided using multiple simulations and calculating arithmetic mean for execution time.If nothing else you're entirely at the mercy of the host OS process scheduler and signal delivery. The emulated CPU may stall for an arbitrary time at any point. Paul --
|
marius.monton.vcf
Description: Vcard
| [Prev in Thread] | Current Thread | [Next in Thread] |