diff --git a/pkg/urbit/noun/trace.c b/pkg/urbit/noun/trace.c index 81485d4465..cf38957ecc 100644 --- a/pkg/urbit/noun/trace.c +++ b/pkg/urbit/noun/trace.c @@ -486,7 +486,7 @@ u3t_event_trace(const c3_c* name, c3_c type) "\"tid\": 1, \"ts\": %" PRIu64 ", \"id\": \"0x100\"}, \n", name, type, - u3_Host.tra_u.nid_w, + getpid(), u3t_trace_time()); u3_Host.tra_u.con_w++; } diff --git a/pkg/urbit/serf/main.c b/pkg/urbit/serf/main.c index 5218be6e35..62f753facc 100644 --- a/pkg/urbit/serf/main.c +++ b/pkg/urbit/serf/main.c @@ -576,11 +576,35 @@ _serf_poke_work(c3_d evt_d, // event number c3_l mug_l, // mug of state u3_noun job) // full event { - if ( evt_d <= u3V.len_w ) { + if ( u3C.wag_w & u3o_trace ) { + if ( u3_Host.tra_u.con_w == 0 && u3_Host.tra_u.fun_w == 0 ) { + u3t_trace_open(); + } + else if ( u3_Host.tra_u.con_w >= 100000 ) { + u3t_trace_close(); + u3t_trace_open(); + } + } + + if ( evt_d < 6 ) { + c3_c lab_c[8]; + snprintf(lab_c, 8, "boot: %llu", evt_d); + + u3t_event_trace(lab_c, 'B'); _serf_work_boot(evt_d, mug_l, job); + u3t_event_trace(lab_c, 'E'); } else { + u3_noun wir = u3h(u3t(job)); + u3_noun cad = u3h(u3t(u3t(job))); + + c3_c lab_c[2048]; + snprintf(lab_c, 2048, "event %llu: [%s %s]", evt_d, + u3m_pretty_path(wir), u3m_pretty(cad)); + + u3t_event_trace(lab_c, 'B'); _serf_work_live(evt_d, mug_l, job); + u3t_event_trace(lab_c, 'E'); } } diff --git a/pkg/urbit/vere/reck.c b/pkg/urbit/vere/reck.c index 4110fd6e0a..c4a2b3ddc1 100644 --- a/pkg/urbit/vere/reck.c +++ b/pkg/urbit/vere/reck.c @@ -444,7 +444,6 @@ _reck_kick_norm(u3_pier* pir_u, u3_noun pox, u3_noun fav) void u3_reck_kick(u3_pier* pir_u, u3_noun ovo) { - u3t_event_trace("Effect", 'b'); if ( (c3n == _reck_kick_spec(pir_u, u3k(u3h(ovo)), u3k(u3t(ovo)))) && (c3n == _reck_kick_norm(pir_u, u3k(u3h(ovo)), u3k(u3t(ovo)))) ) { @@ -480,5 +479,4 @@ u3_reck_kick(u3_pier* pir_u, u3_noun ovo) #endif } u3z(ovo); - u3t_event_trace("Effect", 'e'); }