Branch Coverage

Affinity.xs
Criterion Covered Total %
branch 38 76 50.0


line true false branch
23 1 5 if (available_cpus_cnt == 0)
27 0 6 if (available_cpus_cnt == -1)
30 4 2 if (cpuset->set != NULL)
36 0 6 if (cpuset->set == NULL) {
38 0 0 Perl_croak(pTHX_ (char *) SvPV_nolen(msg));
43 3 3 if (av != NULL) {
46 11 3 for (i = 0; i < av_len; i++) {
47 11 0 size_t cpu = SvIV((SV*)*av_fetch(av, i, 0)); // SvIVX to coerce value into IV
49 11 0 CPU_SET_S(cpu, cpuset->size, cpuset->set);
56 0 3 if (!SvOK(sv))
0 0 if (!SvOK(sv))
0 0 if (!SvOK(sv))
59 0 3 if (SvTIED_mg(sv, PERL_MAGIC_tied))
0 0 if (SvTIED_mg(sv, PERL_MAGIC_tied))
62 0 3 if (!SvROK(sv))
68 3 0 switch (SvTYPE(ref)) {
80 11 3 for (i = av_len(av); i >= 0; i--) {
83 0 11 if (!SvOK(val) || !SvIOK(val)) {
0 0 if (!SvOK(val) || !SvIOK(val)) {
0 0 if (!SvOK(val) || !SvIOK(val)) {
0 11 if (!SvOK(val) || !SvIOK(val)) {
89 0 3 if (bad_arg != -1) {
92 0 0 Perl_croak(pTHX_ (char *) SvPV_nolen(msg));
110 1 1 if (SvOK(sv))
1 0 if (SvOK(sv))
0 1 if (SvOK(sv))
139 1 2 if (SvOK(sv))
1 0 if (SvOK(sv))
0 1 if (SvOK(sv))
149 4 0 int res = CPU_ISSET_S((uint32_t) cpu, cpuset->size, cpuset->set);
2 2 int res = CPU_ISSET_S((uint32_t) cpu, cpuset->size, cpuset->set);
150 0 4 mXPUSHu( res );
158 1 0 CPU_SET_S((uint32_t) cpu, cpuset->size, cpuset->set);
166 1 0 CPU_CLR_S((uint32_t) cpu, cpuset->size, cpuset->set);
174 0 7 mXPUSHu( cpu_count ); // PUSHs(sv_2mortal(newSVuv(cpu_count)));
183 0 1 if (res == -1) {
201 0 0 Perl_croak(pTHX_ (char *) SvPV_nolen(error));
203 0 1 mXPUSHi( res );