[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, zos-debug, updated. gawk-4.1.0-4262-gfe9854f
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, zos-debug, updated. gawk-4.1.0-4262-gfe9854f |
Date: |
Thu, 3 Jun 2021 07:41:25 -0400 (EDT) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, zos-debug has been updated
via fe9854f84bfd739a40c0dcdfefef9a38174e4bd4 (commit)
from 0ec90df0341da36d7c9986d5c8646d9422fe3550 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=fe9854f84bfd739a40c0dcdfefef9a38174e4bd4
commit fe9854f84bfd739a40c0dcdfefef9a38174e4bd4
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Thu Jun 3 14:40:58 2021 +0300
More prints.
diff --git a/awk.h b/awk.h
index 43c044c..9f878b2 100644
--- a/awk.h
+++ b/awk.h
@@ -1265,13 +1265,14 @@ extern STACK_ITEM *stack_top;
* When in doubt, use dupnode.
*/
-#define UPREF(r) (void) ((r)->valref++)
+#define UPREF(r) (void) ((watched && r == watched ? fprintf(stderr, "++
increment\n") : 0), (r)->valref++)
extern void r_unref(NODE *tmp);
static inline void
DEREF(NODE *r)
{
+ if (watched && r == watched) fprintf(stderr, "--decrement\n");
assert(r->valref > 0);
#ifndef GAWKDEBUG
if (--r->valref > 0)
@@ -1891,6 +1892,7 @@ static inline NODE *
dupnode(NODE *n)
{
if ((n->flags & MALLOC) != 0) {
+ if (watched && n == watched) fprintf(stderr, "++ 2
increment\n");
n->valref++;
return n;
}
@@ -1938,6 +1940,7 @@ force_string_fmt(NODE *s, const char *fmtstr, int fmtidx)
static inline void
unref(NODE *r)
{
+ if (watched && r == watched) fprintf(stderr, "-- 2 increment\n");
assert(r == NULL || r->valref > 0);
if (r != NULL && --r->valref <= 0)
r_unref(r);
diff --git a/profile.c b/profile.c
index 007098b..ac48ceb 100644
--- a/profile.c
+++ b/profile.c
@@ -351,12 +351,11 @@ pprint(INSTRUCTION *startp, INSTRUCTION *endp, int flags)
case Op_push_lhs:
case Op_push_param:
case Op_push_array:
- m = pc->memory;
- fprintf(stderr, "in profile.c, ref_count = %d\n",
pc->memory->valref);
case Op_push:
case Op_push_arg:
case Op_push_arg_untyped:
m = pc->memory;
+ if (watched && m == watched) fprintf(stderr, "in
profile.c, ref_count = %d\n", pc->memory->valref);
switch (m->type) {
case Node_param_list:
pp_push(pc->opcode,
func_params[m->param_cnt].param, DONT_FREE, pc->comment);
-----------------------------------------------------------------------
Summary of changes:
awk.h | 5 ++++-
profile.c | 3 +--
2 files changed, 5 insertions(+), 3 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, zos-debug, updated. gawk-4.1.0-4262-gfe9854f,
Arnold Robbins <=