mirror of
https://github.com/urbit/shrub.git
synced 2024-12-28 22:54:15 +03:00
put tracing calls in serf
This commit is contained in:
parent
cf3ddef76a
commit
7c9b8d71ef
@ -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++;
|
||||
}
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user