Open fantasma13 opened 2 years ago
This needs to be in an updated "developer's guide":
To generate a stack-trace to help us debug a problem, please first of all do make realclean
, ensure you have the latest released PDL, then if it is still happening, please follow this process:
perl Makefile.PL
(this will update the timestamps on Makefile
s, prompting a full rebuild)-g
to the OPTIMIZE =
line to generate debug symbols (this gets propagated to subdirs by EUMM’s PASTHRU_*
mechanism)make
gdb perl -ex 'run -Mblib t/tracking.t'
bt
Then please open an issue on whichever repo is relevant (possibly PDL, possibly in this context PDL-OpenCV) with your perl -V
output and PDL version, together with the stack-trace created above. When you do paste such output into a GitHub issue, please surround such blocks with ``` on their own lines. You can check out it will render with the "Preview" button above the issue-editing box.
Techniques to be discussed should include the new PDL_IF_BAD
, and recommend starting any design by thinking about complex values first, together with how to handle badvalues. An example of creative use of badvalues is mentioned in https://perlmonks.org/?node_id=11143676
Also to be discussed: code generation; cf PDL::Slatec, PDL::LinearAlgebra::Complex, and now PDL::OpenCV.
Also in design thinking: broadcasting from the start (and pthreading, where relevant).
To see how PP processes one operation's pp_def
, put before its pp_def
:
$::PP_VERBOSE = 1;
and after:
$::PP_VERBOSE = 0;
Also, for "core" modules, the Makefile
has e.g.. the coretest
target for rapid iteration, which is made up of sub-targets like Basic_Slices_pm_to_blib_dynamic
, for finer-grained rapid iteration.
Additionally, it can be useful to inspect e.g. Basic/Slices/pp-rangeb.c
to see what is actually generated.
Include techniques shown in #457, and the new graphviz stuff as shown in https://sourceforge.net/p/pdl/mailman/message/58730063/
Include techniques of Example/address-pseudonymise
including -x
mode to help spot old vs new behaviour.
The fancy loop()
and OtherPars
stuff in https://www.perlmonks.org/?node_id=11157717 should probably be captured.
The discussion of internals and dataflow in https://github.com/moocow-the-bovine/PDL-CCS/pull/5 should be extracted from.
See #463 for notes on doc-pp
.
This is a good example of good array-programming practice (https://github.com/PDLPorters/pdl/commit/f5ac428664417a15a606fb2a492861a3ce13f8fa), credit to @wlmb and Photonic for the technique including the commenting style.
cachegrind
in particular. #421 discusses other performance/implementation stuff.The recipe to create a stack trace and documentation of $::PP_VERBOSE
will be included in the DeveloperGuide as parts of Pull Request #486.
As discussed with Ed, please add using debugging macros to the documents.