Home
last modified time | relevance | path

Searched refs:sample (Results 1 – 25 of 45) sorted by relevance

12

/system/extras/simpleperf/
Dsample_tree.h96 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()
[all …]
DSampleDisplayer.h31 std::string DisplayAccumulatedOverhead(const EntryT* sample, in DisplayAccumulatedOverhead() argument
33 uint64_t period = sample->period + sample->accumulated_period; in DisplayAccumulatedOverhead()
40 std::string DisplayAccumulatedPeriod(const EntryT* sample) { in DisplayAccumulatedPeriod() argument
41 return android::base::StringPrintf("%" PRIu64, sample->period + sample->accumulated_period); in DisplayAccumulatedPeriod()
45 std::string DisplaySelfOverhead(const EntryT* sample, const InfoT* info) { in DisplaySelfOverhead() argument
46 uint64_t period = sample->period; in DisplaySelfOverhead()
54 std::string function_name(const EntryT* sample) { \
55 return android::base::StringPrintf("%" PRIu64, sample->display_part); \
60 std::string function_name(const EntryT* sample) { \
61 return android::base::StringPrintf("0x%" PRIx64, sample->display_part); \
[all …]
Dreport_sample.proto20 // Wall clock time for current sample.
40 // Simpleperf generates one sample whenever a specified amount of events happen
41 // while running a monitored thread. So each sample belongs to one event type.
47 // and sample lost rate.
48 // event_count field shows the count of the events (belong to the sample's event type)
49 // that have happened since last sample (belong to the sample's event type) for the
50 // same thread. However, if there are lost samples between current sample and previous
51 // sample, the event_count is the count of events from the last lost sample.
54 // An index in meta_info.event_type, shows which event type current sample belongs to.
90 Sample sample = 1; field
Dsample_tree_test.cpp96 static void SampleMatchExpectation(const SampleEntry& sample, in SampleMatchExpectation() argument
100 ASSERT_EQ(expected.pid, sample.pid); in SampleMatchExpectation()
101 ASSERT_EQ(expected.tid, sample.tid); in SampleMatchExpectation()
102 ASSERT_STREQ(expected.thread_comm, sample.thread_comm); in SampleMatchExpectation()
103 ASSERT_EQ(expected.dso_name, sample.dso_name); in SampleMatchExpectation()
104 ASSERT_EQ(expected.map_start_addr, sample.map_start_addr); in SampleMatchExpectation()
105 ASSERT_EQ(expected.sample_count, sample.sample_count); in SampleMatchExpectation()
Dcmd_report.cpp176 std::unique_ptr<SampleEntry> sample( in CreateBranchSample() local
179 sample->branch_from.map = from_map; in CreateBranchSample()
180 sample->branch_from.symbol = from_symbol; in CreateBranchSample()
181 sample->branch_from.vaddr_in_file = from_vaddr_in_file; in CreateBranchSample()
182 sample->branch_from.flags = item.flags; in CreateBranchSample()
183 return InsertSample(std::move(sample)); in CreateBranchSample()
186 SampleEntry* CreateCallChainSample(const SampleEntry* sample, uint64_t ip, in CreateCallChainSample() argument
190 const ThreadEntry* thread = sample->thread; in CreateCallChainSample()
200 sample->time, 0, acc_info, 0, thread, map, symbol, vaddr_in_file)); in CreateCallChainSample()
201 callchain_sample->thread_comm = sample->thread_comm; in CreateCallChainSample()
[all …]
Dcmd_kmem.cpp87 static std::string DisplayFragment(const SlabSample* sample) { in DisplayFragment() argument
89 sample->bytes_alloc - sample->bytes_req); in DisplayFragment()
185 SlabSample* sample = in CreateSample() local
189 std::make_pair(ptr, std::make_pair(r.cpu_data.cpu, sample))); in CreateSample()
192 return sample; in CreateSample()
197 SlabSample* sample = it->second.second; in CreateSample() local
199 sample->cross_cpu_allocations++; in CreateSample()
215 const SlabSample* sample, uint64_t ip, bool in_kernel, in CreateCallChainSample() argument
224 new SlabSample(symbol, sample->ptr, acc_info.bytes_req, in CreateCallChainSample()
225 acc_info.bytes_alloc, 1, sample->gfp_flags, 0)), in CreateCallChainSample()
[all …]
Dcmd_report_sample.cpp334 auto& sample = proto_record.sample(); in DumpProtobufReport() local
337 FprintIndented(report_fp_, 1, "event_type_id: %zu\n", sample.event_type_id()); in DumpProtobufReport()
338 FprintIndented(report_fp_, 1, "time: %" PRIu64 "\n", sample.time()); in DumpProtobufReport()
339 FprintIndented(report_fp_, 1, "event_count: %" PRIu64 "\n", sample.event_count()); in DumpProtobufReport()
340 FprintIndented(report_fp_, 1, "thread_id: %d\n", sample.thread_id()); in DumpProtobufReport()
342 for (int i = 0; i < sample.callchain_size(); ++i) { in DumpProtobufReport()
343 const proto::Sample_CallChainEntry& callchain = sample.callchain(i); in DumpProtobufReport()
536 proto::Sample* sample = proto_record.mutable_sample(); in PrintSampleRecordInProtobuf() local
537 sample->set_time(r.time_data.time); in PrintSampleRecordInProtobuf()
538 sample->set_event_count(r.period_data.period); in PrintSampleRecordInProtobuf()
[all …]
/system/extras/simpleperf/scripts/
Dreport_sample.py39 sample = lib.GetNextSample()
40 if sample is None:
47 sec = sample.time / 1000000000
48 usec = (sample.time - sec * 1000000000) / 1000
49 print('%s\t%d [%03d] %d.%06d:\t\t%d %s:' % (sample.thread_comm,
50 sample.tid, sample.cpu, sec,
51 usec, sample.period, event.name))
52 print('%16x\t%s (%s)' % (sample.ip, symbol.symbol_name, symbol.dso_name))
Dpprof_proto_generator.py66 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)):
[all …]
Dannotate.py205 sample = lib.GetNextSample()
206 if sample is None:
209 if not self._filter_sample(sample):
224 def _filter_sample(self, sample): argument
227 if sample.thread_comm not in self.comm_filter:
230 if sample.pid not in self.pid_filter:
233 if sample.tid not in self.tid_filter:
260 sample = lib.GetNextSample()
261 if sample is None:
264 if not self._filter_sample(sample):
[all …]
/system/extras/simpleperf/scripts/inferno/
Ddata_types.py36 def add_callchain(self, callchain, symbol, sample): argument
37 self.name = sample.thread_comm
39 self.num_events += sample.period
48 self.flamegraph.add_callchain(chain, sample.period)
72 def add_sample(self, sample, symbol, callchain): argument
73 thread = self.get_thread(sample.tid, sample.pid)
74 thread.add_callchain(callchain, symbol, sample)
77 self.num_events += sample.period
Dinferno.py128 sample = lib.GetNextSample()
129 if sample is None:
134 if sample_filter_fn and not sample_filter_fn(sample, symbol, callchain):
136 process.add_sample(sample, symbol, callchain)
338 def filter_fn(sample, _symbol, _callchain): argument
339 sample.pid = sample.tid = process.pid
/system/extras/boottime_tools/bootio/
Dbootio_collector.cpp66 int ReadIo(char *filename, AppSample *sample) { in ReadIo() argument
82 sample->set_rchar(rchar); in ReadIo()
83 sample->set_wchar(wchar); in ReadIo()
84 sample->set_syscr(syscr); in ReadIo()
85 sample->set_syscw(syscw); in ReadIo()
86 sample->set_readbytes(readbytes); in ReadIo()
87 sample->set_writebytes(writebytes); in ReadIo()
112 int ReadStat(char *filename, AppSample *sample) { in ReadStat() argument
139 sample->set_utime(utime); in ReadStat()
140 sample->set_stime(stime); in ReadStat()
[all …]
/system/extras/perfprofd/scripts/
Dperf_proto_json2sqlite.py90 for sample in self.samples_tmp_list:
91 self._c.execute("insert into samples values (?,?,?)", sample)
107 def add_sample(self, sample, tid_name_map): argument
121 pid_name = get_name(sample[0], tid_name_map)
123 tid_name = get_name(sample[1], tid_name_map)
129 for entry in sample[2]:
162 for sample in data['samples']:
163 sql_out.add_sample(sample, data['names'])
Dperf_proto_stack.py361 def print_sample(sample, tid_name_map): argument
362 if sample[0] in tid_name_map:
363 pid_name = "%s (%d)" % (tid_name_map[sample[0]], sample[0])
364 elif sample[0] == 0:
367 pid_name = "unknown (%d)" % (sample[0])
369 if sample[1] in tid_name_map:
370 tid_name = "%s (%d)" % (tid_name_map[sample[1]], sample[1])
371 elif sample[1] == 0:
374 tid_name = "unknown (%d)" % (sample[1])
377 for sym in sample[2]:
[all …]
/system/extras/power_profile/gps_on/Application/
Dbuild.gradle21 // The sample build uses multiple directories to
23 // the main sample code.
25 'main', // main sample code; look here for the interesting stuff.
27 'template'] // boilerplate code that is generated by the sample template process
/system/extras/power_profile/camera_flashlight/Application/
Dbuild.gradle24 // The sample build uses multiple directories to
26 // the main sample code.
28 'main', // main sample code; look here for the interesting stuff.
30 'template'] // boilerplate code that is generated by the sample template process
/system/extras/power_profile/camera_avg/Application/
Dbuild.gradle24 // The sample build uses multiple directories to
26 // the main sample code.
28 'main', // main sample code; look here for the interesting stuff.
30 'template'] // boilerplate code that is generated by the sample template process
/system/media/audio_utils/include/audio_utils/
Dprimitives.h710 static inline int16_t clamp16(int32_t sample) in clamp16() argument
712 if ((sample>>15) ^ (sample>>31)) in clamp16()
713 sample = 0x7FFF ^ (sample>>31); in clamp16()
714 return sample; in clamp16()
720 static inline int32_t clamp32(int64_t sample) in clamp32() argument
722 if ((sample>>31) ^ (sample>>63)) in clamp32()
723 sample = 0x7fffffff ^ (sample>>63); in clamp32()
724 return sample; in clamp32()
Dsample.h34 float float_from_sample(sample_minifloat_t sample);
/system/netd/resolv/
Dres_stats.cpp36 void _res_stats_set_sample(res_sample* sample, time_t now, int rcode, int rtt) { in _res_stats_set_sample() argument
38 sample->at = now; in _res_stats_set_sample()
39 sample->rcode = rcode; in _res_stats_set_sample()
40 sample->rtt = rtt; in _res_stats_set_sample()
Dresolv_private.h134 const res_sample* sample, int max_samples);
140 void _res_stats_set_sample(res_sample* sample, time_t now, int rcode, int rtt);
/system/extras/simpleperf/doc/
Dinferno.md10 . You can see a sample report generated with Inferno
20 ![flamegraph sample](./main_thread_flamegraph.png)
35 ![flamegraph sample](./bottleneck.png)
63 You can select how long to sample for, the color of the node and many other
92 If simpleperf reports a lot of lost sample it is probably because you are
/system/media/audio_utils/
Dprimitives.c141 const int16_t sample = *--src; in memcpy_to_p24_from_i16() local
143 dst[0] = sample >> 8; in memcpy_to_p24_from_i16()
144 dst[1] = sample; in memcpy_to_p24_from_i16()
148 dst[1] = sample; in memcpy_to_p24_from_i16()
149 dst[2] = sample >> 8; in memcpy_to_p24_from_i16()
295 const float sample = *src++; in memcpy_to_float_from_float_with_clamping() local
296 *dst++ = fmax(-absMax, fmin(absMax, sample)); in memcpy_to_float_from_float_with_clamping()
Dchannels.c24 static inline int32_t clamp24(int32_t sample) in clamp24() argument
26 if ((sample>>23) ^ (sample>>31)) { in clamp24()
27 sample = 0x007FFFFF ^ (sample>>31); in clamp24()
29 return sample; in clamp24()

12