Searched refs:sample (Results 1 - 25 of 28) sorted by relevance

12

/system/extras/simpleperf/
H A Dsample_tree.h37 // 1. Build a SampleTree from SampleRecords with each sample containing
40 // 2. Sort the SampleTree by cpu-cycles in the sample. As we want to display the
42 // 3. Display the SampleTree, each sample prints its (cpu-cycles, function name)
53 // displays each sample in the SampleTree.
96 EntryT* sample = CreateSample(r, in_kernel, &acc_info); local
97 if (sample == nullptr) {
106 const ThreadEntry* thread = GetThreadOfSample(sample);
124 callchain.push_back(sample);
148 CreateCallChainSample(sample, ip, in_kernel, callchain, acc_info);
163 EntryT* sample local
203 InsertSample(std::unique_ptr<EntryT> sample) argument
221 InsertCallChainSample(std::unique_ptr<EntryT> sample, const std::vector<EntryT*>& callchain) argument
240 EntryT* sample = *it; local
250 InsertCallChainForSample(EntryT* sample, const std::vector<EntryT*>& callchain, const AccumulateInfoT& acc_info) argument
275 UpdateCallChainParentInfo(EntryT* sample, EntryT* parent) argument
330 SortCallChain(EntryT* sample) argument
[all...]
H A DSampleDisplayer.h28 // The display functions below are used to show items in a sample.
31 std::string DisplayAccumulatedOverhead(const EntryT* sample, argument
33 uint64_t period = sample->period + sample->accumulated_period;
40 std::string DisplayAccumulatedPeriod(const EntryT* sample) { argument
41 return android::base::StringPrintf("%" PRIu64, sample->period + sample->accumulated_period);
45 std::string DisplaySelfOverhead(const EntryT* sample, const InfoT* info) { argument
46 uint64_t period = sample->period;
54 std::string function_name(const EntryT* sample) { \
68 DisplayPid(const EntryT* sample) argument
73 DisplayTid(const EntryT* sample) argument
78 DisplayComm(const EntryT* sample) argument
83 DisplayDso(const EntryT* sample) argument
88 DisplaySymbol(const EntryT* sample) argument
93 DisplayDsoFrom(const EntryT* sample) argument
98 DisplaySymbolFrom(const EntryT* sample) argument
115 operator ()(FILE* fp, const SampleT* sample) argument
173 PrintSampleName(const SampleT* sample) argument
229 AdjustWidth(const EntryT* sample) argument
249 PrintSample(FILE* fp, const EntryT* sample) argument
[all...]
H A Dsample_tree_test.cpp96 static void SampleMatchExpectation(const SampleEntry& sample, argument
100 ASSERT_EQ(expected.pid, sample.pid);
101 ASSERT_EQ(expected.tid, sample.tid);
102 ASSERT_STREQ(expected.thread_comm, sample.thread_comm);
103 ASSERT_EQ(expected.dso_name, sample.dso_name);
104 ASSERT_EQ(expected.map_start_addr, sample.map_start_addr);
105 ASSERT_EQ(expected.sample_count, sample.sample_count);
115 ASSERT_FALSE(has_error) << "Error matching sample at pos " << i;
H A Dcmd_report.cpp63 // accumuated when appearing in other sample's callchain
72 // a callchain tree representing all callchains in the sample
177 std::unique_ptr<SampleEntry> sample(
180 sample->branch_from.map = from_map;
181 sample->branch_from.symbol = from_symbol;
182 sample->branch_from.vaddr_in_file = from_vaddr_in_file;
183 sample->branch_from.flags = item.flags;
184 return InsertSample(std::move(sample));
187 SampleEntry* CreateCallChainSample(const SampleEntry* sample, uint64_t ip,
191 const ThreadEntry* thread = sample
[all...]
H A Dcmd_kmem.cpp44 // callchains in this sample
87 static std::string DisplayFragment(const SlabSample* sample) { argument
89 sample->bytes_alloc - sample->bytes_req);
185 SlabSample* sample = variable
189 std::make_pair(ptr, std::make_pair(r.cpu_data.cpu, sample)));
192 return sample;
197 SlabSample* sample = it->second.second; variable
199 sample->cross_cpu_allocations++;
215 const SlabSample* sample, uint64_
[all...]
H A Dcmd_report_sample.cpp65 "report-sample", "report raw sample information in perf.data",
67 "Usage: simpleperf report-sample [options]\n"
70 " `simpleperf report-sample --protobuf -o <file>`.\n"
283 auto& sample = proto_record.sample(); local
285 FprintIndented(report_fp_, 0, "sample %zu:\n", ++sample_count);
286 FprintIndented(report_fp_, 1, "event_type_id: %zu\n", sample.event_type_id());
287 FprintIndented(report_fp_, 1, "time: %" PRIu64 "\n", sample.time());
288 FprintIndented(report_fp_, 1, "event_count: %" PRIu64 "\n", sample
429 proto::Sample* sample = proto_record.mutable_sample(); local
[all...]
H A Dcallchain.h107 const std::vector<std::unique_ptr<NodeT>>& nodes, const EntryT* sample,
110 if (is_same_sample(node->chain.front(), sample)) {
106 FindMatchingNode( const std::vector<std::unique_ptr<NodeT>>& nodes, const EntryT* sample, std::function<bool(const EntryT*, const EntryT*)> is_same_sample) argument
/system/extras/simpleperf/scripts/
H A Dreport_sample.py28 """ read record_file, and print each sample"""
40 sample = lib.GetNextSample()
41 if sample is None:
48 sec = sample.time / 1000000000
49 usec = (sample.time - sec * 1000000000) / 1000
50 print('%s\t%d [%03d] %d.%d:\t\t%d %s:' % (sample.thread_comm,
51 sample.tid, sample.cpu, sec,
52 usec, sample.period, event.name))
53 print('%16x\t%s (%s)' % (sample
[all...]
H A Dpprof_proto_generator.py73 print('%d samples' % len(p.sample))
74 for i in range(len(p.sample)):
75 print('sample[%d]:' % i)
76 self.show_sample(p.sample[i], sub_space)
109 def show_sample(self, sample, space=''):
111 for i in range(len(sample.location_id)):
112 print('%slocation_id[%d]: id %d' % (space, i, sample.location_id[i]))
113 self.show_location_id(sample.location_id[i], sub_space)
114 for i in range(len(sample.value)):
115 print('%svalue[%d] = %d' % (space, i, sample
[all...]
H A Dsimpleperf_report_lib.py50 """ Instance of a sample in perf.data.
51 ip: the program counter of the thread generating the sample.
52 pid: process id (or thread group id) of the thread generating the sample.
55 time: time at which the sample was generated. The value is in nanoseconds.
58 cpu: the cpu generating the sample.
59 period: count of events have happened since last sample. For example, if we use
90 """ Symbol info of the instruction hit by a sample or a callchain entry of a sample.
107 """ A callchain entry of a sample.
116 """ Callchain info of a sample
[all...]
H A Dannotate.py338 sample = lib.GetNextSample()
339 if sample is None:
342 if not self._filter_sample(sample):
355 def _filter_sample(self, sample):
356 """Return true if the sample can be used."""
358 if sample.thread_comm not in self.comm_filter:
361 if sample.pid not in self.pid_filter:
364 if sample.tid not in self.tid_filter:
394 sample = lib.GetNextSample()
395 if sample i
[all...]
H A Dtest.py818 sample = self.report_lib.GetCurrentSample()
829 sample = self.report_lib.GetCurrentSample()
830 if sample.ip == 0x4004ff and sample.time == 7637889424953:
832 self.assertEqual(sample.pid, 15926)
833 self.assertEqual(sample.tid, 15926)
834 self.assertEqual(sample.thread_comm, 't2')
835 self.assertEqual(sample.cpu, 5)
836 self.assertEqual(sample.period, 694614)
871 sample
[all...]
H A Dbinary_cache_builder.py75 sample = lib.GetNextSample()
76 if sample is None:
/system/extras/simpleperf/scripts/inferno/
H A Ddata_types.py36 def add_callchain(self, callchain, symbol, sample):
37 self.name = sample.thread_comm
39 self.num_events += sample.period
48 self.flamegraph.add_callchain(chain, sample.period)
61 # num_events is the count of events contained in all samples. Each sample contains a
62 # count of events happened since last sample. If we use cpu-cycles event, the count
72 def add_sample(self, sample, symbol, callchain):
73 thread = self.get_thread(sample.tid, sample.pid)
74 thread.add_callchain(callchain, symbol, sample)
[all...]
H A Dinferno.py120 sample = lib.GetNextSample()
121 if sample is None:
126 if sample_filter_fn and not sample_filter_fn(sample, symbol, callchain):
128 process.add_sample(sample, symbol, callchain)
312 def filter_fn(sample, symbol, callchain):
313 sample.pid = sample.tid = process.pid
/system/extras/perfprofd/scripts/
H A Dperf_proto_json2sqlite.py34 # The sample replicates pid and tid.
89 for sample in self.samples_tmp_list:
90 self._c.execute("insert into samples values (?,?,?)", sample)
106 def add_sample(self, sample, tid_name_map):
120 pid_name = get_name(sample[0], tid_name_map)
122 tid_name = get_name(sample[1], tid_name_map)
128 for entry in sample[2]:
161 for sample in data['samples']:
162 sql_out.add_sample(sample, data['names'])
H A Dperf_proto_stack.py341 def print_sample(sample, tid_name_map):
342 if sample[0] in tid_name_map:
343 pid_name = "%s (%d)" % (tid_name_map[sample[0]], sample[0])
344 elif sample[0] == 0:
347 pid_name = "unknown (%d)" % (sample[0])
348 if sample[1] in tid_name_map:
349 tid_name = "%s (%d)" % (tid_name_map[sample[1]], sample[1])
350 elif sample[
[all...]
/system/extras/boottime_tools/bootio/
H A Dbootio_collector.cpp66 int ReadIo(char *filename, AppSample *sample) { argument
82 sample->set_rchar(rchar);
83 sample->set_wchar(wchar);
84 sample->set_syscr(syscr);
85 sample->set_syscw(syscw);
86 sample->set_readbytes(readbytes);
87 sample->set_writebytes(writebytes);
112 int ReadStat(char *filename, AppSample *sample) { argument
139 sample->set_utime(utime);
140 sample
191 AppSample *sample = data->add_samples(); local
[all...]
/system/media/audio_utils/include/audio_utils/
H A Dprimitives.h42 * Each 32-bit input sample can be viewed as a signed fixed-point Q19.12 of which the
48 * For interleaved stereo, pairs is the number of sample pairs,
409 * Any float sample not in the range [-absMax, absMax] will be clamped in this range.
507 * \param sample_size Size of each sample in bytes. Must be 1, 2, 3, or 4.
511 * If the sample size is not in range, the function will abort.
546 * \param sample_size Size of each sample in bytes. Must be 1, 2, 3, or 4.
550 * If the sample size is not in range, the function will abort.
696 * Clamp (aka hard limit or clip) a signed 32-bit sample to 16-bit range.
698 static inline int16_t clamp16(int32_t sample) argument
700 if ((sample>>1
708 clamp32(int64_t sample) argument
[all...]
/system/media/audio_utils/
H A Dchannels.c22 * Clamps a 24-bit value from a 32-bit sample
24 static inline int32_t clamp24(int32_t sample) argument
26 if ((sample>>23) ^ (sample>>31)) {
27 sample = 0x007FFFFF ^ (sample>>31);
29 return sample;
252 * sample_size_in_bytes Specifies the number of bytes per sample.
323 * sample_size_in_bytes Specifies the number of bytes per sample.
336 static const uint8x3_t packed24_zero; /* zero 24 bit sample */
[all...]
H A Dprimitives.c141 const int16_t sample = *--src; local
143 dst[0] = sample >> 8;
144 dst[1] = sample;
148 dst[1] = sample;
149 dst[2] = sample >> 8;
286 const float sample = *src++; local
287 *dst++ = fmax(-absMax, fmin(absMax, sample));
370 * C macro to do channel mask copying independent of dst/src sample type.
422 static const uint8x3_t zero; /* tricky - we use this to zero out a sample */
441 * within a frame. This is independent of src/dst sample typ
[all...]
/system/extras/simpleperf/doc/
H A 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/extras/perfprofd/tests/
H A Dperfprofd_test.cc690 std::string FormatSampleEvent(const quipper::PerfDataProto_SampleEvent& sample) { argument
692 if (sample.has_pid()) {
693 oss << "pid=" << sample.pid();
695 if (sample.has_tid()) {
696 oss << " tid=" << sample.tid();
698 if (sample.has_ip()) {
699 oss << " ip=" << sample.ip();
701 if (sample.has_addr()) {
702 oss << " addr=" << sample.addr();
704 if (sample
[all...]
/system/bt/embdrv/sbc/decoder/srce/
H A Dsynthesis-dct8.c91 #define FLOAT_MULT_DCT(K, sample) (FIX(K, 20) * sample)
/system/bt/bta/hearing_aid/
H A Dhearing_aid.cc753 /* For now we assume data comes in as 16bit per sample 16kHz PCM stereo */
767 const uint8_t* sample = data.data() + i * 4; local
769 uint16_t left = (int16_t)((*(sample + 1) << 8) + *sample) >> 1;
772 sample += 2;
773 uint16_t right = (int16_t)((*(sample + 1) << 8) + *sample) >> 1;

Completed in 429 milliseconds

12