Home
last modified time | relevance | path

Searched refs:cpu (Results 1 – 25 of 70) sorted by relevance

123

/system/extras/sane_schedstat/
Dsane_schedstat.c85 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/cpustats/
Dcpustats.c58 static long unsigned get_cpu_total_time(struct cpu_info *cpu);
59 static int get_freq_scales_count(int cpu);
65 static void read_freq_stats(int cpu);
215 static int get_freq_scales_count(int cpu) { in get_freq_scales_count() argument
221 sprintf(filename, "/sys/devices/system/cpu/cpu%d/cpufreq/stats/time_in_state", cpu); in get_freq_scales_count()
266 static void read_freq_stats(int cpu) { in read_freq_stats() argument
271 sprintf(filename, "/sys/devices/system/cpu/cpu%d/cpufreq/stats/time_in_state", cpu); in read_freq_stats()
273 for (i = 0; i < new_cpus[cpu].freq_count; i++) { in read_freq_stats()
275 fscanf(file, "%u %lu\n", &new_cpus[cpu].freqs[i].freq, in read_freq_stats()
276 &new_cpus[cpu].freqs[i].time); in read_freq_stats()
[all …]
/system/extras/tests/binder/benchmarks/
DbinderAddInts.cpp65 explicit AddIntsService(int cpu = unbound);
83 static void bindCPU(unsigned int cpu);
167 AddIntsService::AddIntsService(int cpu): cpu_(cpu) { in AddIntsService() argument
168 if (cpu != unbound) { bindCPU(cpu); } in AddIntsService()
176 int cpu; in onTransact() local
181 cpu = sched_getcpu(); in onTransact()
182 if (cpu != cpu_) { in onTransact()
183 cerr << "server onTransact on CPU " << cpu << " expected CPU " in onTransact()
205 static void bindCPU(unsigned int cpu) in bindCPU() argument
211 CPU_SET(cpu, &cpuset); in bindCPU()
[all …]
/system/extras/boottime_tools/bootio/
Dbootio_collector.cpp40 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/simpleperf/
Dcpu_hotplug_test.cpp92 static bool IsCpuOnline(int cpu, bool* has_error) { in IsCpuOnline() argument
93 std::string filename = android::base::StringPrintf("/sys/devices/system/cpu/cpu%d/online", cpu); in IsCpuOnline()
105 static bool SetCpuOnline(int cpu, bool online) { in SetCpuOnline() argument
107 bool ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline()
114 std::string filename = android::base::StringPrintf("/sys/devices/system/cpu/cpu%d/online", cpu); in SetCpuOnline()
118 ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline()
131 ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline()
141 …LOG(ERROR) << "setting cpu " << cpu << (online ? " online" : " offline") << " seems not to take ef… in SetCpuOnline()
156 for (int cpu = 1; cpu < GetCpuCount(); ++cpu) { in CpuOnlineRestorer() local
158 bool ret = IsCpuOnline(cpu, &has_error); in CpuOnlineRestorer()
[all …]
Devent_selection_set.cpp456 for (const auto& cpu : cpus) { in CheckIfCpusOnline() local
457 if (std::find(online_cpus.begin(), online_cpus.end(), cpu) == in CheckIfCpusOnline()
459 LOG(ERROR) << "cpu " << cpu << " is not online."; in CheckIfCpusOnline()
467 pid_t tid, int cpu, in OpenEventFilesOnGroup() argument
475 EventFd::OpenEventFile(selection.event_attr, tid, cpu, group_fd, false); in OpenEventFilesOnGroup()
535 for (const auto& cpu : cpus) { in OpenEventFiles() local
536 if (OpenEventFilesOnGroup(group, tid, cpu, &failed_event_type)) { in OpenEventFiles()
586 counter->cpu = event_fd->Cpu(); in ReadCounter()
725 for (const auto& cpu : online_cpus_) { in DetectCpuHotplugEvents() local
726 if (std::find(new_cpus.begin(), new_cpus.end(), cpu) == new_cpus.end()) { in DetectCpuHotplugEvents()
[all …]
Devent_fd.cpp41 static int perf_event_open(const perf_event_attr& attr, pid_t pid, int cpu, in perf_event_open() argument
43 return syscall(__NR_perf_event_open, &attr, pid, cpu, group_fd, flags); in perf_event_open()
47 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 << tid << ", cpu " << cpu << ", group_fd " << group_fd in OpenEventFile()
75 << tid << ", cpu " << cpu << ", group_fd " << group_fd in OpenEventFile()
83 << event_name << ", tid " << tid << ", cpu " << cpu in OpenEventFile()
87 << event_name << ", tid " << tid << ", cpu " << cpu in OpenEventFile()
93 new EventFd(real_attr, perf_event_fd, event_name, tid, cpu)); in OpenEventFile()
Devent_selection_set.h47 int cpu; member
171 bool OpenEventFilesOnGroup(EventSelectionGroup& group, pid_t tid, int cpu,
176 bool HandleCpuOnlineEvent(int cpu);
177 bool HandleCpuOfflineEvent(int cpu);
178 bool CreateMappedBufferForCpu(int cpu);
Devent_fd.h42 pid_t tid, int cpu,
95 const std::string& event_name, pid_t tid, int cpu) in EventFd() argument
101 cpu_(cpu), in EventFd()
Dreport_sample.proto42 // Event type can be cpu-cycles, cpu-clock, sched:sched_switch or other types.
46 // will cost more cpu time generating samples, which may affect the monitored threads
Drecord_equal_test.h49 EXPECT_EQ(r1.cpu_data.cpu, r2.cpu_data.cpu); in CheckSampleRecordDataEqual()
/system/extras/ANRdaemon/
DANRdaemon.cpp130 static void get_cpu_stat(cpu_stat_t *cpu) { in get_cpu_stat() argument
138 if (fscanf(fp, params, &cpu->utime, &cpu->ntime, in get_cpu_stat()
139 &cpu->stime, &cpu->itime, &cpu->iowtime, &cpu->irqtime, in get_cpu_stat()
140 &cpu->sirqtime) != cpu_stat_entries) { in get_cpu_stat()
150 cpu->total = cpu->utime + cpu->ntime + cpu->stime + cpu->itime in get_cpu_stat()
151 + cpu->iowtime + cpu->irqtime + cpu->sirqtime; in get_cpu_stat()
/system/bpfprogs/
Dtime_in_state.c49 uint32_t cpu = bpf_get_smp_processor_id(); in tp_sched_switch() local
50 uint32_t* freq = bpf_cpu_freq_map_lookup_elem(&cpu); in tp_sched_switch()
72 uint32_t cpu = args->cpu_id; in tp_cpufreq() local
74 bpf_cpu_freq_map_update_elem(&cpu, &new, BPF_ANY); in tp_cpufreq()
/system/core/rootdir/
Dueventd.rc68 /sys/devices/system/cpu/cpu* cpufreq/scaling_max_freq 0664 system system
69 /sys/devices/system/cpu/cpu* cpufreq/scaling_min_freq 0664 system system
Dinit.rc132 write /proc/cpu/alignment 4
137 # cpu cores.
174 write /dev/cpuctl/cpu.rt_period_us 1000000
175 write /dev/cpuctl/cpu.rt_runtime_us 950000
696 chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
697 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
698 chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
699 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
700 chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
701 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
[all …]
/system/extras/tests/icachetest/
Dicache_main.cpp64 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()
DProfiler.cpp42 int cpu, int group_fd, unsigned long flags) { in perf_event_open() argument
43 return syscall(__NR_perf_event_open, hw_event, pid, cpu, group_fd, flags); in perf_event_open()
/system/sepolicy/prebuilts/api/27.0/public/
Dperfprofd.te12 # this means read access to /sys/devices/system/cpu/possible
13 # and read/write access to /sys/devices/system/cpu/cpu*/online
Dperformanced.te17 # root cpu set, but only affects the kernel threads.
/system/sepolicy/prebuilts/api/26.0/public/
Dperfprofd.te12 # this means read access to /sys/devices/system/cpu/possible
13 # and read/write access to /sys/devices/system/cpu/cpu*/online
Dperformanced.te12 # root cpu set, but only affects the kernel threads.
/system/core/logd/
DLogBuffer.h65 log_time cpu(CLOCK_MONOTONIC); in isMonotonic()
67 if ((cpu.tv_sec + EPOCH_PLUS_MINUTE) >= now.tv_sec) { in isMonotonic()
72 return mono.tv_sec < ((cpu.tv_sec + now.tv_sec) / 2); in isMonotonic()
/system/sepolicy/prebuilts/api/29.0/public/
Dperfprofd.te15 # this means read access to /sys/devices/system/cpu/possible
16 # and read/write access to /sys/devices/system/cpu/cpu*/online
/system/sepolicy/public/
Dperfprofd.te15 # this means read access to /sys/devices/system/cpu/possible
16 # and read/write access to /sys/devices/system/cpu/cpu*/online
/system/sepolicy/prebuilts/api/28.0/public/
Dperfprofd.te15 # this means read access to /sys/devices/system/cpu/possible
16 # and read/write access to /sys/devices/system/cpu/cpu*/online

123