[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] EDC and asynchronous operations
|
Felix and Eugene,
One thing I'm finding challenging about ACPM is managing the lifetime of
cache objects. These things must live beyond the lifetime of the
transaction that uses them since otherwise the transaction will
perpetually fail. And when the transaction eventually completes
successfully, it's beneficial to not discard the cache objects since
there might be a transaction around the corner that needs the same data.
At the same time, you don't want to keep piling up the cache objects
indefinitely, for obvious memory footprint and performance reasons. So,
I've been coding up a manager that tries to take these things into
consideration. Did you guys have the same challenge with tcf-debug? Just
wanted to check that there isn't some simplistic approach that's not
becoming obvious to me.
John
At 04:23 PM 10/12/2010, Burton, Felix wrote:
Regarding 1: I dont understand
what you mean. The following is simplified pseudo code that count
number of frame on a stack by following a frame pointer list.
Boolean countStackFrames(Context ctx) {
TCFDataCache<Register> fp = lookupRegisterCI(ctx,
REGISTER_FP);
if (!fp.validate(this)) {
fp.wait(this);
return false;
}
Address addr = fp.getData().valueAsAddress();
long count = 0;
while (addr != 0) {
TCFDataCache<Memory> mem = lookupMemoryCI(ctx, addr,
address_size);
if (!mem.validate(this)) {
mem.wait(this);
return false;
}
addr = mem.getData().valueAsAddress();
count++;
}
set(null, null, count);
return true;
}
Regarding 2: I agree, we are not proposing that the asynchronous API
should expose ACPM objects like cache instances. Cache instances
can be built on top of an asynchronous API to allow client to use ACPM
instead of directly using the asynchronous API. This is reflected
on page 1 in the attached slides. The TCF box on the bottom is
exposing asynchronous APIs and on top of that are cache instances that
expose ACPM APIs and on top of that is client code, e.g. code that
assembles information that goes into a view, another cache instance, or
other client.
Hope this helps,
Felix
From: cdt-dev-bounces@xxxxxxxxxxx
[
mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of John
Cortell
Sent: Tuesday, October 12, 2010 1:41 PM
To: CDT General developers list.; CDT General developerslist.
Subject: Re: [cdt-dev] EDC and asynchronous operations
At 02:47 PM 10/12/2010, Burton, Felix wrote:
Felix, everything you wrote makes sense to me. Again, I definitely see
the advantages of ACPM for the client of an async API that needs to make
many API calls to carry out an operation. My points have been
1. ACPM is suitable only if you know the superset of all the data points
your operation will need. There are many situations where this won't be
the case.
2. ACPM seems to me a good tool for the client of an asynchronous
API. However, It's not clear to me that an asynchronous API should expose
ACPM objects, which I think is what Pawel was hinting at.
John
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev