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 AddDroppedTicks(int32 dropped); 40 virtual void PrintResults( 41 ImageProfileResultContainer* container); 42 43 virtual status_t GetImageProfileResult(SharedImage* image, 44 image_id id, 45 ImageProfileResult*& _imageResult); 46 47 protected: 48 int64 fTotalTicks; 49 int64 fUnkownTicks; 50 int64 fDroppedTicks; 51 int64 fTotalSampleCount; 52 }; 53 54 55 class InclusiveProfileResult : public BasicProfileResult { 56 public: 57 virtual void AddSamples( 58 ImageProfileResultContainer* container, 59 addr_t* samples, int32 sampleCount); 60 }; 61 62 63 class ExclusiveProfileResult : public BasicProfileResult { 64 public: 65 virtual void AddSamples( 66 ImageProfileResultContainer* container, 67 addr_t* samples, int32 sampleCount); 68 }; 69 70 71 #endif // BASIC_PROFILE_RESULT_H 72