vfs: check userland buffers before reading them.
[haiku.git] / src / bin / debug / profile / ProfileResult.cpp
blob1f393cb5aaf1002c5b354c9101138134fa23bc37
1 /*
2 * Copyright 2008-2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include "ProfileResult.h"
10 // #pragma mark - ImageProfileResultContainer
13 ImageProfileResultContainer::~ImageProfileResultContainer()
18 // #pragma mark - ImageProfileResultContainer::Visitor
21 ImageProfileResultContainer::Visitor::~Visitor()
26 // #pragma mark - ImageProfileResult
29 ImageProfileResult::ImageProfileResult(SharedImage* image, image_id id)
31 fImage(image),
32 fTotalHits(0),
33 fImageID(id)
35 fImage->AcquireReference();
39 ImageProfileResult::~ImageProfileResult()
41 fImage->ReleaseReference();
45 status_t
46 ImageProfileResult::Init()
48 return B_OK;
52 // #pragma mark - ProfileResult
55 ProfileResult::ProfileResult()
57 fEntity(NULL),
58 fInterval(1)
63 ProfileResult::~ProfileResult()
68 status_t
69 ProfileResult::Init(ProfiledEntity* entity)
71 fEntity = entity;
72 return B_OK;
76 void
77 ProfileResult::SetInterval(bigtime_t interval)
79 fInterval = interval;