From 2f532f889a6bd31f74122bd223277d7c609f7bdc Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Thu, 17 Nov 2011 00:45:50 -0600 Subject: Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 3/4 Add probes to the virtual machine, except (mostly) the efile_drv.c driver and other file I/O-related source files. --- erts/lib_src/common/erl_printf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'erts/lib_src') diff --git a/erts/lib_src/common/erl_printf.c b/erts/lib_src/common/erl_printf.c index 108a8bb531..afb9c0abb7 100644 --- a/erts/lib_src/common/erl_printf.c +++ b/erts/lib_src/common/erl_printf.c @@ -176,16 +176,18 @@ write_sn(void *vwsnap, char* buf, size_t len) write_sn_arg_t *wsnap = (write_sn_arg_t *) vwsnap; ASSERT(wsnap); ASSERT(len > 0); + int rv = 0; if (wsnap->len > 0) { size_t sz = len; if (sz >= wsnap->len) sz = wsnap->len; + rv = (int)sz; memcpy((void *) wsnap->buf, (void *) buf, sz); wsnap->buf += sz; wsnap->len -= sz; return sz; } - return 0; + return rv; } static int -- cgit v1.2.3 From 0fd4e39abeea3fc87b78eec8495109f9245b5ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Tue, 7 Feb 2012 19:19:27 +0100 Subject: Update dtrace for changes in R15 --- erts/lib_src/common/erl_printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/lib_src') diff --git a/erts/lib_src/common/erl_printf.c b/erts/lib_src/common/erl_printf.c index afb9c0abb7..399c83384e 100644 --- a/erts/lib_src/common/erl_printf.c +++ b/erts/lib_src/common/erl_printf.c @@ -173,10 +173,10 @@ typedef struct { static int write_sn(void *vwsnap, char* buf, size_t len) { + int rv = 0; write_sn_arg_t *wsnap = (write_sn_arg_t *) vwsnap; ASSERT(wsnap); ASSERT(len > 0); - int rv = 0; if (wsnap->len > 0) { size_t sz = len; if (sz >= wsnap->len) -- cgit v1.2.3