Lines Matching refs:sample

98     EntryT* sample = CreateSample(r, in_kernel, &acc_info);  in ProcessSampleRecord()  local
99 if (sample == nullptr) { in ProcessSampleRecord()
108 const ThreadEntry* thread = GetThreadOfSample(sample); in ProcessSampleRecord()
126 callchain.push_back(sample); in ProcessSampleRecord()
150 CreateCallChainSample(thread, sample, ip, in_kernel, callchain, acc_info); in ProcessSampleRecord()
165 EntryT* sample = callchain[0]; in ProcessSampleRecord() local
168 if (added_set.find(sample) != added_set.end()) { in ProcessSampleRecord()
171 added_set.insert(sample); in ProcessSampleRecord()
172 InsertCallChainForSample(sample, callchain, acc_info); in ProcessSampleRecord()
173 UpdateCallChainParentInfo(sample, parent); in ProcessSampleRecord()
174 parent = sample; in ProcessSampleRecord()
193 virtual EntryT* CreateCallChainSample(const ThreadEntry* thread, const EntryT* sample,
205 EntryT* InsertSample(std::unique_ptr<EntryT> sample) { in InsertSample() argument
206 if (sample == nullptr || !FilterSample(sample.get())) { in InsertSample()
209 UpdateSummary(sample.get()); in InsertSample()
211 auto it = sample_set_.find(sample.get()); in InsertSample()
213 result = sample.get(); in InsertSample()
214 sample_set_.insert(sample.get()); in InsertSample()
215 sample_storage_.push_back(std::move(sample)); in InsertSample()
218 MergeSample(*it, sample.get()); in InsertSample()
223 EntryT* InsertCallChainSample(std::unique_ptr<EntryT> sample, in InsertCallChainSample() argument
225 if (sample == nullptr) { in InsertCallChainSample()
228 if (!FilterSample(sample.get())) { in InsertCallChainSample()
230 auto it = callchain_sample_set_.find(sample.get()); in InsertCallChainSample()
234 EntryT* result = sample.get(); in InsertCallChainSample()
235 callchain_sample_set_.insert(sample.get()); in InsertCallChainSample()
236 sample_storage_.push_back(std::move(sample)); in InsertCallChainSample()
240 auto it = sample_set_.find(sample.get()); in InsertCallChainSample()
242 EntryT* sample = *it; in InsertCallChainSample() local
244 if (std::find(callchain.begin(), callchain.end(), sample) != in InsertCallChainSample()
246 return sample; in InsertCallChainSample()
249 return InsertSample(std::move(sample)); in InsertCallChainSample()
252 void InsertCallChainForSample(EntryT* sample, in InsertCallChainForSample() argument
256 sample->callchain.AddCallChain( in InsertCallChainForSample()
264 for (EntryT* sample : sample_set_) { in AddCallChainDuplicateInfo()
265 auto it = callchain_parent_map_.find(sample); in AddCallChainDuplicateInfo()
267 sample->callchain.duplicated = true; in AddCallChainDuplicateInfo()
277 void UpdateCallChainParentInfo(EntryT* sample, EntryT* parent) { in UpdateCallChainParentInfo() argument
281 auto it = callchain_parent_map_.find(sample); in UpdateCallChainParentInfo()
286 callchain_parent_map_[sample] = info; in UpdateCallChainParentInfo()
320 for (auto& sample : v) { in Sort()
321 SortCallChain(sample); in Sort()
332 void SortCallChain(EntryT* sample) { sample->callchain.SortByPeriod(); } in SortCallChain() argument
349 for (const auto& sample : samples) { in DisplaySamples() local
350 displayer_.AdjustWidth(sample); in DisplaySamples()
353 for (const auto& sample : samples) { in DisplaySamples() local
354 displayer_.PrintSample(fp, sample); in DisplaySamples()