|
| 1 | +# Generating dummy probes |
| 2 | + |
| 3 | +If Postgres isn't configured with dtrace enabled, we need to generate |
<
8000
tr class="diff-line-row">
| 4 | +dummy probes for the entries in probes.d, that do nothing. |
| 5 | + |
| 6 | +This is accomplished in Unix via the sed script `Gen_dummy_probes.sed`. We |
| 7 | +used to use this in MSVC builds using the perl utility `psed`, which mimicked |
| 8 | +sed. However, that utility disappeared from Windows perl distributions and so |
| 9 | +we converted the sed script to a perl script to be used in MSVC builds. |
| 10 | + |
| 11 | +We still keep the sed script as the authoritative source for generating |
| 12 | +these dummy probes because except on Windows perl is not a hard requirement |
| 13 | +when building from a tarball. |
| 14 | + |
| 15 | +So, if you need to change the way dummy probes are generated, first change |
| 16 | +the sed script, and when it's working generate the perl script. This can |
| 17 | +be accomplished by using the perl utility s2p. |
| 18 | + |
| 19 | +s2p is no longer part of the perl core, so it might not be on your system, |
| 20 | +but it is available on CPAN and also in many package systems. e.g. |
| 21 | +on Fedora it can be installed using `cpan App::s2p` or |
| 22 | +`dnf install perl-App-s2p`. |
| 23 | + |
| 24 | +The Makefile contains a recipe for regenerating Gen_dummy_probes.pl, so all |
| 25 | +you need to do is once you have s2p installed is `make Gen_dummy_probes.pl` |
0 commit comments