[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [4799] Add instruction counter.
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] Re: [4799] Add instruction counter. |
Date: |
Sun, 29 Jun 2008 15:31:27 +0100 |
User-agent: |
KMail/1.9.9 |
On Sunday 29 June 2008, Jan Kiszka wrote:
> Paul Brook wrote:
> >> On the first glance this function looked like it could serve as an
> >> alternative to SSTEP_INTERNAL and provide the required roll-back on
> >> watchpoint hit. But looking closer I realized that icount_decr is only
> >> maintained if use_icount is set.
> >
> > I'm fairly sure limiting the length of the TB and actual instruction
> > counting are largely independent. IIUC you only need the former.
>
> But to calculate the former, you need the latter again.
Not really. You only need to know how far through the TB you got before the
trap occurred.
> I wonder if it
> wouldn't be more efficient and flexible to specify a terminating PC
> instead of an instruction count. Wouldn't that make cpu_io_recompile
> independent of icount_decr and, thus, use_icount?
Ah, I see what you're getting at. cpu_restore_state modifies icount_decr to
indicate how far through the TB we got. That's can be independent of
use_icount.
A terminating PC is much less useful. In general the only instruction you
really know the location of is the one you're currently at.
Paul
Re: [Qemu-devel] [4799] Add instruction counter., C.W. Betts, 2008/06/29