add diagnostic messages showing each connection access

currently the problem seems to be we're
accessing the wrong connection...
This commit is contained in:
Fischlurch 2012-01-07 21:22:35 +01:00
parent 73cfef69c8
commit 8de4ecc8ac
3 changed files with 20 additions and 9 deletions

2
.gitignore vendored
View file

@ -7,6 +7,8 @@
*.gch *.gch
,valgrind.log* ,valgrind.log*
*.pyc *.pyc
/.sconf_temp
/.settings
optcache optcache
Makefile.in Makefile.in
build/* build/*

View file

@ -215,6 +215,8 @@ namespace play {
static DataSink static DataSink
connectOutputSink (CON& connection) connectOutputSink (CON& connection)
{ {
TRACE (test, "activating Con=%p", &connection );
DataSink newSink; DataSink newSink;
newSink.activate(&connection, shutdownConnection); newSink.activate(&connection, shutdownConnection);
return newSink; return newSink;

View file

@ -117,6 +117,8 @@ namespace play {
BuffHandle BuffHandle
trackFrame (FrameID frameNr, BuffHandle const& newBuffer) trackFrame (FrameID frameNr, BuffHandle const& newBuffer)
{ {
TRACE (test, "Con=%p : track buffer %zu for frame-#%lu"
, this, newBuffer.entryID(), frameNr);
REQUIRE (!contains (frameTrackingIndex_,frameNr), REQUIRE (!contains (frameTrackingIndex_,frameNr),
"attempt to lock already used frame %lu", frameNr); "attempt to lock already used frame %lu", frameNr);
@ -140,7 +142,9 @@ namespace play {
BuffHandle BuffHandle
claimBufferFor(FrameID frameNr) claimBufferFor(FrameID frameNr)
{ {
TRACE (test, "Con=%p : lock buffer for frame-#%lu", this, frameNr);
REQUIRE (!closed_); REQUIRE (!closed_);
return trackFrame (frameNr, return trackFrame (frameNr,
buffProvider_.lockBuffer (bufferType_)); buffProvider_.lockBuffer (bufferType_));
} }
@ -149,16 +153,22 @@ namespace play {
bool bool
isTimely (FrameID frameNr, TimeValue currentTime) isTimely (FrameID frameNr, TimeValue currentTime)
{ {
TRACE (test, "Con=%p : timely? frame-#%lu"
, this, frameNr);
if (Time::ANYTIME == currentTime) if (Time::ANYTIME == currentTime)
return true; return true;
else
return currentTime < deadlineFor (frameNr); return currentTime < deadlineFor (frameNr);
} }
void void
transfer (BuffHandle const& filledBuffer) transfer (BuffHandle const& filledBuffer)
{ {
TRACE (test, "Con=%p : transfer buffer %zu"
, this, filledBuffer.entryID());
REQUIRE (!closed_); REQUIRE (!closed_);
pushout (filledBuffer); pushout (filledBuffer);
} }
@ -191,13 +201,13 @@ namespace play {
, frameGrid_(getTestTimeGrid()) /////////////TODO should rather pass that in as part of a "timings" definition , frameGrid_(getTestTimeGrid()) /////////////TODO should rather pass that in as part of a "timings" definition
, closed_(false) , closed_(false)
{ {
INFO (engine_dbg, "building in-memory diagnostic output sequence"); INFO (engine_dbg, "building in-memory diagnostic output sequence (at %p)", this);
} }
virtual virtual
~TrackingInMemoryBlockSequence() ~TrackingInMemoryBlockSequence()
{ {
INFO (engine_dbg, "releasing diagnostic output sequence"); INFO (engine_dbg, "releasing diagnostic output sequence (at %p)", this);
} }
@ -224,6 +234,8 @@ namespace play {
bool bool
wasAllocated (uint frameNr) const wasAllocated (uint frameNr) const
{ {
TRACE (test, "query wasAllocated. Con=%p", this);
return contains (frameTrackingIndex_, frameNr); return contains (frameTrackingIndex_, frameNr);
} }
@ -424,11 +436,6 @@ namespace play {
return block return block
&& block->was_used(); && block->was_used();
} }
private:
}; };