Home
last modified time | relevance | path

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

1234

/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/tests/binder/benchmarks/
DbinderAddInts.cpp65 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/
Dcmd_stat_test.cpp381 int cpu = 0; member
406 counter.cpu = arg.cpu; in AddCounter()
443 AddCounter({.tid = 0, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
444 AddCounter({.tid = 0, .cpu = 1, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
445 AddCounter({.tid = 1, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
446 AddCounter({.tid = 1, .cpu = 1, .value = 2, .time_enabled = 2, .time_running = 1}); in TEST_F()
454 AddCounter({.tid = 0, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
455 AddCounter({.tid = 0, .cpu = 1, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
456 AddCounter({.tid = 1, .cpu = 0, .value = 1, .time_enabled = 1, .time_running = 1}); in TEST_F()
457 AddCounter({.tid = 1, .cpu = 1, .value = 2, .time_enabled = 2, .time_running = 1}); in TEST_F()
[all …]
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_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()
46 std::unique_ptr<EventFd> EventFd::OpenEventFile(const perf_event_attr& attr, pid_t tid, int cpu, in OpenEventFile() argument
65 int perf_event_fd = perf_event_open(real_attr, tid, cpu, group_fd, 0); in OpenEventFile()
69 << tid << ", cpu " << cpu << ", group_fd " << group_fd in OpenEventFile()
73 << tid << ", cpu " << cpu << ", group_fd " << group_fd in OpenEventFile()
81 << event_name << ", tid " << tid << ", cpu " << cpu in OpenEventFile()
85 << event_name << ", tid " << tid << ", cpu " << cpu in OpenEventFile()
91 new EventFd(real_attr, perf_event_fd, event_name, tid, cpu)); in OpenEventFile()
DETMRecorder.cpp48 static int GetTraceId(int cpu) { in GetTraceId() argument
49 return 0x10 + cpu * 2; in GetTraceId()
144 int cpu; in ReadEtmInfo() local
145 if (sscanf(name.c_str(), "cpu%d", &cpu) == 1) { in ReadEtmInfo()
146 ETMPerCpu &cpu_info = etm_info_[cpu]; in ReadEtmInfo()
209 e.cpu = p.first; in CreateAuxTraceInfoRecord()
Dcmd_stat_impl.h81 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);
Devent_fd.h41 static std::unique_ptr<EventFd> OpenEventFile(const perf_event_attr& attr, pid_t tid, int cpu,
111 const std::string& event_name, pid_t tid, int cpu) in EventFd() argument
117 cpu_(cpu), in EventFd()
Dcmd_stat.cpp97 const ThreadInfo* thread, int cpu) { in FindSummary() argument
99 if (s.type_name == type_name && s.modifier == modifier && s.thread == thread && s.cpu == cpu) { in FindSummary()
110 const CounterSummary* other = FindSummary(s.type_name, "k", s.thread, s.cpu); in AutoGenerateSummaries()
112 if (FindSummary(s.type_name, "", s.thread, s.cpu) == nullptr) { in AutoGenerateSummaries()
113 summaries_.emplace_back(s.type_name, "", s.group_id, s.thread, s.cpu, in AutoGenerateSummaries()
129 bool show_cpu = !summaries_.empty() && summaries_[0].cpu != -1; in Show()
143 fprintf(fp, "%d,", s.cpu); in ShowCSV()
180 adjust_width(width[i++], std::to_string(s.cpu).size()); in ShowText()
208 fprintf(fp, " %-*d", static_cast<int>(width[i++]), s.cpu); in ShowText()
241 const CounterSummary* other = FindSummary("cpu-cycles", s.modifier, s.thread, s.cpu); in GetCommentForSummary()
[all …]
Devent_selection_set.cpp542 for (const auto& cpu : cpus) { in CheckIfCpusOnline() local
543 if (std::find(online_cpus.begin(), online_cpus.end(), cpu) == in CheckIfCpusOnline()
545 LOG(ERROR) << "cpu " << cpu << " is not online."; in CheckIfCpusOnline()
553 pid_t tid, int cpu, in OpenEventFilesOnGroup() argument
561 selection.event_attr, tid, cpu, group_fd, selection.event_type_modifier.name, false); in OpenEventFilesOnGroup()
611 for (const auto& cpu : *pcpus) { in OpenEventFiles()
612 if (OpenEventFilesOnGroup(group, tid, cpu, &failed_event_type)) { in OpenEventFiles()
702 counter->cpu = event_fd->Cpu(); in ReadCounter()
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
Dutils.cpp420 int cpu; in GetCpusFromString() local
422 while ((cpu = static_cast<int>(strtol(p, &endp, 10))) != 0 || endp != p) { in GetCpusFromString()
424 for (int t = last_cpu + 1; t < cpu; ++t) { in GetCpusFromString()
429 cpu_set.insert(cpu); in GetCpusFromString()
430 last_cpu = cpu; in GetCpusFromString()
/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/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/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/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.rc90 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=*
231 write /proc/cpu/alignment 4
236 # cpu cores.
273 write /dev/cpuctl/cpu.rt_period_us 1000000
274 write /dev/cpuctl/cpu.rt_runtime_us 950000
899 chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
900 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
[all …]
/system/bpfprogs/
Dtime_in_state.c59 uint32_t cpu = bpf_get_smp_processor_id(); variable
60 uint32_t* policyp = bpf_cpu_policy_map_lookup_elem(&cpu);
140 uint32_t cpu = args->cpu_id; variable
142 uint32_t* policyp = bpf_cpu_policy_map_lookup_elem(&cpu);
/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()
/system/extras/simpleperf/doc/
Dexecutable_commands_reference.md25 - [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/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
/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
/system/sepolicy/prebuilts/api/30.0/private/
Dtraced_perf.te11 # 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/private/
Dtraced_perf.te11 # 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 };
Dgpuservice.te50 allow gpuservice self:perf_event { cpu kernel open write };
51 neverallow gpuservice self:perf_event ~{ cpu kernel open write };

1234