|
From: Leung Ngai-H. Z. <leu...@co...> - 2006-01-09 02:54:54
|
So after using a modification of Cachegrind and Lackey to collect instruction reads, loads and stores, I get something like the following: ins : 0x40FA821 ins : 0x40FA823 ins : 0x40FA824 ins : 0x40FA826 ins : 0x40FA828 ins : 0x40FA831 load : 0x41BF5C0, 4 store: 0x41BF5C0, 4 ins : 0x40FA834 ins : 0x40FA837 ins : 0x40FA83A I was wondering why the instructions referenced aren't consecutive. Is it because Valgrind has added additional instructions during its translation? Or is that how instructions really are read in real programs? Thanks in advance. Zac |
|
From: Jeroen N. W. <jn...@xs...> - 2006-01-09 07:21:51
|
> > So after using a modification of Cachegrind and Lackey to collect > instruction reads, loads and stores, I get something like the following: > > ins : 0x40FA821 > ins : 0x40FA823 > ins : 0x40FA824 > ins : 0x40FA826 > ins : 0x40FA828 > ins : 0x40FA831 > load : 0x41BF5C0, 4 > store: 0x41BF5C0, 4 > ins : 0x40FA834 > ins : 0x40FA837 > ins : 0x40FA83A > > I was wondering why the instructions referenced aren't consecutive. Is it > because Valgrind has added additional instructions during its translation? > Or is that how instructions really are read in real programs? The length of an instruction can vary from 1 to 15 bytes (at least on x86/amd64 type CPUs). What I see above is a linear sequence of instructions of 1, 2, or 3 bytes long. HTH Jeroen. > > Thanks in advance. > > Zac > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: Nicholas N. <nj...@cs...> - 2006-01-09 16:44:10
|
On Mon, 9 Jan 2006, Jeroen N. Witmond wrote: >> So after using a modification of Cachegrind and Lackey to collect >> instruction reads, loads and stores, I get something like the following: >> >> ins : 0x40FA821 >> ins : 0x40FA823 >> ins : 0x40FA824 >> ins : 0x40FA826 >> ins : 0x40FA828 >> ins : 0x40FA831 >> load : 0x41BF5C0, 4 >> store: 0x41BF5C0, 4 >> ins : 0x40FA834 >> ins : 0x40FA837 >> ins : 0x40FA83A >> >> I was wondering why the instructions referenced aren't consecutive. Is it >> because Valgrind has added additional instructions during its translation? >> Or is that how instructions really are read in real programs? > > The length of an instruction can vary from 1 to 15 bytes (at least on > x86/amd64 type CPUs). What I see above is a linear sequence of > instructions of 1, 2, or 3 bytes long. Yep, and if you run it on PowerPC you'll see the instructions are all 4 bytes long and on 4-byte boundaries. Nick |