Module riak_core_dtrace

Erlang-triggerable DTrace probe support.

Description

Erlang-triggerable DTrace probe support

In an ideal world, this module would live in a repo that would be easily sharable across multiple Basho projects. The tricky bit for this would be trying to make generic the application:get_env(riak_core, dtrace_support) call that's currently in the riak_kv_dtrace:dtrace/1 function. But we'll wait for another day, I think.

The purpose of this module is to reduce the overhead of DTrace (and SystemTap) probes when those probes are: 1. not supported by the VM, or 2. disabled by application configuration. #1 is the bigger problem: a single call to the code loader can take several milliseconds. #2 is useful in the case that we want to try to reduce the overhead of adding these probes even further by avoiding the NIF call entirely.

SLF's MacBook Pro tests

without cover, with R14B04 + DTrace:

timeit_naive average 2236.306 usec/call over 500.0 calls timeit_mochiglobal average 0.509 usec/call over 225000.0 calls timeit_best OFF (fastest) average 0.051 usec/call over 225000.0 calls timeit_best ON -init average 1.027 usec/call over 225000.0 calls timeit_best ON +init average 0.202 usec/call over 225000.0 calls

with cover, with R14B04 + DTrace:

timeit_naive average 2286.202 usec/call over 500.0 calls timeit_mochiglobal average 1.255 usec/call over 225000.0 calls timeit_best OFF (fastest) average 1.162 usec/call over 225000.0 calls timeit_best ON -init average 2.207 usec/call over 225000.0 calls timeit_best ON +init average 1.303 usec/call over 225000.0 calls

Function Index

dtrace/1
dtrace/3
dtrace/4
dtrace/6
enabled/0
put_tag/1
timeit0/1
timeit_best/1
timeit_mg/1

Function Details

dtrace/1

dtrace(ArgList) -> any()

dtrace/3

dtrace(Int0, Ints, Strings) -> any()

dtrace/4

dtrace(Int0, Ints, String0, Strings) -> any()

dtrace/6

dtrace(Int0, Int1, Ints, String0, String1, Strings) -> any()

enabled/0

enabled() -> any()

put_tag/1

put_tag(Tag) -> any()

timeit0/1

timeit0(ArgList) -> any()

timeit_best/1

timeit_best(ArgList) -> any()

timeit_mg/1

timeit_mg(ArgList) -> any()


Generated by EDoc