/commonlibrary/memory_utils/libmeminfo/test/unittest/ |
H A D | meminfo_test.cpp | 53 int pid = 1;
in HWTEST_F() local 55 size = GetRssByPid(pid);
in HWTEST_F() 62 int pid = -1;
in HWTEST_F() local 64 size = GetRssByPid(pid);
in HWTEST_F() 70 int pid = 1;
in HWTEST_F() local 72 size = GetPssByPid(pid);
in HWTEST_F() 80 int pid = -1;
in HWTEST_F() local 82 size = GetPssByPid(pid);
in HWTEST_F() 88 int pid = 1;
in HWTEST_F() local 90 size = GetSwapPssByPid(pid);
in HWTEST_F() 98 int pid = -1; HWTEST_F() local 106 int pid = 1; HWTEST_F() local [all...] |
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/ |
H A D | async_pool.rs | 47 // Gets the pid of all current threads (including the main thread) 59 // Get the name of the thread based on the thread pid 60 unsafe fn name_of_pid(pid: &str) -> Option<String> { in name_of_pid() 65 pid in name_of_pid() 79 fn get_other_thread_affinity(pid: i32) -> Vec<usize> { in get_other_thread_affinity() 84 sched_getaffinity(pid, size_of::<cpu_set_t>(), &mut set); in get_other_thread_affinity() 138 let pid = dir.to_str().unwrap().parse::<i32>().unwrap(); in sdv_async_pool_001() 139 if let Some(name) = name_of_pid(pid.to_string().as_str()) { in sdv_async_pool_001() 142 assert_eq!(get_other_thread_affinity(pid).len(), 1); in sdv_async_pool_001() 198 let pid in sdv_async_pool_002() [all...] |
/commonlibrary/memory_utils/libmeminfo/include/ |
H A D | meminfo.h | 25 uint64_t GetRssByPid(const int pid);
28 uint64_t GetPssByPid(const int pid);
31 uint64_t GetSwapPssByPid(const int pid);
34 bool GetGraphicsMemory(const int pid, uint64_t &gl, uint64_t &graph);
|
/commonlibrary/memory_utils/libmeminfo/src/ |
H A D | meminfo.cpp | 39 uint64_t GetRssByPid(const int pid)
in GetRssByPid() argument 46 std::string statmPath = "/proc/" + std::to_string(pid) + "/statm";
in GetRssByPid() 61 uint64_t GetPssByPid(const int pid)
in GetPssByPid() argument 64 std::string filename = "/proc/" + std::to_string(pid) + "/smaps_rollup";
in GetPssByPid() 89 uint64_t GetSwapPssByPid(const int pid)
in GetSwapPssByPid() argument 92 std::string filename = "/proc/" + std::to_string(pid) + "/smaps_rollup";
in GetSwapPssByPid() 117 bool GetGraphicsMemory(const int pid, uint64_t &gl, uint64_t &graph)
in GetGraphicsMemory() argument 132 if (memtrack->GetDevMem(pid, memTrackerType.first, records) != HDF_SUCCESS) {
in GetGraphicsMemory()
|
/commonlibrary/ets_utils/js_sys_module/process/ |
H A D | js_childprocess.cpp | 80 pid_t pid = fork();
in Spawn() local 81 if (!pid) {
in Spawn() 90 } else if (pid > 0) {
in Spawn() 95 optionsInfo_->pid = pid;
in Spawn() 134 waitpid(optionsInfo_->pid, &status, 0);
in Wait() 220 NAPI_CALL(env, napi_create_int32(env, optionsInfo_->pid, &result));
in Getpid() 256 stdOutInfo_->pid = optionsInfo_->pid;
in CreateWorker() 271 stdErrInfo_->pid in CreateWorker() [all...] |
H A D | js_process.cpp | 159 int32_t pid = 0;
in Kill() local 161 napi_get_value_int32(env, proid, &pid);
in Kill() 165 if (sig > 64 && (!pid || pid == -1 || pid == ownPid || pid == -ownPid)) {
in Kill() 170 int err = uv_kill(pid, sig);
in Kill() 580 int32_t pid = 0;
in Kill() local 582 napi_get_value_int32(env, proid, &pid);
in Kill() 586 if (sig > 64 && (!pid || pi in Kill() [all...] |
H A D | js_childprocess.h | 39 int pid {};
48 pid_t pid {};
101 * Get the specific pid value.
|
/commonlibrary/ets_utils/js_sys_module/test/ |
H A D | test_process.cpp | 114 napi_value pid = childprocess.Getpid(env); in HWTEST_F() local 117 napi_value result = process.Kill(env, pid, signal); in HWTEST_F() 139 napi_value pid = childprocess.Getpid(env); in HWTEST_F() local 142 napi_value result = process.Kill(env, pid, signal); in HWTEST_F() 270 * @tc.desc: Test process pid. 278 int32_t pid = 0; in HWTEST_F() local 279 napi_get_value_int32(env, napiPid, &pid); in HWTEST_F() 281 if (pid > 0) { in HWTEST_F() 333 * @tc.desc: test get the specific pid value. 347 int32_t pid in HWTEST_F() local [all...] |
/commonlibrary/memory_utils/libdmabufheap/test/unittest/libdmabufheap/ |
H A D | dmabuf_alloc_test.cpp | 132 pid_t pid = fork(); in HWTEST_F() local 133 ASSERT_GE(pid, 0); in HWTEST_F() 135 if (pid == 0) { in HWTEST_F() 154 waitpid(pid, nullptr, 0); in HWTEST_F()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/bin/ |
H A D | ylong_tokio_mem.rs | 21 let pid = process::id(); in get_memory_info() 22 println!("pid {pid}"); in get_memory_info() 23 let cmd = format!("{pid}"); in get_memory_info()
|
H A D | ylong_tokio_spawn.rs | 24 let pid = process::id(); in get_memory_info() 25 println!("pid {pid}"); in get_memory_info() 26 let cmd = format!("{pid}"); in get_memory_info()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/examples/ |
H A D | ylong_runtime_memory.rs | 34 let pid = process::id(); in get_memory_info() 35 println!("pid {pid:}"); in get_memory_info() 36 let cmd = format!("/proc/{pid:}/status"); in get_memory_info()
|
/commonlibrary/c_utils/base/src/ |
H A D | refbase.cpp | 82 RefTracker(RefTracker* exTracker, const void* id, int strong, int weak, int ref, int pid, int tid); 98 RefTracker::RefTracker(RefTracker* exTracker, const void* id, int strong, int weak, int ref, int pid, int tid) in RefTracker() argument 99 : ptrID (id), strongRefCnt (strong), weakRefCnt (weak), refCnt (ref), PID (pid), TID (tid), exTrace (exTracker) in RefTracker()
|
/commonlibrary/ets_utils/platform/ios/ |
H A D | process_helper.cpp | 482 int pid = getpid(); in GetProcessStartRealtime() local 485 int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid}; in GetProcessStartRealtime()
|
/commonlibrary/ets_utils/js_concurrent_module/taskpool/ |
H A D | task_manager.cpp | 297 // read /proc/[pid]/task/[tid]/stat to get the number of idle threads. 301 pid_t pid = getpid(); in ReadThreadInfo() local 303 int ret = snprintf_s(path, sizeof(path), sizeof(path) - 1, "/proc/%d/task/%d/stat", pid, tid); in ReadThreadInfo()
|