Home
last modified time | relevance | path

Searched refs:ncpus (Results 1 – 25 of 51) sorted by relevance

123

/external/ltp/testcases/kernel/syscalls/sched_setaffinity/
Dsched_setaffinity01.c57 static long ncpus; variable
98 ncpus = tst_ncpus_max(); in setup()
101 mask = CPU_ALLOC(ncpus); in setup()
104 ncpus); in setup()
105 mask_size = CPU_ALLOC_SIZE(ncpus); in setup()
110 emask = CPU_ALLOC(ncpus + 1); in setup()
113 ncpus + 1); in setup()
114 emask_size = CPU_ALLOC_SIZE(ncpus + 1); in setup()
116 CPU_SET_S(ncpus, emask_size, emask); in setup()
/external/grpc-grpc/src/core/lib/gpr/
Dcpu_linux.cc36 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()
Dcpu_posix.cc35 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/linux-kselftest/tools/testing/selftests/rcutorture/bin/
Dcpus2use.sh25 ncpus=`grep '^processor' /proc/cpuinfo | wc -l`
27 awk -v ncpus=$ncpus '{ print ncpus * ($7 + $NF) / 100 }'`
28 awk -v ncpus=$ncpus -v idlecpus=$idlecpus < /dev/null '
Dkvm-build.sh51 ncpus=`cpus2use.sh`
52 make O=$builddir -j$ncpus $TORTURE_KMAKE_ARG > $resdir/Make.out 2>&1
/external/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/
Dcpuinfo.c25 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 …]
Dlibcpuset.c1202 int ncpus = cpuset_cpus_nbits(); in rebuild_map() local
1206 for (cpu = 0; cpu < (unsigned int)ncpus; cpu++) in rebuild_map()
1220 if (cpu >= (unsigned int)ncpus in rebuild_map()
1245 int ncpus = cpuset_cpus_nbits(); in load_map() local
1249 if ((cpunodemap.map = calloc(ncpus, sizeof(int))) == NULL) in load_map()
1254 for (cpu = 0; cpu < (unsigned int)ncpus; cpu++) in load_map()
1259 if (cpu >= (unsigned int)ncpus || mem >= (unsigned int)nmems) in load_map()
1281 int ncpus = cpuset_cpus_nbits(); in store_map() local
1290 for (cpu = 0; cpu < (unsigned int)ncpus; cpu++) { in store_map()
1359 int ncpus = cpuset_cpus_nbits(); in cpuset_localcpus() local
[all …]
/external/ltp/testcases/kernel/mem/cpuset/
Dcpuset01.c41 static long ncpus; variable
69 exit(mem_hog_cpuset(ncpus > 1 ? ncpus : 1)); in test_cpuset()
89 ncpus = count_cpu(); in setup()
176 int ncpus = 0; in count_cpu() local
178 while (path_exist(PATH_SYS_SYSTEM "/cpu/cpu%d", ncpus)) in count_cpu()
179 ncpus++; in count_cpu()
181 return ncpus; in count_cpu()
/external/bcc/tests/cc/
Dtest_hash_table.cc108 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++) {
Dtest_array_table.cc111 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++) {
Dtest_bpf_table.cc106 size_t ncpus = ebpf::BPFTable::get_possible_cpu_count(); variable
108 std::vector<std::string> v1(ncpus);
109 for (size_t i = 0; i < ncpus; i++) {
119 for (size_t i = 0; i < ncpus; i++) {
/external/jemalloc_new/include/jemalloc/internal/
Djemalloc_internal_inlines_a.h30 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/swiftshader/third_party/LLVM/utils/lit/lit/
DUtil.py11 ncpus = os.sysconf("SC_NPROCESSORS_ONLN")
12 if isinstance(ncpus, int) and ncpus > 0:
13 return ncpus
18 ncpus = int(os.environ["NUMBER_OF_PROCESSORS"])
19 if ncpus > 0:
20 return ncpus
/external/ltp/lib/
Dtst_cpu.c27 long ncpus = -1; in tst_ncpus() local
29 ncpus = SAFE_SYSCONF(NULL, _SC_NPROCESSORS_ONLN); in tst_ncpus()
33 return ncpus; in tst_ncpus()
/external/llvm/utils/lit/lit/
Dutil.py34 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)
/external/ltp/include/lapi/
Dcpuset.h36 #define CPU_ALLOC(ncpus) malloc(sizeof(cpu_set_t)); \ argument
37 if (ncpus > CPU_SETSIZE) { \
39 "Your libc does not support masks with %ld cpus", ncpus); \
/external/autotest/client/tests/monotonic_time/src/
Dtime_test.c234 int ncpus; in run_test() local
256 ncpus = count_cpus(cpus); in run_test()
258 if (nthreads != ncpus) { in run_test()
260 ncpus, nthreads); in run_test()
270 test->name, ncpus, duration); in run_test()
272 INFO("running %s test on %d cpus", test->name, ncpus); in run_test()
/external/ltp/testcases/cve/
Dcve-2015-3290.c424 int i, ncpus; in do_child() local
432 ncpus = tst_ncpus(); in do_child()
433 threads = SAFE_MALLOC(sizeof(*threads) * ncpus); in do_child()
435 for (i = 0; i < ncpus; i++) in do_child()
441 for (i = 0; i < ncpus; i++) { in do_child()
/external/swiftshader/third_party/llvm-7.0/llvm/utils/lit/lit/
Dutil.py113 ncpus = os.sysconf('SC_NPROCESSORS_ONLN')
114 if isinstance(ncpus, int) and ncpus > 0:
115 return ncpus
121 ncpus = int(os.environ['NUMBER_OF_PROCESSORS'])
122 if ncpus > 0:
125 return min(ncpus, 32)
/external/bcc/src/cc/api/
DBPFTable.h167 ncpus(BPFTable::get_possible_cpu_count()) { in BPFPercpuArrayTable()
178 value.resize(ncpus); in get_value()
184 if (value.size() != ncpus) in update_value()
190 unsigned int ncpus;
268 ncpus(BPFTable::get_possible_cpu_count()) { in BPFPercpuHashTable()
280 value.resize(ncpus); in get_value()
286 if (value.size() != ncpus) in update_value()
293 unsigned int ncpus;
DBPFTable.cc61 size_t ncpus = get_possible_cpus().size(); in get_value() local
63 char value[desc.leaf_size * ncpus]; in get_value()
74 value_str.resize(ncpus); in get_value()
76 for (size_t i = 0; i < ncpus; i++) { in get_value()
107 size_t ncpus = get_possible_cpus().size(); in update_value() local
109 char value[desc.leaf_size * ncpus]; in update_value()
117 if (value_str.size() != ncpus) in update_value()
120 for (size_t i = 0; i < ncpus; i++) { in update_value()
/external/blktrace/btreplay/
Dbtreplay.c143 static int ncpus = 0; // Number of CPUs in the system variable
504 ncpus = sysconf(_SC_NPROCESSORS_ONLN); in get_ncpus()
524 ncpus = -1; in get_ncpus()
527 ncpus = last_cpu; in get_ncpus()
528 ncpus++; in get_ncpus()
531 if (ncpus == 0) { in get_ncpus()
546 cpus = CPU_ALLOC(ncpus); in pin_to_cpu()
547 size = CPU_ALLOC_SIZE(ncpus); in pin_to_cpu()
549 assert(0 <= tip->cpu && tip->cpu < ncpus); in pin_to_cpu()
561 cpu_set_t *now = CPU_ALLOC(ncpus); in pin_to_cpu()
[all …]
/external/blktrace/
Dblktrace.c96 int fd, ncpus; member
218 int fd, ncpus; member
278 static int ncpus; variable
1034 cl_fds = calloc(ncpus, sizeof(*cl_fds)); in open_client_connections()
1084 dpp->ncpus = max_cpus; in setup_buts()
1088 dpp->stats = calloc(dpp->ncpus, sizeof(*dpp->stats)); in setup_buts()
1089 memset(dpp->stats, 0, dpp->ncpus * sizeof(*dpp->stats)); in setup_buts()
2058 for (cpu = 0, sp = dpp->stats; cpu < dpp->ncpus; cpu++, sp++) { in show_stats()
2278 nc->ncpus = -1; in ch_add_connection()
2340 static void device_done(struct devpath *dpp, int ncpus) in device_done() argument
[all …]
/external/strace/xlat/
Dgen.sh315 local ncpus="$(getconf _NPROCESSORS_ONLN)"
317 [ "${ncpus}" -ge 1 ] ||
318 ncpus=1
/external/clang/utils/analyzer/
DSATestBuild.py69 ncpus = os.sysconf("SC_NPROCESSORS_ONLN")
70 if isinstance(ncpus, int) and ncpus > 0:
71 return ncpus
76 ncpus = int(os.environ["NUMBER_OF_PROCESSORS"])
77 if ncpus > 0:
78 return ncpus

123