Lines Matching refs:sample
189 void SubCommandReport::BroadcastSample(std::unique_ptr<PerfRecordSample> &sample) in BroadcastSample() argument
194 sample->data_.id = config.ids_[0]; in BroadcastSample()
195 ProcessSample(sample); in BroadcastSample()
199 void SubCommandReport::ProcessSample(std::unique_ptr<PerfRecordSample> &sample) in ProcessSample() argument
201 sample->DumpLog(__FUNCTION__); in ProcessSample()
203 reportJsonFile_->UpdateReportSample(sample->data_.id, sample->data_.pid, sample->data_.tid, in ProcessSample()
204 sample->data_.period); in ProcessSample()
205 reportJsonFile_->UpdateReportCallStack(sample->data_.id, sample->data_.pid, in ProcessSample()
206 sample->data_.tid, sample->data_.period, in ProcessSample()
207 sample->callFrames_); in ProcessSample()
213 *sample, static_cast<uint32_t>(GetReport().GetConfigIndex(sample->data_.id)), in ProcessSample()
218 GetReport().AddReportItemBranch(*sample); in ProcessSample()
220 GetReport().AddReportItem(*sample, showCallStack_); in ProcessSample()
231 std::unique_ptr<PerfRecordSample> sample(static_cast<PerfRecordSample *>(record.release())); in RecordCallBack() local
234 auto prevIt = prevSampleCache_.find(sample->data_.tid); in RecordCallBack()
237 prevSampleCache_[sample->data_.tid] = std::move(sample); in RecordCallBack()
243 HLOGV("calc time %llu - %llu", sample->data_.time, prevSample->data_.time); in RecordCallBack()
244 if (sample->data_.time > prevSample->data_.time) { in RecordCallBack()
245 prevSample->data_.period = sample->data_.time - prevSample->data_.time; in RecordCallBack()
251 prevIt->second = std::move(sample); in RecordCallBack()
253 sample = std::move(prevSample); in RecordCallBack()
255 HLOGV("current sample period %llu ", sample->data_.period); in RecordCallBack()
258 if (cpuOffMode_ and cpuOffids_.size() > 0 and cpuOffids_.count(sample->data_.id) > 0) { in RecordCallBack()
259 BroadcastSample(sample); in RecordCallBack()
261 ProcessSample(sample); in RecordCallBack()
439 std::unique_ptr<PerfRecordSample> sample = std::move(pair.second); in FlushCacheRecord() local
440 sample->data_.period = 1u; in FlushCacheRecord()
441 if (cpuOffMode_ and cpuOffids_.size() > 0 and cpuOffids_.count(sample->data_.id) > 0) { in FlushCacheRecord()
442 BroadcastSample(sample); in FlushCacheRecord()
444 ProcessSample(sample); in FlushCacheRecord()