AbstractThreadProfileResult::SynchronizeImages(): New images were only

added, if their creation event was now or in the future. Obviously we're
only interested in images that do already exist, though. Also get rid of
"new" images that already have been deleted in the meantime.
Fixes problem that for some threads (almost) no images were added and
thus no functions could be resolved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28441 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-11-01 20:21:47 +00:00
parent 73ca5aff45
commit e5c6366896
1 changed files with 7 additions and 2 deletions

View File

@ -255,8 +255,13 @@ AbstractThreadProfileResult<ThreadImageType>::SynchronizeImages(int32 event)
// add new images
it = fNewImages.GetIterator();
while (ThreadImageType* image = it.Next()) {
if (image->GetImage()->CreationEvent() >= event) {
if (image->GetImage()->CreationEvent() <= event) {
it.Remove();
int32 deleted = image->GetImage()->DeletionEvent();
if (deleted >= 0 && event >= deleted) {
// image already deleted
delete image;
} else
fImages.Add(image);
}
}