Browse files

Add redbug/dtrace funs to dtrace header

Rather then force the implementor to repeat these functions in every
module that wants to add dtrace like support to redbug simply
include them in the header file.  As long as this header is included
after all exports there are no problems.
  • Loading branch information...
rzezeski committed May 16, 2012
1 parent 2d33fbf commit 9746045d1e1c0b59ba4ff25f0f0677b876fd5892
Showing with 15 additions and 0 deletions.
  1. +15 −0 include/riak_core_dtrace.hrl
@@ -0,0 +1,15 @@
+%% NOTE: Coordinate ?DTRACE_TAG_KEY with riak_core_dtrace.erl
+%% Erlang tracing-related funnel functions for DTrace/SystemTap. When
+%% using Redbug or other Erlang tracing framework, trace these
+%% functions. Include these here to avoid copy/pasting to every
+%% module.
+dtrace(_BKey, Category, Ints, Strings) ->
+ riak_core_dtrace:dtrace(Category, Ints, Strings).
+%% Internal functions, not so interesting for Erlang tracing.
+dtrace_int(Category, Ints, Strings) ->
+ dtrace(get(?DTRACE_TAG_KEY), Category, Ints, Strings).

0 comments on commit 9746045

Please sign in to comment.