Skip to content

Commit 139eb13

Browse files
committed
Remove instrumentation of C code
1 parent b5088cc commit 139eb13

File tree

5 files changed

+0
-125
lines changed

5 files changed

+0
-125
lines changed

c_src/bitcask_nifs.c

-27
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ void DEBUG2(const char *fmt, ...) { }
8080
# define DEBUG_ENTRY(E) {}
8181
#endif
8282

83-
#ifdef PULSE
84-
#include "pulse_c_send.h"
85-
#endif
86-
8783
#ifdef BITCASK_DEBUG
8884
void format_bin(char * buf, size_t buf_size, const unsigned char * bin, size_t bin_size)
8985
{
@@ -378,9 +374,6 @@ static void bitcask_nifs_file_resource_cleanup(ErlNifEnv* env, void* arg);
378374

379375
static ErlNifFunc nif_funcs[] =
380376
{
381-
#ifdef PULSE
382-
{"set_pulse_pid", 1, set_pulse_pid},
383-
#endif
384377
{"keydir_new", 0, bitcask_nifs_keydir_new0},
385378
{"keydir_new", 1, bitcask_nifs_keydir_new1},
386379
{"maybe_keydir_new", 1, bitcask_nifs_maybe_keydir_new1},
@@ -1213,12 +1206,6 @@ static void perhaps_sweep_siblings(bitcask_keydir* keydir)
12131206
return;
12141207
}
12151208

1216-
#ifdef PULSE
1217-
i = 10;
1218-
#else /* PULSE */
1219-
i = 100*1000;
1220-
#endif
1221-
12221209
gettimeofday(&target, NULL);
12231210
target.tv_usec += max_usec;
12241211
if (target.tv_usec > 1000000)
@@ -2728,17 +2715,7 @@ static void msg_pending_awaken(ErlNifEnv* env, bitcask_keydir* keydir,
27282715
for (idx = 0; idx < keydir->pending_awaken_count; idx++)
27292716
{
27302717
enif_clear_env(msg_env);
2731-
#ifdef PULSE
2732-
/* Using PULSE_SEND here sometimes deadlocks the Bitcask PULSE test.
2733-
Reverting to using enif_send for now.
2734-
TODO: Check if PULSE_SEND is really necessary and investigate/fix
2735-
deadlock in the future
2736-
*/
2737-
/* PULSE_SEND(env, &keydir->pending_awaken[idx], msg_env, msg); */
27382718
enif_send(env, &keydir->pending_awaken[idx], msg_env, msg);
2739-
#else
2740-
enif_send(env, &keydir->pending_awaken[idx], msg_env, msg);
2741-
#endif
27422719
}
27432720
enif_free_env(msg_env);
27442721
}
@@ -3055,10 +3032,6 @@ static int on_load(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)
30553032
ATOM_CUR = enif_make_atom(env, "cur");
30563033
ATOM_BOF = enif_make_atom(env, "bof");
30573034

3058-
#ifdef PULSE
3059-
pulse_c_send_on_load(env);
3060-
#endif
3061-
30623035
return 0;
30633036
}
30643037

c_src/pulse_c_send.c

-62
This file was deleted.

c_src/pulse_c_send.h

-29
This file was deleted.

eqc/bitcask_pulse.erl

-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ run_commands_on_node(LocalOrSlave, Cmds, Seed, Verbose, KeepFiles) ->
322322
end,
323323
event_logger:start_link(),
324324
pulse:start(),
325-
bitcask_nifs:set_pulse_pid(utils:whereis(pulse)),
326325
error_logger:tty(false),
327326
error_logger:add_report_handler(handle_errors),
328327
token:next_name(),

src/bitcask_nifs.erl

-6
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
-ifdef(PULSE).
7070
-compile({parse_transform, pulse_instrument}).
7171
-include_lib("pulse_otp/include/pulse_otp.hrl").
72-
-export([set_pulse_pid/1]).
7372
-compile({pulse_skip, [{init,0}]}).
7473
-endif.
7574

@@ -100,11 +99,6 @@ init() ->
10099
end,
101100
erlang:load_nif(SoName, 0).
102101

103-
-ifdef(PULSE).
104-
set_pulse_pid(_Pid) ->
105-
erlang:nif_error({error, not_loaded}).
106-
-endif.
107-
108102
%% ===================================================================
109103
%% Internal functions
110104
%% ===================================================================

0 commit comments

Comments
 (0)