equal
deleted
inserted
replaced
87 { |
87 { |
88 public: |
88 public: |
89 DProfilerPriSampler(struct TProfilerGppSamplerData*, TInt id); |
89 DProfilerPriSampler(struct TProfilerGppSamplerData*, TInt id); |
90 ~DProfilerPriSampler(); |
90 ~DProfilerPriSampler(); |
91 |
91 |
92 void Sample(); |
92 void Sample(TAny* aPtr); |
93 TInt Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset); |
93 TInt Reset(DProfilerSampleStream* aStream, TUint32 aSyncOffset); |
94 TInt PostSample(); |
94 TInt PostSample(); |
95 TBool PostSampleNeeded(); |
95 TBool PostSampleNeeded(); |
96 |
96 |
97 private: |
97 private: |
162 { |
162 { |
163 if(sampleNeeded) |
163 if(sampleNeeded) |
164 { |
164 { |
165 this->sampleNeeded = false; |
165 this->sampleNeeded = false; |
166 |
166 |
167 LOGSTRING3("CProfilerPriSampler<%d>::PostSample - state %d",BufferSize,this->sampleBuffer->GetBufferStatus()); |
167 LOGSTRING3("CProfilerPriSampler<%d>::PostSample - state %d",BufferSize,this->iSampleBuffer->GetBufferStatus()); |
168 |
168 |
169 //TInt interruptLevel = NKern::DisableInterrupts(0); |
169 //TInt interruptLevel = NKern::DisableInterrupts(0); |
170 |
170 |
171 TInt length(this->priSamplerImpl.SampleImpl()); |
171 TInt length(this->priSamplerImpl.SampleImpl()); |
172 if(length != 0) |
172 if(length != 0) |
201 } |
201 } |
202 |
202 |
203 template <int BufferSize> |
203 template <int BufferSize> |
204 TBool DProfilerPriSampler<BufferSize>::PostSampleNeeded() |
204 TBool DProfilerPriSampler<BufferSize>::PostSampleNeeded() |
205 { |
205 { |
206 LOGSTRING3("CProfilerPriSampler<%d>::PostSampleNeeded - state %d",BufferSize,this->sampleBuffer->GetBufferStatus()); |
206 LOGSTRING3("CProfilerPriSampler<%d>::PostSampleNeeded - state %d",BufferSize,this->iSampleBuffer->GetBufferStatus()); |
207 |
207 |
208 TUint32 status = this->iSampleBuffer->iBufferStatus; |
208 TUint32 status = this->iSampleBuffer->GetBufferStatus(); |
209 |
209 |
210 if(status == DProfilerSampleBuffer::BufferCopyAsap || status == DProfilerSampleBuffer::BufferFull || this->sampleNeeded == true) |
210 if(status == DProfilerSampleBuffer::BufferCopyAsap || |
|
211 status == DProfilerSampleBuffer::BufferFull || |
|
212 this->sampleNeeded == true) |
211 { |
213 { |
212 return true; |
214 return true; |
213 } |
215 } |
214 |
216 |
215 return false; |
217 return false; |
216 } |
218 } |
217 |
219 |
218 |
220 |
219 template <int BufferSize> |
221 template <int BufferSize> |
220 void DProfilerPriSampler<BufferSize>::Sample() |
222 void DProfilerPriSampler<BufferSize>::Sample(TAny* aPtr) |
221 { |
223 { |
222 LOGSTRING2("CProfilerPriSampler<%d>::Sample",BufferSize); |
224 LOGSTRING2("CProfilerPriSampler<%d>::Sample",BufferSize); |
223 |
225 |
224 if(priSamplerImpl.SampleNeeded() && this->sampleInProgress == false) |
226 if(priSamplerImpl.SampleNeeded() && this->sampleInProgress == false) |
225 { |
227 { |