Devel::DTrace::Probe - a live DTrace probe
use Devel::DTrace::Provider; my $provider = Devel::DTrace::Provider->new('provider1', 'perl'); $provider->probe('probe1', 'string'); my $probes = $provider->enable; if ($probes->{probe1}->is_enabled()) { $probes->{probe1}->fire('foo'); }
This is the actual probe object, providing methods to call the 'is_enabled' tracepoint function, and the actual 'fire' tracepoint function.
Returns a true value if the probe is currently enabled by DTrace. You can use this to determine whether to spend time gathering arguments for the probe.
Fires the probe. Expects to be called with as many arguments of the appropriate type as were declared for the probe.
To install Devel::DTrace::Provider, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::DTrace::Provider
CPAN shell
perl -MCPAN -e shell install Devel::DTrace::Provider
For more information on module installation, please visit the detailed CPAN module installation guide.