| line |
true |
false |
branch |
|
517
|
0 |
0 |
if (!logfh) |
|
575
|
0 |
705 |
const char *argv0 = SvPV(sv, len); |
|
577
|
0 |
705 |
assert(out != NULL); |
|
607
|
11985 |
705 |
} while (++opt_p < opt_end); |
|
612
|
385 |
320 |
if (compression_level) { |
|
632
|
0 |
99004 |
if (NYTP_TAG_STRING != tag && NYTP_TAG_STRING_UTF8 != tag) |
|
|
0 |
0 |
if (NYTP_TAG_STRING != tag && NYTP_TAG_STRING_UTF8 != tag) |
|
637
|
57754 |
41250 |
if (sv) { |
|
638
|
57754 |
0 |
SvGROW(sv, len+1); /* forces SVt_PV */ |
|
|
3213 |
54541 |
SvGROW(sv, len+1); /* forces SVt_PV */ |
|
645
|
99004 |
0 |
buf = SvPV_nolen(sv); |
|
647
|
0 |
99004 |
SvCUR_set(sv, len); |
|
|
0 |
0 |
SvCUR_set(sv, len); |
|
|
0 |
99004 |
SvCUR_set(sv, len); |
|
|
0 |
0 |
SvCUR_set(sv, len); |
|
|
0 |
0 |
SvCUR_set(sv, len); |
|
|
0 |
99004 |
SvCUR_set(sv, len); |
|
|
0 |
0 |
SvCUR_set(sv, len); |
|
650
|
0 |
99004 |
if (NYTP_TAG_STRING_UTF8 == tag) |
|
653
|
0 |
99004 |
if (trace_level >= 19) { |
|
656
|
0 |
0 |
if (buf[len2-1] == '\n') { |
|
660
|
0 |
0 |
logwarn(" read string '%.*s%s'%s\n", (int)len2, SvPV_nolen(sv), |
|
|
0 |
0 |
logwarn(" read string '%.*s%s'%s\n", (int)len2, SvPV_nolen(sv), |
|
677
|
1627271 |
42511 |
while (len--) { |
|
690
|
168 |
48 |
if (memEQ(filename, prefix, prefix_len) |
|
691
|
168 |
0 |
&& isdigit((int)filename[prefix_len])) { |
|
694
|
56 |
168 |
while (isdigit((int)*s)) |
|
696
|
168 |
0 |
if (s[0] == ')') |
|
708
|
157 |
3895 |
if (filename_len < 6) |
|
711
|
3743 |
152 |
if (filename[filename_len - 1] != ']' && filename[filename_len - 1] != ')') |
|
|
3703 |
40 |
if (filename[filename_len - 1] != ']' && filename[filename_len - 1] != ')') |
|
713
|
168 |
24 |
if (eval_prefix(filename, "(eval ", 6)) |
|
715
|
0 |
24 |
if (eval_prefix(filename, "(re_eval ", 9)) |
|
734
|
11720 |
30976 |
while(NULL != found) { |
|
736
|
11373 |
347 |
if (found->key_len == key_len |
|
737
|
11373 |
0 |
&& memEQ(found->key, key, key_len) |
|
743
|
162 |
185 |
if (NULL == found->next_entry) { |
|
744
|
2 |
160 |
if (insert) { |
|
769
|
1622 |
29354 |
if (insert) { |
|
782
|
630 |
992 |
if (!hashtable->first_inserted) |
|
802
|
0 |
0 |
if (verbosity) |
|
804
|
0 |
0 |
if (!hashtable->table) |
|
807
|
0 |
0 |
for (idx=0; idx < hashtable->size; ++idx) { |
|
811
|
0 |
0 |
if (!found) |
|
815
|
0 |
0 |
while (NULL != found) { |
|
820
|
0 |
0 |
if (verbosity) |
|
822
|
0 |
0 |
if (chain_len > max_chain_len) |
|
838
|
580 |
1087 |
if (fid_info->key_abs) { |
|
861
|
0 |
1667 |
if (file_name_copy) |
|
873
|
516 |
1076 |
if (fid_info->key_abs) { |
|
878
|
1460 |
132 |
if (len > 3 && memEQs(file_name + len - 3, 3, ".pm")) { |
|
|
251 |
1209 |
if (len > 3 && memEQs(file_name + len - 3, 3, ".pm")) { |
|
890
|
16 |
235 |
if (PerlLIO_lstat(pmc, &pmcstat) == 0) { |
|
895
|
16 |
0 |
if (PerlLIO_lstat(file_name, &pmstat) < 0 || |
|
|
16 |
0 |
if (PerlLIO_lstat(file_name, &pmstat) < 0 || |
|
910
|
0 |
0 |
if (fid_flags & NYTP_FIDf_IS_EVAL) my_strlcat(buf, "eval,", len); |
|
911
|
0 |
0 |
if (fid_flags & NYTP_FIDf_IS_FAKE) my_strlcat(buf, "fake,", len); |
|
912
|
0 |
0 |
if (fid_flags & NYTP_FIDf_IS_AUTOSPLIT) my_strlcat(buf, "autosplit,", len); |
|
913
|
0 |
0 |
if (fid_flags & NYTP_FIDf_IS_ALIAS) my_strlcat(buf, "alias,", len); |
|
914
|
0 |
0 |
if (fid_flags & NYTP_FIDf_IS_PMC) my_strlcat(buf, "pmc,", len); |
|
915
|
0 |
0 |
if (fid_flags & NYTP_FIDf_VIA_STMT) my_strlcat(buf, "viastmt,", len); |
|
916
|
0 |
0 |
if (fid_flags & NYTP_FIDf_VIA_SUB) my_strlcat(buf, "viasub,", len); |
|
917
|
0 |
0 |
if (fid_flags & NYTP_FIDf_HAS_SRC) my_strlcat(buf, "hassrc,", len); |
|
918
|
0 |
0 |
if (fid_flags & NYTP_FIDf_SAVE_SRC) my_strlcat(buf, "savesrc,", len); |
|
919
|
0 |
0 |
if (*buf) /* trim trailing comma */ |
|
929
|
75 |
705 |
while (e) { |
|
930
|
75 |
0 |
if ( !(e->fid_flags & NYTP_FIDf_IS_ALIAS) ) |
|
949
|
0 |
32 |
base_start = (base_start) ? base_start+1 : file_name; |
|
952
|
0 |
32 |
if (trace_level >= 3) |
|
956
|
144 |
32 |
for ( ; e; e = (fid_hash_entry*)e->he.next_inserted) { |
|
959
|
32 |
112 |
if (e->fid_flags & NYTP_FIDf_IS_AUTOSPLIT) |
|
961
|
0 |
112 |
if (trace_level >= 4) |
|
965
|
32 |
80 |
if (e->he.key_len < base_len) |
|
969
|
48 |
32 |
if (memcmp(e_name, base_start, base_len) != 0) |
|
972
|
32 |
0 |
if (e->he.key_len > base_len && *(e_name-1) != *sep) |
|
|
0 |
32 |
if (e->he.key_len > base_len && *(e_name-1) != *sep) |
|
975
|
0 |
32 |
if (trace_level >= 3) |
|
1018
|
40887 |
1624 |
if (1 != hash_op(&fidhash, file_name, file_name_len, (Hash_entry**)&found, (bool)(created_via ? 1 : 0))) { |
|
1020
|
0 |
40887 |
if (trace_level >= 7) { |
|
1021
|
0 |
0 |
if (found) |
|
1025
|
11373 |
29514 |
return (found) ? found->he.id : 0; |
|
1028
|
994 |
630 |
if (fidhash.prior_inserted) |
|
1036
|
679 |
945 |
if ('(' == file_name[0]) { /* first char is '(' */ |
|
1037
|
661 |
18 |
if (']' == file_name[file_name_len-1]) { /* last char is ']' */ |
|
1043
|
661 |
0 |
if (!start || !end || start > end) { /* should never happen */ |
|
|
661 |
0 |
if (!start || !end || start > end) { /* should never happen */ |
|
|
0 |
661 |
if (!start || !end || start > end) { /* should never happen */ |
|
1053
|
16 |
2 |
else if (filename_is_eval(file_name, file_name_len)) { |
|
1067
|
947 |
677 |
if (!found->eval_fid) { |
|
1069
|
0 |
947 |
if (tag) { |
|
1074
|
0 |
0 |
if (trace_level >= 1) |
|
1084
|
48 |
1576 |
if ( ')' == file_name[file_name_len-1] && strstr(file_name, " (autosplit ")) { |
|
|
32 |
16 |
if ( ')' == file_name[file_name_len-1] && strstr(file_name, " (autosplit ")) { |
|
1095
|
32 |
1592 |
if (found->fid_flags & NYTP_FIDf_IS_AUTOSPLIT |
|
1096
|
32 |
0 |
&& (parent_entry = find_autosplit_parent(aTHX_ file_name)) |
|
1110
|
0 |
32 |
if (trace_level >= 2) |
|
1111
|
0 |
0 |
logwarn("Use fid %2u (after %2u:%-4u) %x e%u:%u %.*s %s\n", |
|
1121
|
915 |
677 |
if (!found->eval_fid && |
|
|
132 |
783 |
if (!found->eval_fid && |
|
1122
|
16 |
116 |
!(file_name[0] == '-' |
|
1123
|
16 |
0 |
&& (file_name_len==1 || (file_name[1]=='e' && file_name_len==2))) && |
|
|
0 |
16 |
&& (file_name_len==1 || (file_name[1]=='e' && file_name_len==2))) && |
|
|
516 |
267 |
&& (file_name_len==1 || (file_name[1]=='e' && file_name_len==2))) && |
|
1138
|
0 |
516 |
if (!getcwd(file_name_abs, sizeof(file_name_abs))) { |
|
1152
|
516 |
0 |
if (strNE(file_name_abs, "/")) |
|
1155
|
0 |
516 |
if (strnEQ(file_name, "./", 2)) { |
|
1168
|
16 |
1576 |
if (fid_is_pmc(aTHX_ found)) |
|
1175
|
1356 |
236 |
if ( (src_av = GvAV(gv_fetchfile_flags(found->he.key, found->he.key_len, 0))) ) |
|
1176
|
1280 |
76 |
if (av_len(src_av) > -1) |
|
1180
|
132 |
1460 |
if (found->he.key[0] == '-' && (found->he.key_len == 1 || |
|
|
16 |
116 |
if (found->he.key[0] == '-' && (found->he.key_len == 1 || |
|
|
16 |
0 |
if (found->he.key[0] == '-' && (found->he.key_len == 1 || |
|
1181
|
16 |
0 |
(found->he.key[1] == 'e' && found->he.key_len == 2))) |
|
1187
|
915 |
677 |
if (found->eval_fid |
|
1188
|
763 |
152 |
|| (found->fid_flags & NYTP_FIDf_IS_EVAL) |
|
1189
|
376 |
387 |
|| (profile_opts & NYTP_OPTf_SAVESRC) |
|
1190
|
264 |
112 |
|| (found->he.key_len > 10 && found->he.key[9] == 'x' && strnEQ(found->he.key, "/loader/0x", 10)) |
|
|
0 |
264 |
|| (found->he.key_len > 10 && found->he.key[9] == 'x' && strnEQ(found->he.key, "/loader/0x", 10)) |
|
|
0 |
0 |
|| (found->he.key_len > 10 && found->he.key[9] == 'x' && strnEQ(found->he.key, "/loader/0x", 10)) |
|
1197
|
0 |
1592 |
if (trace_level >= 2) { |
|
1201
|
0 |
0 |
logwarn("New fid %2u (after %2u:%-4u) 0x%02x e%u:%u %.*s %s %s\n", |
|
1217
|
5563 |
5531 |
UV uv = (!svp || !SvOK(*svp)) ? default_uv : SvUV(*svp); |
|
|
0 |
5563 |
UV uv = (!svp || !SvOK(*svp)) ? default_uv : SvUV(*svp); |
|
|
0 |
0 |
UV uv = (!svp || !SvOK(*svp)) ? default_uv : SvUV(*svp); |
|
|
0 |
0 |
UV uv = (!svp || !SvOK(*svp)) ? default_uv : SvUV(*svp); |
|
|
0 |
5563 |
UV uv = (!svp || !SvOK(*svp)) ? default_uv : SvUV(*svp); |
|
1225
|
11110 |
5531 |
NV nv = (!svp || !SvOK(*svp)) ? default_nv : SvNV(*svp); |
|
|
0 |
11110 |
NV nv = (!svp || !SvOK(*svp)) ? default_nv : SvNV(*svp); |
|
|
0 |
0 |
NV nv = (!svp || !SvOK(*svp)) ? default_nv : SvNV(*svp); |
|
|
0 |
0 |
NV nv = (!svp || !SvOK(*svp)) ? default_nv : SvNV(*svp); |
|
|
11110 |
0 |
NV nv = (!svp || !SvOK(*svp)) ? default_nv : SvNV(*svp); |
|
1282
|
1384800 |
0 |
for (i = startingblock; i >= 0; i--) { |
|
1286
|
1384800 |
0 |
if (type_bit & cx_type_mask) |
|
1346
|
0 |
1484890 |
if (!start_op) { |
|
1347
|
0 |
0 |
if (trace_level >= trace) |
|
1354
|
1484890 |
0 |
while ( o && (type = (o->op_type) ? o->op_type : (int)o->op_targ) ) { |
|
|
1484890 |
0 |
while ( o && (type = (o->op_type) ? o->op_type : (int)o->op_targ) ) { |
|
|
1484890 |
0 |
while ( o && (type = (o->op_type) ? o->op_type : (int)o->op_targ) ) { |
|
1355
|
578625 |
906265 |
if (type == OP_NEXTSTATE || |
|
|
505816 |
72809 |
if (type == OP_NEXTSTATE || |
|
1361
|
0 |
1412081 |
if (trace_level >= trace) |
|
1362
|
0 |
0 |
logwarn("\tstart_cop_of_context %s is %s line %d of %s\n", |
|
|
0 |
0 |
logwarn("\tstart_cop_of_context %s is %s line %d of %s\n", |
|
1367
|
0 |
72809 |
if (trace_level >= trace) |
|
1368
|
0 |
0 |
logwarn("\tstart_cop_of_context %s op '%s' isn't a cop, giving up\n", |
|
1384
|
0 |
0 |
if (trace_level >= 3) { |
|
1412
|
0 |
721584 |
if (trace_level >= 6) |
|
1419
|
0 |
2106384 |
while (cxix < 0 && top_si->si_type != PERLSI_MAIN) { |
|
|
0 |
0 |
while (cxix < 0 && top_si->si_type != PERLSI_MAIN) { |
|
1420
|
0 |
0 |
if (trace_level >= 6) |
|
1428
|
2106384 |
0 |
if (cxix < 0 || (cxix == 0 && !top_si->si_prev)) { |
|
|
2470 |
2103914 |
if (cxix < 0 || (cxix == 0 && !top_si->si_prev)) { |
|
|
2422 |
48 |
if (cxix < 0 || (cxix == 0 && !top_si->si_prev)) { |
|
1430
|
0 |
2422 |
if (trace_level >= 5) |
|
1435
|
0 |
2103962 |
if (trace_level >= 5) |
|
1438
|
719162 |
1384800 |
if (callback(aTHX_ cx, &cx_type_mask)) |
|
1451
|
1412081 |
0 |
char *a_file = OutCopFILE(a); |
|
1452
|
1412081 |
0 |
char *b_file = OutCopFILE(b); |
|
1453
|
810489 |
601592 |
if (a_file == b_file) |
|
1457
|
0 |
601592 |
if (strEQ(a_file, b_file)) |
|
1469
|
717578 |
1386384 |
if (CxTYPE(cx) == CXt_SUB) { |
|
1470
|
717578 |
0 |
if (PL_debstash && CvSTASH(cx->blk_sub.cv) == PL_debstash) |
|
|
0 |
717578 |
if (PL_debstash && CvSTASH(cx->blk_sub.cv) == PL_debstash) |
|
1476
|
117570 |
600008 |
if (_cop_in_same_file(near_cop, PL_curcop_nytprof)) { |
|
1479
|
24855 |
92715 |
if (!last_block_line) |
|
1483
|
0 |
717578 |
if (trace_level >= 8) { |
|
1485
|
0 |
0 |
logwarn("\tat %d: block %d sub %d for %s %s\n", |
|
1488
|
0 |
0 |
if (trace_level >= 99) |
|
1496
|
0 |
1386384 |
if (trace_level >= 6) |
|
1500
|
619072 |
767312 |
if (last_block_line) |
|
1504
|
72809 |
694503 |
if ((near_cop = start_cop_of_context(aTHX_ cx)) == NULL) |
|
1508
|
1584 |
692919 |
if (!_cop_in_same_file(near_cop, PL_curcop_nytprof)) { |
|
1510
|
1584 |
0 |
if ('(' == *OutCopFILE(PL_curcop_nytprof)) { |
|
|
944 |
640 |
if ('(' == *OutCopFILE(PL_curcop_nytprof)) { |
|
1516
|
0 |
640 |
if (trace_level >= 5) |
|
1517
|
0 |
0 |
logwarn("at %d: %s in different file (%s, %s)\n", |
|
|
0 |
0 |
logwarn("at %d: %s in different file (%s, %s)\n", |
|
1524
|
0 |
692919 |
if (trace_level >= 5) |
|
1538
|
0 |
555 |
if (!o || o == PL_op) |
|
|
0 |
0 |
if (!o || o == PL_op) |
|
1540
|
0 |
0 |
if (o->op_flags & OPf_KIDS) { |
|
1542
|
0 |
0 |
for (kid = cUNOPo->op_first; kid; kid = OpSIBLING(kid)) { |
|
|
0 |
0 |
for (kid = cUNOPo->op_first; kid; kid = OpSIBLING(kid)) { |
|
1546
|
0 |
0 |
if (kid->op_type == OP_NULL && kid->op_targ == OP_NEXTSTATE) |
|
|
0 |
0 |
if (kid->op_type == OP_NULL && kid->op_targ == OP_NEXTSTATE) |
|
1550
|
0 |
0 |
if (new_cop) |
|
1569
|
862767 |
10398 |
if (!is_profiling || !profile_stmts) |
|
|
77 |
862690 |
if (!is_profiling || !profile_stmts) |
|
1586
|
862053 |
637 |
if (last_executed_fid) { |
|
1587
|
721700 |
140353 |
if (profile_blocks) |
|
1595
|
0 |
862053 |
if (trace_level >= 5) /* previous fid:line and how much time we spent there */ |
|
1601
|
862626 |
64 |
if (!cop) |
|
1603
|
555 |
862135 |
if ( (last_executed_line = CopLINE(cop)) == 0 ) { |
|
1608
|
0 |
555 |
cop = (COP*)closest_cop(aTHX_ cop, OpSIBLING(cop)); |
|
1609
|
0 |
555 |
if (!cop) |
|
1612
|
555 |
0 |
if (!last_executed_line) { |
|
1616
|
555 |
0 |
char *pkg_name = CopSTASHPV(cop); |
|
|
555 |
0 |
char *pkg_name = CopSTASHPV(cop); |
|
|
555 |
0 |
char *pkg_name = CopSTASHPV(cop); |
|
|
0 |
555 |
char *pkg_name = CopSTASHPV(cop); |
|
|
0 |
0 |
char *pkg_name = CopSTASHPV(cop); |
|
|
555 |
0 |
char *pkg_name = CopSTASHPV(cop); |
|
|
0 |
555 |
char *pkg_name = CopSTASHPV(cop); |
|
1617
|
555 |
0 |
int is_preamble = (PL_scopestack_ix <= 7 && strEQ(pkg_name,"main")); |
|
|
555 |
0 |
int is_preamble = (PL_scopestack_ix <= 7 && strEQ(pkg_name,"main")); |
|
1620
|
0 |
555 |
if (!is_preamble && op) { |
|
|
0 |
0 |
if (!is_preamble && op) { |
|
1622
|
0 |
0 |
logwarn("Unable to determine line number in %s (ssix%d)\n", |
|
1624
|
0 |
0 |
if (trace_level > 5) |
|
1631
|
862690 |
0 |
file = OutCopFILE(cop); |
|
1632
|
637 |
862053 |
if (!last_executed_fid) { /* first time */ |
|
1633
|
0 |
637 |
if (trace_level >= 1) { |
|
1634
|
0 |
0 |
logwarn("~ first statement profiled at line %d of %s, pid %ld\n", |
|
1638
|
3873 |
858817 |
if (file != last_executed_fileptr) { /* cache (hit ratio ~50% e.g. for perlcritic) */ |
|
1643
|
0 |
862690 |
if (trace_level >= 7) /* show the fid:line we're about to execute */ |
|
1644
|
0 |
0 |
logwarn("\t@%d:%-4d... %s\n", last_executed_fid, last_executed_line, |
|
1647
|
722309 |
140381 |
if (profile_blocks) { |
|
1650
|
721584 |
725 |
if (op) { |
|
1654
|
3591 |
718718 |
if (!last_block_line) last_block_line = last_executed_line; |
|
1655
|
603795 |
118514 |
if (!last_sub_line) last_sub_line = last_executed_line; |
|
1683
|
247684 |
2159 |
if (!is_profiling || !out || !profile_stmts) |
|
|
247684 |
0 |
if (!is_profiling || !out || !profile_stmts) |
|
|
0 |
247684 |
if (!is_profiling || !out || !profile_stmts) |
|
1717
|
196914 |
50770 |
if (last_executed_line == prev_last_executed_line |
|
1723
|
0 |
247684 |
if (trace_level >= 5) { |
|
1724
|
0 |
0 |
logwarn("\tleft %u:%u via %s back to %s at %u:%u (b%u s%u) - discounting next statement%s\n", |
|
|
0 |
0 |
logwarn("\tleft %u:%u via %s back to %s at %u:%u (b%u s%u) - discounting next statement%s\n", |
|
|
0 |
0 |
logwarn("\tleft %u:%u via %s back to %s at %u:%u (b%u s%u) - discounting next statement%s\n", |
|
1726
|
0 |
0 |
OP_NAME_safe(prev_op), OP_NAME_safe(op), |
|
|
0 |
0 |
OP_NAME_safe(prev_op), OP_NAME_safe(op), |
|
1728
|
0 |
0 |
(op || is_multicall) ? "" : ", LEAVING PERL" |
|
1742
|
11618 |
0 |
if (!option || !*option) |
|
|
0 |
11618 |
if (!option || !*option) |
|
1744
|
11618 |
0 |
if (!value || !*value) |
|
|
0 |
11618 |
if (!value || !*value) |
|
1747
|
1297 |
10321 |
if (strEQ(option, "file")) { |
|
1750
|
0 |
10321 |
else if (strEQ(option, "log")) { |
|
1752
|
0 |
0 |
if (!fp) { |
|
1759
|
1281 |
9040 |
else if (strEQ(option, "start")) { |
|
1760
|
76 |
1205 |
if (strEQ(value,"begin")) profile_start = NYTP_START_BEGIN; |
|
1761
|
1205 |
0 |
else if (strEQ(value,"init")) profile_start = NYTP_START_INIT; |
|
1762
|
0 |
0 |
else if (strEQ(value,"end")) profile_start = NYTP_START_END; |
|
1763
|
0 |
0 |
else if (strEQ(value,"no")) profile_start = NYTP_START_NO; |
|
1766
|
15 |
9025 |
else if (strEQ(option, "addpid")) { |
|
1769
|
15 |
0 |
: profile_opts & ~NYTP_OPTf_ADDPID; |
|
1771
|
0 |
9025 |
else if (strEQ(option, "addtimestamp")) { |
|
1774
|
0 |
0 |
: profile_opts & ~NYTP_OPTf_ADDTIMESTAMP; |
|
1776
|
9009 |
16 |
else if (strEQ(option, "optimize") || strEQ(option, "optimise")) { |
|
|
0 |
9009 |
else if (strEQ(option, "optimize") || strEQ(option, "optimise")) { |
|
1779
|
16 |
0 |
: profile_opts & ~NYTP_OPTf_OPTIMIZE; |
|
1781
|
1280 |
7729 |
else if (strEQ(option, "savesrc")) { |
|
1784
|
696 |
584 |
: profile_opts & ~NYTP_OPTf_SAVESRC; |
|
1786
|
0 |
7729 |
else if (strEQ(option, "endatexit")) { |
|
1787
|
0 |
0 |
if (atoi(value)) |
|
1790
|
0 |
7729 |
else if (strEQ(option, "libcexit")) { |
|
1791
|
0 |
0 |
if (atoi(value)) |
|
1801
|
7729 |
56737 |
if (strEQ(option, opt_p->option_name)) { |
|
1806
|
56737 |
0 |
} while (++opt_p < opt_end); |
|
1807
|
0 |
7729 |
if (!found) { |
|
1812
|
0 |
11618 |
if (trace_level) |
|
1827
|
0 |
705 |
const char *mode = (strnEQ(filename, "/dev/", 4) ? "wb" : "wbx"); |
|
1837
|
663 |
42 |
if ((profile_opts & (NYTP_OPTf_ADDPID|NYTP_OPTf_ADDTIMESTAMP)) |
|
1838
|
0 |
663 |
|| out /* already opened so assume we're forking and add the pid */ |
|
1840
|
0 |
42 |
if (strlen(filename) >= MAXPATHLEN-(20+20)) /* buffer overrun protection */ |
|
1843
|
0 |
42 |
if ((profile_opts & NYTP_OPTf_ADDPID) || out) |
|
|
0 |
0 |
if ((profile_opts & NYTP_OPTf_ADDPID) || out) |
|
1845
|
0 |
42 |
if ( profile_opts & NYTP_OPTf_ADDTIMESTAMP ) |
|
1855
|
0 |
705 |
if (!out) { |
|
1858
|
0 |
0 |
if (fopen_errno==EEXIST && !(profile_opts & NYTP_OPTf_ADDPID)) |
|
|
0 |
0 |
if (fopen_errno==EEXIST && !(profile_opts & NYTP_OPTf_ADDPID)) |
|
1864
|
0 |
705 |
if (trace_level >= 1) |
|
1876
|
36 |
675 |
if (!out) |
|
1890
|
0 |
675 |
if ((result = NYTP_close(out, 0))) |
|
1894
|
0 |
675 |
if (trace_level >= 1) |
|
1904
|
863486 |
31 |
if (getpid() == last_pid) |
|
1908
|
0 |
31 |
if (trace_level >= 1) |
|
1915
|
31 |
0 |
if (sub_callers_hv) |
|
1919
|
30 |
1 |
if (open_new_file) { |
|
1925
|
0 |
30 |
if (result) |
|
1932
|
4 |
27 |
if (profile_forkdepth == 0) { /* parent doesn't want children profiled */ |
|
1939
|
27 |
4 |
if (open_new_file) |
|
2011
|
530 |
0 |
if (!subname || *subname != 'B' || strNE(subname,"BEGIN")) |
|
|
530 |
0 |
if (!subname || *subname != 'B' || strNE(subname,"BEGIN")) |
|
|
32 |
498 |
if (!subname || *subname != 'B' || strNE(subname,"BEGIN")) |
|
2020
|
0 |
498 |
SvCUR_set(fullnamesv, total_len); |
|
|
0 |
0 |
SvCUR_set(fullnamesv, total_len); |
|
|
0 |
498 |
SvCUR_set(fullnamesv, total_len); |
|
|
0 |
0 |
SvCUR_set(fullnamesv, total_len); |
|
|
0 |
0 |
SvCUR_set(fullnamesv, total_len); |
|
|
0 |
498 |
SvCUR_set(fullnamesv, total_len); |
|
|
0 |
0 |
SvCUR_set(fullnamesv, total_len); |
|
2024
|
496 |
2 |
if (DBsv && parse_DBsub_value(aTHX_ DBsv, NULL, &line, NULL, SvPVX(fullnamesv))) { |
|
|
496 |
0 |
if (DBsv && parse_DBsub_value(aTHX_ DBsv, NULL, &line, NULL, SvPVX(fullnamesv))) { |
|
2027
|
496 |
0 |
if (hv_fetch(GvHV(PL_DBsub), SvPV_nolen(fullnamesv), (I32)SvCUR(fullnamesv), 0)) { |
|
|
36 |
460 |
if (hv_fetch(GvHV(PL_DBsub), SvPV_nolen(fullnamesv), (I32)SvCUR(fullnamesv), 0)) { |
|
2031
|
496 |
0 |
(void) hv_store(GvHV(PL_DBsub), SvPV_nolen(fullnamesv), (I32)SvCUR(fullnamesv), DBsv, 0); |
|
2048
|
0 |
0 |
sprintf(buf, "(seix %d%s%d, ac%u)", |
|
2061
|
130879 |
0 |
if ((trace_level >= 6 || subr_entry->already_counted>1) |
|
|
0 |
130879 |
if ((trace_level >= 6 || subr_entry->already_counted>1) |
|
2063
|
0 |
0 |
&& !(subr_entry->prev_subr_entry_ix == subr_entry_ix && subr_entry->already_counted==1) |
|
|
0 |
0 |
&& !(subr_entry->prev_subr_entry_ix == subr_entry_ix && subr_entry->already_counted==1) |
|
2065
|
0 |
0 |
logwarn("%2u << %s::%s done %s\n", |
|
2068
|
0 |
0 |
(subr_entry->called_subnam_sv && SvOK(subr_entry->called_subnam_sv)) |
|
|
0 |
0 |
(subr_entry->called_subnam_sv && SvOK(subr_entry->called_subnam_sv)) |
|
|
0 |
0 |
(subr_entry->called_subnam_sv && SvOK(subr_entry->called_subnam_sv)) |
|
2069
|
0 |
0 |
? SvPV_nolen(subr_entry->called_subnam_sv) |
|
2073
|
65482 |
65397 |
if (subr_entry->caller_subnam_sv) { |
|
2077
|
65482 |
65397 |
if (subr_entry->called_subnam_sv) { |
|
2081
|
130879 |
0 |
if (subr_entry->prev_subr_entry_ix <= subr_entry_ix) |
|
2106
|
65482 |
65397 |
if (subr_entry->called_subnam_sv && !SvOK(subr_entry->called_subnam_sv)) { |
|
|
4 |
65478 |
if (subr_entry->called_subnam_sv && !SvOK(subr_entry->called_subnam_sv)) { |
|
|
4 |
0 |
if (subr_entry->called_subnam_sv && !SvOK(subr_entry->called_subnam_sv)) { |
|
|
4 |
0 |
if (subr_entry->called_subnam_sv && !SvOK(subr_entry->called_subnam_sv)) { |
|
2107
|
0 |
4 |
if (trace_level) |
|
2116
|
65401 |
65478 |
if (subr_entry->already_counted) { |
|
2135
|
0 |
65478 |
if (subr_entry->hide_subr_call_time) { |
|
2148
|
65478 |
0 |
subr_call_key_len = my_snprintf(subr_call_key, sizeof(subr_call_key), "%s::%s[%u:%d]", |
|
|
65478 |
0 |
subr_call_key_len = my_snprintf(subr_call_key, sizeof(subr_call_key), "%s::%s[%u:%d]", |
|
|
0 |
65478 |
subr_call_key_len = my_snprintf(subr_call_key, sizeof(subr_call_key), "%s::%s[%u:%d]", |
|
2152
|
0 |
65478 |
if (subr_call_key_len >= sizeof(subr_call_key)) |
|
2161
|
1060986 |
65478 |
while (*p) |
|
2165
|
65478 |
0 |
if (subr_entry->called_subnam_sv) { |
|
2168
|
65478 |
0 |
p = SvPV(subr_entry->called_subnam_sv, len); |
|
2176
|
0 |
65478 |
if (called_subname_pv_end >= called_subname_pv+sizeof(called_subname_pv)) |
|
2183
|
3139 |
62339 |
if (!SvROK(sv_tmp)) { /* autoviv hash ref - is first call of this called subname from anywhere */ |
|
2187
|
733 |
2406 |
if (subr_entry->called_is_xs) { |
|
2193
|
127 |
606 |
if ( ('s' == *subr_entry->called_is_xs) /* "sop" (slowop) */ |
|
2194
|
127 |
0 |
|| (subr_entry->called_cv && SvTYPE(subr_entry->called_cv) == SVt_PVCV) |
|
|
127 |
0 |
|| (subr_entry->called_cv && SvTYPE(subr_entry->called_cv) == SVt_PVCV) |
|
2203
|
685 |
48 |
if (!SvOK(sv)) |
|
|
685 |
0 |
if (!SvOK(sv)) |
|
|
685 |
0 |
if (!SvOK(sv)) |
|
2205
|
0 |
733 |
if (trace_level >= 2) |
|
2213
|
4853 |
60625 |
if (!SvROK(sv_tmp)) { /* first call from this subname[fid:line] - autoviv array ref */ |
|
2218
|
4853 |
0 |
if (subr_entry->called_subpkg_pv) { /* note that a sub in this package was called */ |
|
2220
|
813 |
4040 |
if (SvTYPE(pf_sv) == SVt_NULL) { /* log when first created */ |
|
2222
|
0 |
813 |
if (trace_level >= 3) |
|
2233
|
0 |
65478 |
if (trace_level >= 5) { |
|
2246
|
65446 |
32 |
if (subr_entry->called_cv_depth <= 1) { |
|
2248
|
65446 |
0 |
sv_setnv(incl_time_sv, SvNV(incl_time_sv)+incl_subr_ticks); |
|
2254
|
16 |
16 |
sv_setnv(reci_time_sv, (SvOK(reci_time_sv)) ? SvNV(reci_time_sv)+(incl_subr_ticks/ticks_per_sec) : (incl_subr_ticks/ticks_per_sec)); |
|
|
16 |
0 |
sv_setnv(reci_time_sv, (SvOK(reci_time_sv)) ? SvNV(reci_time_sv)+(incl_subr_ticks/ticks_per_sec) : (incl_subr_ticks/ticks_per_sec)); |
|
|
0 |
16 |
sv_setnv(reci_time_sv, (SvOK(reci_time_sv)) ? SvNV(reci_time_sv)+(incl_subr_ticks/ticks_per_sec) : (incl_subr_ticks/ticks_per_sec)); |
|
|
16 |
0 |
sv_setnv(reci_time_sv, (SvOK(reci_time_sv)) ? SvNV(reci_time_sv)+(incl_subr_ticks/ticks_per_sec) : (incl_subr_ticks/ticks_per_sec)); |
|
2256
|
16 |
16 |
if (!SvOK(max_depth_sv) || subr_entry->called_cv_depth-1 > SvIV(max_depth_sv)) |
|
|
16 |
0 |
if (!SvOK(max_depth_sv) || subr_entry->called_cv_depth-1 > SvIV(max_depth_sv)) |
|
|
0 |
16 |
if (!SvOK(max_depth_sv) || subr_entry->called_cv_depth-1 > SvIV(max_depth_sv)) |
|
|
16 |
0 |
if (!SvOK(max_depth_sv) || subr_entry->called_cv_depth-1 > SvIV(max_depth_sv)) |
|
|
0 |
16 |
if (!SvOK(max_depth_sv) || subr_entry->called_cv_depth-1 > SvIV(max_depth_sv)) |
|
2260
|
65478 |
0 |
sv_setnv(excl_time_sv, SvNV(excl_time_sv)+excl_subr_ticks); |
|
2262
|
60808 |
4670 |
if (opt_calls && out) { |
|
|
60769 |
39 |
if (opt_calls && out) { |
|
2277
|
81629 |
0 |
incr_sub_inclusive_time(aTHX_ subr_entry_ix_ptr(save_ix)); |
|
2288
|
0 |
109298 |
if (!subname_gv_ptr) |
|
2298
|
36 |
1440 |
if (!SvROK(sv)) { |
|
2301
|
0 |
36 |
if (sv == &PL_sv_yes) { /* unfound import, ignore */ |
|
2304
|
0 |
36 |
if (SvGMAGICAL(sv)) { |
|
2306
|
0 |
0 |
if (SvROK(sv)) |
|
2308
|
0 |
0 |
sym = SvPOKp(sv) ? SvPVX(sv) : Nullch; |
|
2311
|
32 |
4 |
sym = SvPV_nolen(sv); |
|
2312
|
0 |
36 |
if (!sym) |
|
2314
|
4 |
32 |
if (PL_op->op_private & HINT_STRICT_REFS) |
|
2325
|
1440 |
0 |
if (SvTYPE(cv) == SVt_PVCV) |
|
2335
|
103349 |
0 |
if (!(isGV_with_GP(sv) && (cv = GvCVu((GV*)sv)))) |
|
|
0 |
103349 |
if (!(isGV_with_GP(sv) && (cv = GvCVu((GV*)sv)))) |
|
|
0 |
0 |
if (!(isGV_with_GP(sv) && (cv = GvCVu((GV*)sv)))) |
|
|
103349 |
0 |
if (!(isGV_with_GP(sv) && (cv = GvCVu((GV*)sv)))) |
|
|
16 |
103333 |
if (!(isGV_with_GP(sv) && (cv = GvCVu((GV*)sv)))) |
|
2337
|
16 |
103333 |
if (!cv) /* would autoload in this situation */ |
|
2341
|
109278 |
0 |
if (cv && !*subname_gv_ptr && CvGV(cv) && isGV_with_GP(CvGV(cv))) { |
|
|
109278 |
0 |
if (cv && !*subname_gv_ptr && CvGV(cv) && isGV_with_GP(CvGV(cv))) { |
|
|
109278 |
0 |
if (cv && !*subname_gv_ptr && CvGV(cv) && isGV_with_GP(CvGV(cv))) { |
|
|
109278 |
0 |
if (cv && !*subname_gv_ptr && CvGV(cv) && isGV_with_GP(CvGV(cv))) { |
|
|
0 |
109278 |
if (cv && !*subname_gv_ptr && CvGV(cv) && isGV_with_GP(CvGV(cv))) { |
|
|
0 |
0 |
if (cv && !*subname_gv_ptr && CvGV(cv) && isGV_with_GP(CvGV(cv))) { |
|
2356
|
1795 |
806 |
if (!si) |
|
2359
|
148 |
2453 |
if (ix < 0) { |
|
2361
|
48 |
100 |
if (si->si_type != PERLSI_MAIN) |
|
2363
|
0 |
100 |
if (trace_level >= 9) |
|
2371
|
0 |
2453 |
if (trace_level >= 9) |
|
2376
|
2445 |
8 |
if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) |
|
|
0 |
2445 |
if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) |
|
2378
|
546 |
1899 |
else if (CxTYPE(cx) == CXt_EVAL && !CxTRYBLOCK(cx)) |
|
|
369 |
177 |
else if (CxTYPE(cx) == CXt_EVAL && !CxTRYBLOCK(cx)) |
|
2380
|
1802 |
274 |
else if (ix == 0 && si->si_type == PERLSI_MAIN) |
|
|
1687 |
115 |
else if (ix == 0 && si->si_type == PERLSI_MAIN) |
|
2382
|
274 |
115 |
else if (ix > 0) /* more on this stack? */ |
|
2386
|
115 |
0 |
if (si->si_type != PERLSI_MAIN) { |
|
2408
|
0 |
65482 |
if (subr_entry_ix <= prev_subr_entry_ix) { |
|
2416
|
65482 |
0 |
subr_entry = subr_entry_ix_ptr(subr_entry_ix); |
|
2420
|
63583 |
1899 |
caller_subr_entry = subr_entry_ix_ptr(prev_subr_entry_ix); |
|
2422
|
63583 |
1899 |
? caller_subr_entry->subr_prof_depth+1 : 1; |
|
2433
|
2901 |
62581 |
if (op_type == OP_ENTERSUB || op_type == OP_GOTO) { |
|
|
168 |
2733 |
if (op_type == OP_ENTERSUB || op_type == OP_GOTO) { |
|
2436
|
62745 |
4 |
if (called_gv) { |
|
2437
|
62745 |
0 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
|
62745 |
0 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
|
0 |
62745 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
|
0 |
0 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
|
62745 |
0 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
|
0 |
62745 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
2442
|
0 |
62745 |
if ('P'==*p++ && 'O'==*p++ && 'S'==*p++ && 'I'==*p++ && 'X'==*p++ && 0==*p) { |
|
|
0 |
0 |
if ('P'==*p++ && 'O'==*p++ && 'S'==*p++ && 'I'==*p++ && 'X'==*p++ && 0==*p) { |
|
|
0 |
0 |
if ('P'==*p++ && 'O'==*p++ && 'S'==*p++ && 'I'==*p++ && 'X'==*p++ && 0==*p) { |
|
|
0 |
0 |
if ('P'==*p++ && 'O'==*p++ && 'S'==*p++ && 'I'==*p++ && 'X'==*p++ && 0==*p) { |
|
|
0 |
0 |
if ('P'==*p++ && 'O'==*p++ && 'S'==*p++ && 'I'==*p++ && 'X'==*p++ && 0==*p) { |
|
|
0 |
0 |
if ('P'==*p++ && 'O'==*p++ && 'S'==*p++ && 'I'==*p++ && 'X'==*p++ && 0==*p) { |
|
2444
|
0 |
0 |
if ('_'==*s++ && 'e'==*s++ && 'x'==*s++ && 'i'==*s++ && 't'==*s++ && 0==*s) { |
|
|
0 |
0 |
if ('_'==*s++ && 'e'==*s++ && 'x'==*s++ && 'i'==*s++ && 't'==*s++ && 0==*s) { |
|
|
0 |
0 |
if ('_'==*s++ && 'e'==*s++ && 'x'==*s++ && 'i'==*s++ && 't'==*s++ && 0==*s) { |
|
|
0 |
0 |
if ('_'==*s++ && 'e'==*s++ && 'x'==*s++ && 'i'==*s++ && 't'==*s++ && 0==*s) { |
|
|
0 |
0 |
if ('_'==*s++ && 'e'==*s++ && 'x'==*s++ && 'i'==*s++ && 't'==*s++ && 0==*s) { |
|
|
0 |
0 |
if ('_'==*s++ && 'e'==*s++ && 'x'==*s++ && 'i'==*s++ && 't'==*s++ && 0==*s) { |
|
2465
|
0 |
2733 |
if (profile_slowops == 1) { /* 1 == put slowops into 1 package */ |
|
2472
|
362 |
2371 |
if (!slowop_name_cache) |
|
2475
|
0 |
2733 |
if (!opname) |
|
2479
|
557 |
2176 |
if(!SvOK(sv)) { |
|
|
557 |
0 |
if(!SvOK(sv)) { |
|
|
557 |
0 |
if(!SvOK(sv)) { |
|
2484
|
0 |
557 |
SvCUR_set(sv, 5 + len); |
|
|
0 |
0 |
SvCUR_set(sv, 5 + len); |
|
|
0 |
557 |
SvCUR_set(sv, 5 + len); |
|
|
0 |
0 |
SvCUR_set(sv, 5 + len); |
|
|
0 |
0 |
SvCUR_set(sv, 5 + len); |
|
|
0 |
557 |
SvCUR_set(sv, 5 + len); |
|
|
0 |
0 |
SvCUR_set(sv, 5 + len); |
|
2488
|
2733 |
0 |
subr_entry->called_subpkg_pv = CopSTASHPV(PL_curcop); |
|
|
2733 |
0 |
subr_entry->called_subpkg_pv = CopSTASHPV(PL_curcop); |
|
|
2733 |
0 |
subr_entry->called_subpkg_pv = CopSTASHPV(PL_curcop); |
|
|
0 |
2733 |
subr_entry->called_subpkg_pv = CopSTASHPV(PL_curcop); |
|
|
0 |
0 |
subr_entry->called_subpkg_pv = CopSTASHPV(PL_curcop); |
|
|
2733 |
0 |
subr_entry->called_subpkg_pv = CopSTASHPV(PL_curcop); |
|
|
0 |
2733 |
subr_entry->called_subpkg_pv = CopSTASHPV(PL_curcop); |
|
2496
|
0 |
2733 |
if (OP_ACCEPT == op_type) |
|
2506
|
65482 |
0 |
file = OutCopFILE(prev_cop); |
|
2509
|
1660 |
63822 |
: get_file_id(aTHX_ file, strlen(file), NYTP_FIDf_VIA_SUB); |
|
2513
|
168 |
65314 |
if (clone_subr_entry) { |
|
2523
|
65314 |
0 |
if (profile_findcaller /* user wants us to calculate each time */ |
|
2524
|
63519 |
1795 |
|| !caller_subr_entry /* we don't have a caller struct */ |
|
2525
|
63519 |
0 |
|| !caller_subr_entry->called_subpkg_pv /* we don't have caller details */ |
|
2526
|
63519 |
0 |
|| !caller_subr_entry->called_subnam_sv |
|
2527
|
0 |
63519 |
|| !SvOK(caller_subr_entry->called_subnam_sv) |
|
|
0 |
0 |
|| !SvOK(caller_subr_entry->called_subnam_sv) |
|
|
0 |
0 |
|| !SvOK(caller_subr_entry->called_subnam_sv) |
|
2544
|
1687 |
108 |
if (caller_cv == PL_main_cv) { |
|
2555
|
100 |
8 |
else if (caller_cv == 0) { |
|
2566
|
0 |
8 |
if (!egv) |
|
2569
|
8 |
0 |
if (gv && (stash_hv = GvSTASH(gv))) { |
|
|
8 |
0 |
if (gv && (stash_hv = GvSTASH(gv))) { |
|
2570
|
8 |
0 |
subr_entry->caller_subpkg_pv = HvNAME(stash_hv); |
|
|
8 |
0 |
subr_entry->caller_subpkg_pv = HvNAME(stash_hv); |
|
|
0 |
8 |
subr_entry->caller_subpkg_pv = HvNAME(stash_hv); |
|
|
0 |
0 |
subr_entry->caller_subpkg_pv = HvNAME(stash_hv); |
|
|
8 |
0 |
subr_entry->caller_subpkg_pv = HvNAME(stash_hv); |
|
|
0 |
8 |
subr_entry->caller_subpkg_pv = HvNAME(stash_hv); |
|
2574
|
0 |
0 |
logwarn("Can't determine name of calling sub (GV %p, Stash %p, CV flags %d) at %s line %d\n", |
|
2583
|
0 |
1795 |
found_caller_by = (profile_findcaller) ? "" : "(calculated)"; |
|
2587
|
0 |
63519 |
int caller_is_op = caller_se->called_is_xs && strEQ(caller_se->called_is_xs,"sop"); |
|
|
0 |
0 |
int caller_is_op = caller_se->called_is_xs && strEQ(caller_se->called_is_xs,"sop"); |
|
2605
|
0 |
65482 |
if (trace_level >= 4) { |
|
2606
|
0 |
0 |
logwarn("%2u >> %s at %u:%d from %s::%s %s %s\n", |
|
2624
|
4669 |
60813 |
if (opt_calls >= 2 && out) { |
|
|
4669 |
0 |
if (opt_calls >= 2 && out) { |
|
2654
|
68770 |
7511 |
OPCODE op_type = (is_slowop || (opcode) PL_op->op_type == OP_GOTO) ? (opcode) PL_op->op_type : OP_ENTERSUB; |
|
|
264 |
68506 |
OPCODE op_type = (is_slowop || (opcode) PL_op->op_type == OP_GOTO) ? (opcode) PL_op->op_type : OP_ENTERSUB; |
|
2664
|
76281 |
0 |
if (!profile_subs /* not profiling subs */ |
|
2666
|
66724 |
9557 |
|| !is_profiling |
|
2669
|
63791 |
2933 |
|| (op_type==OP_ENTERSUB && (sub_sv == &PL_sv_yes || sub_sv == DB_CHECK_cv || sub_sv == DB_INIT_cv |
|
|
63769 |
22 |
|| (op_type==OP_ENTERSUB && (sub_sv == &PL_sv_yes || sub_sv == DB_CHECK_cv || sub_sv == DB_INIT_cv |
|
|
63769 |
0 |
|| (op_type==OP_ENTERSUB && (sub_sv == &PL_sv_yes || sub_sv == DB_CHECK_cv || sub_sv == DB_INIT_cv |
|
|
63769 |
0 |
|| (op_type==OP_ENTERSUB && (sub_sv == &PL_sv_yes || sub_sv == DB_CHECK_cv || sub_sv == DB_INIT_cv |
|
2670
|
63175 |
594 |
|| sub_sv == DB_END_cv || sub_sv == DB_fin_cv)) |
|
|
62581 |
594 |
|| sub_sv == DB_END_cv || sub_sv == DB_fin_cv)) |
|
2672
|
200 |
65314 |
|| (op_type==OP_GOTO && |
|
|
168 |
32 |
|| (op_type==OP_GOTO && |
|
2673
|
168 |
0 |
( !(SvROK(sub_sv) && SvTYPE(SvRV(sub_sv)) == SVt_PVCV) |
|
2674
|
0 |
168 |
|| subr_entry_ix == -1) /* goto out of sub whose entry wasn't profiled */ |
|
2683
|
76 |
65406 |
if (!profile_stmts) { |
|
2688
|
0 |
65482 |
if (trace_level >= 99) { |
|
2703
|
65314 |
168 |
if (op_type != OP_GOTO) { |
|
2746
|
168 |
0 |
subr_entry_t *src = subr_entry_ix_ptr(subr_entry_ix); |
|
2773
|
65429 |
0 |
subr_entry = subr_entry_ix_ptr(this_subr_entry_ix); |
|
2776
|
0 |
65429 |
assert(subr_entry); |
|
2777
|
0 |
65429 |
assert(subr_entry->caller_fid < fidhash.next_id); |
|
2783
|
32 |
65397 |
if (subr_entry->already_counted) { |
|
2784
|
0 |
32 |
if (trace_level >= 9) |
|
2785
|
0 |
0 |
logwarn("%2u -- %s::%s already counted %s\n", |
|
2788
|
0 |
0 |
(subr_entry->called_subnam_sv && SvOK(subr_entry->called_subnam_sv)) |
|
|
0 |
0 |
(subr_entry->called_subnam_sv && SvOK(subr_entry->called_subnam_sv)) |
|
|
0 |
0 |
(subr_entry->called_subnam_sv && SvOK(subr_entry->called_subnam_sv)) |
|
2789
|
0 |
0 |
? SvPV_nolen(subr_entry->called_subnam_sv) |
|
2792
|
0 |
32 |
assert(subr_entry->already_counted < 3); |
|
2796
|
62712 |
2685 |
if (is_slowop) { |
|
2803
|
168 |
62544 |
if (op_type == OP_GOTO) { |
|
2805
|
16 |
152 |
is_xs = (CvISXSUB(called_cv)) ? "xsub" : NULL; |
|
2808
|
15995 |
46549 |
if (op != next_op) { /* have entered a sub */ |
|
2819
|
0 |
46549 |
if (!called_cv && gv) { /* XXX no test case for this */ |
|
|
0 |
0 |
if (!called_cv && gv) { /* XXX no test case for this */ |
|
2820
|
0 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
|
0 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
|
0 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
|
0 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
|
0 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
|
0 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
2822
|
0 |
0 |
if (trace_level >= 0) |
|
2823
|
0 |
0 |
logwarn("Assuming called sub is named %s::%s at %s line %d (please report as a bug)\n", |
|
|
0 |
0 |
logwarn("Assuming called sub is named %s::%s at %s line %d (please report as a bug)\n", |
|
2830
|
62712 |
0 |
if (called_cv && CvGV(called_cv)) { |
|
|
62712 |
0 |
if (called_cv && CvGV(called_cv)) { |
|
2833
|
62712 |
0 |
if (SvTYPE(gv) == SVt_PVGV && GvSTASH(gv)) { |
|
|
62712 |
0 |
if (SvTYPE(gv) == SVt_PVGV && GvSTASH(gv)) { |
|
2837
|
62712 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
|
62712 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
|
0 |
62712 |
stash_name = HvNAME(GvSTASH(gv)); |
|
|
0 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
|
62712 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
|
0 |
62712 |
stash_name = HvNAME(GvSTASH(gv)); |
|
2840
|
0 |
0 |
else if (trace_level >= 1) { |
|
2841
|
0 |
0 |
logwarn("NYTProf is confused about CV %p called as %s at %s line %d (please report as a bug)\n", |
|
|
0 |
0 |
logwarn("NYTProf is confused about CV %p called as %s at %s line %d (please report as a bug)\n", |
|
2844
|
0 |
0 |
if (trace_level >= 2) { |
|
2852
|
0 |
62712 |
if (!SvOK(subr_entry->called_subnam_sv)) { |
|
|
0 |
0 |
if (!SvOK(subr_entry->called_subnam_sv)) { |
|
|
0 |
0 |
if (!SvOK(subr_entry->called_subnam_sv)) { |
|
2853
|
0 |
0 |
const char *what = (is_xs) ? is_xs : "sub"; |
|
2855
|
0 |
0 |
if (!called_cv) { /* should never get here as pp_entersub would have croaked */ |
|
2856
|
0 |
0 |
logwarn("unknown entersub %s '%s' (please report this as a bug)\n", what, SvPV_nolen(sub_sv)); |
|
2857
|
0 |
0 |
stash_name = CopSTASHPV(PL_curcop); |
|
|
0 |
0 |
stash_name = CopSTASHPV(PL_curcop); |
|
|
0 |
0 |
stash_name = CopSTASHPV(PL_curcop); |
|
|
0 |
0 |
stash_name = CopSTASHPV(PL_curcop); |
|
|
0 |
0 |
stash_name = CopSTASHPV(PL_curcop); |
|
|
0 |
0 |
stash_name = CopSTASHPV(PL_curcop); |
|
|
0 |
0 |
stash_name = CopSTASHPV(PL_curcop); |
|
2858
|
0 |
0 |
sv_setpvf(subr_entry->called_subnam_sv, "__UNKNOWN__[%s,%s])", what, SvPV_nolen(sub_sv)); |
|
2861
|
0 |
0 |
stash_name = HvNAME(CvSTASH(called_cv)); |
|
|
0 |
0 |
stash_name = HvNAME(CvSTASH(called_cv)); |
|
|
0 |
0 |
stash_name = HvNAME(CvSTASH(called_cv)); |
|
|
0 |
0 |
stash_name = HvNAME(CvSTASH(called_cv)); |
|
|
0 |
0 |
stash_name = HvNAME(CvSTASH(called_cv)); |
|
|
0 |
0 |
stash_name = HvNAME(CvSTASH(called_cv)); |
|
2863
|
0 |
0 |
if (trace_level) |
|
2864
|
0 |
0 |
logwarn("unknown entersub %s assumed to be anon called_cv '%s'\n", |
|
2867
|
0 |
0 |
if (trace_level >= 9) |
|
2872
|
530 |
62182 |
if (*SvPVX(subr_entry->called_subnam_sv) == 'B') |
|
2876
|
62712 |
0 |
subr_entry->called_cv_depth = (called_cv) ? CvDEPTH(called_cv)+(is_xs?1:0) : 0; |
|
2882
|
49250 |
16147 |
if (subr_entry->called_is_xs |
|
2883
|
46260 |
2990 |
&& subr_entry->called_subpkg_pv[0] == 'D' |
|
2884
|
96 |
46164 |
&& subr_entry->called_subpkg_pv[1] == 'B' |
|
2885
|
96 |
0 |
&& subr_entry->called_subpkg_pv[2] == '\0' |
|
2888
|
96 |
0 |
char *p = SvPV(subr_entry->called_subnam_sv, len); |
|
2890
|
0 |
96 |
if(*p == '_' && (memEQs(p, len, "_CHECK") || memEQs(p, len, "_INIT") || memEQs(p, len, "_END"))) { |
|
|
0 |
0 |
if(*p == '_' && (memEQs(p, len, "_CHECK") || memEQs(p, len, "_INIT") || memEQs(p, len, "_END"))) { |
|
|
0 |
0 |
if(*p == '_' && (memEQs(p, len, "_CHECK") || memEQs(p, len, "_INIT") || memEQs(p, len, "_END"))) { |
|
|
0 |
0 |
if(*p == '_' && (memEQs(p, len, "_CHECK") || memEQs(p, len, "_INIT") || memEQs(p, len, "_END"))) { |
|
|
0 |
0 |
if(*p == '_' && (memEQs(p, len, "_CHECK") || memEQs(p, len, "_INIT") || memEQs(p, len, "_END"))) { |
|
|
0 |
0 |
if(*p == '_' && (memEQs(p, len, "_CHECK") || memEQs(p, len, "_INIT") || memEQs(p, len, "_END"))) { |
|
|
0 |
0 |
if(*p == '_' && (memEQs(p, len, "_CHECK") || memEQs(p, len, "_INIT") || memEQs(p, len, "_END"))) { |
|
2896
|
0 |
65397 |
if (!profile_subs) |
|
2899
|
0 |
65397 |
if (trace_level >= 4) { |
|
2900
|
0 |
0 |
logwarn("%2u ->%4s %s::%s from %s::%s @%u:%u (d%d, oh %" NVff "t, sub %" NVff "s) #%lu\n", |
|
|
0 |
0 |
logwarn("%2u ->%4s %s::%s from %s::%s @%u:%u (d%d, oh %" NVff "t, sub %" NVff "s) #%lu\n", |
|
|
0 |
0 |
logwarn("%2u ->%4s %s::%s from %s::%s @%u:%u (d%d, oh %" NVff "t, sub %" NVff "s) #%lu\n", |
|
2904
|
0 |
0 |
subr_entry->called_subnam_sv ? SvPV_nolen(subr_entry->called_subnam_sv) : "(null)", |
|
2906
|
0 |
0 |
subr_entry->caller_subnam_sv ? SvPV_nolen(subr_entry->caller_subnam_sv) : "(null)", |
|
2915
|
49250 |
16147 |
if (subr_entry->called_is_xs) { |
|
2964
|
0 |
24 |
if (PL_op->op_type == OP_EXEC) |
|
2983
|
0 |
694 |
if (profile_usecputime) { |
|
2988
|
0 |
694 |
if (trace_level) |
|
2989
|
0 |
0 |
logwarn("~ enable_profile (previously %s) to %s\n", |
|
|
0 |
0 |
logwarn("~ enable_profile (previously %s) to %s\n", |
|
2991
|
0 |
0 |
(file && *file) ? file : PROF_output_file); |
|
2995
|
32 |
662 |
if (file && *file && strNE(file, PROF_output_file)) { |
|
|
32 |
0 |
if (file && *file && strNE(file, PROF_output_file)) { |
|
|
32 |
0 |
if (file && *file && strNE(file, PROF_output_file)) { |
|
3001
|
678 |
16 |
if (!out) { |
|
3007
|
338 |
356 |
if (opt_use_db_sub) /* set PL_DBsingle if required */ |
|
3028
|
694 |
37 |
if (is_profiling) { |
|
3029
|
338 |
356 |
if (opt_use_db_sub) |
|
3031
|
691 |
3 |
if (out) |
|
3035
|
0 |
731 |
if (trace_level) |
|
3036
|
0 |
0 |
logwarn("~ disable_profile (previously %s, pid %d, trace %" IVdf ")\n", |
|
3055
|
0 |
679 |
if (trace_level >= 1) |
|
3060
|
341 |
338 |
if (!profile_leave || opt_use_db_sub) |
|
|
161 |
180 |
if (!profile_leave || opt_use_db_sub) |
|
3067
|
0 |
679 |
if (trace_level >= 2) { |
|
3073
|
0 |
679 |
if (HvKEYS(sub_callers_hv)) { |
|
|
613 |
66 |
if (HvKEYS(sub_callers_hv)) { |
|
3099
|
630 |
0 |
if (profile_clock == -1) { /* auto select */ |
|
3107
|
0 |
630 |
if (clock_gettime(profile_clock, &start_time) != 0) { |
|
3108
|
0 |
0 |
if (trace_level) |
|
3113
|
0 |
0 |
if (clock_gettime(profile_clock, &start_time) != 0) |
|
3172
|
306 |
324 |
if (opt_use_db_sub) { |
|
3177
|
630 |
0 |
if (profile_opts & NYTP_OPTf_OPTIMIZE) |
|
3181
|
322 |
308 |
if (profile_opts & NYTP_OPTf_SAVESRC) { |
|
3186
|
0 |
630 |
if (!opt_nameevals) |
|
3188
|
0 |
630 |
if (!opt_nameanonsubs) |
|
3191
|
0 |
630 |
if (opt_perldb) /* force a PL_perldb value - for testing only, not documented */ |
|
3196
|
0 |
630 |
if (trace_level) |
|
3201
|
0 |
630 |
if (get_hv("DB::sub", 0) == NULL) { |
|
3222
|
610 |
20 |
if (profile_stmts && !opt_use_db_sub) { |
|
|
314 |
296 |
if (profile_stmts && !opt_use_db_sub) { |
|
3228
|
166 |
148 |
if (profile_leave) { |
|
3248
|
610 |
20 |
if (profile_slowops) { |
|
3256
|
630 |
0 |
if (!sub_callers_hv) |
|
3258
|
630 |
0 |
if (!pkg_fids_hv) |
|
3263
|
628 |
2 |
if (!PL_checkav) PL_checkav = newAV(); |
|
3264
|
628 |
2 |
if (!PL_initav) PL_initav = newAV(); |
|
3265
|
628 |
2 |
if (!PL_endav) PL_endav = newAV(); |
|
3272
|
93 |
537 |
if (profile_start == NYTP_START_BEGIN) { |
|
3278
|
0 |
630 |
if (PL_minus_c) { |
|
3287
|
0 |
630 |
if (trace_level >= 1) |
|
3303
|
0 |
4031559 |
unsigned int fid = (eval_line_num) ? eval_file_num : file_num; |
|
3306
|
6762 |
4024797 |
if (!SvROK(line_time_rvav)) /* autoviv */ |
|
3319
|
25706 |
4005853 |
if (!SvROK(time_rvav)) { /* autoviv */ |
|
3325
|
0 |
25706 |
if (embed_fid_line) { /* used to optimize reporting */ |
|
3334
|
4005853 |
0 |
sv_setnv(time_sv, time + SvNV(time_sv)); |
|
3335
|
3032276 |
973577 |
if (count) { |
|
3337
|
3032276 |
0 |
(count == 1) ? sv_inc(sv) : sv_setiv(sv, (IV)time + SvIV(sv)); |
|
|
0 |
0 |
(count == 1) ? sv_inc(sv) : sv_setiv(sv, (IV)time + SvIV(sv)); |
|
3356
|
36393 |
0 |
char *colon = rninstr(sub_name, sub_name+(len > 0 ? len : -len), delim, delim+2); |
|
3357
|
36393 |
0 |
if (!colon || colon == sub_name) |
|
|
0 |
36393 |
if (!colon || colon == sub_name) |
|
3377
|
0 |
36393 |
if (!pkg_len) |
|
3380
|
29641 |
6752 |
if (!svp) |
|
3389
|
36055 |
0 |
char *filename = SvPV_nolen(sv); |
|
3394
|
36055 |
0 |
if (first && filename_len_p) |
|
|
35559 |
496 |
if (first && filename_len_p) |
|
3397
|
0 |
36055 |
if (!first++) /* start of first number, if colon was found */ |
|
3399
|
0 |
36055 |
if ('-' == *first) { /* first number is negative */ |
|
3405
|
36055 |
0 |
if (!last || !grok_number(first, last-first, first_line_p)) |
|
|
0 |
36055 |
if (!last || !grok_number(first, last-first, first_line_p)) |
|
3407
|
0 |
36055 |
if (first_is_neg) { |
|
3413
|
0 |
36055 |
if ('-' == *++last) { /* skip past dash, is next char a minus? */ |
|
3418
|
35559 |
496 |
if (last_line_p) |
|
3434
|
0 |
675 |
if (trace_level >= 1) |
|
3443
|
35013 |
675 |
while (NULL != (file_lines_sv = hv_iternextsv(hv, &sub_name, &sub_name_len))) { |
|
3445
|
35013 |
0 |
char *filename = SvPV(file_lines_sv, file_lines_len); |
|
3464
|
34228 |
785 |
if (file_lines_len > 4 |
|
3465
|
2628 |
31600 |
&& filename[file_lines_len - 2] == '-' && filename[file_lines_len - 1] == '0' |
|
|
517 |
2111 |
&& filename[file_lines_len - 2] == '-' && filename[file_lines_len - 1] == '0' |
|
3466
|
0 |
517 |
&& filename[file_lines_len - 4] != ':' && filename[file_lines_len - 3] != '0') |
|
|
0 |
0 |
&& filename[file_lines_len - 4] != ':' && filename[file_lines_len - 3] != '0') |
|
3470
|
35013 |
0 |
filename_len = (first) ? first - filename : 0; |
|
3475
|
29553 |
5460 |
if (!pkg_filename_sv) /* we don't know package */ |
|
3479
|
998 |
4462 |
if (SvOK(pkg_filename_sv)) { |
|
|
998 |
0 |
if (SvOK(pkg_filename_sv)) { |
|
|
0 |
998 |
if (SvOK(pkg_filename_sv)) { |
|
3481
|
4462 |
0 |
char *cached_filename = SvPV(pkg_filename_sv, cached_len); |
|
3487
|
3933 |
529 |
if (filename_len > 0 |
|
3488
|
101 |
3832 |
&& filename_is_eval(cached_filename, cached_len) |
|
3489
|
50 |
51 |
&& !filename_is_eval(filename, filename_len) |
|
3491
|
0 |
50 |
if (trace_level >= 3) |
|
3501
|
0 |
4412 |
if (trace_level >= 3 |
|
3502
|
0 |
0 |
&& strnNE(SvPV_nolen(pkg_filename_sv), filename, filename_len) |
|
|
0 |
0 |
&& strnNE(SvPV_nolen(pkg_filename_sv), filename, filename_len) |
|
3503
|
0 |
0 |
&& !filename_is_eval(filename, filename_len) |
|
3506
|
0 |
0 |
logwarn("Package '%.*s' (of sub %.*s) not associated with '%.*s' because already associated with '%s'\n", |
|
3517
|
256 |
742 |
if (!filename_len) { |
|
3518
|
0 |
256 |
if (trace_level >= 3) |
|
3530
|
0 |
742 |
if (trace_level >= 3) |
|
3535
|
594 |
81 |
if (main_runtime_used) { /* Create fake entry for main::RUNTIME sub */ |
|
3542
|
88 |
506 |
if (!pkg_filename_sv) { /* no subs in main, so guess */ |
|
3545
|
1 |
505 |
else if (SvOK(pkg_filename_sv)) { |
|
|
1 |
0 |
else if (SvOK(pkg_filename_sv)) { |
|
|
0 |
1 |
else if (SvOK(pkg_filename_sv)) { |
|
3554
|
0 |
675 |
if (trace_level >= 1) |
|
3555
|
0 |
0 |
logwarn("~ writing sub line ranges of %ld subs\n", (long)HvKEYS(hv)); |
|
3561
|
35559 |
675 |
while (NULL != (file_lines_sv = hv_iternextsv(hv, &sub_name, &sub_name_len))) { |
|
3563
|
35559 |
0 |
char *filename = SvPV_nolen(file_lines_sv); |
|
3567
|
0 |
35559 |
if (!parse_DBsub_value(aTHX_ file_lines_sv, &filename_len, &first_line, &last_line, sub_name)) { |
|
3572
|
786 |
34773 |
if (!filename_len) { /* no filename, so presumably a fake entry for xsub */ |
|
3575
|
786 |
0 |
if (pkg_filename_sv && SvOK(pkg_filename_sv)) { |
|
|
129 |
657 |
if (pkg_filename_sv && SvOK(pkg_filename_sv)) { |
|
|
129 |
0 |
if (pkg_filename_sv && SvOK(pkg_filename_sv)) { |
|
|
0 |
129 |
if (pkg_filename_sv && SvOK(pkg_filename_sv)) { |
|
3576
|
657 |
0 |
filename = SvPV(pkg_filename_sv, filename_len); |
|
3577
|
0 |
657 |
if (trace_level >= 2) |
|
3584
|
29514 |
6045 |
if (!fid) { |
|
3585
|
0 |
29514 |
if (trace_level >= 4) |
|
3591
|
0 |
6045 |
if (trace_level >= 2) |
|
3609
|
0 |
675 |
if (!sub_callers_hv) |
|
3611
|
0 |
675 |
if (trace_level >= 1) |
|
3612
|
0 |
0 |
logwarn("~ writing sub callers for %ld subs\n", (long)HvKEYS(sub_callers_hv)); |
|
3615
|
3116 |
675 |
while (NULL != (fid_line_rvhv = hv_iternextsv(sub_callers_hv, &called_subname, &called_subname_len))) { |
|
3621
|
3116 |
0 |
if (!SvROK(fid_line_rvhv) || SvTYPE(SvRV(fid_line_rvhv))!=SVt_PVHV) { |
|
|
0 |
3116 |
if (!SvROK(fid_line_rvhv) || SvTYPE(SvRV(fid_line_rvhv))!=SVt_PVHV) { |
|
3635
|
5547 |
3116 |
while (NULL != (sv = hv_iternextsv(fid_lines_hv, &caller_subname, &caller_subname_len))) { |
|
3645
|
0 |
5547 |
if (!fid_line_start) { |
|
3649
|
0 |
5547 |
if (2 != sscanf(fid_line_start+1, "%u:%u", &fid, &line)) { |
|
3657
|
0 |
5547 |
if (line > 2147483600) { /* ~2**31 */ |
|
3681
|
5547 |
0 |
if (sc[NYTP_SCi_INCL_RTIME] < 0.0 || sc[NYTP_SCi_EXCL_RTIME] < 0.0) { |
|
|
0 |
5547 |
if (sc[NYTP_SCi_INCL_RTIME] < 0.0 || sc[NYTP_SCi_EXCL_RTIME] < 0.0) { |
|
3683
|
0 |
0 |
if (trace_level) { |
|
3690
|
0 |
5547 |
if (trace) { |
|
3691
|
0 |
0 |
if (!fid && !line) { |
|
|
0 |
0 |
if (!fid && !line) { |
|
3703
|
0 |
675 |
if (negative_time_calls) { |
|
3719
|
0 |
675 |
if (trace_level >= 1) |
|
3722
|
1577 |
675 |
for (e = (fid_hash_entry*)fidhash.first_inserted; e; e = (fid_hash_entry*)e->he.next_inserted) { |
|
3727
|
246 |
1331 |
if ( !(e->fid_flags & NYTP_FIDf_HAS_SRC) ) { |
|
3730
|
26 |
220 |
if (src_av && av_len(src_av) > -1) /* sanity check */ |
|
|
0 |
26 |
if (src_av && av_len(src_av) > -1) /* sanity check */ |
|
3732
|
246 |
0 |
if (trace_level >= 3 || *hint) |
|
|
0 |
246 |
if (trace_level >= 3 || *hint) |
|
3737
|
0 |
1331 |
if (!src_av) { /* sanity check */ |
|
3745
|
320 |
1011 |
if ( !(e->fid_flags & NYTP_FIDf_SAVE_SRC) ) { |
|
3751
|
0 |
1011 |
if (trace_level >= 3) |
|
3754
|
28177 |
1011 |
for (line = 1; line <= lines; ++line) { /* lines start at 1 */ |
|
3757
|
27401 |
776 |
const char *src = (svp) ? SvPV(*svp, len) : ""; |
|
|
27401 |
0 |
const char *src = (svp) ? SvPV(*svp, len) : ""; |
|
3761
|
0 |
28177 |
if (trace_level >= 8) { |
|
3762
|
0 |
0 |
logwarn("fid %d src line %d: %s%s", e->he.id, line, src, |
|
3763
|
0 |
0 |
(len && src[len-1]=='\n') ? "" : "\n"); |
|
3769
|
0 |
675 |
if (trace_level >= 2) |
|
3779
|
23708 |
0 |
char *start = SvPV(sv, len); |
|
3853
|
7972 |
7788 |
if (!SvROK(sv)) { /* autoviv */ |
|
3878
|
0 |
16898 |
if (trace_level >= 1) |
|
3879
|
0 |
0 |
logwarn(": %.*s = '%s'\n", (int) text_len, text, SvPV_nolen(value_sv)); |
|
3965
|
0 |
324767 |
if (trace_level >= 8) |
|
3968
|
0 |
324767 |
if (state->statement_discount) |
|
3992
|
1343853 |
0 |
ticks = va_arg(args, I32); |
|
3993
|
1343853 |
0 |
file_num = va_arg(args, unsigned int); |
|
3994
|
1343853 |
0 |
line_num = va_arg(args, unsigned int); |
|
3999
|
0 |
1343853 |
if (!SvROK(fid_info_rvav)) { /* should never happen */ |
|
4000
|
0 |
0 |
if (!SvOK(fid_info_rvav)) { /* only warn once */ |
|
|
0 |
0 |
if (!SvOK(fid_info_rvav)) { /* only warn once */ |
|
|
0 |
0 |
if (!SvOK(fid_info_rvav)) { /* only warn once */ |
|
4006
|
0 |
1343853 |
if (trace_level >= 8) { |
|
4008
|
0 |
0 |
if (file_num != state->last_file_num && SvROK(fid_info_rvav)) |
|
|
0 |
0 |
if (file_num != state->last_file_num && SvROK(fid_info_rvav)) |
|
4009
|
0 |
0 |
new_file_name = SvPV_nolen(*av_fetch((AV *)SvRV(fid_info_rvav), NYTP_FIDi_FILENAME, 1)); |
|
4019
|
1343853 |
0 |
if (tag == nytp_time_block) { |
|
4020
|
1343853 |
0 |
unsigned int block_line_num = va_arg(args, unsigned int); |
|
4021
|
0 |
1343853 |
unsigned int sub_line_num = va_arg(args, unsigned int); |
|
4023
|
966 |
1342887 |
if (!state->fid_block_time_av) |
|
4030
|
966 |
1342887 |
if (!state->fid_sub_time_av) |
|
4037
|
0 |
1343853 |
if (trace_level >= 8) |
|
4069
|
2422 |
0 |
file_num = va_arg(args, unsigned int); |
|
4070
|
2422 |
0 |
eval_file_num = va_arg(args, unsigned int); |
|
4071
|
2422 |
0 |
eval_line_num = va_arg(args, unsigned int); |
|
4072
|
2422 |
0 |
fid_flags = va_arg(args, unsigned int); |
|
4073
|
0 |
2422 |
file_size = va_arg(args, unsigned int); |
|
4074
|
0 |
2422 |
file_mtime = va_arg(args, unsigned int); |
|
4075
|
0 |
2422 |
filename_sv = va_arg(args, SV *); |
|
4079
|
0 |
2422 |
if (trace_level >= 2) { |
|
4082
|
0 |
0 |
if (eval_file_num || eval_line_num) |
|
|
0 |
0 |
if (eval_file_num || eval_line_num) |
|
4087
|
0 |
0 |
logwarn("Fid %2u is %s%s 0x%x(%s)\n", |
|
4099
|
2422 |
0 |
if (SvOK(*svp)) { /* should never happen, perhaps file is corrupt */ |
|
|
2422 |
0 |
if (SvOK(*svp)) { /* should never happen, perhaps file is corrupt */ |
|
|
0 |
2422 |
if (SvOK(*svp)) { /* should never happen, perhaps file is corrupt */ |
|
4102
|
0 |
0 |
logwarn("Fid %d redefined from %s to %s\n", file_num, |
|
|
0 |
0 |
logwarn("Fid %d redefined from %s to %s\n", file_num, |
|
4108
|
1112 |
1310 |
if (eval_file_num) { |
|
4112
|
0 |
1112 |
if (!SvROK(eval_fi)) { /* should never happen */ |
|
4114
|
0 |
0 |
logwarn("Eval '%s' (fid %d, flags:%s) has unknown invoking fid %d\n", |
|
4126
|
576 |
536 |
if (!SvROK(has_evals)) /* autoviv */ |
|
4134
|
1112 |
1310 |
av_store(av, NYTP_FIDi_EVAL_FID, (eval_file_num) ? newSVuv(eval_file_num) : &PL_sv_no); |
|
4135
|
1112 |
1310 |
av_store(av, NYTP_FIDi_EVAL_LINE, (eval_file_num) ? newSVuv(eval_line_num) : &PL_sv_no); |
|
4159
|
32560 |
0 |
file_num = va_arg(args, unsigned int); |
|
4160
|
32560 |
0 |
line_num = va_arg(args, unsigned int); |
|
4161
|
32560 |
0 |
src = va_arg(args, SV *); |
|
4166
|
1266 |
31294 |
if (!av_exists(state->fid_srclines_av, file_num)) { |
|
4176
|
0 |
32560 |
if (trace_level >= 8) { |
|
4177
|
0 |
0 |
logwarn("Fid %2u:%u src: %s\n", file_num, line_num, SvPV_nolen(src)); |
|
4199
|
7812 |
0 |
fid = va_arg(args, unsigned int); |
|
4200
|
7812 |
0 |
first_line = va_arg(args, unsigned int); |
|
4201
|
7812 |
0 |
last_line = va_arg(args, unsigned int); |
|
4202
|
7812 |
0 |
subname_sv = va_arg(args, SV *); |
|
4208
|
7812 |
0 |
subname_pv = SvPV(subname_sv, subname_len); |
|
4209
|
0 |
7812 |
if (trace_level >= 2) |
|
4214
|
7812 |
0 |
if (SvOK(*av_fetch(av, NYTP_SIi_FID, 1))) { |
|
|
7812 |
0 |
if (SvOK(*av_fetch(av, NYTP_SIi_FID, 1))) { |
|
|
0 |
7812 |
if (SvOK(*av_fetch(av, NYTP_SIi_FID, 1))) { |
|
4219
|
0 |
0 |
if (!instr(subname_pv, "__ANON__[(eval")) |
|
4226
|
0 |
0 |
if (fid > SvUV(*av_fetch(av, NYTP_SIi_FID, 1))) |
|
|
0 |
0 |
if (fid > SvUV(*av_fetch(av, NYTP_SIi_FID, 1))) |
|
4234
|
7812 |
0 |
if (!skip_subinfo_store) { |
|
4268
|
7948 |
0 |
fid = va_arg(args, unsigned int); |
|
4269
|
7948 |
0 |
line = va_arg(args, unsigned int); |
|
4270
|
7948 |
0 |
count = va_arg(args, unsigned int); |
|
4271
|
7948 |
0 |
incl_time = va_arg(args, NV); |
|
4272
|
7948 |
0 |
excl_time = va_arg(args, NV); |
|
4273
|
7948 |
0 |
reci_time = va_arg(args, NV); |
|
4274
|
7948 |
0 |
rec_depth = va_arg(args, unsigned int); |
|
4275
|
0 |
7948 |
called_subname_sv = va_arg(args, SV *); |
|
4276
|
0 |
7948 |
caller_subname_sv = va_arg(args, SV *); |
|
4283
|
0 |
7948 |
if (trace_level >= 6) |
|
4284
|
0 |
0 |
logwarn("Sub %s called by %s %u:%u: count %d, incl %" NVff ", excl %" NVff "\n", |
|
|
0 |
0 |
logwarn("Sub %s called by %s %u:%u: count %d, incl %" NVff ", excl %" NVff "\n", |
|
4294
|
4112 |
3836 |
if (!SvROK(sv)) /* autoviv */ |
|
4299
|
5910 |
2038 |
if (!SvROK(sv)) /* autoviv */ |
|
4305
|
6838 |
1110 |
if (fid) { |
|
4311
|
6822 |
16 |
if (!SvROK(sv)) /* autoviv */ |
|
4313
|
0 |
16 |
else if (trace_level) |
|
4317
|
0 |
0 |
logwarn("Merging extra sub caller info for %s called at %d:%d\n", |
|
4322
|
6822 |
16 |
sv_setuv(sv, (SvOK(sv)) ? SvUV(sv) + count : count); |
|
|
6822 |
0 |
sv_setuv(sv, (SvOK(sv)) ? SvUV(sv) + count : count); |
|
|
0 |
6822 |
sv_setuv(sv, (SvOK(sv)) ? SvUV(sv) + count : count); |
|
|
0 |
16 |
sv_setuv(sv, (SvOK(sv)) ? SvUV(sv) + count : count); |
|
4324
|
6822 |
16 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + incl_time : incl_time); |
|
|
6822 |
0 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + incl_time : incl_time); |
|
|
0 |
6822 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + incl_time : incl_time); |
|
|
16 |
0 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + incl_time : incl_time); |
|
4326
|
6822 |
16 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + excl_time : excl_time); |
|
|
6822 |
0 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + excl_time : excl_time); |
|
|
0 |
6822 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + excl_time : excl_time); |
|
|
16 |
0 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + excl_time : excl_time); |
|
4332
|
6822 |
16 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + reci_time : reci_time); |
|
|
6822 |
0 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + reci_time : reci_time); |
|
|
0 |
6822 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + reci_time : reci_time); |
|
|
16 |
0 |
sv_setnv(sv, (SvOK(sv)) ? SvNV(sv) + reci_time : reci_time); |
|
4334
|
6822 |
16 |
if (!SvOK(sv) || SvUV(sv) < rec_depth) /* max() */ |
|
|
6822 |
0 |
if (!SvOK(sv) || SvUV(sv) < rec_depth) /* max() */ |
|
|
0 |
6822 |
if (!SvOK(sv) || SvUV(sv) < rec_depth) /* max() */ |
|
|
0 |
16 |
if (!SvOK(sv) || SvUV(sv) < rec_depth) /* max() */ |
|
|
0 |
16 |
if (!SvOK(sv) || SvUV(sv) < rec_depth) /* max() */ |
|
4339
|
6822 |
16 |
if (!SvROK(sv)) /* autoviv */ |
|
4349
|
6058 |
780 |
if (!SvROK(fi)) /* autoviv */ |
|
4353
|
0 |
6838 |
AV *av2 = av_make(AvFILL(av)+1, AvARRAY(av)); |
|
4366
|
0 |
7948 |
sv_setuv(sv, count + (SvOK(sv) ? SvUV(sv) : 0)); |
|
|
0 |
0 |
sv_setuv(sv, count + (SvOK(sv) ? SvUV(sv) : 0)); |
|
|
0 |
0 |
sv_setuv(sv, count + (SvOK(sv) ? SvUV(sv) : 0)); |
|
|
0 |
7948 |
sv_setuv(sv, count + (SvOK(sv) ? SvUV(sv) : 0)); |
|
4368
|
0 |
7948 |
sv_setnv(sv, incl_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
|
0 |
0 |
sv_setnv(sv, incl_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
|
0 |
0 |
sv_setnv(sv, incl_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
|
7948 |
0 |
sv_setnv(sv, incl_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
4370
|
0 |
7948 |
sv_setnv(sv, excl_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
|
0 |
0 |
sv_setnv(sv, excl_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
|
0 |
0 |
sv_setnv(sv, excl_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
|
7948 |
0 |
sv_setnv(sv, excl_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
4373
|
0 |
7948 |
if (!SvOK(sv) || rec_depth > SvUV(sv)) |
|
|
0 |
0 |
if (!SvOK(sv) || rec_depth > SvUV(sv)) |
|
|
0 |
0 |
if (!SvOK(sv) || rec_depth > SvUV(sv)) |
|
|
0 |
7948 |
if (!SvOK(sv) || rec_depth > SvUV(sv)) |
|
|
16 |
7932 |
if (!SvOK(sv) || rec_depth > SvUV(sv)) |
|
4376
|
0 |
7948 |
sv_setnv(sv, reci_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
|
0 |
0 |
sv_setnv(sv, reci_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
|
0 |
0 |
sv_setnv(sv, reci_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
|
7948 |
0 |
sv_setnv(sv, reci_time + (SvOK(sv) ? SvNV(sv) : 0.0)); |
|
4395
|
994 |
0 |
pid = va_arg(args, unsigned int); |
|
4396
|
994 |
0 |
ppid = va_arg(args, unsigned int); |
|
4397
|
994 |
0 |
start_time = va_arg(args, NV); |
|
4405
|
0 |
994 |
if (trace_level) |
|
4407
|
0 |
0 |
text, ppid, (IV)HvKEYS(state->live_pids_hv), start_time); |
|
4426
|
994 |
0 |
pid = va_arg(args, unsigned int); |
|
4427
|
994 |
0 |
end_time = va_arg(args, NV); |
|
4434
|
0 |
994 |
if (!hv_delete(state->live_pids_hv, text, len, 0)) |
|
4437
|
0 |
994 |
if (trace_level) |
|
4439
|
0 |
0 |
(IV)HvKEYS(state->live_pids_hv), state->profiler_end_time); |
|
4464
|
8946 |
0 |
key = va_arg(args, char *); |
|
4465
|
8946 |
0 |
key_len = va_arg(args, unsigned long); |
|
4466
|
8946 |
0 |
key_utf8 = va_arg(args, unsigned int); |
|
4468
|
8946 |
0 |
value = va_arg(args, char *); |
|
4469
|
0 |
8946 |
value_len = va_arg(args, unsigned long); |
|
4470
|
0 |
8946 |
value_utf8 = va_arg(args, unsigned int); |
|
4474
|
0 |
8946 |
store_attrib_sv(aTHX_ state->attr_hv, key, |
|
|
0 |
8946 |
store_attrib_sv(aTHX_ state->attr_hv, key, |
|
4496
|
17892 |
0 |
key = va_arg(args, char *); |
|
4497
|
17892 |
0 |
key_len = va_arg(args, unsigned long); |
|
4498
|
17892 |
0 |
key_utf8 = va_arg(args, unsigned int); |
|
4500
|
17892 |
0 |
value = va_arg(args, char *); |
|
4501
|
0 |
17892 |
value_len = va_arg(args, unsigned long); |
|
4502
|
0 |
17892 |
value_utf8 = va_arg(args, unsigned int); |
|
4506
|
0 |
17892 |
value_sv = newSVpvn_flags(value, value_len, value_utf8 ? SVf_UTF8 : 0); |
|
4507
|
0 |
17892 |
(void)hv_store(state->option_hv, key, key_utf8 ? -(I32)key_len : key_len, value_sv, 0); |
|
4508
|
0 |
17892 |
if (trace_level >= 1) |
|
4509
|
0 |
0 |
logwarn("! %.*s = '%s'\n", (int) key_len, key, SvPV_nolen(value_sv)); |
|
4554
|
0 |
591275 |
if (!arglist) { |
|
4555
|
0 |
0 |
if (description) |
|
4561
|
574667 |
16608 |
if (!state->cb[tag]) |
|
4564
|
0 |
16608 |
if (trace_level >= 9) { |
|
4572
|
0 |
16608 |
PUSHMARK(SP); |
|
4574
|
0 |
16608 |
XPUSHs(state->tag_names[tag]); |
|
4576
|
47569 |
16608 |
while ((type = *arglist++)) { |
|
4580
|
7204 |
5 |
unsigned int u = va_arg(args, unsigned int); |
|
4583
|
0 |
7209 |
XPUSHs(cb_args[i++]); |
|
4588
|
3 |
0 |
I32 i32 = va_arg(args, I32); |
|
4591
|
0 |
3 |
XPUSHs(cb_args[i++]); |
|
4596
|
14335 |
0 |
NV n = va_arg(args, NV); |
|
4599
|
0 |
14335 |
XPUSHs(cb_args[i++]); |
|
4604
|
7168 |
2 |
SV *sv = va_arg(args, SV *); |
|
4607
|
0 |
7170 |
XPUSHs(cb_args[i++]); |
|
4612
|
3 |
1 |
SV *sv = va_arg(args, SV *); |
|
4614
|
0 |
4 |
XPUSHs(sv_2mortal(sv)); |
|
4619
|
18848 |
0 |
char *p = va_arg(args, char *); |
|
4620
|
9425 |
9423 |
unsigned long len = va_arg(args, unsigned long); |
|
4621
|
9425 |
9423 |
unsigned int utf8 = va_arg(args, unsigned int); |
|
4624
|
0 |
18848 |
if (utf8) |
|
4629
|
0 |
18848 |
XPUSHs(cb_args[i++]); |
|
4638
|
0 |
16608 |
assert(i <= C_ARRAY_LENGTH(state->cb_args)); |
|
4715
|
0 |
1343 |
if (!NYTP_gets(in, &buffer, &buffer_len)) |
|
4717
|
0 |
1343 |
if (2 != sscanf(buffer, "NYTProf %d %d\n", &file_major, &file_minor)) |
|
4719
|
0 |
1343 |
if (file_major != NYTP_FILE_MAJOR_VERSION) |
|
4723
|
0 |
1343 |
if (file_minor > NYTP_FILE_MINOR_VERSION) |
|
4728
|
349 |
994 |
if (callbacks[nytp_version]) |
|
4736
|
1343 |
2368876 |
if (NYTP_read_unchecked(in, &c, sizeof(c)) != sizeof(c)) { |
|
4737
|
1343 |
0 |
if (NYTP_eof(in)) |
|
4744
|
0 |
2368876 |
if (trace_level >= 9) |
|
4766
|
1810935 |
0 |
if (c == NYTP_TAG_TIME_BLOCK) { |
|
4814
|
2389 |
6944 |
if (callbacks[nytp_sub_entry]) |
|
4826
|
7165 |
20780 |
if (callbacks[nytp_sub_return]) |
|
4887
|
0 |
12087 |
if (NULL == end) |
|
4891
|
0 |
12087 |
if ((NULL == (value = (char *)memchr(buffer, '=', end - buffer)))) { |
|
4902
|
1343 |
10744 |
if (memEQs(buffer, key_end - buffer, "ticks_per_sec")) { |
|
|
1343 |
0 |
if (memEQs(buffer, key_end - buffer, "ticks_per_sec")) { |
|
4905
|
1343 |
9401 |
else if (memEQs(buffer, key_end - buffer, "nv_size")) { |
|
|
1343 |
0 |
else if (memEQs(buffer, key_end - buffer, "nv_size")) { |
|
4906
|
0 |
1343 |
if (sizeof(NV) != atoi(value)) |
|
4918
|
0 |
24174 |
if (NULL == end) |
|
4922
|
0 |
24174 |
if ((NULL == (value = (char *)memchr(buffer, '=', end - buffer)))) { |
|
4938
|
0 |
2098 |
if (!end) |
|
4942
|
582 |
1516 |
if (callbacks[nytp_comment]) |
|
4946
|
0 |
2098 |
if (trace_level >= 1) |
|
4954
|
233 |
522 |
if (callbacks[nytp_start_deflate]) { |
|
5008
|
0 |
994 |
if (HvKEYS(state.live_pids_hv)) { |
|
|
0 |
994 |
if (HvKEYS(state.live_pids_hv)) { |
|
5010
|
0 |
0 |
(IV)HvKEYS(state.live_pids_hv), |
|
5022
|
212 |
782 |
if (state.statement_discount) /* discard unused statement_discount */ |
|
5036
|
994 |
0 |
if (state.profiler_end_time |
|
5037
|
0 |
994 |
&& state.total_stmts_duration > state.profiler_duration * 1.1 |
|
5058
|
0 |
994 |
if (show_summary_stats) |
|
5079
|
966 |
28 |
if (state.fid_block_time_av) { |
|
5084
|
966 |
28 |
if (state.fid_sub_time_av) { |
|
5104
|
348 |
1 |
if (SvTYPE(cb) == SVt_PVHV) { |
|
5111
|
0 |
348 |
if (svp) { |
|
5112
|
0 |
0 |
if (!SvROK(*svp) && SvTYPE(SvRV(*svp)) != SVt_PVCV) |
|
|
0 |
0 |
if (!SvROK(*svp) && SvTYPE(SvRV(*svp)) != SVt_PVCV) |
|
5116
|
1 |
0 |
} else if (SvTYPE(cb) == SVt_PVCV) { |
|
5130
|
6282 |
349 |
while (--i) { |
|
5131
|
5584 |
698 |
if (callback_info[i].args) { |
|
5141
|
6264 |
18 |
if (cb_hv) { |
|
5145
|
1044 |
5220 |
if (svp) { |
|
5146
|
0 |
1044 |
if (!SvROK(*svp) && SvTYPE(SvRV(*svp)) != SVt_PVCV) |
|
|
0 |
0 |
if (!SvROK(*svp) && SvTYPE(SvRV(*svp)) != SVt_PVCV) |
|
5155
|
3839 |
349 |
for (i = 0; i < C_ARRAY_LENGTH(state.cb_args); i++) |
|
5239
|
60660 |
1348 |
} while (++constant < end); |
|
5251
|
0 |
32425 |
XSRETURN_IV(trace_level); |
|
5262
|
46097 |
17 |
if (!action) |
|
5263
|
0 |
46097 |
XSRETURN(0); |
|
5264
|
16 |
1 |
if (SvROK(action) && SvTYPE(SvRV(action))==SVt_PVCV) { |
|
|
16 |
0 |
if (SvROK(action) && SvTYPE(SvRV(action))==SVt_PVCV) { |
|
5266
|
0 |
16 |
PUSHMARK(SP); |
|
5269
|
1 |
0 |
else if (strEQ(SvPV_nolen(action),"eval")) |
|
|
0 |
1 |
else if (strEQ(SvPV_nolen(action),"eval")) |
|
5270
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
5271
|
1 |
0 |
else if (strEQ(SvPV_nolen(action),"die")) |
|
|
1 |
0 |
else if (strEQ(SvPV_nolen(action),"die")) |
|
5273
|
0 |
0 |
logwarn("example_xsub: unknown action '%s'\n", SvPV_nolen(action)); |
|
5305
|
0 |
0 |
if (!last_pid) |
|
5314
|
0 |
0 |
EXTEND(SP, 4); |
|
5330
|
259982 |
0 |
if (opt_use_db_sub) |
|
5352
|
64 |
0 |
if (!RETVAL) { |
|
5375
|
537 |
0 |
if (profile_start == NYTP_START_INIT) { |
|
5378
|
0 |
0 |
else if (profile_start == NYTP_START_END) { |
|
5380
|
0 |
0 |
if (trace_level >= 1) |
|
5382
|
0 |
0 |
if (!PL_endav) |
|
5388
|
0 |
537 |
if (trace_level >= 1) |
|
5404
|
0 |
630 |
if (!PL_checkav) PL_checkav = newAV(); |
|
5405
|
0 |
630 |
if (!PL_endav) PL_endav = newAV(); |
|
5406
|
0 |
630 |
av_push((ix == 1 ? PL_checkav : PL_endav), SvREFCNT_inc(finish_profile_cv)); |
|
5411
|
0 |
630 |
if (trace_level >= 1) |
|
5412
|
0 |
0 |
logwarn("~ %s done\n", ix == 1 ? "CHECK" : "END"); |
|
5428
|
0 |
1343 |
if (trace_level) |
|
5431
|
0 |
1343 |
if (in == NULL) { |
|
5434
|
1343 |
0 |
if (cb && SvROK(cb)) { |
|
|
349 |
994 |
if (cb && SvROK(cb)) { |
|
5442
|
0 |
1343 |
if ((result = NYTP_close(in, 0))) |