line |
true |
false |
branch |
513
|
0 |
0 |
if (!logfh) |
571
|
0 |
705 |
const char *argv0 = SvPV(sv, len); |
573
|
0 |
705 |
assert(out != NULL); |
603
|
11985 |
705 |
} while (++opt_p < opt_end); |
608
|
385 |
320 |
if (compression_level) { |
628
|
0 |
99080 |
if (NYTP_TAG_STRING != tag && NYTP_TAG_STRING_UTF8 != tag) |
|
0 |
0 |
if (NYTP_TAG_STRING != tag && NYTP_TAG_STRING_UTF8 != tag) |
633
|
57830 |
41250 |
if (sv) { |
634
|
57830 |
0 |
SvGROW(sv, len+1); /* forces SVt_PV */ |
|
3225 |
54605 |
SvGROW(sv, len+1); /* forces SVt_PV */ |
641
|
99080 |
0 |
buf = SvPV_nolen(sv); |
643
|
0 |
99080 |
SvCUR_set(sv, len); |
|
0 |
0 |
SvCUR_set(sv, len); |
|
0 |
99080 |
SvCUR_set(sv, len); |
|
0 |
0 |
SvCUR_set(sv, len); |
|
0 |
0 |
SvCUR_set(sv, len); |
|
0 |
99080 |
SvCUR_set(sv, len); |
|
0 |
0 |
SvCUR_set(sv, len); |
646
|
0 |
99080 |
if (NYTP_TAG_STRING_UTF8 == tag) |
649
|
0 |
99080 |
if (trace_level >= 19) { |
652
|
0 |
0 |
if (buf[len2-1] == '\n') { |
656
|
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), |
673
|
1627743 |
42511 |
while (len--) { |
686
|
150 |
60 |
if (memEQ(filename, prefix, prefix_len) |
687
|
150 |
0 |
&& isdigit((int)filename[prefix_len])) { |
690
|
56 |
150 |
while (isdigit((int)*s)) |
692
|
150 |
0 |
if (s[0] == ')') |
704
|
157 |
3887 |
if (filename_len < 6) |
707
|
3753 |
134 |
if (filename[filename_len - 1] != ']' && filename[filename_len - 1] != ')') |
|
3707 |
46 |
if (filename[filename_len - 1] != ']' && filename[filename_len - 1] != ')') |
709
|
150 |
30 |
if (eval_prefix(filename, "(eval ", 6)) |
711
|
0 |
30 |
if (eval_prefix(filename, "(re_eval ", 9)) |
730
|
11848 |
30848 |
while(NULL != found) { |
732
|
11373 |
475 |
if (found->key_len == key_len |
733
|
11373 |
0 |
&& memEQ(found->key, key, key_len) |
739
|
290 |
185 |
if (NULL == found->next_entry) { |
740
|
2 |
288 |
if (insert) { |
765
|
1622 |
29226 |
if (insert) { |
778
|
630 |
992 |
if (!hashtable->first_inserted) |
798
|
0 |
0 |
if (verbosity) |
800
|
0 |
0 |
if (!hashtable->table) |
803
|
0 |
0 |
for (idx=0; idx < hashtable->size; ++idx) { |
807
|
0 |
0 |
if (!found) |
811
|
0 |
0 |
while (NULL != found) { |
816
|
0 |
0 |
if (verbosity) |
818
|
0 |
0 |
if (chain_len > max_chain_len) |
834
|
580 |
1087 |
if (fid_info->key_abs) { |
857
|
0 |
1667 |
if (file_name_copy) |
869
|
516 |
1076 |
if (fid_info->key_abs) { |
874
|
1460 |
132 |
if (len > 3 && memEQs(file_name + len - 3, 3, ".pm")) { |
|
251 |
1209 |
if (len > 3 && memEQs(file_name + len - 3, 3, ".pm")) { |
886
|
16 |
235 |
if (PerlLIO_lstat(pmc, &pmcstat) == 0) { |
891
|
16 |
0 |
if (PerlLIO_lstat(file_name, &pmstat) < 0 || |
|
16 |
0 |
if (PerlLIO_lstat(file_name, &pmstat) < 0 || |
906
|
0 |
0 |
if (fid_flags & NYTP_FIDf_IS_EVAL) my_strlcat(buf, "eval,", len); |
907
|
0 |
0 |
if (fid_flags & NYTP_FIDf_IS_FAKE) my_strlcat(buf, "fake,", len); |
908
|
0 |
0 |
if (fid_flags & NYTP_FIDf_IS_AUTOSPLIT) my_strlcat(buf, "autosplit,", len); |
909
|
0 |
0 |
if (fid_flags & NYTP_FIDf_IS_ALIAS) my_strlcat(buf, "alias,", len); |
910
|
0 |
0 |
if (fid_flags & NYTP_FIDf_IS_PMC) my_strlcat(buf, "pmc,", len); |
911
|
0 |
0 |
if (fid_flags & NYTP_FIDf_VIA_STMT) my_strlcat(buf, "viastmt,", len); |
912
|
0 |
0 |
if (fid_flags & NYTP_FIDf_VIA_SUB) my_strlcat(buf, "viasub,", len); |
913
|
0 |
0 |
if (fid_flags & NYTP_FIDf_HAS_SRC) my_strlcat(buf, "hassrc,", len); |
914
|
0 |
0 |
if (fid_flags & NYTP_FIDf_SAVE_SRC) my_strlcat(buf, "savesrc,", len); |
915
|
0 |
0 |
if (*buf) /* trim trailing comma */ |
925
|
75 |
705 |
while (e) { |
926
|
75 |
0 |
if ( !(e->fid_flags & NYTP_FIDf_IS_ALIAS) ) |
945
|
0 |
32 |
base_start = (base_start) ? base_start+1 : file_name; |
948
|
0 |
32 |
if (trace_level >= 3) |
952
|
144 |
32 |
for ( ; e; e = (fid_hash_entry*)e->he.next_inserted) { |
955
|
32 |
112 |
if (e->fid_flags & NYTP_FIDf_IS_AUTOSPLIT) |
957
|
0 |
112 |
if (trace_level >= 4) |
961
|
32 |
80 |
if (e->he.key_len < base_len) |
965
|
48 |
32 |
if (memcmp(e_name, base_start, base_len) != 0) |
968
|
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) |
971
|
0 |
32 |
if (trace_level >= 3) |
1014
|
40887 |
1624 |
if (1 != hash_op(&fidhash, file_name, file_name_len, (Hash_entry**)&found, (bool)(created_via ? 1 : 0))) { |
1016
|
0 |
40887 |
if (trace_level >= 7) { |
1017
|
0 |
0 |
if (found) |
1021
|
11373 |
29514 |
return (found) ? found->he.id : 0; |
1024
|
994 |
630 |
if (fidhash.prior_inserted) |
1032
|
679 |
945 |
if ('(' == file_name[0]) { /* first char is '(' */ |
1033
|
661 |
18 |
if (']' == file_name[file_name_len-1]) { /* last char is ']' */ |
1039
|
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 */ |
1049
|
16 |
2 |
else if (filename_is_eval(file_name, file_name_len)) { |
1063
|
947 |
677 |
if (!found->eval_fid) { |
1065
|
0 |
947 |
if (tag) { |
1070
|
0 |
0 |
if (trace_level >= 1) |
1080
|
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 ")) { |
1091
|
32 |
1592 |
if (found->fid_flags & NYTP_FIDf_IS_AUTOSPLIT |
1092
|
32 |
0 |
&& (parent_entry = find_autosplit_parent(aTHX_ file_name)) |
1106
|
0 |
32 |
if (trace_level >= 2) |
1107
|
0 |
0 |
logwarn("Use fid %2u (after %2u:%-4u) %x e%u:%u %.*s %s\n", |
1117
|
915 |
677 |
if (!found->eval_fid && |
|
132 |
783 |
if (!found->eval_fid && |
1118
|
16 |
116 |
!(file_name[0] == '-' |
1119
|
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))) && |
1134
|
0 |
516 |
if (!getcwd(file_name_abs, sizeof(file_name_abs))) { |
1148
|
516 |
0 |
if (strNE(file_name_abs, "/")) |
1151
|
0 |
516 |
if (strnEQ(file_name, "./", 2)) { |
1164
|
16 |
1576 |
if (fid_is_pmc(aTHX_ found)) |
1171
|
1356 |
236 |
if ( (src_av = GvAV(gv_fetchfile_flags(found->he.key, found->he.key_len, 0))) ) |
1172
|
1280 |
76 |
if (av_len(src_av) > -1) |
1176
|
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 || |
1177
|
16 |
0 |
(found->he.key[1] == 'e' && found->he.key_len == 2))) |
1183
|
915 |
677 |
if (found->eval_fid |
1184
|
763 |
152 |
|| (found->fid_flags & NYTP_FIDf_IS_EVAL) |
1185
|
376 |
387 |
|| (profile_opts & NYTP_OPTf_SAVESRC) |
1186
|
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)) |
1193
|
0 |
1592 |
if (trace_level >= 2) { |
1197
|
0 |
0 |
logwarn("New fid %2u (after %2u:%-4u) 0x%02x e%u:%u %.*s %s %s\n", |
1213
|
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); |
1221
|
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); |
1278
|
1388076 |
0 |
for (i = startingblock; i >= 0; i--) { |
1282
|
1388076 |
0 |
if (type_bit & cx_type_mask) |
1342
|
0 |
1489841 |
if (!start_op) { |
1343
|
0 |
0 |
if (trace_level >= trace) |
1350
|
1489841 |
0 |
while ( o && (type = (o->op_type) ? o->op_type : (int)o->op_targ) ) { |
|
1489841 |
0 |
while ( o && (type = (o->op_type) ? o->op_type : (int)o->op_targ) ) { |
|
1489841 |
0 |
while ( o && (type = (o->op_type) ? o->op_type : (int)o->op_targ) ) { |
1351
|
581005 |
908836 |
if (type == OP_NEXTSTATE || |
|
506480 |
74525 |
if (type == OP_NEXTSTATE || |
1357
|
0 |
1415316 |
if (trace_level >= trace) |
1358
|
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", |
1363
|
0 |
74525 |
if (trace_level >= trace) |
1364
|
0 |
0 |
logwarn("\tstart_cop_of_context %s op '%s' isn't a cop, giving up\n", |
1380
|
0 |
0 |
if (trace_level >= 3) { |
1408
|
0 |
723259 |
if (trace_level >= 6) |
1415
|
0 |
2111335 |
while (cxix < 0 && top_si->si_type != PERLSI_MAIN) { |
|
0 |
0 |
while (cxix < 0 && top_si->si_type != PERLSI_MAIN) { |
1416
|
0 |
0 |
if (trace_level >= 6) |
1424
|
2111335 |
0 |
if (cxix < 0 || (cxix == 0 && !top_si->si_prev)) { |
|
2470 |
2108865 |
if (cxix < 0 || (cxix == 0 && !top_si->si_prev)) { |
|
2422 |
48 |
if (cxix < 0 || (cxix == 0 && !top_si->si_prev)) { |
1426
|
0 |
2422 |
if (trace_level >= 5) |
1431
|
0 |
2108913 |
if (trace_level >= 5) |
1434
|
720837 |
1388076 |
if (callback(aTHX_ cx, &cx_type_mask)) |
1447
|
1415316 |
0 |
char *a_file = OutCopFILE(a); |
1448
|
1415316 |
0 |
char *b_file = OutCopFILE(b); |
1449
|
813724 |
601592 |
if (a_file == b_file) |
1453
|
0 |
601592 |
if (strEQ(a_file, b_file)) |
1465
|
719253 |
1389660 |
if (CxTYPE(cx) == CXt_SUB) { |
1466
|
719253 |
0 |
if (PL_debstash && CvSTASH(cx->blk_sub.cv) == PL_debstash) |
|
0 |
719253 |
if (PL_debstash && CvSTASH(cx->blk_sub.cv) == PL_debstash) |
1472
|
119245 |
600008 |
if (_cop_in_same_file(near_cop, PL_curcop_nytprof)) { |
1475
|
24970 |
94275 |
if (!last_block_line) |
1479
|
0 |
719253 |
if (trace_level >= 8) { |
1481
|
0 |
0 |
logwarn("\tat %d: block %d sub %d for %s %s\n", |
1484
|
0 |
0 |
if (trace_level >= 99) |
1492
|
0 |
1389660 |
if (trace_level >= 6) |
1496
|
619072 |
770588 |
if (last_block_line) |
1500
|
74525 |
696063 |
if ((near_cop = start_cop_of_context(aTHX_ cx)) == NULL) |
1504
|
1584 |
694479 |
if (!_cop_in_same_file(near_cop, PL_curcop_nytprof)) { |
1506
|
1584 |
0 |
if ('(' == *OutCopFILE(PL_curcop_nytprof)) { |
|
944 |
640 |
if ('(' == *OutCopFILE(PL_curcop_nytprof)) { |
1512
|
0 |
640 |
if (trace_level >= 5) |
1513
|
0 |
0 |
logwarn("at %d: %s in different file (%s, %s)\n", |
|
0 |
0 |
logwarn("at %d: %s in different file (%s, %s)\n", |
1520
|
0 |
694479 |
if (trace_level >= 5) |
1534
|
0 |
555 |
if (!o || o == PL_op) |
|
0 |
0 |
if (!o || o == PL_op) |
1536
|
0 |
0 |
if (o->op_flags & OPf_KIDS) { |
1538
|
0 |
0 |
for (kid = cUNOPo->op_first; kid; kid = OpSIBLING(kid)) { |
|
0 |
0 |
for (kid = cUNOPo->op_first; kid; kid = OpSIBLING(kid)) { |
1542
|
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) |
1546
|
0 |
0 |
if (new_cop) |
1565
|
864442 |
10398 |
if (!is_profiling || !profile_stmts) |
|
77 |
864365 |
if (!is_profiling || !profile_stmts) |
1582
|
863728 |
637 |
if (last_executed_fid) { |
1583
|
723375 |
140353 |
if (profile_blocks) |
1591
|
0 |
863728 |
if (trace_level >= 5) /* previous fid:line and how much time we spent there */ |
1597
|
864301 |
64 |
if (!cop) |
1599
|
555 |
863810 |
if ( (last_executed_line = CopLINE(cop)) == 0 ) { |
1604
|
0 |
555 |
cop = (COP*)closest_cop(aTHX_ cop, OpSIBLING(cop)); |
1605
|
0 |
555 |
if (!cop) |
1608
|
555 |
0 |
if (!last_executed_line) { |
1612
|
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); |
1613
|
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")); |
1616
|
0 |
555 |
if (!is_preamble && op) { |
|
0 |
0 |
if (!is_preamble && op) { |
1618
|
0 |
0 |
logwarn("Unable to determine line number in %s (ssix%d)\n", |
1620
|
0 |
0 |
if (trace_level > 5) |
1627
|
864365 |
0 |
file = OutCopFILE(cop); |
1628
|
637 |
863728 |
if (!last_executed_fid) { /* first time */ |
1629
|
0 |
637 |
if (trace_level >= 1) { |
1630
|
0 |
0 |
logwarn("~ first statement profiled at line %d of %s, pid %ld\n", |
1634
|
3873 |
860492 |
if (file != last_executed_fileptr) { /* cache (hit ratio ~50% e.g. for perlcritic) */ |
1639
|
0 |
864365 |
if (trace_level >= 7) /* show the fid:line we're about to execute */ |
1640
|
0 |
0 |
logwarn("\t@%d:%-4d... %s\n", last_executed_fid, last_executed_line, |
1643
|
723984 |
140381 |
if (profile_blocks) { |
1646
|
723259 |
725 |
if (op) { |
1650
|
3591 |
720393 |
if (!last_block_line) last_block_line = last_executed_line; |
1651
|
603795 |
120189 |
if (!last_sub_line) last_sub_line = last_executed_line; |
1679
|
249095 |
2159 |
if (!is_profiling || !out || !profile_stmts) |
|
249095 |
0 |
if (!is_profiling || !out || !profile_stmts) |
|
0 |
249095 |
if (!is_profiling || !out || !profile_stmts) |
1713
|
198447 |
50648 |
if (last_executed_line == prev_last_executed_line |
1719
|
0 |
249095 |
if (trace_level >= 5) { |
1720
|
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", |
1722
|
0 |
0 |
OP_NAME_safe(prev_op), OP_NAME_safe(op), |
|
0 |
0 |
OP_NAME_safe(prev_op), OP_NAME_safe(op), |
1724
|
0 |
0 |
(op || is_multicall) ? "" : ", LEAVING PERL" |
1738
|
11618 |
0 |
if (!option || !*option) |
|
0 |
11618 |
if (!option || !*option) |
1740
|
11618 |
0 |
if (!value || !*value) |
|
0 |
11618 |
if (!value || !*value) |
1743
|
1297 |
10321 |
if (strEQ(option, "file")) { |
1746
|
0 |
10321 |
else if (strEQ(option, "log")) { |
1748
|
0 |
0 |
if (!fp) { |
1755
|
1281 |
9040 |
else if (strEQ(option, "start")) { |
1756
|
76 |
1205 |
if (strEQ(value,"begin")) profile_start = NYTP_START_BEGIN; |
1757
|
1205 |
0 |
else if (strEQ(value,"init")) profile_start = NYTP_START_INIT; |
1758
|
0 |
0 |
else if (strEQ(value,"end")) profile_start = NYTP_START_END; |
1759
|
0 |
0 |
else if (strEQ(value,"no")) profile_start = NYTP_START_NO; |
1762
|
15 |
9025 |
else if (strEQ(option, "addpid")) { |
1765
|
15 |
0 |
: profile_opts & ~NYTP_OPTf_ADDPID; |
1767
|
0 |
9025 |
else if (strEQ(option, "addtimestamp")) { |
1770
|
0 |
0 |
: profile_opts & ~NYTP_OPTf_ADDTIMESTAMP; |
1772
|
9009 |
16 |
else if (strEQ(option, "optimize") || strEQ(option, "optimise")) { |
|
0 |
9009 |
else if (strEQ(option, "optimize") || strEQ(option, "optimise")) { |
1775
|
16 |
0 |
: profile_opts & ~NYTP_OPTf_OPTIMIZE; |
1777
|
1280 |
7729 |
else if (strEQ(option, "savesrc")) { |
1780
|
696 |
584 |
: profile_opts & ~NYTP_OPTf_SAVESRC; |
1782
|
0 |
7729 |
else if (strEQ(option, "endatexit")) { |
1783
|
0 |
0 |
if (atoi(value)) |
1786
|
0 |
7729 |
else if (strEQ(option, "libcexit")) { |
1787
|
0 |
0 |
if (atoi(value)) |
1797
|
7729 |
56737 |
if (strEQ(option, opt_p->option_name)) { |
1802
|
56737 |
0 |
} while (++opt_p < opt_end); |
1803
|
0 |
7729 |
if (!found) { |
1808
|
0 |
11618 |
if (trace_level) |
1823
|
0 |
705 |
const char *mode = (strnEQ(filename, "/dev/", 4) ? "wb" : "wbx"); |
1833
|
663 |
42 |
if ((profile_opts & (NYTP_OPTf_ADDPID|NYTP_OPTf_ADDTIMESTAMP)) |
1834
|
0 |
663 |
|| out /* already opened so assume we're forking and add the pid */ |
1836
|
0 |
42 |
if (strlen(filename) >= MAXPATHLEN-(20+20)) /* buffer overrun protection */ |
1839
|
0 |
42 |
if ((profile_opts & NYTP_OPTf_ADDPID) || out) |
|
0 |
0 |
if ((profile_opts & NYTP_OPTf_ADDPID) || out) |
1841
|
0 |
42 |
if ( profile_opts & NYTP_OPTf_ADDTIMESTAMP ) |
1851
|
0 |
705 |
if (!out) { |
1854
|
0 |
0 |
if (fopen_errno==EEXIST && !(profile_opts & NYTP_OPTf_ADDPID)) |
|
0 |
0 |
if (fopen_errno==EEXIST && !(profile_opts & NYTP_OPTf_ADDPID)) |
1860
|
0 |
705 |
if (trace_level >= 1) |
1872
|
36 |
675 |
if (!out) |
1886
|
0 |
675 |
if ((result = NYTP_close(out, 0))) |
1890
|
0 |
675 |
if (trace_level >= 1) |
1900
|
865161 |
31 |
if (getpid() == last_pid) |
1904
|
0 |
31 |
if (trace_level >= 1) |
1911
|
31 |
0 |
if (sub_callers_hv) |
1915
|
30 |
1 |
if (open_new_file) { |
1921
|
0 |
30 |
if (result) |
1928
|
4 |
27 |
if (profile_forkdepth == 0) { /* parent doesn't want children profiled */ |
1935
|
27 |
4 |
if (open_new_file) |
2007
|
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")) |
2016
|
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); |
2020
|
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))) { |
2023
|
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)) { |
2027
|
496 |
0 |
(void) hv_store(GvHV(PL_DBsub), SvPV_nolen(fullnamesv), (I32)SvCUR(fullnamesv), DBsv, 0); |
2044
|
0 |
0 |
sprintf(buf, "(seix %d%s%d, ac%u)", |
2057
|
131055 |
0 |
if ((trace_level >= 6 || subr_entry->already_counted>1) |
|
0 |
131055 |
if ((trace_level >= 6 || subr_entry->already_counted>1) |
2059
|
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) |
2061
|
0 |
0 |
logwarn("%2u << %s::%s done %s\n", |
2064
|
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)) |
2065
|
0 |
0 |
? SvPV_nolen(subr_entry->called_subnam_sv) |
2069
|
65570 |
65485 |
if (subr_entry->caller_subnam_sv) { |
2073
|
65570 |
65485 |
if (subr_entry->called_subnam_sv) { |
2077
|
131055 |
0 |
if (subr_entry->prev_subr_entry_ix <= subr_entry_ix) |
2102
|
65570 |
65485 |
if (subr_entry->called_subnam_sv && !SvOK(subr_entry->called_subnam_sv)) { |
|
4 |
65566 |
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)) { |
2103
|
0 |
4 |
if (trace_level) |
2112
|
65489 |
65566 |
if (subr_entry->already_counted) { |
2131
|
0 |
65566 |
if (subr_entry->hide_subr_call_time) { |
2144
|
65566 |
0 |
subr_call_key_len = my_snprintf(subr_call_key, sizeof(subr_call_key), "%s::%s[%u:%d]", |
|
65566 |
0 |
subr_call_key_len = my_snprintf(subr_call_key, sizeof(subr_call_key), "%s::%s[%u:%d]", |
|
0 |
65566 |
subr_call_key_len = my_snprintf(subr_call_key, sizeof(subr_call_key), "%s::%s[%u:%d]", |
2148
|
0 |
65566 |
if (subr_call_key_len >= sizeof(subr_call_key)) |
2157
|
1061778 |
65566 |
while (*p) |
2161
|
65566 |
0 |
if (subr_entry->called_subnam_sv) { |
2164
|
65566 |
0 |
p = SvPV(subr_entry->called_subnam_sv, len); |
2172
|
0 |
65566 |
if (called_subname_pv_end >= called_subname_pv+sizeof(called_subname_pv)) |
2179
|
3139 |
62427 |
if (!SvROK(sv_tmp)) { /* autoviv hash ref - is first call of this called subname from anywhere */ |
2183
|
733 |
2406 |
if (subr_entry->called_is_xs) { |
2189
|
127 |
606 |
if ( ('s' == *subr_entry->called_is_xs) /* "sop" (slowop) */ |
2190
|
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) |
2199
|
685 |
48 |
if (!SvOK(sv)) |
|
685 |
0 |
if (!SvOK(sv)) |
|
685 |
0 |
if (!SvOK(sv)) |
2201
|
0 |
733 |
if (trace_level >= 2) |
2209
|
4853 |
60713 |
if (!SvROK(sv_tmp)) { /* first call from this subname[fid:line] - autoviv array ref */ |
2214
|
4853 |
0 |
if (subr_entry->called_subpkg_pv) { /* note that a sub in this package was called */ |
2216
|
813 |
4040 |
if (SvTYPE(pf_sv) == SVt_NULL) { /* log when first created */ |
2218
|
0 |
813 |
if (trace_level >= 3) |
2229
|
0 |
65566 |
if (trace_level >= 5) { |
2242
|
65534 |
32 |
if (subr_entry->called_cv_depth <= 1) { |
2244
|
65534 |
0 |
sv_setnv(incl_time_sv, SvNV(incl_time_sv)+incl_subr_ticks); |
2250
|
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)); |
2252
|
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)) |
2256
|
65566 |
0 |
sv_setnv(excl_time_sv, SvNV(excl_time_sv)+excl_subr_ticks); |
2258
|
60884 |
4682 |
if (opt_calls && out) { |
|
60845 |
39 |
if (opt_calls && out) { |
2273
|
81805 |
0 |
incr_sub_inclusive_time(aTHX_ subr_entry_ix_ptr(save_ix)); |
2284
|
0 |
109386 |
if (!subname_gv_ptr) |
2294
|
36 |
1440 |
if (!SvROK(sv)) { |
2297
|
0 |
36 |
if (sv == &PL_sv_yes) { /* unfound import, ignore */ |
2300
|
0 |
36 |
if (SvGMAGICAL(sv)) { |
2302
|
0 |
0 |
if (SvROK(sv)) |
2304
|
0 |
0 |
sym = SvPOKp(sv) ? SvPVX(sv) : Nullch; |
2307
|
32 |
4 |
sym = SvPV_nolen(sv); |
2308
|
0 |
36 |
if (!sym) |
2310
|
4 |
32 |
if (PL_op->op_private & HINT_STRICT_REFS) |
2321
|
1440 |
0 |
if (SvTYPE(cv) == SVt_PVCV) |
2331
|
103393 |
0 |
if (!(isGV_with_GP(sv) && (cv = GvCVu((GV*)sv)))) |
|
0 |
103393 |
if (!(isGV_with_GP(sv) && (cv = GvCVu((GV*)sv)))) |
|
0 |
0 |
if (!(isGV_with_GP(sv) && (cv = GvCVu((GV*)sv)))) |
|
103393 |
0 |
if (!(isGV_with_GP(sv) && (cv = GvCVu((GV*)sv)))) |
|
16 |
103377 |
if (!(isGV_with_GP(sv) && (cv = GvCVu((GV*)sv)))) |
2333
|
16 |
103377 |
if (!cv) /* would autoload in this situation */ |
2337
|
109366 |
0 |
if (cv && !*subname_gv_ptr && CvGV(cv) && isGV_with_GP(CvGV(cv))) { |
|
109366 |
0 |
if (cv && !*subname_gv_ptr && CvGV(cv) && isGV_with_GP(CvGV(cv))) { |
|
109366 |
0 |
if (cv && !*subname_gv_ptr && CvGV(cv) && isGV_with_GP(CvGV(cv))) { |
|
109366 |
0 |
if (cv && !*subname_gv_ptr && CvGV(cv) && isGV_with_GP(CvGV(cv))) { |
|
0 |
109366 |
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))) { |
2352
|
1795 |
806 |
if (!si) |
2355
|
148 |
2453 |
if (ix < 0) { |
2357
|
48 |
100 |
if (si->si_type != PERLSI_MAIN) |
2359
|
0 |
100 |
if (trace_level >= 9) |
2367
|
0 |
2453 |
if (trace_level >= 9) |
2372
|
2445 |
8 |
if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) |
|
0 |
2445 |
if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) |
2374
|
546 |
1899 |
else if (CxTYPE(cx) == CXt_EVAL && !CxTRYBLOCK(cx)) |
|
369 |
177 |
else if (CxTYPE(cx) == CXt_EVAL && !CxTRYBLOCK(cx)) |
2376
|
1802 |
274 |
else if (ix == 0 && si->si_type == PERLSI_MAIN) |
|
1687 |
115 |
else if (ix == 0 && si->si_type == PERLSI_MAIN) |
2378
|
274 |
115 |
else if (ix > 0) /* more on this stack? */ |
2382
|
115 |
0 |
if (si->si_type != PERLSI_MAIN) { |
2404
|
0 |
65570 |
if (subr_entry_ix <= prev_subr_entry_ix) { |
2412
|
65570 |
0 |
subr_entry = subr_entry_ix_ptr(subr_entry_ix); |
2416
|
63671 |
1899 |
caller_subr_entry = subr_entry_ix_ptr(prev_subr_entry_ix); |
2418
|
63671 |
1899 |
? caller_subr_entry->subr_prof_depth+1 : 1; |
2429
|
2901 |
62669 |
if (op_type == OP_ENTERSUB || op_type == OP_GOTO) { |
|
168 |
2733 |
if (op_type == OP_ENTERSUB || op_type == OP_GOTO) { |
2432
|
62833 |
4 |
if (called_gv) { |
2433
|
62833 |
0 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
62833 |
0 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
0 |
62833 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
0 |
0 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
62833 |
0 |
char *p = HvNAME(GvSTASH(called_gv)); |
|
0 |
62833 |
char *p = HvNAME(GvSTASH(called_gv)); |
2438
|
0 |
62833 |
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) { |
2440
|
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) { |
2461
|
0 |
2733 |
if (profile_slowops == 1) { /* 1 == put slowops into 1 package */ |
2468
|
362 |
2371 |
if (!slowop_name_cache) |
2471
|
0 |
2733 |
if (!opname) |
2475
|
557 |
2176 |
if(!SvOK(sv)) { |
|
557 |
0 |
if(!SvOK(sv)) { |
|
557 |
0 |
if(!SvOK(sv)) { |
2480
|
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); |
2484
|
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); |
2492
|
0 |
2733 |
if (OP_ACCEPT == op_type) |
2502
|
65570 |
0 |
file = OutCopFILE(prev_cop); |
2505
|
1660 |
63910 |
: get_file_id(aTHX_ file, strlen(file), NYTP_FIDf_VIA_SUB); |
2509
|
168 |
65402 |
if (clone_subr_entry) { |
2519
|
65402 |
0 |
if (profile_findcaller /* user wants us to calculate each time */ |
2520
|
63607 |
1795 |
|| !caller_subr_entry /* we don't have a caller struct */ |
2521
|
63607 |
0 |
|| !caller_subr_entry->called_subpkg_pv /* we don't have caller details */ |
2522
|
63607 |
0 |
|| !caller_subr_entry->called_subnam_sv |
2523
|
0 |
63607 |
|| !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) |
2540
|
1687 |
108 |
if (caller_cv == PL_main_cv) { |
2551
|
100 |
8 |
else if (caller_cv == 0) { |
2562
|
0 |
8 |
if (!egv) |
2565
|
8 |
0 |
if (gv && (stash_hv = GvSTASH(gv))) { |
|
8 |
0 |
if (gv && (stash_hv = GvSTASH(gv))) { |
2566
|
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); |
2570
|
0 |
0 |
logwarn("Can't determine name of calling sub (GV %p, Stash %p, CV flags %d) at %s line %d\n", |
2579
|
0 |
1795 |
found_caller_by = (profile_findcaller) ? "" : "(calculated)"; |
2583
|
0 |
63607 |
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"); |
2601
|
0 |
65570 |
if (trace_level >= 4) { |
2602
|
0 |
0 |
logwarn("%2u >> %s at %u:%d from %s::%s %s %s\n", |
2620
|
4583 |
60987 |
if (opt_calls >= 2 && out) { |
|
4583 |
0 |
if (opt_calls >= 2 && out) { |
2650
|
68858 |
7511 |
OPCODE op_type = (is_slowop || (opcode) PL_op->op_type == OP_GOTO) ? (opcode) PL_op->op_type : OP_ENTERSUB; |
|
264 |
68594 |
OPCODE op_type = (is_slowop || (opcode) PL_op->op_type == OP_GOTO) ? (opcode) PL_op->op_type : OP_ENTERSUB; |
2660
|
76369 |
0 |
if (!profile_subs /* not profiling subs */ |
2662
|
66812 |
9557 |
|| !is_profiling |
2665
|
63879 |
2933 |
|| (op_type==OP_ENTERSUB && (sub_sv == &PL_sv_yes || sub_sv == DB_CHECK_cv || sub_sv == DB_INIT_cv |
|
63857 |
22 |
|| (op_type==OP_ENTERSUB && (sub_sv == &PL_sv_yes || sub_sv == DB_CHECK_cv || sub_sv == DB_INIT_cv |
|
63857 |
0 |
|| (op_type==OP_ENTERSUB && (sub_sv == &PL_sv_yes || sub_sv == DB_CHECK_cv || sub_sv == DB_INIT_cv |
|
63857 |
0 |
|| (op_type==OP_ENTERSUB && (sub_sv == &PL_sv_yes || sub_sv == DB_CHECK_cv || sub_sv == DB_INIT_cv |
2666
|
63263 |
594 |
|| sub_sv == DB_END_cv || sub_sv == DB_fin_cv)) |
|
62669 |
594 |
|| sub_sv == DB_END_cv || sub_sv == DB_fin_cv)) |
2668
|
200 |
65402 |
|| (op_type==OP_GOTO && |
|
168 |
32 |
|| (op_type==OP_GOTO && |
2669
|
168 |
0 |
( !(SvROK(sub_sv) && SvTYPE(SvRV(sub_sv)) == SVt_PVCV) |
2670
|
0 |
168 |
|| subr_entry_ix == -1) /* goto out of sub whose entry wasn't profiled */ |
2679
|
76 |
65494 |
if (!profile_stmts) { |
2684
|
0 |
65570 |
if (trace_level >= 99) { |
2699
|
65402 |
168 |
if (op_type != OP_GOTO) { |
2742
|
168 |
0 |
subr_entry_t *src = subr_entry_ix_ptr(subr_entry_ix); |
2769
|
65517 |
0 |
subr_entry = subr_entry_ix_ptr(this_subr_entry_ix); |
2772
|
0 |
65517 |
assert(subr_entry); |
2773
|
0 |
65517 |
assert(subr_entry->caller_fid < fidhash.next_id); |
2779
|
32 |
65485 |
if (subr_entry->already_counted) { |
2780
|
0 |
32 |
if (trace_level >= 9) |
2781
|
0 |
0 |
logwarn("%2u -- %s::%s already counted %s\n", |
2784
|
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)) |
2785
|
0 |
0 |
? SvPV_nolen(subr_entry->called_subnam_sv) |
2788
|
0 |
32 |
assert(subr_entry->already_counted < 3); |
2792
|
62800 |
2685 |
if (is_slowop) { |
2799
|
168 |
62632 |
if (op_type == OP_GOTO) { |
2801
|
16 |
152 |
is_xs = (CvISXSUB(called_cv)) ? "xsub" : NULL; |
2804
|
16083 |
46549 |
if (op != next_op) { /* have entered a sub */ |
2815
|
0 |
46549 |
if (!called_cv && gv) { /* XXX no test case for this */ |
|
0 |
0 |
if (!called_cv && gv) { /* XXX no test case for this */ |
2816
|
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)); |
2818
|
0 |
0 |
if (trace_level >= 0) |
2819
|
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", |
2826
|
62800 |
0 |
if (called_cv && CvGV(called_cv)) { |
|
62800 |
0 |
if (called_cv && CvGV(called_cv)) { |
2829
|
62800 |
0 |
if (SvTYPE(gv) == SVt_PVGV && GvSTASH(gv)) { |
|
62800 |
0 |
if (SvTYPE(gv) == SVt_PVGV && GvSTASH(gv)) { |
2833
|
62800 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
62800 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
0 |
62800 |
stash_name = HvNAME(GvSTASH(gv)); |
|
0 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
62800 |
0 |
stash_name = HvNAME(GvSTASH(gv)); |
|
0 |
62800 |
stash_name = HvNAME(GvSTASH(gv)); |
2836
|
0 |
0 |
else if (trace_level >= 1) { |
2837
|
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", |
2840
|
0 |
0 |
if (trace_level >= 2) { |
2848
|
0 |
62800 |
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)) { |
2849
|
0 |
0 |
const char *what = (is_xs) ? is_xs : "sub"; |
2851
|
0 |
0 |
if (!called_cv) { /* should never get here as pp_entersub would have croaked */ |
2852
|
0 |
0 |
logwarn("unknown entersub %s '%s' (please report this as a bug)\n", what, SvPV_nolen(sub_sv)); |
2853
|
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); |
2854
|
0 |
0 |
sv_setpvf(subr_entry->called_subnam_sv, "__UNKNOWN__[%s,%s])", what, SvPV_nolen(sub_sv)); |
2857
|
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)); |
2859
|
0 |
0 |
if (trace_level) |
2860
|
0 |
0 |
logwarn("unknown entersub %s assumed to be anon called_cv '%s'\n", |
2863
|
0 |
0 |
if (trace_level >= 9) |
2868
|
530 |
62270 |
if (*SvPVX(subr_entry->called_subnam_sv) == 'B') |
2872
|
62800 |
0 |
subr_entry->called_cv_depth = (called_cv) ? CvDEPTH(called_cv)+(is_xs?1:0) : 0; |
2878
|
49250 |
16235 |
if (subr_entry->called_is_xs |
2879
|
46260 |
2990 |
&& subr_entry->called_subpkg_pv[0] == 'D' |
2880
|
96 |
46164 |
&& subr_entry->called_subpkg_pv[1] == 'B' |
2881
|
96 |
0 |
&& subr_entry->called_subpkg_pv[2] == '\0' |
2884
|
96 |
0 |
char *p = SvPV(subr_entry->called_subnam_sv, len); |
2886
|
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"))) { |
2892
|
0 |
65485 |
if (!profile_subs) |
2895
|
0 |
65485 |
if (trace_level >= 4) { |
2896
|
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", |
2900
|
0 |
0 |
subr_entry->called_subnam_sv ? SvPV_nolen(subr_entry->called_subnam_sv) : "(null)", |
2902
|
0 |
0 |
subr_entry->caller_subnam_sv ? SvPV_nolen(subr_entry->caller_subnam_sv) : "(null)", |
2911
|
49250 |
16235 |
if (subr_entry->called_is_xs) { |
2960
|
0 |
24 |
if (PL_op->op_type == OP_EXEC) |
2979
|
0 |
694 |
if (profile_usecputime) { |
2984
|
0 |
694 |
if (trace_level) |
2985
|
0 |
0 |
logwarn("~ enable_profile (previously %s) to %s\n", |
|
0 |
0 |
logwarn("~ enable_profile (previously %s) to %s\n", |
2987
|
0 |
0 |
(file && *file) ? file : PROF_output_file); |
2991
|
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)) { |
2997
|
678 |
16 |
if (!out) { |
3003
|
338 |
356 |
if (opt_use_db_sub) /* set PL_DBsingle if required */ |
3024
|
694 |
37 |
if (is_profiling) { |
3025
|
338 |
356 |
if (opt_use_db_sub) |
3027
|
691 |
3 |
if (out) |
3031
|
0 |
731 |
if (trace_level) |
3032
|
0 |
0 |
logwarn("~ disable_profile (previously %s, pid %d, trace %" IVdf ")\n", |
3051
|
0 |
679 |
if (trace_level >= 1) |
3056
|
341 |
338 |
if (!profile_leave || opt_use_db_sub) |
|
161 |
180 |
if (!profile_leave || opt_use_db_sub) |
3063
|
0 |
679 |
if (trace_level >= 2) { |
3069
|
0 |
679 |
if (HvKEYS(sub_callers_hv)) { |
|
613 |
66 |
if (HvKEYS(sub_callers_hv)) { |
3095
|
630 |
0 |
if (profile_clock == -1) { /* auto select */ |
3103
|
0 |
630 |
if (clock_gettime(profile_clock, &start_time) != 0) { |
3104
|
0 |
0 |
if (trace_level) |
3109
|
0 |
0 |
if (clock_gettime(profile_clock, &start_time) != 0) |
3168
|
306 |
324 |
if (opt_use_db_sub) { |
3173
|
630 |
0 |
if (profile_opts & NYTP_OPTf_OPTIMIZE) |
3177
|
322 |
308 |
if (profile_opts & NYTP_OPTf_SAVESRC) { |
3182
|
0 |
630 |
if (!opt_nameevals) |
3184
|
0 |
630 |
if (!opt_nameanonsubs) |
3187
|
0 |
630 |
if (opt_perldb) /* force a PL_perldb value - for testing only, not documented */ |
3192
|
0 |
630 |
if (trace_level) |
3197
|
0 |
630 |
if (get_hv("DB::sub", 0) == NULL) { |
3218
|
610 |
20 |
if (profile_stmts && !opt_use_db_sub) { |
|
314 |
296 |
if (profile_stmts && !opt_use_db_sub) { |
3224
|
166 |
148 |
if (profile_leave) { |
3244
|
610 |
20 |
if (profile_slowops) { |
3252
|
630 |
0 |
if (!sub_callers_hv) |
3254
|
630 |
0 |
if (!pkg_fids_hv) |
3259
|
628 |
2 |
if (!PL_checkav) PL_checkav = newAV(); |
3260
|
628 |
2 |
if (!PL_initav) PL_initav = newAV(); |
3261
|
628 |
2 |
if (!PL_endav) PL_endav = newAV(); |
3268
|
93 |
537 |
if (profile_start == NYTP_START_BEGIN) { |
3274
|
0 |
630 |
if (PL_minus_c) { |
3283
|
0 |
630 |
if (trace_level >= 1) |
3299
|
0 |
4036584 |
unsigned int fid = (eval_line_num) ? eval_file_num : file_num; |
3302
|
6762 |
4029822 |
if (!SvROK(line_time_rvav)) /* autoviv */ |
3315
|
25706 |
4010878 |
if (!SvROK(time_rvav)) { /* autoviv */ |
3321
|
0 |
25706 |
if (embed_fid_line) { /* used to optimize reporting */ |
3330
|
4010878 |
0 |
sv_setnv(time_sv, time + SvNV(time_sv)); |
3331
|
3033068 |
977810 |
if (count) { |
3333
|
3033068 |
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)); |
3352
|
36393 |
0 |
char *colon = rninstr(sub_name, sub_name+(len > 0 ? len : -len), delim, delim+2); |
3353
|
36393 |
0 |
if (!colon || colon == sub_name) |
|
0 |
36393 |
if (!colon || colon == sub_name) |
3373
|
0 |
36393 |
if (!pkg_len) |
3376
|
29641 |
6752 |
if (!svp) |
3385
|
36055 |
0 |
char *filename = SvPV_nolen(sv); |
3390
|
36055 |
0 |
if (first && filename_len_p) |
|
35559 |
496 |
if (first && filename_len_p) |
3393
|
0 |
36055 |
if (!first++) /* start of first number, if colon was found */ |
3395
|
0 |
36055 |
if ('-' == *first) { /* first number is negative */ |
3401
|
36055 |
0 |
if (!last || !grok_number(first, last-first, first_line_p)) |
|
0 |
36055 |
if (!last || !grok_number(first, last-first, first_line_p)) |
3403
|
0 |
36055 |
if (first_is_neg) { |
3409
|
0 |
36055 |
if ('-' == *++last) { /* skip past dash, is next char a minus? */ |
3414
|
35559 |
496 |
if (last_line_p) |
3430
|
0 |
675 |
if (trace_level >= 1) |
3439
|
35013 |
675 |
while (NULL != (file_lines_sv = hv_iternextsv(hv, &sub_name, &sub_name_len))) { |
3441
|
35013 |
0 |
char *filename = SvPV(file_lines_sv, file_lines_len); |
3460
|
34228 |
785 |
if (file_lines_len > 4 |
3461
|
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' |
3462
|
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') |
3466
|
35013 |
0 |
filename_len = (first) ? first - filename : 0; |
3471
|
29553 |
5460 |
if (!pkg_filename_sv) /* we don't know package */ |
3475
|
1010 |
4450 |
if (SvOK(pkg_filename_sv)) { |
|
1010 |
0 |
if (SvOK(pkg_filename_sv)) { |
|
0 |
1010 |
if (SvOK(pkg_filename_sv)) { |
3477
|
4450 |
0 |
char *cached_filename = SvPV(pkg_filename_sv, cached_len); |
3483
|
3933 |
517 |
if (filename_len > 0 |
3484
|
93 |
3840 |
&& filename_is_eval(cached_filename, cached_len) |
3485
|
52 |
41 |
&& !filename_is_eval(filename, filename_len) |
3487
|
0 |
52 |
if (trace_level >= 3) |
3497
|
0 |
4398 |
if (trace_level >= 3 |
3498
|
0 |
0 |
&& strnNE(SvPV_nolen(pkg_filename_sv), filename, filename_len) |
|
0 |
0 |
&& strnNE(SvPV_nolen(pkg_filename_sv), filename, filename_len) |
3499
|
0 |
0 |
&& !filename_is_eval(filename, filename_len) |
3502
|
0 |
0 |
logwarn("Package '%.*s' (of sub %.*s) not associated with '%.*s' because already associated with '%s'\n", |
3513
|
268 |
742 |
if (!filename_len) { |
3514
|
0 |
268 |
if (trace_level >= 3) |
3526
|
0 |
742 |
if (trace_level >= 3) |
3531
|
594 |
81 |
if (main_runtime_used) { /* Create fake entry for main::RUNTIME sub */ |
3538
|
88 |
506 |
if (!pkg_filename_sv) { /* no subs in main, so guess */ |
3541
|
1 |
505 |
else if (SvOK(pkg_filename_sv)) { |
|
1 |
0 |
else if (SvOK(pkg_filename_sv)) { |
|
0 |
1 |
else if (SvOK(pkg_filename_sv)) { |
3550
|
0 |
675 |
if (trace_level >= 1) |
3551
|
0 |
0 |
logwarn("~ writing sub line ranges of %ld subs\n", (long)HvKEYS(hv)); |
3557
|
35559 |
675 |
while (NULL != (file_lines_sv = hv_iternextsv(hv, &sub_name, &sub_name_len))) { |
3559
|
35559 |
0 |
char *filename = SvPV_nolen(file_lines_sv); |
3563
|
0 |
35559 |
if (!parse_DBsub_value(aTHX_ file_lines_sv, &filename_len, &first_line, &last_line, sub_name)) { |
3568
|
786 |
34773 |
if (!filename_len) { /* no filename, so presumably a fake entry for xsub */ |
3571
|
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)) { |
3572
|
657 |
0 |
filename = SvPV(pkg_filename_sv, filename_len); |
3573
|
0 |
657 |
if (trace_level >= 2) |
3580
|
29514 |
6045 |
if (!fid) { |
3581
|
0 |
29514 |
if (trace_level >= 4) |
3587
|
0 |
6045 |
if (trace_level >= 2) |
3605
|
0 |
675 |
if (!sub_callers_hv) |
3607
|
0 |
675 |
if (trace_level >= 1) |
3608
|
0 |
0 |
logwarn("~ writing sub callers for %ld subs\n", (long)HvKEYS(sub_callers_hv)); |
3611
|
3116 |
675 |
while (NULL != (fid_line_rvhv = hv_iternextsv(sub_callers_hv, &called_subname, &called_subname_len))) { |
3617
|
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) { |
3631
|
5547 |
3116 |
while (NULL != (sv = hv_iternextsv(fid_lines_hv, &caller_subname, &caller_subname_len))) { |
3641
|
0 |
5547 |
if (!fid_line_start) { |
3645
|
0 |
5547 |
if (2 != sscanf(fid_line_start+1, "%u:%u", &fid, &line)) { |
3653
|
0 |
5547 |
if (line > 2147483600) { /* ~2**31 */ |
3677
|
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) { |
3679
|
0 |
0 |
if (trace_level) { |
3686
|
0 |
5547 |
if (trace) { |
3687
|
0 |
0 |
if (!fid && !line) { |
|
0 |
0 |
if (!fid && !line) { |
3699
|
0 |
675 |
if (negative_time_calls) { |
3715
|
0 |
675 |
if (trace_level >= 1) |
3718
|
1577 |
675 |
for (e = (fid_hash_entry*)fidhash.first_inserted; e; e = (fid_hash_entry*)e->he.next_inserted) { |
3723
|
246 |
1331 |
if ( !(e->fid_flags & NYTP_FIDf_HAS_SRC) ) { |
3726
|
26 |
220 |
if (src_av && av_len(src_av) > -1) /* sanity check */ |
|
0 |
26 |
if (src_av && av_len(src_av) > -1) /* sanity check */ |
3728
|
246 |
0 |
if (trace_level >= 3 || *hint) |
|
0 |
246 |
if (trace_level >= 3 || *hint) |
3733
|
0 |
1331 |
if (!src_av) { /* sanity check */ |
3741
|
320 |
1011 |
if ( !(e->fid_flags & NYTP_FIDf_SAVE_SRC) ) { |
3747
|
0 |
1011 |
if (trace_level >= 3) |
3750
|
28177 |
1011 |
for (line = 1; line <= lines; ++line) { /* lines start at 1 */ |
3753
|
27401 |
776 |
const char *src = (svp) ? SvPV(*svp, len) : ""; |
|
27401 |
0 |
const char *src = (svp) ? SvPV(*svp, len) : ""; |
3757
|
0 |
28177 |
if (trace_level >= 8) { |
3758
|
0 |
0 |
logwarn("fid %d src line %d: %s%s", e->he.id, line, src, |
3759
|
0 |
0 |
(len && src[len-1]=='\n') ? "" : "\n"); |
3765
|
0 |
675 |
if (trace_level >= 2) |
3775
|
23708 |
0 |
char *start = SvPV(sv, len); |
3849
|
7972 |
7788 |
if (!SvROK(sv)) { /* autoviv */ |
3874
|
0 |
16898 |
if (trace_level >= 1) |
3875
|
0 |
0 |
logwarn(": %.*s = '%s'\n", (int) text_len, text, SvPV_nolen(value_sv)); |
3961
|
0 |
326178 |
if (trace_level >= 8) |
3964
|
0 |
326178 |
if (state->statement_discount) |
3988
|
1345528 |
0 |
ticks = va_arg(args, I32); |
3989
|
1345528 |
0 |
file_num = va_arg(args, unsigned int); |
3990
|
1345528 |
0 |
line_num = va_arg(args, unsigned int); |
3995
|
0 |
1345528 |
if (!SvROK(fid_info_rvav)) { /* should never happen */ |
3996
|
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 */ |
4002
|
0 |
1345528 |
if (trace_level >= 8) { |
4004
|
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)) |
4005
|
0 |
0 |
new_file_name = SvPV_nolen(*av_fetch((AV *)SvRV(fid_info_rvav), NYTP_FIDi_FILENAME, 1)); |
4015
|
1345528 |
0 |
if (tag == nytp_time_block) { |
4016
|
1345528 |
0 |
unsigned int block_line_num = va_arg(args, unsigned int); |
4017
|
0 |
1345528 |
unsigned int sub_line_num = va_arg(args, unsigned int); |
4019
|
966 |
1344562 |
if (!state->fid_block_time_av) |
4026
|
966 |
1344562 |
if (!state->fid_sub_time_av) |
4033
|
0 |
1345528 |
if (trace_level >= 8) |
4065
|
2422 |
0 |
file_num = va_arg(args, unsigned int); |
4066
|
2422 |
0 |
eval_file_num = va_arg(args, unsigned int); |
4067
|
2422 |
0 |
eval_line_num = va_arg(args, unsigned int); |
4068
|
2422 |
0 |
fid_flags = va_arg(args, unsigned int); |
4069
|
0 |
2422 |
file_size = va_arg(args, unsigned int); |
4070
|
0 |
2422 |
file_mtime = va_arg(args, unsigned int); |
4071
|
0 |
2422 |
filename_sv = va_arg(args, SV *); |
4075
|
0 |
2422 |
if (trace_level >= 2) { |
4078
|
0 |
0 |
if (eval_file_num || eval_line_num) |
|
0 |
0 |
if (eval_file_num || eval_line_num) |
4083
|
0 |
0 |
logwarn("Fid %2u is %s%s 0x%x(%s)\n", |
4095
|
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 */ |
4098
|
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, |
4104
|
1112 |
1310 |
if (eval_file_num) { |
4108
|
0 |
1112 |
if (!SvROK(eval_fi)) { /* should never happen */ |
4110
|
0 |
0 |
logwarn("Eval '%s' (fid %d, flags:%s) has unknown invoking fid %d\n", |
4122
|
576 |
536 |
if (!SvROK(has_evals)) /* autoviv */ |
4130
|
1112 |
1310 |
av_store(av, NYTP_FIDi_EVAL_FID, (eval_file_num) ? newSVuv(eval_file_num) : &PL_sv_no); |
4131
|
1112 |
1310 |
av_store(av, NYTP_FIDi_EVAL_LINE, (eval_file_num) ? newSVuv(eval_line_num) : &PL_sv_no); |
4155
|
32560 |
0 |
file_num = va_arg(args, unsigned int); |
4156
|
32560 |
0 |
line_num = va_arg(args, unsigned int); |
4157
|
32560 |
0 |
src = va_arg(args, SV *); |
4162
|
1266 |
31294 |
if (!av_exists(state->fid_srclines_av, file_num)) { |
4172
|
0 |
32560 |
if (trace_level >= 8) { |
4173
|
0 |
0 |
logwarn("Fid %2u:%u src: %s\n", file_num, line_num, SvPV_nolen(src)); |
4195
|
7812 |
0 |
fid = va_arg(args, unsigned int); |
4196
|
7812 |
0 |
first_line = va_arg(args, unsigned int); |
4197
|
7812 |
0 |
last_line = va_arg(args, unsigned int); |
4198
|
7812 |
0 |
subname_sv = va_arg(args, SV *); |
4204
|
7812 |
0 |
subname_pv = SvPV(subname_sv, subname_len); |
4205
|
0 |
7812 |
if (trace_level >= 2) |
4210
|
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))) { |
4215
|
0 |
0 |
if (!instr(subname_pv, "__ANON__[(eval")) |
4222
|
0 |
0 |
if (fid > SvUV(*av_fetch(av, NYTP_SIi_FID, 1))) |
|
0 |
0 |
if (fid > SvUV(*av_fetch(av, NYTP_SIi_FID, 1))) |
4230
|
7812 |
0 |
if (!skip_subinfo_store) { |
4264
|
7948 |
0 |
fid = va_arg(args, unsigned int); |
4265
|
7948 |
0 |
line = va_arg(args, unsigned int); |
4266
|
7948 |
0 |
count = va_arg(args, unsigned int); |
4267
|
7948 |
0 |
incl_time = va_arg(args, NV); |
4268
|
7948 |
0 |
excl_time = va_arg(args, NV); |
4269
|
7948 |
0 |
reci_time = va_arg(args, NV); |
4270
|
7948 |
0 |
rec_depth = va_arg(args, unsigned int); |
4271
|
0 |
7948 |
called_subname_sv = va_arg(args, SV *); |
4272
|
0 |
7948 |
caller_subname_sv = va_arg(args, SV *); |
4279
|
0 |
7948 |
if (trace_level >= 6) |
4280
|
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", |
4290
|
4112 |
3836 |
if (!SvROK(sv)) /* autoviv */ |
4295
|
5910 |
2038 |
if (!SvROK(sv)) /* autoviv */ |
4301
|
6838 |
1110 |
if (fid) { |
4307
|
6822 |
16 |
if (!SvROK(sv)) /* autoviv */ |
4309
|
0 |
16 |
else if (trace_level) |
4313
|
0 |
0 |
logwarn("Merging extra sub caller info for %s called at %d:%d\n", |
4318
|
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); |
4320
|
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); |
4322
|
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); |
4328
|
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); |
4330
|
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() */ |
4335
|
6822 |
16 |
if (!SvROK(sv)) /* autoviv */ |
4345
|
6058 |
780 |
if (!SvROK(fi)) /* autoviv */ |
4349
|
0 |
6838 |
AV *av2 = av_make(AvFILL(av)+1, AvARRAY(av)); |
4362
|
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)); |
4364
|
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)); |
4366
|
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)); |
4369
|
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)) |
4372
|
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)); |
4391
|
994 |
0 |
pid = va_arg(args, unsigned int); |
4392
|
994 |
0 |
ppid = va_arg(args, unsigned int); |
4393
|
994 |
0 |
start_time = va_arg(args, NV); |
4401
|
0 |
994 |
if (trace_level) |
4403
|
0 |
0 |
text, ppid, (IV)HvKEYS(state->live_pids_hv), start_time); |
4422
|
994 |
0 |
pid = va_arg(args, unsigned int); |
4423
|
994 |
0 |
end_time = va_arg(args, NV); |
4430
|
0 |
994 |
if (!hv_delete(state->live_pids_hv, text, len, 0)) |
4433
|
0 |
994 |
if (trace_level) |
4435
|
0 |
0 |
(IV)HvKEYS(state->live_pids_hv), state->profiler_end_time); |
4460
|
8946 |
0 |
key = va_arg(args, char *); |
4461
|
8946 |
0 |
key_len = va_arg(args, unsigned long); |
4462
|
8946 |
0 |
key_utf8 = va_arg(args, unsigned int); |
4464
|
8946 |
0 |
value = va_arg(args, char *); |
4465
|
0 |
8946 |
value_len = va_arg(args, unsigned long); |
4466
|
0 |
8946 |
value_utf8 = va_arg(args, unsigned int); |
4470
|
0 |
8946 |
store_attrib_sv(aTHX_ state->attr_hv, key, |
|
0 |
8946 |
store_attrib_sv(aTHX_ state->attr_hv, key, |
4492
|
17892 |
0 |
key = va_arg(args, char *); |
4493
|
17892 |
0 |
key_len = va_arg(args, unsigned long); |
4494
|
17892 |
0 |
key_utf8 = va_arg(args, unsigned int); |
4496
|
17892 |
0 |
value = va_arg(args, char *); |
4497
|
0 |
17892 |
value_len = va_arg(args, unsigned long); |
4498
|
0 |
17892 |
value_utf8 = va_arg(args, unsigned int); |
4502
|
0 |
17892 |
value_sv = newSVpvn_flags(value, value_len, value_utf8 ? SVf_UTF8 : 0); |
4503
|
0 |
17892 |
(void)hv_store(state->option_hv, key, key_utf8 ? -(I32)key_len : key_len, value_sv, 0); |
4504
|
0 |
17892 |
if (trace_level >= 1) |
4505
|
0 |
0 |
logwarn("! %.*s = '%s'\n", (int) key_len, key, SvPV_nolen(value_sv)); |
4550
|
0 |
591275 |
if (!arglist) { |
4551
|
0 |
0 |
if (description) |
4557
|
574667 |
16608 |
if (!state->cb[tag]) |
4560
|
0 |
16608 |
if (trace_level >= 9) { |
4568
|
0 |
16608 |
PUSHMARK(SP); |
4570
|
0 |
16608 |
XPUSHs(state->tag_names[tag]); |
4572
|
47569 |
16608 |
while ((type = *arglist++)) { |
4576
|
7204 |
5 |
unsigned int u = va_arg(args, unsigned int); |
4579
|
0 |
7209 |
XPUSHs(cb_args[i++]); |
4584
|
3 |
0 |
I32 i32 = va_arg(args, I32); |
4587
|
0 |
3 |
XPUSHs(cb_args[i++]); |
4592
|
14335 |
0 |
NV n = va_arg(args, NV); |
4595
|
0 |
14335 |
XPUSHs(cb_args[i++]); |
4600
|
7168 |
2 |
SV *sv = va_arg(args, SV *); |
4603
|
0 |
7170 |
XPUSHs(cb_args[i++]); |
4608
|
3 |
1 |
SV *sv = va_arg(args, SV *); |
4610
|
0 |
4 |
XPUSHs(sv_2mortal(sv)); |
4615
|
18848 |
0 |
char *p = va_arg(args, char *); |
4616
|
9425 |
9423 |
unsigned long len = va_arg(args, unsigned long); |
4617
|
9425 |
9423 |
unsigned int utf8 = va_arg(args, unsigned int); |
4620
|
0 |
18848 |
if (utf8) |
4625
|
0 |
18848 |
XPUSHs(cb_args[i++]); |
4634
|
0 |
16608 |
assert(i <= C_ARRAY_LENGTH(state->cb_args)); |
4711
|
0 |
1343 |
if (!NYTP_gets(in, &buffer, &buffer_len)) |
4713
|
0 |
1343 |
if (2 != sscanf(buffer, "NYTProf %d %d\n", &file_major, &file_minor)) |
4715
|
0 |
1343 |
if (file_major != NYTP_FILE_MAJOR_VERSION) |
4719
|
0 |
1343 |
if (file_minor > NYTP_FILE_MINOR_VERSION) |
4724
|
349 |
994 |
if (callbacks[nytp_version]) |
4732
|
1343 |
2371952 |
if (NYTP_read_unchecked(in, &c, sizeof(c)) != sizeof(c)) { |
4733
|
1343 |
0 |
if (NYTP_eof(in)) |
4740
|
0 |
2371952 |
if (trace_level >= 9) |
4762
|
1812610 |
0 |
if (c == NYTP_TAG_TIME_BLOCK) { |
4810
|
2389 |
6858 |
if (callbacks[nytp_sub_entry]) |
4822
|
7165 |
20856 |
if (callbacks[nytp_sub_return]) |
4883
|
0 |
12087 |
if (NULL == end) |
4887
|
0 |
12087 |
if ((NULL == (value = (char *)memchr(buffer, '=', end - buffer)))) { |
4898
|
1343 |
10744 |
if (memEQs(buffer, key_end - buffer, "ticks_per_sec")) { |
|
1343 |
0 |
if (memEQs(buffer, key_end - buffer, "ticks_per_sec")) { |
4901
|
1343 |
9401 |
else if (memEQs(buffer, key_end - buffer, "nv_size")) { |
|
1343 |
0 |
else if (memEQs(buffer, key_end - buffer, "nv_size")) { |
4902
|
0 |
1343 |
if (sizeof(NV) != atoi(value)) |
4914
|
0 |
24174 |
if (NULL == end) |
4918
|
0 |
24174 |
if ((NULL == (value = (char *)memchr(buffer, '=', end - buffer)))) { |
4934
|
0 |
2098 |
if (!end) |
4938
|
582 |
1516 |
if (callbacks[nytp_comment]) |
4942
|
0 |
2098 |
if (trace_level >= 1) |
4950
|
233 |
522 |
if (callbacks[nytp_start_deflate]) { |
5004
|
0 |
994 |
if (HvKEYS(state.live_pids_hv)) { |
|
0 |
994 |
if (HvKEYS(state.live_pids_hv)) { |
5006
|
0 |
0 |
(IV)HvKEYS(state.live_pids_hv), |
5018
|
212 |
782 |
if (state.statement_discount) /* discard unused statement_discount */ |
5032
|
994 |
0 |
if (state.profiler_end_time |
5033
|
0 |
994 |
&& state.total_stmts_duration > state.profiler_duration * 1.1 |
5054
|
0 |
994 |
if (show_summary_stats) |
5075
|
966 |
28 |
if (state.fid_block_time_av) { |
5080
|
966 |
28 |
if (state.fid_sub_time_av) { |
5100
|
348 |
1 |
if (SvTYPE(cb) == SVt_PVHV) { |
5107
|
0 |
348 |
if (svp) { |
5108
|
0 |
0 |
if (!SvROK(*svp) && SvTYPE(SvRV(*svp)) != SVt_PVCV) |
|
0 |
0 |
if (!SvROK(*svp) && SvTYPE(SvRV(*svp)) != SVt_PVCV) |
5112
|
1 |
0 |
} else if (SvTYPE(cb) == SVt_PVCV) { |
5126
|
6282 |
349 |
while (--i) { |
5127
|
5584 |
698 |
if (callback_info[i].args) { |
5137
|
6264 |
18 |
if (cb_hv) { |
5141
|
1044 |
5220 |
if (svp) { |
5142
|
0 |
1044 |
if (!SvROK(*svp) && SvTYPE(SvRV(*svp)) != SVt_PVCV) |
|
0 |
0 |
if (!SvROK(*svp) && SvTYPE(SvRV(*svp)) != SVt_PVCV) |
5151
|
3839 |
349 |
for (i = 0; i < C_ARRAY_LENGTH(state.cb_args); i++) |
5235
|
60660 |
1348 |
} while (++constant < end); |
5247
|
0 |
32435 |
XSRETURN_IV(trace_level); |
5258
|
46097 |
17 |
if (!action) |
5259
|
0 |
46097 |
XSRETURN(0); |
5260
|
16 |
1 |
if (SvROK(action) && SvTYPE(SvRV(action))==SVt_PVCV) { |
|
16 |
0 |
if (SvROK(action) && SvTYPE(SvRV(action))==SVt_PVCV) { |
5262
|
0 |
16 |
PUSHMARK(SP); |
5265
|
1 |
0 |
else if (strEQ(SvPV_nolen(action),"eval")) |
|
0 |
1 |
else if (strEQ(SvPV_nolen(action),"eval")) |
5266
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
|
0 |
0 |
eval_pv(SvPV_nolen(arg), TRUE); |
5267
|
1 |
0 |
else if (strEQ(SvPV_nolen(action),"die")) |
|
1 |
0 |
else if (strEQ(SvPV_nolen(action),"die")) |
5269
|
0 |
0 |
logwarn("example_xsub: unknown action '%s'\n", SvPV_nolen(action)); |
5281
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
|
0 |
0 |
eval_pv("Devel::NYTProf::Test::example_xsub()", 1); |
5301
|
0 |
0 |
if (!last_pid) |
5310
|
0 |
0 |
EXTEND(SP, 4); |
5326
|
260480 |
0 |
if (opt_use_db_sub) |
5348
|
64 |
0 |
if (!RETVAL) { |
5371
|
537 |
0 |
if (profile_start == NYTP_START_INIT) { |
5374
|
0 |
0 |
else if (profile_start == NYTP_START_END) { |
5376
|
0 |
0 |
if (trace_level >= 1) |
5378
|
0 |
0 |
if (!PL_endav) |
5384
|
0 |
537 |
if (trace_level >= 1) |
5400
|
0 |
630 |
if (!PL_checkav) PL_checkav = newAV(); |
5401
|
0 |
630 |
if (!PL_endav) PL_endav = newAV(); |
5402
|
0 |
630 |
av_push((ix == 1 ? PL_checkav : PL_endav), SvREFCNT_inc(finish_profile_cv)); |
5407
|
0 |
630 |
if (trace_level >= 1) |
5408
|
0 |
0 |
logwarn("~ %s done\n", ix == 1 ? "CHECK" : "END"); |
5424
|
0 |
1343 |
if (trace_level) |
5427
|
0 |
1343 |
if (in == NULL) { |
5430
|
1343 |
0 |
if (cb && SvROK(cb)) { |
|
349 |
994 |
if (cb && SvROK(cb)) { |
5438
|
0 |
1343 |
if ((result = NYTP_close(in, 0))) |