From f97058f0b895b320ed4967650e92217c62e06d9a Mon Sep 17 00:00:00 2001 From: ~hatteb-mitlyd Date: Fri, 30 May 2014 11:09:47 -0700 Subject: [PATCH] more profiling detritus Conflicts: v/raft.c --- f/trac.c | 11 +++++++++++ v/raft.c | 16 ++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/f/trac.c b/f/trac.c index a7dde38707..c0ca8050c3 100644 --- a/f/trac.c +++ b/f/trac.c @@ -698,6 +698,14 @@ void u2_tx_slog(u2_ray wir_r, u2_noun luf) // retain { +#if 0 + struct timeval t; + static struct timeval p; + struct timeval d; + gettimeofday(&t, 0); + timersub(&t, &p, &d); + printf("%ld.%d ", d.tv_sec, d.tv_usec); +#endif { if ( u2_yes == u2du(luf) ) { u2_noun pri = u2h(luf); @@ -710,6 +718,9 @@ u2_tx_slog(u2_ray wir_r, u2_lo_tank(0, u2k(u2t(luf))); } } +#if 0 + p = t; +#endif } /* u2_tx_warn(): report a warning by internal file and line. diff --git a/v/raft.c b/v/raft.c index 93f69c0f6c..66676de650 100644 --- a/v/raft.c +++ b/v/raft.c @@ -1535,12 +1535,12 @@ _raft_lame(u2_reck* rec_u, u2_noun ovo, u2_noun why, u2_noun tan) static void _raft_punk(u2_reck* rec_u, u2_noun ovo) { - // c3_c* txt_c = u2_cr_string(u2h(u2t(ovo))); + // c3_c* txt_c = u2_cr_string(u2h(u2t(ovo))); c3_w sec_w; - // static c3_w num_w; + // static c3_w num_w; u2_noun gon; - // uL(fprintf(uH, "punk: %s: %d\n", u2_cr_string(u2h(u2t(ovo))), num_w++)); + // uL(fprintf(uH, "punk: %s: %d\n", u2_cr_string(u2h(u2t(ovo))), num_w++)); // XX this is wrong - the timer should be on the original hose. // @@ -1555,8 +1555,15 @@ _raft_punk(u2_reck* rec_u, u2_noun ovo) u2_Host.beh_u.run_w = 0; } + // struct timeval b4, f2, d0; + // gettimeofday(&b4, 0); + gon = u2_lo_soft(rec_u, sec_w, u2_reck_poke, u2k(ovo)); + // gettimeofday(&f2, 0); + // timersub(&f2, &b4, &d0); + // uL(fprintf(uH, "%%punk %ld.%d\n", d0.tv_sec, d0.tv_usec)); + if ( u2_blip != u2h(gon) ) { u2_noun why = u2k(u2h(gon)); u2_noun tan = u2k(u2t(gon)); @@ -1587,7 +1594,8 @@ _raft_punk(u2_reck* rec_u, u2_noun ovo) _raft_sure(rec_u, ovo, vir, cor); } } - // uL(fprintf(uH, "punk oot %s\n", txt_c)); + // uL(fprintf(uH, "punk oot %s\n", txt_c)); + // free(txt_c); } static void