/system/extras/sane_schedstat/ |
D | sane_schedstat.c | 85 int cpu; in parse_cpu_v15() local 88 &cpu, &tmp.yld_count, in parse_cpu_v15() 96 cpu_delta[cpu].yld_count = tmp.yld_count - cpu_prev[cpu].yld_count; in parse_cpu_v15() 97 cpu_delta[cpu].sched_switch = tmp.sched_switch - cpu_prev[cpu].sched_switch; in parse_cpu_v15() 98 cpu_delta[cpu].sched_count = tmp.sched_count - cpu_prev[cpu].sched_count; in parse_cpu_v15() 99 cpu_delta[cpu].sched_goidle = tmp.sched_goidle - cpu_prev[cpu].sched_goidle; in parse_cpu_v15() 100 cpu_delta[cpu].ttwu_count = tmp.ttwu_count - cpu_prev[cpu].ttwu_count; in parse_cpu_v15() 101 cpu_delta[cpu].ttwu_local = tmp.ttwu_local - cpu_prev[cpu].ttwu_local; in parse_cpu_v15() 102 cpu_delta[cpu].cpu_time = tmp.cpu_time - cpu_prev[cpu].cpu_time; in parse_cpu_v15() 103 cpu_delta[cpu].run_delay = tmp.run_delay - cpu_prev[cpu].run_delay; in parse_cpu_v15() [all …]
|
/system/extras/tests/binder/benchmarks/ |
D | binderAddInts.cpp | 65 explicit AddIntsService(int cpu = unbound); 83 static void bindCPU(unsigned int cpu); 166 AddIntsService::AddIntsService(int cpu): cpu_(cpu) { in AddIntsService() argument 167 if (cpu != unbound) { bindCPU(cpu); } in AddIntsService() 175 int cpu; in onTransact() local 180 cpu = sched_getcpu(); in onTransact() 181 if (cpu != cpu_) { in onTransact() 182 cerr << "server onTransact on CPU " << cpu << " expected CPU " in onTransact() 204 static void bindCPU(unsigned int cpu) in bindCPU() argument 210 CPU_SET(cpu, &cpuset); in bindCPU() [all …]
|
/system/extras/simpleperf/ |
D | cmd_stat_test.cpp | 381 int cpu = 0; member 404 counter.cpu = arg.cpu; in AddCounter() 441 AddCounter({.tid = 0, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F() 442 AddCounter({.tid = 0, .cpu = 1, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F() 443 AddCounter({.tid = 1, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F() 444 AddCounter({.tid = 1, .cpu = 1, .value = 2, .time_enabled = 2, .time_running = 1}); in TEST_F() 452 AddCounter({.tid = 0, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F() 453 AddCounter({.tid = 0, .cpu = 1, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F() 454 AddCounter({.tid = 1, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F() 455 AddCounter({.tid = 1, .cpu = 1, .value = 2, .time_enabled = 2, .time_running = 1}); in TEST_F() [all …]
|
D | cpu_hotplug_test.cpp | 93 static bool IsCpuOnline(int cpu, bool* has_error) { in IsCpuOnline() argument 94 std::string filename = android::base::StringPrintf("/sys/devices/system/cpu/cpu%d/online", cpu); in IsCpuOnline() 106 static bool SetCpuOnline(int cpu, bool online) { in SetCpuOnline() argument 108 bool ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline() 115 std::string filename = android::base::StringPrintf("/sys/devices/system/cpu/cpu%d/online", cpu); in SetCpuOnline() 119 ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline() 132 ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline() 142 LOG(ERROR) << "setting cpu " << cpu << (online ? " online" : " offline") in SetCpuOnline() 158 for (int cpu = 1; cpu < GetCpuCount(); ++cpu) { in CpuOnlineRestorer() local 160 bool ret = IsCpuOnline(cpu, &has_error); in CpuOnlineRestorer() [all …]
|
D | ETMRecorder.cpp | 49 static int GetTraceId(int cpu) { in GetTraceId() argument 50 return 0x10 + cpu * 2; in GetTraceId() 145 int cpu; in ReadEtmInfo() local 146 if (sscanf(name.c_str(), "cpu%d", &cpu) == 1) { in ReadEtmInfo() 148 if (std::find(online_cpus.begin(), online_cpus.end(), cpu) == online_cpus.end()) { in ReadEtmInfo() 151 ETMPerCpu& cpu_info = etm_info_[cpu]; in ReadEtmInfo() 224 e.cpu = p.first; in CreateAuxTraceInfoRecord()
|
D | event_fd.cpp | 43 static int perf_event_open(const perf_event_attr& attr, pid_t pid, int cpu, int group_fd, in perf_event_open() argument 45 return syscall(__NR_perf_event_open, &attr, pid, cpu, group_fd, flags); in perf_event_open() 48 std::unique_ptr<EventFd> EventFd::OpenEventFile(const perf_event_attr& attr, pid_t tid, int cpu, in OpenEventFile() argument 67 int perf_event_fd = perf_event_open(real_attr, tid, cpu, group_fd, 0); in OpenEventFile() 71 << cpu << ", group_fd " << group_fd << ") failed"; in OpenEventFile() 74 << cpu << ", group_fd " << group_fd << ") failed"; in OpenEventFile() 81 << tid << ", cpu " << cpu << ", group_fd " << group_fd << ") failed"; in OpenEventFile() 84 << tid << ", cpu " << cpu << ", group_fd " << group_fd << ") failed"; in OpenEventFile() 88 return std::unique_ptr<EventFd>(new EventFd(real_attr, perf_event_fd, event_name, tid, cpu)); in OpenEventFile()
|
D | cmd_stat_impl.h | 81 int cpu; // -1 represents all cpus member 93 const ThreadInfo* thread, int cpu, uint64_t count, uint64_t runtime_in_ns, in CounterSummary() 99 cpu(cpu), in CounterSummary() 160 BUILD_COMPARE_VALUE_FUNCTION(CompareSummaryCpu, cpu); 222 key |= static_cast<uint64_t>(counter.cpu) << 32; in AddCountersForOneEventType() 232 int cpu = report_per_core_ ? static_cast<int>(pair.first >> 32) : -1; in AddCountersForOneEventType() local 234 AddSummary(info, tid, cpu, sum); in AddCountersForOneEventType() 248 void AddSummary(const CountersInfo& info, pid_t tid, int cpu, const CounterSum& sum) { in AddSummary() argument 263 summaries_.emplace_back(info.event_name, info.event_modifier, info.group_id, thread, cpu, in AddSummary() 304 const ThreadInfo* thread, int cpu);
|
D | event_fd.h | 43 static std::unique_ptr<EventFd> OpenEventFile(const perf_event_attr& attr, pid_t tid, int cpu, 113 int cpu) in EventFd() argument 119 cpu_(cpu), in EventFd()
|
D | cmd_stat.cpp | 96 const ThreadInfo* thread, int cpu) { in FindSummary() argument 98 if (s.type_name == type_name && s.modifier == modifier && s.thread == thread && s.cpu == cpu) { in FindSummary() 109 const CounterSummary* other = FindSummary(s.type_name, "k", s.thread, s.cpu); in AutoGenerateSummaries() 111 if (FindSummary(s.type_name, "", s.thread, s.cpu) == nullptr) { in AutoGenerateSummaries() 112 summaries_.emplace_back(s.type_name, "", s.group_id, s.thread, s.cpu, in AutoGenerateSummaries() 128 bool show_cpu = !summaries_.empty() && summaries_[0].cpu != -1; in Show() 142 fprintf(fp, "%d,", s.cpu); in ShowCSV() 179 adjust_width(width[i++], std::to_string(s.cpu).size()); in ShowText() 207 fprintf(fp, " %-*d", static_cast<int>(width[i++]), s.cpu); in ShowText() 240 const CounterSummary* other = FindSummary("cpu-cycles", s.modifier, s.thread, s.cpu); in GetCommentForSummary() [all …]
|
D | event_selection_set.cpp | 553 for (const auto& cpu : cpus) { in CheckIfCpusOnline() local 554 if (std::find(online_cpus.begin(), online_cpus.end(), cpu) == online_cpus.end()) { in CheckIfCpusOnline() 555 LOG(ERROR) << "cpu " << cpu << " is not online."; in CheckIfCpusOnline() 562 bool EventSelectionSet::OpenEventFilesOnGroup(EventSelectionGroup& group, pid_t tid, int cpu, in OpenEventFilesOnGroup() argument 570 selection.event_attr, tid, cpu, group_fd, selection.event_type_modifier.name, false); in OpenEventFilesOnGroup() 620 for (const auto& cpu : *pcpus) { in OpenEventFiles() 621 if (OpenEventFilesOnGroup(group, tid, cpu, &failed_event_type)) { in OpenEventFiles() 711 counter->cpu = event_fd->Cpu(); in ReadCounter()
|
D | record_equal_test.h | 51 EXPECT_EQ(r1.cpu_data.cpu, r2.cpu_data.cpu); in CheckSampleRecordDataEqual()
|
/system/extras/cpustats/ |
D | cpustats.c | 62 static long unsigned get_cpu_total_time(struct cpu_info* cpu); 63 static int get_freq_scales_count(int cpu); 69 static void read_freq_stats(int cpu); 219 static int get_freq_scales_count(int cpu) { in get_freq_scales_count() argument 225 sprintf(filename, "/sys/devices/system/cpu/cpu%d/cpufreq/stats/time_in_state", cpu); in get_freq_scales_count() 270 static void read_freq_stats(int cpu) { in read_freq_stats() argument 275 sprintf(filename, "/sys/devices/system/cpu/cpu%d/cpufreq/stats/time_in_state", cpu); in read_freq_stats() 277 for (i = 0; i < new_cpus[cpu].freq_count; i++) { in read_freq_stats() 279 fscanf(file, "%u %lu\n", &new_cpus[cpu].freqs[i].freq, &new_cpus[cpu].freqs[i].time); in read_freq_stats() 282 new_cpus[cpu].freqs[i].freq = old_cpus[cpu].freqs[i].freq; in read_freq_stats() [all …]
|
/system/extras/boottime_tools/bootio/ |
D | bootio_collector.cpp | 40 void PopulateCpu(CpuData& cpu) { in PopulateCpu() argument 49 cpu.set_utime(utime); in PopulateCpu() 50 cpu.set_ntime(ntime); in PopulateCpu() 51 cpu.set_stime(stime); in PopulateCpu() 52 cpu.set_itime(itime); in PopulateCpu() 53 cpu.set_iowtime(iowtime); in PopulateCpu() 54 cpu.set_irqtime(irqtime); in PopulateCpu() 55 cpu.set_sirqtime(sirqtime); in PopulateCpu() 203 uint64_t SumCpuValues(CpuData& cpu) { in SumCpuValues() argument 204 return cpu.utime() + cpu.ntime() + cpu.stime() + cpu.itime() + cpu.iowtime() + in SumCpuValues() [all …]
|
/system/extras/ANRdaemon/ |
D | ANRdaemon.cpp | 121 static void get_cpu_stat(cpu_stat_t* cpu) { in get_cpu_stat() argument 129 if (fscanf(fp, params, &cpu->utime, &cpu->ntime, &cpu->stime, &cpu->itime, &cpu->iowtime, in get_cpu_stat() 130 &cpu->irqtime, &cpu->sirqtime) != cpu_stat_entries) { in get_cpu_stat() 140 cpu->total = cpu->utime + cpu->ntime + cpu->stime + cpu->itime + cpu->iowtime + in get_cpu_stat() 141 cpu->irqtime + cpu->sirqtime; in get_cpu_stat()
|
/system/extras/tests/icachetest/ |
D | icache_main.cpp | 64 size_t cpu = std::stoi(arg); in handleCommandLineArgments() local 65 if (cpu < std::thread::hardware_concurrency()) { in handleCommandLineArgments() 66 CPU_SET(cpu, &g_cpu_set); in handleCommandLineArgments()
|
/system/core/rootdir/ |
D | ueventd.rc | 79 /sys/devices/system/cpu/cpu* cpufreq/scaling_max_freq 0664 system system 80 /sys/devices/system/cpu/cpu* cpufreq/scaling_min_freq 0664 system system
|
D | init.rc | 90 on early-init && property:ro.product.cpu.abilist32=* 92 on early-init && property:ro.product.cpu.abilist64=* 94 on property:apexd.status=ready && property:ro.product.cpu.abilist32=* 96 on property:apexd.status=ready && property:ro.product.cpu.abilist64=* 180 # Create a cpu group for NNAPI HAL processes 185 write /dev/cpuctl/nnapi-hal/cpu.uclamp.min 1 186 write /dev/cpuctl/nnapi-hal/cpu.uclamp.latency_sensitive 1 188 # Create a cpu group for camera daemon processes 284 write /proc/cpu/alignment 4 289 # cpu cores. [all …]
|
/system/extras/simpleperf/doc/ |
D | executable_commands_reference.md | 25 - [Record both on CPU time and off CPU time](#record-both-on-cpu-time-and-off-cpu-time) 37 several hardware counters, counting events like how many cpu cycles have happened, how many 104 cpu-cycles 108 cpu-clock 115 events. For example, raw-cpu-cycles is wrapped into cpu-cycles, raw-instruction-retired is wrapped 126 # Stat using default events (cpu-cycles,instructions,...), and monitor process 7394 for 10 seconds. 130 1,320,496,145 cpu-cycles # 0.131736 GHz (100%) 145 # Stat event cpu-cycles. 146 $ simpleperf stat -e cpu-cycles -p 11904 --duration 10 294 By default, stat cmd outputs an event count sum for all monitored cpu cores. But when `--per-core` [all …]
|
/system/sepolicy/prebuilts/api/27.0/public/ |
D | perfprofd.te | 12 # this means read access to /sys/devices/system/cpu/possible 13 # and read/write access to /sys/devices/system/cpu/cpu*/online
|
/system/sepolicy/prebuilts/api/26.0/public/ |
D | perfprofd.te | 12 # this means read access to /sys/devices/system/cpu/possible 13 # and read/write access to /sys/devices/system/cpu/cpu*/online
|
/system/bpfprogs/ |
D | time_in_state.c | 68 uint32_t cpu = bpf_get_smp_processor_id(); variable 69 uint32_t* policyp = bpf_cpu_policy_map_lookup_elem(&cpu); 193 uint32_t cpu = args->cpu_id; variable 195 uint32_t* policyp = bpf_cpu_policy_map_lookup_elem(&cpu);
|
/system/sepolicy/prebuilts/api/30.0/private/ |
D | traced_perf.te | 11 # Allow traced_perf full use of perf_event_open(2). It will perform cpu-wide 15 allow traced_perf self:perf_event { open cpu kernel read write tracepoint };
|
/system/sepolicy/prebuilts/api/31.0/private/ |
D | gpuservice.te | 50 allow gpuservice self:perf_event { cpu kernel open write }; 51 neverallow gpuservice self:perf_event ~{ cpu kernel open write };
|
/system/sepolicy/private/ |
D | gpuservice.te | 50 allow gpuservice self:perf_event { cpu kernel open write }; 51 neverallow gpuservice self:perf_event ~{ cpu kernel open write };
|
/system/extras/memory_replay/ |
D | TraceBenchmark.cpp | 420 int cpu = strtol(&argv[i][6], &endptr, 10); in main() local 427 CPU_SET(cpu, &cpuset); in main() 430 printf("Invalid cpu %d\n", cpu); in main() 436 printf("Locking to cpu %d\n", cpu); in main()
|