• Home
  • Raw
  • Download

Lines Matching refs:sample

96     EntryT* sample = CreateSample(r, in_kernel, &acc_info);  in ProcessSampleRecord()  local
97 if (sample == nullptr) { in ProcessSampleRecord()
106 const ThreadEntry* thread = GetThreadOfSample(sample); in ProcessSampleRecord()
124 callchain.push_back(sample); in ProcessSampleRecord()
148 CreateCallChainSample(sample, ip, in_kernel, callchain, acc_info); in ProcessSampleRecord()
163 EntryT* sample = callchain[0]; in ProcessSampleRecord() local
166 if (added_set.find(sample) != added_set.end()) { in ProcessSampleRecord()
169 added_set.insert(sample); in ProcessSampleRecord()
170 InsertCallChainForSample(sample, callchain, acc_info); in ProcessSampleRecord()
171 UpdateCallChainParentInfo(sample, parent); in ProcessSampleRecord()
172 parent = sample; in ProcessSampleRecord()
191 virtual EntryT* CreateCallChainSample(const EntryT* sample, uint64_t ip,
203 EntryT* InsertSample(std::unique_ptr<EntryT> sample) { in InsertSample() argument
204 if (sample == nullptr || !FilterSample(sample.get())) { in InsertSample()
207 UpdateSummary(sample.get()); in InsertSample()
209 auto it = sample_set_.find(sample.get()); in InsertSample()
211 result = sample.get(); in InsertSample()
212 sample_set_.insert(sample.get()); in InsertSample()
213 sample_storage_.push_back(std::move(sample)); in InsertSample()
216 MergeSample(*it, sample.get()); in InsertSample()
221 EntryT* InsertCallChainSample(std::unique_ptr<EntryT> sample, in InsertCallChainSample() argument
223 if (sample == nullptr) { in InsertCallChainSample()
226 if (!FilterSample(sample.get())) { in InsertCallChainSample()
228 auto it = callchain_sample_set_.find(sample.get()); in InsertCallChainSample()
232 EntryT* result = sample.get(); in InsertCallChainSample()
233 callchain_sample_set_.insert(sample.get()); in InsertCallChainSample()
234 sample_storage_.push_back(std::move(sample)); in InsertCallChainSample()
238 auto it = sample_set_.find(sample.get()); in InsertCallChainSample()
240 EntryT* sample = *it; in InsertCallChainSample() local
242 if (std::find(callchain.begin(), callchain.end(), sample) != in InsertCallChainSample()
244 return sample; in InsertCallChainSample()
247 return InsertSample(std::move(sample)); in InsertCallChainSample()
250 void InsertCallChainForSample(EntryT* sample, in InsertCallChainForSample() argument
254 sample->callchain.AddCallChain( in InsertCallChainForSample()
262 for (EntryT* sample : sample_set_) { in AddCallChainDuplicateInfo()
263 auto it = callchain_parent_map_.find(sample); in AddCallChainDuplicateInfo()
265 sample->callchain.duplicated = true; in AddCallChainDuplicateInfo()
275 void UpdateCallChainParentInfo(EntryT* sample, EntryT* parent) { in UpdateCallChainParentInfo() argument
279 auto it = callchain_parent_map_.find(sample); in UpdateCallChainParentInfo()
284 callchain_parent_map_[sample] = info; in UpdateCallChainParentInfo()
318 for (auto& sample : v) { in Sort()
319 SortCallChain(sample); in Sort()
330 void SortCallChain(EntryT* sample) { sample->callchain.SortByPeriod(); } in SortCallChain() argument
347 for (const auto& sample : samples) { in DisplaySamples() local
348 displayer_.AdjustWidth(sample); in DisplaySamples()
351 for (const auto& sample : samples) { in DisplaySamples() local
352 displayer_.PrintSample(fp, sample); in DisplaySamples()