1 /* 2 * Copyright 2008-2010, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef BASIC_PROFILE_RESULT_H 6 #define BASIC_PROFILE_RESULT_H 7 8 9 #include "ProfileResult.h" 10 11 12 class BasicImageProfileResult : public ImageProfileResult, 13 public DoublyLinkedListLinkImpl<BasicImageProfileResult> { 14 public: 15 BasicImageProfileResult(SharedImage* image, 16 image_id id); 17 virtual ~BasicImageProfileResult(); 18 19 status_t Init(); 20 21 inline bool AddHit(addr_t address); 22 inline void AddUnknownHit(); 23 inline void AddSymbolHit(int32 symbolIndex); 24 inline void AddImageHit(); 25 26 inline const int64* SymbolHits() const; 27 inline int64 UnknownHits() const; 28 29 private: 30 int64* fSymbolHits; 31 int64 fUnknownHits; 32 }; 33 34 35 class BasicProfileResult : public ProfileResult { 36 public: 37 BasicProfileResult(); 38 39 virtual void AddExpectedTicks(int32 expected); 40 virtual void AddDroppedTicks(int32 dropped); 41 virtual void PrintResults( 42 ImageProfileResultContainer* container); 43 44 virtual status_t GetImageProfileResult(SharedImage* image, 45 image_id id, 46 ImageProfileResult*& _imageResult); 47 48 protected: 49 int64 fTotalTicks; 50 int64 fUnkownTicks; 51 int64 fExpectedTicks; 52 int64 fDroppedTicks; 53 int64 fTotalSampleCount; 54 }; 55 56 57 class InclusiveProfileResult : public BasicProfileResult { 58 public: 59 virtual void AddSamples( 60 ImageProfileResultContainer* container, 61 addr_t* samples, int32 sampleCount); 62 }; 63 64 65 class ExclusiveProfileResult : public BasicProfileResult { 66 public: 67 virtual void AddSamples( 68 ImageProfileResultContainer* container, 69 addr_t* samples, int32 sampleCount); 70 }; 71 72 73 #endif // BASIC_PROFILE_RESULT_H 74