[PTLsim-devel] Having problems getting -stoprip to work

Martin
Fri May 25 14:15:30 EDT 2007


Hi,
   I'm trying to improve the performance of a section of code using
prefetches.  At the moment it seems to help but not as much as I would
have thought, so I was hoping to use ptlsim in userspace mode to throw
some light on what's going on at the chip level.
   To do this I'm looking to profile a very small amount of the program
and was hoping to use -startrip and -stoprip to do this.  Even on a
small test case I can't seem to get -stoprip to work.  The input program
is:

int main (void) {
        return 1;
}

which objdump gives as:

08048384 
: 8048384: 8d 4c 24 04 lea 0x4(%esp),%ecx 8048388: 83 e4 f0 and $0xfffffff0,%esp 804838b: ff 71 fc pushl 0xfffffffc(%ecx) 804838e: 55 push %ebp 804838f: 89 e5 mov %esp,%ebp 8048391: 51 push %ecx 8048392: 83 ec 10 sub $0x10,%esp 8048395: b8 01 00 00 00 mov $0x1,%eax 804839a: 83 c4 10 add $0x10,%esp 804839d: 59 pop %ecx 804839e: 5d pop %ebp 804839f: 8d 61 fc lea 0xfffffffc(%ecx),%esp 80483a2: c3 ret 80483a3: 90 nop I'm using the following options: -logfile test.log -loglevel 6 -stats test.stats -stoprip 0x804838e and I get the following log file: // // PTLsim: Cycle Accurate x86 Simulator (32-bit version) // Copyright 1999-2007 Matt T. Yourst <yourst at yourst.com> // // Revision 219 (2007-05-13) // Built May 23 2007 17:01:39 on ralph.cs.bath.ac.uk using gcc-4.1 // Running on ralph. // // Arguments: ./test // Thread 15612 is running in 32-bit x86 mode // Active parameters: -core ooo -quiet disabled -logfile test.log -loglevel 6 -stopinsns infinity -stopcycle infinity -stopiter infinity -stoprip 134513550 but it doesn't stop when it reaches 0x804838e. Can anyone point me in the direction of what I'm doing wrong? Cheers, - Martin


More information about the PTLsim-devel mailing list