Lines Matching refs:sample
66 print('%d samples' % len(p.sample))
67 for i in range(len(p.sample)):
69 self.show_sample(p.sample[i], sub_space)
102 def show_sample(self, sample, space=''): argument
104 for i in range(len(sample.location_id)):
105 print('%slocation_id[%d]: id %d' % (space, i, sample.location_id[i]))
106 self.show_location_id(sample.location_id[i], sub_space)
107 for i in range(len(sample.value)):
108 print('%svalue[%d] = %d' % (space, i, sample.value[i]))
109 for i in range(len(sample.label)):
311 sample = Sample()
312 sample.add_value(sample_type_id, 1)
313 sample.add_value(sample_type_id + 1, report_sample.period)
316 sample.add_location_id(location_id)
321 sample.add_location_id(location_id)
322 if sample.location_ids:
323 self.add_sample(sample)
330 for sample in self.sample_list:
331 self.gen_profile_sample(sample)
341 def _filter_report_sample(self, sample): argument
344 if sample.thread_comm not in self.comm_filter:
347 if sample.pid not in self.pid_filter:
350 if sample.tid not in self.tid_filter:
471 def add_sample(self, sample): argument
472 exist_sample = self.sample_map.get(sample.key)
474 exist_sample.add_values(sample.values)
476 self.sample_list.append(sample)
477 self.sample_map[sample.key] = sample
548 def gen_profile_sample(self, sample): argument
549 profile_sample = self.profile.sample.add()
550 profile_sample.location_id.extend(sample.location_ids)
553 for sample_type_id in sample.values:
554 values[sample_type_id] = sample.values[sample_type_id]