/system/extras/simpleperf/ |
D | sample_tree.h | 95 EntryT* sample = CreateSample(r, in_kernel, &acc_info); in ProcessSampleRecord() local 96 if (sample == nullptr) { in ProcessSampleRecord() 104 const ThreadEntry* thread = GetThreadOfSample(sample); in ProcessSampleRecord() 121 callchain.push_back(sample); in ProcessSampleRecord() 145 CreateCallChainSample(thread, sample, ip, in_kernel, callchain, acc_info); in ProcessSampleRecord() 160 EntryT* sample = callchain[0]; in ProcessSampleRecord() local 163 if (added_set.find(sample) != added_set.end()) { in ProcessSampleRecord() 166 added_set.insert(sample); in ProcessSampleRecord() 167 InsertCallChainForSample(sample, callchain, acc_info); in ProcessSampleRecord() 168 UpdateCallChainParentInfo(sample, parent); in ProcessSampleRecord() [all …]
|
D | SampleDisplayer.h | 33 std::string DisplayAccumulatedOverhead(const EntryT* sample, const InfoT* info) { in DisplayAccumulatedOverhead() argument 34 uint64_t period = sample->period + sample->accumulated_period; in DisplayAccumulatedOverhead() 41 std::string DisplayAccumulatedPeriod(const EntryT* sample) { in DisplayAccumulatedPeriod() argument 42 return android::base::StringPrintf("%" PRIu64, sample->period + sample->accumulated_period); in DisplayAccumulatedPeriod() 46 std::string DisplaySelfOverhead(const EntryT* sample, const InfoT* info) { in DisplaySelfOverhead() argument 47 uint64_t period = sample->period; in DisplaySelfOverhead() 55 std::string function_name(const EntryT* sample) { \ 56 return android::base::StringPrintf("%" PRIu64, sample->display_part); \ 61 std::string function_name(const EntryT* sample) { \ 62 return android::base::StringPrintf("0x%" PRIx64, sample->display_part); \ [all …]
|
D | cmd_report_sample.proto | 20 // Wall clock time for current sample. 51 // Simpleperf generates one sample whenever a specified amount of events happen 52 // while running a monitored thread. So each sample belongs to one event type. 58 // and sample lost rate. 59 // event_count field shows the count of the events (belong to the sample's event type) 60 // that have happened since last sample (belong to the sample's event type) for the 61 // same thread. However, if there are lost samples between current sample and previous 62 // sample, the event_count is the count of events from the last lost sample. 65 // An index in meta_info.event_type, shows which event type current sample belongs to. 127 Sample sample = 1; field
|
D | cmd_report.cpp | 185 auto sample = in CreateBranchSample() local 188 sample->branch_from.map = from_map; in CreateBranchSample() 189 sample->branch_from.symbol = from_symbol; in CreateBranchSample() 190 sample->branch_from.vaddr_in_file = from_vaddr_in_file; in CreateBranchSample() 191 sample->branch_from.flags = item.flags; in CreateBranchSample() 192 return InsertSample(std::move(sample)); in CreateBranchSample() 195 SampleEntry* CreateCallChainSample(const ThreadEntry* thread, const SampleEntry* sample, in CreateCallChainSample() argument 207 auto callchain_sample = std::make_unique<SampleEntry>(sample->time, 0, acc_info, 0, sample->cpu, in CreateCallChainSample() 209 callchain_sample->thread_comm = sample->thread_comm; in CreateCallChainSample() 213 const ThreadEntry* GetThreadOfSample(SampleEntry* sample) override { in GetThreadOfSample() argument [all …]
|
D | sample_tree_test.cpp | 91 static void SampleMatchExpectation(const SampleEntry& sample, const SampleEntry& expected, in SampleMatchExpectation() argument 94 ASSERT_EQ(expected.pid, sample.pid); in SampleMatchExpectation() 95 ASSERT_EQ(expected.tid, sample.tid); in SampleMatchExpectation() 96 ASSERT_STREQ(expected.thread_comm, sample.thread_comm); in SampleMatchExpectation() 97 ASSERT_EQ(expected.dso_name, sample.dso_name); in SampleMatchExpectation() 98 ASSERT_EQ(expected.map_start_addr, sample.map_start_addr); in SampleMatchExpectation() 99 ASSERT_EQ(expected.sample_count, sample.sample_count); in SampleMatchExpectation()
|
D | cmd_report_sample.cpp | 387 auto& sample = proto_record.sample(); in DumpProtobufReport() local 390 FprintIndented(report_fp_, 1, "event_type_id: %zu\n", sample.event_type_id()); in DumpProtobufReport() 391 FprintIndented(report_fp_, 1, "time: %" PRIu64 "\n", sample.time()); in DumpProtobufReport() 392 FprintIndented(report_fp_, 1, "event_count: %" PRIu64 "\n", sample.event_count()); in DumpProtobufReport() 393 FprintIndented(report_fp_, 1, "thread_id: %d\n", sample.thread_id()); in DumpProtobufReport() 395 for (int i = 0; i < sample.callchain_size(); ++i) { in DumpProtobufReport() 396 const proto::Sample_CallChainEntry& callchain = sample.callchain(i); in DumpProtobufReport() 414 if (sample.has_unwinding_result()) { in DumpProtobufReport() 417 sample.unwinding_result().raw_error_code()); in DumpProtobufReport() 419 sample.unwinding_result().error_addr()); in DumpProtobufReport() [all …]
|
D | cmd_kmem.cpp | 82 static std::string DisplayFragment(const SlabSample* sample) { in DisplayFragment() argument 83 return android::base::StringPrintf("%" PRIu64, sample->bytes_alloc - sample->bytes_req); in DisplayFragment() 177 SlabSample* sample = InsertSample(std::unique_ptr<SlabSample>( in CreateSample() local 179 alloc_cpu_record_map_.insert(std::make_pair(ptr, std::make_pair(r.cpu_data.cpu, sample))); in CreateSample() 182 return sample; in CreateSample() 187 SlabSample* sample = it->second.second; in CreateSample() local 189 sample->cross_cpu_allocations++; in CreateSample() 203 SlabSample* CreateCallChainSample(const ThreadEntry*, const SlabSample* sample, uint64_t ip, in CreateCallChainSample() argument 211 std::unique_ptr<SlabSample>(new SlabSample(symbol, sample->ptr, acc_info.bytes_req, in CreateCallChainSample() 212 acc_info.bytes_alloc, 1, sample->gfp_flags, 0)), in CreateCallChainSample() [all …]
|
/system/extras/simpleperf/scripts/ |
D | debug_unwind_reporter.py | 83 def match(self, sample: Sample) -> bool: 88 def match(self, sample: Sample) -> bool: 89 for node in sample.callchain: 99 def match(self, sample: Sample) -> bool: 100 return sample.error_code in self.error_code 107 def match(self, sample: Sample) -> bool: 108 return sample.callchain[-1].dso in self.end_dso 115 def match(self, sample: Sample) -> bool: 116 return sample.callchain[-1].symbol in self.end_symbol 123 def match(self, sample: Sample) -> bool: [all …]
|
D | report_sample.py | 39 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))
|
D | pprof_proto_generator.py | 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)): [all …]
|
D | annotate.py | 205 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: 257 sample = lib.GetNextSample() 258 if sample is None: 261 if not self._filter_sample(sample): [all …]
|
/system/bt/embdrv/g722/fuzzer/ |
D | g722_enc_fuzzer.cc | 53 const uint8_t* sample = buff.data() + i * 2; in LLVMFuzzerTestOneInput() local 54 int16_t left = (int16_t)((*(sample + 1) << 8) + *sample) >> 1; in LLVMFuzzerTestOneInput() 56 sample += 2; in LLVMFuzzerTestOneInput() 57 int16_t right = (int16_t)((*(sample + 1) << 8) + *sample) >> 1; in LLVMFuzzerTestOneInput()
|
/system/extras/simpleperf/scripts/inferno/ |
D | data_types.py | 36 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
|
D | inferno.py | 132 sample = lib.GetNextSample() 133 if sample is None: 138 if sample_filter_fn and not sample_filter_fn(sample, symbol, callchain): 140 process.add_sample(sample, symbol, callchain) 349 def filter_fn(sample, _symbol, _callchain): argument 350 sample.pid = sample.tid = process.pid
|
/system/extras/simpleperf/scripts/test/ |
D | report_lib_test.py | 48 sample = self.report_lib.GetCurrentSample() 49 if sample.ip == 0x4004ff and sample.time == 7637889424953: 51 self.assertEqual(sample.pid, 15926) 52 self.assertEqual(sample.tid, 15926) 53 self.assertEqual(sample.thread_comm, 't2') 54 self.assertEqual(sample.cpu, 5) 55 self.assertEqual(sample.period, 694614) 91 sample = self.report_lib.GetCurrentSample() 92 total_period += sample.period 94 sleep_function_period += sample.period [all …]
|
D | pprof_proto_generator_test.py | 102 self.assertGreater(len(profile_both.sample), len(profile1.sample)) 103 self.assertGreater(len(profile_both.sample), len(profile2.sample))
|
/system/extras/boottime_tools/bootio/ |
D | bootio_collector.cpp | 66 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/power_profile/gps_on/Application/ |
D | build.gradle | 21 // 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/perf2cfg/perf2cfg/ |
D | analyze.py | 166 for sample in self.samples(): 174 sample.period) 186 sample = self.report.GetNextSample() 187 while sample: 190 yield sample 192 sample = self.report.GetNextSample()
|
/system/extras/power_profile/camera_flashlight/Application/ |
D | build.gradle | 24 // 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/ |
D | build.gradle | 24 // 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/ |
D | primitives.h | 749 static inline int16_t clamp16(int32_t sample) in clamp16() argument 751 if ((sample>>15) ^ (sample>>31)) in clamp16() 752 sample = 0x7FFF ^ (sample>>31); in clamp16() 753 return sample; in clamp16() 759 static inline int32_t clamp32(int64_t sample) in clamp32() argument 761 if ((sample>>31) ^ (sample>>63)) in clamp32() 762 sample = 0x7fffffff ^ (sample>>63); in clamp32() 763 return sample; in clamp32()
|
/system/extras/simpleperf/scripts/purgatorio/ |
D | purgatorio.py | 192 sample = lib.GetNextSample() 194 if sample is None: 202 start_time = sample.time 204 sample_time = (sample.time - start_time) / 1e6 # convert to ms 211 thread_desc = ThreadDescriptor(sample.pid, sample.tid, sample.thread_comm)
|
/system/extras/perf2cfg/tests/ |
D | test_edit.py | 35 for sample in samples: 36 analyzer.record_sample(*sample)
|
/system/extras/simpleperf/doc/ |
D | executable_commands_reference.md | 30 - [Group samples into sample entries](#group-samples-into-sample-entries) 56 4. Each time a given number of events happen, the kernel dumps a sample to the mapped buffers. 75 The report-sample command: reports each sample in perf.data, used for supporting integration of 327 The record command is used to dump samples of the profiled processes. Each sample can contain 328 information like the time at which the sample was generated, the number of events since last 329 sample, the program counter of a thread, the call chain of a thread. 335 # Record on process 7394 for 10 seconds, using default event (cpu-cycles), using default sample 385 # Record with sample frequency 1000: sample 1000 times every second running. 388 # Record with sample period 100000: sample 1 time every 100000 events. 393 used for generating samples (default is 25%), and decreases the max allowed sample frequency when [all …]
|