/external/ltp/lib/ |
D | tst_cpu.c | 29 long ncpus = -1; in tst_ncpus() local 31 ncpus = SAFE_SYSCONF(NULL, _SC_NPROCESSORS_ONLN); in tst_ncpus() 35 return ncpus; in tst_ncpus() 80 long ncpus = tst_ncpus_max(); in tst_ncpus_available() local 81 size_t cpusz = CPU_ALLOC_SIZE(ncpus); in tst_ncpus_available() 82 cpu_set_t *cpus = CPU_ALLOC(ncpus); in tst_ncpus_available() 91 ncpus = CPU_COUNT_S(cpusz, cpus); in tst_ncpus_available() 95 return ncpus; in tst_ncpus_available()
|
/external/igt-gpu-tools/benchmarks/ |
D | prime_lookup.c | 53 static int loop(int nobj, int ndev, int nage, int ncpus, unsigned flags) in loop() argument 63 nobj, ndev, nage, ncpus, flags); in loop() 68 size = ncpus * sizeof(*results); in loop() 76 igt_fork(child, ncpus) { in loop() 120 results[ncpus] = 0; in loop() 121 for (n = 0; n < ncpus; n++) in loop() 122 results[ncpus] += results[n]; in loop() 123 printf("%.3f us\n", results[ncpus] / ncpus); in loop() 159 int ncpus = 1; in main() local 186 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main() [all …]
|
D | gem_exec_fault.c | 72 static int loop(uint64_t size, unsigned ring, int reps, int ncpus, unsigned flags) in loop() argument 117 igt_fork(child, ncpus) { in loop() 149 for (int child = 0; child < ncpus; child++) in loop() 150 shared[ncpus] += shared[child]; in loop() 151 printf("%7.3f\n", shared[ncpus] / ncpus); in loop() 162 int ncpus = 1; in main() local 189 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 203 return loop(size, ring, reps, ncpus, flags); in main()
|
D | gem_exec_nop.c | 74 static int loop(unsigned ring, int reps, int ncpus, unsigned flags) in loop() argument 131 igt_fork(child, ncpus) { in loop() 170 for (int child = 0; child < ncpus; child++) in loop() 171 shared[ncpus] += shared[child]; in loop() 172 printf("%7.3f\n", shared[ncpus] / ncpus); in loop() 191 int ncpus = 1; in main() local 218 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 238 return loop(ring, reps, ncpus, flags); in main()
|
D | gem_exec_ctx.c | 81 int ncpus, in loop() argument 123 igt_fork(child, ncpus) { in loop() 179 for (int child = 0; child < ncpus; child++) in loop() 180 shared[ncpus] += shared[child]; in loop() 181 printf("%7.3f\n", shared[ncpus] / ncpus); in loop() 192 int ncpus = 1; in main() local 224 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 242 return loop(ring, reps, mode, ncpus, flags); in main()
|
D | gem_create.c | 87 int ncpus = 1; in main() local 103 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 153 igt_fork(child, ncpus) { in main() 178 for (int child = 0; child < ncpus; child++) in main() 179 shared[ncpus] += shared[child]; in main() 181 printf("%7.3f\n", shared[ncpus]); in main()
|
D | gem_blt.c | 184 static int run(int object, int batch, int time, int reps, int ncpus, unsigned flags) in run() argument 265 count = baseline((uint64_t)object * batch, 100) / ncpus; in run() 286 igt_fork(child, ncpus) { in run() 308 for (int child = 0; child < ncpus; child++) in run() 309 shared[ncpus] += shared[child]; in run() 310 printf("%7.3f\n", shared[ncpus] / ncpus); in run() 322 int ncpus = 1; in main() local 363 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 371 return run(size, batch, time, reps, ncpus, flags); in main()
|
D | gem_busy.c | 165 static int loop(unsigned ring, int reps, int ncpus, unsigned flags) in loop() argument 291 igt_fork(child, ncpus) { in loop() 334 for (int child = 0; child < ncpus; child++) in loop() 335 shared[ncpus] += shared[child]; in loop() 336 printf("%7.3f\n", shared[ncpus] / ncpus); in loop() 346 int ncpus = 1; in main() local 373 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main() 404 return loop(ring, reps, ncpus, flags); in main()
|
D | gem_syslatency.c | 360 int ncpus = sysconf(_SC_NPROCESSORS_ONLN); in main() local 374 ncpus = 1; in main() 419 busy = calloc(ncpus, sizeof(*busy)); in main() 422 for (n = 0; n < ncpus; n++) { in main() 432 wait = calloc(ncpus, sizeof(*wait)); in main() 435 for (n = 0; n < ncpus; n++) { in main() 444 igt_stats_init_with_size(&cycles, ncpus); in main() 446 for (n = 0; n < ncpus; n++) { in main() 452 igt_stats_init_with_size(&mean, ncpus); in main() 453 igt_stats_init_with_size(&max, ncpus); in main() [all …]
|
/external/linux-kselftest/tools/testing/selftests/rcutorture/bin/ |
D | cpus2use.sh | 17 ncpus=`grep '^processor' /proc/cpuinfo | wc -l` 21 awk -v ncpus=$ncpus '{ print ncpus * ($7 + $NF) / 100 }'` 24 idlecpus=$ncpus 26 awk -v ncpus=$ncpus -v idlecpus=$idlecpus < /dev/null '
|
/external/rust/crates/grpcio-sys/grpc/src/core/lib/gpr/ |
D | cpu_linux.cc | 36 static int ncpus = 0; variable 42 ncpus = 1; in init_num_cpus() 48 ncpus = static_cast<int>(sysconf(_SC_NPROCESSORS_CONF)); in init_num_cpus() 49 if (ncpus < 1) { in init_num_cpus() 51 ncpus = 1; in init_num_cpus() 58 return static_cast<unsigned>(ncpus); in gpr_cpu_num_cores()
|
D | cpu_posix.cc | 34 static long ncpus = 0; variable 39 ncpus = sysconf(_SC_NPROCESSORS_CONF); in init_ncpus() 40 if (ncpus < 1 || ncpus > INT32_MAX) { in init_ncpus() 42 ncpus = 1; in init_ncpus() 49 return (unsigned)ncpus; in gpr_cpu_num_cores()
|
/external/grpc-grpc/src/core/lib/gpr/ |
D | cpu_linux.cc | 36 static int ncpus = 0; variable 42 ncpus = 1; in init_num_cpus() 48 ncpus = static_cast<int>(sysconf(_SC_NPROCESSORS_CONF)); in init_num_cpus() 49 if (ncpus < 1) { in init_num_cpus() 51 ncpus = 1; in init_num_cpus() 58 return static_cast<unsigned>(ncpus); in gpr_cpu_num_cores()
|
D | cpu_posix.cc | 35 static long ncpus = 0; variable 40 ncpus = sysconf(_SC_NPROCESSORS_CONF); in init_ncpus() 41 if (ncpus < 1 || ncpus > INT32_MAX) { in init_ncpus() 43 ncpus = 1; in init_ncpus() 50 return (unsigned)ncpus; in gpr_cpu_num_cores()
|
/external/ltp/testcases/kernel/syscalls/sched_setaffinity/ |
D | sched_setaffinity01.c | 92 long ncpus; in setup() local 93 ncpus = tst_ncpus_max(); in setup() 96 mask = CPU_ALLOC(ncpus); in setup() 100 mask_size = CPU_ALLOC_SIZE(ncpus); in setup() 105 emask = CPU_ALLOC(ncpus + 1); in setup() 109 emask_size = CPU_ALLOC_SIZE(ncpus + 1); in setup() 111 CPU_SET_S(ncpus, emask_size, emask); in setup()
|
/external/ltp/testcases/kernel/mem/cpuset/ |
D | cpuset01.c | 41 static long ncpus; variable 68 exit(mem_hog_cpuset(ncpus > 1 ? ncpus : 1)); in test_cpuset() 81 ncpus = count_cpu(); in setup() 165 int ncpus = 0; in count_cpu() local 167 while (path_exist(PATH_SYS_SYSTEM "/cpu/cpu%d", ncpus)) in count_cpu() 168 ncpus++; in count_cpu() 170 return ncpus; in count_cpu()
|
/external/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/ |
D | cpuinfo.c | 25 int ncpus; variable 38 if (!ncpus) { in get_cpu_baseinfo() 39 ncpus = get_ncpus(); in get_cpu_baseinfo() 40 if (ncpus <= 0) in get_cpu_baseinfo() 50 cpus = malloc(sizeof(*cpus) * ncpus); in get_cpu_baseinfo() 53 memset(cpus, 0, sizeof(*cpus) * ncpus); in get_cpu_baseinfo() 68 if (data >= ncpus) { in get_cpu_baseinfo() 103 for (i = 0; i < ncpus; i++) { in online_cpumask() 225 if (ci < 0 || ci >= ncpus) { in get_sched_domains() 256 if (!ncpus) { in getcpuinfo() [all …]
|
/external/bcc/tests/cc/ |
D | test_hash_table.cc | 108 size_t ncpus = ebpf::BPFTable::get_possible_cpu_count(); variable 121 std::vector<uint64_t> v1(ncpus); 124 for (size_t j = 0; j < ncpus; j++) { 135 for (size_t j = 0; j < ncpus; j++) { 140 for (size_t j = 0; j < ncpus; j++) { 147 for (size_t j = 0; j < ncpus; j++) { 165 std::vector<uint64_t> v(ncpus); 168 for (size_t cpu = 0; cpu < ncpus; cpu++) { 183 for (size_t cpu = 0; cpu < ncpus; cpu++) {
|
D | test_array_table.cc | 111 size_t ncpus = ebpf::BPFTable::get_possible_cpu_count(); variable 124 std::vector<uint64_t> v1(ncpus); 127 for (size_t j = 0; j < ncpus; j++) { 137 REQUIRE(v2.size() == ncpus); 138 for (size_t j = 0; j < ncpus; j++) {
|
/external/jemalloc_new/include/jemalloc/internal/ |
D | jemalloc_internal_inlines_a.h | 30 if ((opt_percpu_arena == percpu_arena) || ((unsigned)cpuid < ncpus / in percpu_arena_choose() 36 arena_ind = cpuid - ncpus / 2; in percpu_arena_choose() 46 if (mode == per_phycpu_arena && ncpus > 1) { in percpu_arena_ind_limit() 47 if (ncpus % 2) { in percpu_arena_ind_limit() 49 return ncpus / 2 + 1; in percpu_arena_ind_limit() 51 return ncpus / 2; in percpu_arena_ind_limit() 53 return ncpus; in percpu_arena_ind_limit()
|
/external/igt-gpu-tools/tests/i915/ |
D | gem_ctx_create.c | 84 static void files(int core, int timeout, const int ncpus) in files() argument 100 igt_fork(child, ncpus) { in files() 127 static void active(int fd, unsigned engine, int timeout, int ncpus) in active() argument 156 if (ncpus < 0) { in active() 176 ncpus = -ncpus; in active() 179 igt_fork(child, ncpus) { in active() 256 static void maximum(int fd, int ncpus, unsigned mode) in maximum() argument 298 igt_fork(child, ncpus) { in maximum() 525 const int ncpus = sysconf(_SC_NPROCESSORS_ONLN); variable 566 maximum(fd, ncpus, CHECK_RAM); [all …]
|
D | gem_exec_flush.c | 556 const int ncpus = sysconf(_SC_NPROCESSORS_ONLN); variable 616 batch(fd, ring, ncpus, timeout, b->mode, 0); 621 batch(fd, ring, ncpus, timeout, b->mode, COHERENT); 626 batch(fd, ring, ncpus, timeout, b->mode, 635 run(fd, ring, ncpus, timeout, 641 run(fd, ring, ncpus, timeout, 648 run(fd, ring, ncpus, timeout, 654 run(fd, ring, ncpus, timeout, 660 run(fd, ring, ncpus, timeout, 666 run(fd, ring, ncpus, timeout, [all …]
|
/external/linux-kselftest/tools/testing/selftests/powerpc/ |
D | utils.c | 91 int ncpus, cpu = -1; in pick_online_cpu() local 95 ncpus = get_nprocs_conf(); in pick_online_cpu() 96 size = CPU_ALLOC_SIZE(ncpus); in pick_online_cpu() 97 mask = CPU_ALLOC(ncpus); in pick_online_cpu() 111 for (cpu = 8; cpu < ncpus; cpu += 8) in pick_online_cpu() 116 for (cpu = ncpus - 1; cpu >= 0; cpu--) in pick_online_cpu()
|
/external/ltp/include/lapi/ |
D | cpuset.h | 24 #define CPU_ALLOC(ncpus) malloc(sizeof(cpu_set_t)); \ argument 25 if (ncpus > CPU_SETSIZE) { \ 27 "Your libc does not support masks with %ld cpus", (long)ncpus); \
|
/external/llvm/utils/lit/lit/ |
D | util.py | 34 ncpus = os.sysconf("SC_NPROCESSORS_ONLN") 35 if isinstance(ncpus, int) and ncpus > 0: 36 return ncpus 41 ncpus = int(os.environ["NUMBER_OF_PROCESSORS"]) 42 if ncpus > 0: 45 return min(ncpus, 32)
|