diff options
author | Lukas Larsson <[email protected]> | 2016-05-03 10:07:27 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2016-05-03 10:07:27 +0200 |
commit | 8fcc73cd8d19fe362f929c9cb0d96579a2ed4ee5 (patch) | |
tree | 32c3d1b27c5ee4801958f58b449e8fafae19153f /erts/emulator/beam/erl_trace.c | |
parent | 94e70f82df417d9e673a13d101007d7ae8932df7 (diff) | |
parent | 80512854940a6db33152717246a34bbe68aaa8ed (diff) | |
download | otp-8fcc73cd8d19fe362f929c9cb0d96579a2ed4ee5.tar.gz otp-8fcc73cd8d19fe362f929c9cb0d96579a2ed4ee5.tar.bz2 otp-8fcc73cd8d19fe362f929c9cb0d96579a2ed4ee5.zip |
Merge branch 'lukas/erts/tracing/misc_fixes/OTP-13503'
* lukas/erts/tracing/misc_fixes/OTP-13503:
erts: Add test for new procs trace with spawn_link
kernel: Remove seq_trace event order dep in tc
erts: Add tests for set on link tracing
erts: Expand trace tests for refc binaries
erts: Remove erl_tracer with invalid state
erts: Remove some dead code
erts: Fix broken doc link to erl_tracer
Conflicts:
erts/emulator/beam/erl_trace.c
Diffstat (limited to 'erts/emulator/beam/erl_trace.c')
-rw-r--r-- | erts/emulator/beam/erl_trace.c | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c index 56899f574a..128696270b 100644 --- a/erts/emulator/beam/erl_trace.c +++ b/erts/emulator/beam/erl_trace.c @@ -658,6 +658,7 @@ do { \ # define GET_NOW(m, s, u) do {get_now(m, s, u);} while (0) #endif + static void write_sys_msg_to_port(Eterm unused_to, Port* trace_port, @@ -1737,41 +1738,6 @@ profile_scheduler(Eterm scheduler_id, Eterm state) { } -void -profile_scheduler_q(Eterm scheduler_id, Eterm state, Eterm no_schedulers, Uint Ms, Uint s, Uint us) { - Eterm *hp, msg, timestamp; - -#ifndef ERTS_SMP -#define LOCAL_HEAP_SIZE (4 + 7) - DeclareTmpHeapNoproc(local_heap,LOCAL_HEAP_SIZE); - UseTmpHeapNoproc(LOCAL_HEAP_SIZE); - - hp = local_heap; -#else - ErlHeapFragment *bp; - Uint hsz; - - hsz = 4 + 7; - - bp = new_message_buffer(hsz); - hp = bp->mem; -#endif - - erts_smp_mtx_lock(&smq_mtx); - - timestamp = TUPLE3(hp, make_small(Ms), make_small(s), make_small(us)); hp += 4; - msg = TUPLE6(hp, am_profile, am_scheduler, scheduler_id, state, no_schedulers, timestamp); hp += 7; -#ifndef ERTS_SMP - profile_send(NIL, msg); - UnUseTmpHeapNoproc(LOCAL_HEAP_SIZE); -#undef LOCAL_HEAP_SIZE -#else - enqueue_sys_msg_unlocked(SYS_MSG_TYPE_SYSPROF, NIL, NIL, msg, bp); -#endif - erts_smp_mtx_unlock(&smq_mtx); - -} - /* Port profiling */ void @@ -1935,7 +1901,10 @@ trace_port_receive(Port *t_p, Eterm caller, Eterm what, ...) } data = TUPLE2(hp, caller, data); - send_to_tracer_nif(NULL, &t_p->common, t_p->common.id, tnif, TRACE_FUN_T_RECEIVE, + hp += 3; + ASSERT(hp <= (local_heap + LOCAL_HEAP_SIZE) || orig_hp); + send_to_tracer_nif(NULL, &t_p->common, t_p->common.id, tnif, + TRACE_FUN_T_RECEIVE, am_receive, data, THE_NON_VALUE); if (bptr && erts_refc_dectest(&bptr->refc, 1) == 0) |