diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-02-07 19:19:27 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-03-22 18:16:13 +0100 |
commit | 0fd4e39abeea3fc87b78eec8495109f9245b5ac8 (patch) | |
tree | e4e8de912a44e58d0f5e1d108ce3e8d9ed822558 /lib/dtrace/c_src | |
parent | ad6387b0242caa2b3c64d62a133752e10546211b (diff) | |
download | otp-0fd4e39abeea3fc87b78eec8495109f9245b5ac8.tar.gz otp-0fd4e39abeea3fc87b78eec8495109f9245b5ac8.tar.bz2 otp-0fd4e39abeea3fc87b78eec8495109f9245b5ac8.zip |
Update dtrace for changes in R15
Diffstat (limited to 'lib/dtrace/c_src')
-rw-r--r-- | lib/dtrace/c_src/Makefile | 2 | ||||
-rw-r--r-- | lib/dtrace/c_src/Makefile.in | 15 | ||||
-rw-r--r-- | lib/dtrace/c_src/dtrace.c | 16 |
3 files changed, 13 insertions, 20 deletions
diff --git a/lib/dtrace/c_src/Makefile b/lib/dtrace/c_src/Makefile index f3320bb766..a65491d45d 100644 --- a/lib/dtrace/c_src/Makefile +++ b/lib/dtrace/c_src/Makefile @@ -1,4 +1,4 @@ # -# Invoke with GNU make or clearmake -C gnu. +# Invoke with GNU make # include $(ERL_TOP)/make/run_make.mk diff --git a/lib/dtrace/c_src/Makefile.in b/lib/dtrace/c_src/Makefile.in index ed13684a95..831ce5ce75 100644 --- a/lib/dtrace/c_src/Makefile.in +++ b/lib/dtrace/c_src/Makefile.in @@ -72,7 +72,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/dtrace-$(VSN) # ---------------------------------------------------- # Misc Macros # ---------------------------------------------------- -OBJS = $(OBJDIR)/dtrace$(TYPEMARKER).o +before_DTrace_OBJS = $(OBJDIR)/dtrace$(TYPEMARKER).o ## NIF_MAKEFILE = $(PRIVDIR)/Makefile # Higher-level makefiles says that we can only compile on UNIX flavors @@ -100,18 +100,17 @@ else DTRACE_USER_HEADER= endif +DTRACE_OBJS = ifdef DTRACE_ENABLED_2STEP -OBJS += $(OBJDIR)/dtrace_user.o -$(OBJDIR)/dtrace_user.o: $(OBJS) $(OBJDIR)/dtrace_user.h - touch $(OBJDIR)/erlang_dtrace.c - $(CC) $(CFLAGS) -c -o $@ $(OBJDIR)/erlang_dtrace.c - # The object file created above is immediately clobbered below. - # But creating it above avoids chicken-and-egg problem with OBJS +DTRACE_OBJS += $(OBJDIR)/dtrace_user.o +$(OBJDIR)/dtrace_user.o: $(before_DTrace_OBJS) $(OBJDIR)/dtrace_user.h dtrace -G -C \ -s ./dtrace_user.d \ - -o $@ $(OBJS) + -o $@ $(before_DTrace_OBJS) endif +OBJS = $(before_DTrace_OBJS) $(DTRACE_OBJS) + $(OBJDIR): -@mkdir -p $(OBJDIR) diff --git a/lib/dtrace/c_src/dtrace.c b/lib/dtrace/c_src/dtrace.c index c9d25ece9c..90bb39a4b8 100644 --- a/lib/dtrace/c_src/dtrace.c +++ b/lib/dtrace/c_src/dtrace.c @@ -25,7 +25,6 @@ #include "erl_nif.h" #include "config.h" #include "sys.h" -#define DTRACE_DRIVER_SKIP_FUNC_DECLARATIONS #include "dtrace-wrapper.h" #ifdef HAVE_DTRACE #include "dtrace_user.h" @@ -144,8 +143,7 @@ static ERL_NIF_TERM user_trace_i4s4(ErlNifEnv* env, int argc, const ERL_NIF_TERM if (DTRACE_ENABLED(user_trace_i4s4)) { dtrace_nifenv_str(env, procbuf); - get_string_maybe(env, argv[0], &utbuf, - user_tagbuf, sizeof(user_tagbuf)-1); + get_string_maybe(env, argv[0], &utbuf, user_tagbuf, MESSAGE_BUFSIZ); if (! enif_get_int64(env, argv[1], &i1)) i1 = 0; if (! enif_get_int64(env, argv[2], &i2)) @@ -154,14 +152,10 @@ static ERL_NIF_TERM user_trace_i4s4(ErlNifEnv* env, int argc, const ERL_NIF_TERM i3 = 0; if (! enif_get_int64(env, argv[4], &i4)) i4 = 0; - get_string_maybe(env, argv[5], &mbuf1, - messagebuf1, sizeof(messagebuf1)-1); - get_string_maybe(env, argv[6], &mbuf2, - messagebuf2, sizeof(messagebuf2)-1); - get_string_maybe(env, argv[7], &mbuf3, - messagebuf3, sizeof(messagebuf3)-1); - get_string_maybe(env, argv[8], &mbuf4, - messagebuf4, sizeof(messagebuf4)-1); + get_string_maybe(env, argv[5], &mbuf1, messagebuf1, MESSAGE_BUFSIZ); + get_string_maybe(env, argv[6], &mbuf2, messagebuf2, MESSAGE_BUFSIZ); + get_string_maybe(env, argv[7], &mbuf3, messagebuf3, MESSAGE_BUFSIZ); + get_string_maybe(env, argv[8], &mbuf4, messagebuf4, MESSAGE_BUFSIZ); DTRACE10(user_trace_i4s4, procbuf, utbuf, i1, i2, i3, i4, mbuf1, mbuf2, mbuf3, mbuf4); return atom_true; |