aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_trace.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-03-07 16:04:04 +0100
committerBjörn-Egil Dahlberg <[email protected]>2016-04-29 18:31:35 +0200
commit6f89f183317c930fe1199ad3320825b02bb861da (patch)
tree5d919324442bc87300cd6956dc17f8a6874232f0 /erts/emulator/beam/erl_trace.c
parentf5fa3ac80d2f7fcd11ac3e702c29df5ef6c204db (diff)
downloadotp-6f89f183317c930fe1199ad3320825b02bb861da.tar.gz
otp-6f89f183317c930fe1199ad3320825b02bb861da.tar.bz2
otp-6f89f183317c930fe1199ad3320825b02bb861da.zip
erts: Extend garbage collection trace
Replace 'gc_start' and 'gc_end' with * 'gc_minor_start' * 'gc_minor_end' * 'gc_major_start' * 'gc_major_end'
Diffstat (limited to 'erts/emulator/beam/erl_trace.c')
-rw-r--r--erts/emulator/beam/erl_trace.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c
index 0842c0c0a4..9146cc7c7f 100644
--- a/erts/emulator/beam/erl_trace.c
+++ b/erts/emulator/beam/erl_trace.c
@@ -1326,23 +1326,26 @@ void save_calls(Process *p, Export *e)
* are all small (atomic) integers.
*/
void
-trace_gc(Process *p, Eterm what)
+trace_gc(Process *p, Eterm what, Uint size)
{
ErtsTracerNif *tnif = NULL;
Eterm* hp;
Eterm msg = NIL;
- Uint size = 0;
+ Uint sz = 0;
+ Eterm tup;
if (is_tracer_proc_enabled(
p, ERTS_PROC_LOCK_MAIN, &p->common, &tnif, what)) {
- (void) erts_process_gc_info(p, &size, NULL);
- hp = HAlloc(p, size);
+ (void) erts_process_gc_info(p, &sz, NULL);
+ hp = HAlloc(p, sz + 3 + 2);
msg = erts_process_gc_info(p, NULL, &hp);
+ tup = TUPLE2(hp, am_wordsize, make_small(size)); hp += 3;
+ msg = CONS(hp, tup, msg); hp += 2;
send_to_tracer_nif(p, &p->common, p->common.id, tnif, TRACE_FUN_GC,
- what, msg, THE_NON_VALUE);
+ what, msg, am_undefined);
}
}