From: Julien Desfossez Date: Fri, 7 Feb 2014 22:03:53 +0000 (-0500) Subject: pretty-printing cleanup X-Git-Tag: v0.3~52 X-Git-Url: https://git.lttng.org/?p=lttngtop.git;a=commitdiff_plain;h=4251cc67f883927c96fe0d13d14101b8ed01ab43 pretty-printing cleanup Signed-off-by: Julien Desfossez --- diff --git a/src/lttngtop.c b/src/lttngtop.c index 33f098a..f85d11e 100644 --- a/src/lttngtop.c +++ b/src/lttngtop.c @@ -270,22 +270,13 @@ enum bt_cb_ret print_timestamp(struct bt_ctf_event *call_data, void *private_dat delta = timestamp - prev_ts; prev_ts = timestamp; - if (hostname) { - printf("%02d:%02d:%02d.%09" PRIu64 " (+%" PRIu64 ".%09" PRIu64 ") (%s) " - "(cpu %d) [%s (%d/%d)] %s (", - start.tm_hour, start.tm_min, start.tm_sec, - ts_nsec_start, delta / NSEC_PER_SEC, - delta % NSEC_PER_SEC, hostname, cpu_id, - procname, pid, tid, - bt_ctf_event_name(call_data)); - } else { - printf("%02d:%02d:%02d.%09" PRIu64 " (+%" PRIu64 ".%09" PRIu64 ") " - "(cpu %d) [%s (%d/%d)] %s (", - start.tm_hour, start.tm_min, start.tm_sec, - ts_nsec_start, delta / NSEC_PER_SEC, - delta % NSEC_PER_SEC, cpu_id, procname, pid, - tid, bt_ctf_event_name(call_data)); - } + printf("%02d:%02d:%02d.%09" PRIu64 " (+%" PRIu64 ".%09" PRIu64 ") %s%s" + "(cpu %d) [%s (%d/%d)] %s (", + start.tm_hour, start.tm_min, start.tm_sec, + ts_nsec_start, delta / NSEC_PER_SEC, + delta % NSEC_PER_SEC, (hostname) ? hostname : "", + (hostname) ? " ": "", cpu_id, procname, pid, tid, + bt_ctf_event_name(call_data)); print_fields(call_data); printf(")\n");