15fc675d5SIngo Weinhold /* 25fc675d5SIngo Weinhold * Copyright 2008-2010, Ingo Weinhold, ingo_weinhold@gmx.de. 35fc675d5SIngo Weinhold * Distributed under the terms of the MIT License. 45fc675d5SIngo Weinhold */ 55fc675d5SIngo Weinhold #ifndef BASIC_PROFILE_RESULT_H 65fc675d5SIngo Weinhold #define BASIC_PROFILE_RESULT_H 75fc675d5SIngo Weinhold 85fc675d5SIngo Weinhold 95fc675d5SIngo Weinhold #include "ProfileResult.h" 105fc675d5SIngo Weinhold 115fc675d5SIngo Weinhold 126a28c22fSIngo Weinhold class BasicImageProfileResult : public ImageProfileResult, 136a28c22fSIngo Weinhold public DoublyLinkedListLinkImpl<BasicImageProfileResult> { 145fc675d5SIngo Weinhold public: 156a28c22fSIngo Weinhold BasicImageProfileResult(SharedImage* image, 166a28c22fSIngo Weinhold image_id id); 176a28c22fSIngo Weinhold virtual ~BasicImageProfileResult(); 185fc675d5SIngo Weinhold 1928f88875SIngo Weinhold status_t Init(); 205fc675d5SIngo Weinhold 215fc675d5SIngo Weinhold inline bool AddHit(addr_t address); 225fc675d5SIngo Weinhold inline void AddUnknownHit(); 235fc675d5SIngo Weinhold inline void AddSymbolHit(int32 symbolIndex); 245fc675d5SIngo Weinhold inline void AddImageHit(); 255fc675d5SIngo Weinhold 265fc675d5SIngo Weinhold inline const int64* SymbolHits() const; 275fc675d5SIngo Weinhold inline int64 UnknownHits() const; 285fc675d5SIngo Weinhold 295fc675d5SIngo Weinhold private: 305fc675d5SIngo Weinhold int64* fSymbolHits; 315fc675d5SIngo Weinhold int64 fUnknownHits; 325fc675d5SIngo Weinhold }; 335fc675d5SIngo Weinhold 345fc675d5SIngo Weinhold 356a28c22fSIngo Weinhold class BasicProfileResult : public ProfileResult { 365fc675d5SIngo Weinhold public: 375fc675d5SIngo Weinhold BasicProfileResult(); 385fc675d5SIngo Weinhold 39*2813fd13SAugustin Cavalier virtual void AddExpectedTicks(int32 expected); 405fc675d5SIngo Weinhold virtual void AddDroppedTicks(int32 dropped); 416a28c22fSIngo Weinhold virtual void PrintResults( 426a28c22fSIngo Weinhold ImageProfileResultContainer* container); 435fc675d5SIngo Weinhold 4428f88875SIngo Weinhold virtual status_t GetImageProfileResult(SharedImage* image, 4528f88875SIngo Weinhold image_id id, 4628f88875SIngo Weinhold ImageProfileResult*& _imageResult); 475fc675d5SIngo Weinhold 485fc675d5SIngo Weinhold protected: 495fc675d5SIngo Weinhold int64 fTotalTicks; 505fc675d5SIngo Weinhold int64 fUnkownTicks; 51*2813fd13SAugustin Cavalier int64 fExpectedTicks; 525fc675d5SIngo Weinhold int64 fDroppedTicks; 535fc675d5SIngo Weinhold int64 fTotalSampleCount; 545fc675d5SIngo Weinhold }; 555fc675d5SIngo Weinhold 565fc675d5SIngo Weinhold 575fc675d5SIngo Weinhold class InclusiveProfileResult : public BasicProfileResult { 585fc675d5SIngo Weinhold public: 596a28c22fSIngo Weinhold virtual void AddSamples( 606a28c22fSIngo Weinhold ImageProfileResultContainer* container, 616a28c22fSIngo Weinhold addr_t* samples, int32 sampleCount); 625fc675d5SIngo Weinhold }; 635fc675d5SIngo Weinhold 645fc675d5SIngo Weinhold 655fc675d5SIngo Weinhold class ExclusiveProfileResult : public BasicProfileResult { 665fc675d5SIngo Weinhold public: 676a28c22fSIngo Weinhold virtual void AddSamples( 686a28c22fSIngo Weinhold ImageProfileResultContainer* container, 696a28c22fSIngo Weinhold addr_t* samples, int32 sampleCount); 705fc675d5SIngo Weinhold }; 715fc675d5SIngo Weinhold 725fc675d5SIngo Weinhold 735fc675d5SIngo Weinhold #endif // BASIC_PROFILE_RESULT_H 74