diff options
author | Patrik Nyblom <[email protected]> | 2012-03-22 18:29:34 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-03-22 18:30:07 +0100 |
commit | 5957a8338fe1f4e79a39277174094bbd9e978896 (patch) | |
tree | 4abcf47850e2a577b401a61bb1693d85cb137ffe /erts/emulator/beam/erl_nif.c | |
parent | b5f6596f49db47e6dacddb2b10292a7294e13993 (diff) | |
parent | 1e653c3539423e4cfdeab1d232483bcac0e8b073 (diff) | |
download | otp-5957a8338fe1f4e79a39277174094bbd9e978896.tar.gz otp-5957a8338fe1f4e79a39277174094bbd9e978896.tar.bz2 otp-5957a8338fe1f4e79a39277174094bbd9e978896.zip |
Merge branch 'pan/dtrace' into maint
* pan/dtrace: (22 commits)
Use distinct function-entry probes for local and global calls
Correct calculation of stack depth in call/return probes
Add probes for all kind of calls
Don't try to "clean up" generated fun names
erl_process.c: Fix probe for process exit
Remove code causing dialyzer warning from prim_file
Add documentation for dyntrace and system_info changes
Update slogan and add system_info for dynamic trace
Update README's for dtrace and systemtap
Rename dyntrace BIFs to more suiting names
If VM probes are not enabled, short-circuit calls to probe BIFs
beam_makeops: Add a simple preprocessor
Ifdef all dynamic trace code
Move dtrace erlang code and NIF into runtime_tools
Correct some errors in the user tag spreading
Change to more specific configure options for dtrace
Add user tag spreading functionality to VM and use in file
Update dtrace for changes in R15
Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 4/4
Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 3/4
...
OTP-10017
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index 58a09986d2..40f2fde578 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -66,6 +66,9 @@ static void add_readonly_check(ErlNifEnv*, unsigned char* ptr, unsigned sz); static int is_offheap(const ErlOffHeap* off_heap); #endif +#ifdef USE_VM_PROBES +void dtrace_nifenv_str(ErlNifEnv *, char *); +#endif #define MIN_HEAP_FRAG_SZ 200 static Eterm* alloc_heap_heavy(ErlNifEnv* env, unsigned need, Eterm* hp); @@ -350,7 +353,11 @@ int enif_send(ErlNifEnv* env, const ErlNifPid* to_pid, if (flush_me) { flush_env(env); /* Needed for ERTS_HOLE_CHECK */ } - erts_queue_message(rp, &rp_locks, frags, msg, am_undefined); + erts_queue_message(rp, &rp_locks, frags, msg, am_undefined +#ifdef USE_VM_PROBES + , NIL +#endif + ); if (rp_locks) { ERTS_SMP_LC_ASSERT(rp_locks == (rp_had_locks | (ERTS_PROC_LOCK_MSGQ | ERTS_PROC_LOCK_STATUS))); @@ -1779,6 +1786,13 @@ void erl_nif_init() resource_type_list.name = THE_NON_VALUE; } +#ifdef USE_VM_PROBES +void dtrace_nifenv_str(ErlNifEnv *env, char *process_buf) +{ + dtrace_pid_str(env->proc->id, process_buf); +} +#endif + #ifdef READONLY_CHECK /* Use checksums to assert that NIFs do not write into inspected binaries */ |