/aosp12/frameworks/base/tools/powermodel/test/com/android/powermodel/ |
H A D | PowerProfileTest.java | 73 Assert.assertEquals(1.3f, cpu.suspendMa, EPSILON); in testReadGood() 74 Assert.assertEquals(3.9f, cpu.idleMa, EPSILON); in testReadGood() 75 Assert.assertEquals(18.33f, cpu.activeMa, EPSILON); in testReadGood() 76 Assert.assertEquals(2, cpu.clusters.length); in testReadGood() 78 Assert.assertEquals(4, cpu.clusters[0].coreCount); in testReadGood() 79 Assert.assertEquals(2.41f, cpu.clusters[0].onMa, EPSILON); in testReadGood() 80 Assert.assertEquals(9, cpu.clusters[0].frequencies.length, EPSILON); in testReadGood() 81 Assert.assertEquals(100000, cpu.clusters[0].frequencies[0].speedHz); in testReadGood() 83 Assert.assertEquals(303200, cpu.clusters[0].frequencies[1].speedHz); in testReadGood() 100 Assert.assertEquals(2, cpu.clusters[1].coreCount); in testReadGood() [all …]
|
/aosp12/system/extras/sane_schedstat/ |
H A D | sane_schedstat.c | 85 int cpu; in parse_cpu_v15() local 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() 104 cpu_delta[cpu].pcount = tmp.pcount - cpu_prev[cpu].pcount; in parse_cpu_v15() [all …]
|
/aosp12/frameworks/base/libs/hwui/tests/scripts/ |
H A D | prep_buller.sh | 4 cpubase=/sys/devices/system/cpu 18 cpu=0 20 while [ $((cpu < 4)) -eq 1 ]; do 21 echo "Setting cpu $cpu to $S hz" 22 adb shell "echo 1 > $cpubase/cpu${cpu}/online" 23 adb shell "echo userspace > $cpubase/cpu${cpu}/$gov" 27 cpu=$(($cpu + 1)) 30 while [ $((cpu < $nr)) -eq 1 ]; do 31 echo "disable cpu $cpu" 32 adb shell "echo 0 > $cpubase/cpu${cpu}/online" [all …]
|
H A D | prep_generic.sh | 120 cpu=0 121 while [ -d ${CPU_BASE}/cpu${cpu}/cpufreq ]; do 127 echo 1 > ${CPU_BASE}/cpu${cpu}/online || true 131 echo userspace > ${CPU_BASE}/cpu${cpu}/${GOV} 133 maxFreq=`cat ${CPU_BASE}/cpu$cpu/cpufreq/cpuinfo_max_freq` 134 availFreq=`cat ${CPU_BASE}/cpu$cpu/cpufreq/scaling_available_frequencies` 148 enableIndices=${cpu} 159 cpu=$(($cpu + 1)) 219 freq=${CPU_BASE}/cpu$cpu/cpufreq 226 echo 1 > ${CPU_BASE}/cpu${cpu}/online || true [all …]
|
H A D | prep_taieye.sh | 2 cpubase=/sys/devices/system/cpu 10 cpu=0 13 while [ $((cpu < 4)) -eq 1 ]; do 14 echo "Setting cpu ${cpu} to $S hz" 16 adb shell "echo 1 > $cpubase/cpu${cpu}/online" 17 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_max_freq" 19 cpu=$(($cpu + 1)) 22 while [ $((cpu < $nr)) -eq 1 ]; do 23 echo "disable cpu $cpu" 24 adb shell "echo 0 > $cpubase/cpu${cpu}/online" [all …]
|
H A D | prep_fugu.sh | 3 cpubase=/sys/devices/system/cpu 31 cpu=0 33 while [ $((cpu < 3)) -eq 1 ]; do 34 echo "Setting cpu ${cpu} & $(($cpu + 1)) cluster to $S hz" 36 adb shell "echo 1 > $cpubase/cpu${cpu}/online" &> /dev/null 37 adb shell "echo userspace > $cpubase/cpu${cpu}/$gov" 38 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_max_freq" 39 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_min_freq" 40 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_setspeed" 41 cpu=$(($cpu + 2))
|
H A D | prep_marlfish.sh | 3 cpubase=/sys/devices/system/cpu 19 cpu=0 22 while [ $((cpu < 3)) -eq 1 ]; do 24 echo "Setting cpu ${cpu} & $(($cpu + 1)) cluster to $S hz" 25 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_max_freq" 26 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_min_freq" 27 cpu=$(($cpu + 2))
|
/aosp12/system/extras/simpleperf/ |
H A D | cmd_stat_test.cpp | 381 int cpu = 0; member 404 counter.cpu = arg.cpu; in AddCounter() 459 ASSERT_EQ(summaries[0].cpu, -1); in TEST_F() 475 ASSERT_EQ(summaries[0].cpu, 0); in TEST_F() 480 ASSERT_EQ(summaries[1].cpu, 1); in TEST_F() 493 ASSERT_EQ(summaries[0].cpu, 0); in TEST_F() 497 ASSERT_EQ(summaries[1].cpu, 1); in TEST_F() 501 ASSERT_EQ(summaries[2].cpu, 0); in TEST_F() 505 ASSERT_EQ(summaries[3].cpu, 1); in TEST_F() 535 ASSERT_EQ(summaries[0].cpu, 0); in TEST_F() [all …]
|
H A D | cpu_hotplug_test.cpp | 106 static bool SetCpuOnline(int cpu, bool online) { in SetCpuOnline() argument 108 bool ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline() 119 ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline() 132 ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline() 158 for (int cpu = 1; cpu < GetCpuCount(); ++cpu) { in CpuOnlineRestorer() local 160 bool ret = IsCpuOnline(cpu, &has_error); in CpuOnlineRestorer() 164 online_map_[cpu] = ret; in CpuOnlineRestorer() 183 for (int cpu = 1; cpu < GetCpuCount(); ++cpu) { in FindAHotpluggableCpu() local 189 if (SetCpuOnline(cpu, !online)) { in FindAHotpluggableCpu() 190 *hotpluggable_cpu = cpu; in FindAHotpluggableCpu() [all …]
|
H A 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()
|
H A 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()
|
H A 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);
|
/aosp12/system/extras/cpustats/ |
H A 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 270 static void read_freq_stats(int cpu) { in read_freq_stats() argument 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() 283 new_cpus[cpu].freqs[i].time = old_cpus[cpu].freqs[i].time; in read_freq_stats() 297 return (cpu->utime + cpu->ntime + cpu->stime + cpu->itime + cpu->iowtime + cpu->irqtime + in get_cpu_total_time() [all …]
|
/aosp12/system/extras/tests/binder/benchmarks/ |
H A 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() 204 static void bindCPU(unsigned int cpu) in bindCPU() argument 210 CPU_SET(cpu, &cpuset); in bindCPU() 255 int cpu = strtoul(optarg, &chptr, 10); in main() local [all …]
|
/aosp12/build/bazel/platforms/arch/ |
H A D | BUILD | 1 # Standard cpu name constraint_setting and constraint_values 10 constraint_setting = "@platforms//cpu:cpu", 15 constraint_setting = "@platforms//cpu:cpu", 20 constraint_setting = "@platforms//cpu:cpu", 27 actual = "@platforms//cpu:x86_64"
|
/aosp12/system/extras/boottime_tools/bootio/ |
H A 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() 204 return cpu.utime() + cpu.ntime() + cpu.stime() + cpu.itime() + cpu.iowtime() + in SumCpuValues() 205 cpu.irqtime() + cpu.sirqtime(); in SumCpuValues() [all …]
|
/aosp12/bionic/libc/include/ |
H A D | sched.h | 80 #define CPU_SET(cpu, set) CPU_SET_S(cpu, sizeof(cpu_set_t), set) argument 81 #define CPU_CLR(cpu, set) CPU_CLR_S(cpu, sizeof(cpu_set_t), set) argument 82 #define CPU_ISSET(cpu, set) CPU_ISSET_S(cpu, sizeof(cpu_set_t), set) argument 105 #define CPU_SET_S(cpu, setsize, set) \ argument 107 size_t __cpu = (cpu); \ 112 #define CPU_CLR_S(cpu, setsize, set) \ argument 114 size_t __cpu = (cpu); \ 119 #define CPU_ISSET_S(cpu, setsize, set) \ argument 121 size_t __cpu = (cpu); \
|
/aosp12/build/soong/ui/tracer/ |
H A D | status.go | 31 cpu int member 43 cpu := -1 46 cpu = i 52 if cpu == -1 { 53 cpu = len(s.cpus) 58 cpu: cpu, 69 s.cpus[start.cpu] = false 82 Tid: uint64(start.cpu),
|
/aosp12/hardware/qcom/sm8150/thermal/ |
H A D | thermal_common.c | 71 unsigned int cpu = 0; in get_cpu_label() local 77 for(cpu = 0; cpu < get_num_cpus(); cpu++) { in get_cpu_label() 78 cpu_label[cpu] = (char *)calloc(sizeof("CPUN"), sizeof(char)); in get_cpu_label() 79 if(!cpu_label[cpu]) in get_cpu_label() 81 snprintf(cpu_label[cpu], sizeof("CPUN"), CPU_LABEL, cpu); in get_cpu_label() 268 unsigned int idx = 0, cpu = 0; in thermal_zone_init() local 285 for (cpu = 0; cpu < get_num_cpus() && in thermal_zone_init() 286 idx < (get_num_cpus() + cfg_cnt - 1); cpu++, idx++) { in thermal_zone_init() 288 v_sen_t[j].type, cpu)) { in thermal_zone_init()
|
/aosp12/hardware/qcom/sdm845/thermal/ |
H A D | thermal_common.c | 71 unsigned int cpu = 0; in get_cpu_label() local 77 for(cpu = 0; cpu < get_num_cpus(); cpu++) { in get_cpu_label() 78 cpu_label[cpu] = (char *)calloc(sizeof("CPUN"), sizeof(char)); in get_cpu_label() 79 if(!cpu_label[cpu]) in get_cpu_label() 81 snprintf(cpu_label[cpu], sizeof("CPUN"), CPU_LABEL, cpu); in get_cpu_label() 268 unsigned int idx = 0, cpu = 0; in thermal_zone_init() local 285 for (cpu = 0; cpu < get_num_cpus() && in thermal_zone_init() 286 idx < (get_num_cpus() + cfg_cnt - 1); cpu++, idx++) { in thermal_zone_init() 288 v_sen_t[j].type, cpu)) { in thermal_zone_init()
|
/aosp12/system/extras/ANRdaemon/ |
H A 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()
|
/aosp12/packages/modules/NeuralNetworks/tools/systrace_parser/parser/test/ |
H A D | large_test.sh | 19 echo parsing cpu 20 ../../parse_systrace.py cpu.html > cpu.tmp 31 echo checking cpu 32 diff cpu.txt cpu.tmp
|
/aosp12/frameworks/native/libs/cputimeinstate/ |
H A D | cputimeinstate.cpp | 207 for (auto &cpu : gPolicyCpus[i]) { in startTrackingUidTimes() local 208 if (writeToMapEntry(cpuPolicyFd, &cpu, &i, BPF_ANY)) return false; in startTrackingUidTimes() 279 for (const auto &cpu : gPolicyCpus[policyIdx]) { in getTotalCpuFreqTimes() local 280 out[policyIdx][freqIdx] += vals[cpu]; in getTotalCpuFreqTimes() 318 for (const auto &cpu : gPolicyCpus[j]) { in getUidCpuFreqTimes() local 384 for (const auto &cpu : gPolicyCpus[i]) { in getUidsUpdatedCpuFreqTimes() local 427 for (uint32_t cpu = 0; cpu < gNCpus; ++cpu) { in getUidConcurrentTimes() local 438 for (const auto &cpu : gPolicyCpus[policy]) { in getUidConcurrentTimes() local 496 for (uint32_t cpu = 0; cpu < gNCpus; ++cpu) { in getUidsUpdatedConcurrentTimes() local 507 for (const auto &cpu : gPolicyCpus[policy]) { in getUidsUpdatedConcurrentTimes() local [all …]
|
/aosp12/hardware/google/pixel/power-libperfmgr/aidl/ |
H A D | android.hardware.power-service.pixel-libperfmgr.rc | 27 on property:vendor.powerhal.dalvik.vm.dex2oat-cpu-set=* 28 setprop dalvik.vm.dex2oat-cpu-set ${vendor.powerhal.dalvik.vm.dex2oat-cpu-set} 29 setprop dalvik.vm.restore-dex2oat-cpu-set ${vendor.powerhal.dalvik.vm.dex2oat-cpu-set}
|
/aosp12/bionic/libc/bionic/ |
H A D | sched_getcpu.cpp | 35 unsigned cpu; in sched_getcpu() local 36 int rc = __getcpu(&cpu, nullptr, nullptr); in sched_getcpu() 40 return cpu; in sched_getcpu()
|