aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--profile.c10
-rw-r--r--test/Makefile.am6
-rw-r--r--test/Makefile.in6
3 files changed, 8 insertions, 14 deletions
diff --git a/profile.c b/profile.c
index 8eb31b24..f1ced7e1 100644
--- a/profile.c
+++ b/profile.c
@@ -176,8 +176,6 @@ pprint(INSTRUCTION *startp, INSTRUCTION *endp, bool in_for_header)
char *str;
NODE *t2;
INSTRUCTION *ip;
- INSTRUCTION *ic;
- INSTRUCTION *i2;
NODE *m;
char *tmp;
int rule;
@@ -198,7 +196,7 @@ pprint(INSTRUCTION *startp, INSTRUCTION *endp, bool in_for_header)
if (ip->opcode == Op_comment){
/* print pre-begin/end comments */
print_comment(ip, 0);
- ip = ip->nexti->nexti;
+ ip = ip->nexti;
}
if (do_profile && ! rule_count[rule]++)
fprintf(prof_fp, _("\t# %s block(s)\n\n"), ruletab[rule]);
@@ -206,8 +204,7 @@ pprint(INSTRUCTION *startp, INSTRUCTION *endp, bool in_for_header)
} else {
if (do_profile && ! rule_count[rule]++)
fprintf(prof_fp, _("\t# Rule(s)\n\n"));
- ic = ip = pc->nexti;
- i2 = (pc + 1)->firsti;
+ ip = pc->nexti;
lind = ip->exec_count;
/*print pre-block comments */
if(ip->opcode == Op_exec_count && ip->nexti->opcode == Op_comment)ip = ip->nexti;
@@ -1533,7 +1530,8 @@ pp_func(INSTRUCTION *pc, void *data ATTRIBUTE_UNUSED)
print_comment(fp, 0);
fp = fp->nexti;
}
- fprintf(prof_fp, "\t");
+ if (!do_profile)
+ fprintf(prof_fp, "\t");
indent(pc->nexti->exec_count);
fprintf(prof_fp, "%s %s(", op2str(Op_K_function), func->vname);
pcount = func->param_cnt;
diff --git a/test/Makefile.am b/test/Makefile.am
index f28b381e..65952acd 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1686,14 +1686,12 @@ profile3:
profile4:
@echo $@
- @$(AWK) --pretty-print=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
- @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
+ @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
profile5:
@echo $@
- @$(AWK) --pretty-print=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
- @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
+ @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
posix2008sub:
diff --git a/test/Makefile.in b/test/Makefile.in
index f3b537f3..71593576 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -2110,14 +2110,12 @@ profile3:
profile4:
@echo $@
- @$(AWK) --pretty-print=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
- @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
+ @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
profile5:
@echo $@
- @$(AWK) --pretty-print=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
- @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
+ @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
posix2008sub: