Lines Matching defs:cpu
47 OHOS::UniqueFd PerfEvents::Open(perf_event_attr &attr, pid_t pid, int cpu, int groupFd,
50 OHOS::UniqueFd fd = UniqueFd(syscall(__NR_perf_event_open, &attr, pid, cpu, groupFd, flags));
56 HLOGV("perf_event_open: got fd %d for pid %d cpu %d group %d flags %lu", fd.Get(), pid, cpu, groupFd, flags);
104 HLOGD("mmap cpu %d, aux_head: %llu, aux_tail:%llu, auxOffset:%llu, auxSize:%llu",
105 mmapFd.cpu, auxHead, auxTail, auxOffset, auxSize);
114 int cpu = mmapFd.cpu;
117 arm_spe_reference(), cpu, tid, cpu, pid);
213 // cpu-clcles event must be supported
313 if ((eventTokens[0] == "sw-task-clock" || eventTokens[0] == "sw-cpu-clock") &&
566 // 1. prepare cpu pid
955 cpus_.push_back(i); // put all cpu
963 pid == 0 and cpu == -1
966 pid == 0 and cpu >= 0
970 pid > 0 and cpu == -1
973 pid > 0 and cpu >= 0
977 pid == -1 and cpu >= 0
983 pid == -1 and cpu == -1
1005 // print info tell user which cpu and process we will select.
1027 // create each fd by cpu and process user select
1044 Group's fd requires the pid to be the same as the cpu, the only difference is event
1048 event E1 pid P1 cpu C1 [Group 1]
1049 event E1 pid P1 cpu C2 [Group 2]
1050 event E1 pid P1 cpu C3 [Group 3]
1052 event E1 pid P2 cpu C1 [Group 4]
1053 event E1 pid P2 cpu C2 [Group 5]
1054 event E1 pid P2 cpu C3 [Group 6]
1056 event E2 pid P1 cpu C1 [Group 1]
1057 event E2 pid P1 cpu C2 [Group 2]
1058 event E2 pid P1 cpu C3 [Group 3]
1060 event E2 pid P2 cpu C1 [Group 4]
1061 event E2 pid P2 cpu C2 [Group 5]
1062 event E2 pid P2 cpu C3 [Group 6]
1068 for (size_t i = 0; i < cpus_.size(); i++) { // each cpu
1080 for (size_t icpu = 0; icpu < cpus_.size(); icpu++) { // each cpu
1082 // one fd event group must match same cpu and same pid config (event can be
1100 printf("%s event is not supported by the kernel on cpu %d. reason: %d:%s\n",
1105 HLOGE("%s event is not supported by the kernel on cpu %d. reason: %d:%s\n",
1108 break; // jump to next cpu
1115 fdItem.cpu = cpus_[icpu];
1162 // count event info together (every cpu , every pid)
1190 eventItem.configName.c_str(), readNoGroupValue.id, fditem.cpu, fditem.pid,
1194 countEvent->summaries.emplace_back(fditem.cpu, fditem.pid, readNoGroupValue.value,
1211 auto it = cpuMmap_.find(item.cpu);
1227 mmapItem.cpu = item.cpu;
1228 cpuMmap_[item.cpu] = mmapItem;
1244 auto it = cpuMmap_.find(item.cpu);
1263 cpuMmap_[item.cpu] = mmapItem;
1265 HLOGD("CreateMmap success cpu %d fd %d", item.cpu, mmapItem.fd);