Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patches 2/2] fix PERL_TRACE_OPS for threads, tweak for usability. #14299

Open
p5pRT opened this issue Dec 3, 2014 · 6 comments
Open

[patches 2/2] fix PERL_TRACE_OPS for threads, tweak for usability. #14299

p5pRT opened this issue Dec 3, 2014 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 3, 2014

Migrated from rt.perl.org#123359 (status was 'open')

Searchable as RT123359$

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2014

From @jimc

1st adds Zero to perl-clone-using,

2nd does various tweaks to make it pass tests, be more usable.
- print only when -D.. given on cmd-line
- print only non-zero (good for -e tests)

I thought about adding

#ifdef PERL_TRACE_OPS && !defined(DEBUGGING)
#error "PERL_TRACE_OPS needs DEBUGGING too"
#endif

to dissuade casual builds slightly.

@p5pRT
Copy link
Author

p5pRT commented Dec 3, 2014

From @jimc

traceops-patch

@p5pRT
Copy link
Author

p5pRT commented Dec 4, 2014

From @jimc

sorry, I could have explained better.

1st adds Zero to perl-clone-using,

ie

diff --git a/sv.c b/sv.c

index 04b8fa8..6eb68e8 100644

--- a/sv.c

+++ b/sv.c

@​@​ -15010,6 +15010,10 @​@​ perl_clone_using(PerlInterpreter *proto_perl, UV
flags,

}

}

+#ifdef PERL_TRACE_OPS

+ Zero(PL_op_exec_cnt, OP_max+2, UV);

+#endif

+

without it, each sub-thread in a threaded -DPERL_TRACE_OPS build

will print the same big number (99%), which prints as "abababab" in %x,

an obvious poison value in the interpreter struct

sure, who in their right mind would build such a thing, but ...

2nd does various tweaks to make it pass tests, be more usable.
- print only when -D.. given on cmd-line

- print only non-zero (good for -e tests)

ie perl_destruct prints op-counts only when enabled with -Dv or such,
and only those actually used, which makes perl -Dv -e 1 print a
short/readable list.

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2014

From @tonycoz

On Wed Dec 03 11​:47​:09 2014, yoduh wrote​:

1st adds Zero to perl-clone-using,

2nd does various tweaks to make it pass tests, be more usable.
- print only when -D.. given on cmd-line
- print only non-zero (good for -e tests)

I thought about adding

#ifdef PERL_TRACE_OPS && !defined(DEBUGGING)
#error "PERL_TRACE_OPS needs DEBUGGING too"
#endif

to dissuade casual builds slightly.

I'm not sure I'd want to apply your change without that, or some other way of enabling the trace dump, such an environment variable.

Tony

@p5pRT
Copy link
Author

p5pRT commented Dec 10, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented May 10, 2016

From @jimc

123359 [patches 2/2] fix PERL_TRACE_OPS for threads, tweak for
usability. open perl5 Nobody 0

this ticket is superceded / obsoleted by [perl #127880]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants