summaryrefslogtreecommitdiff
path: root/common/printf.c
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2017-02-07 16:38:26 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-02-11 13:06:38 -0800
commiteb2e38ec56c5701a1d9bcc3618957b4d4dee50f6 (patch)
treec842f3e693bb70eec8309558034ae6021c97c8b9 /common/printf.c
parent050ea0226844252d33285461b490372fe8c02f8e (diff)
downloadchrome-ec-eb2e38ec56c5701a1d9bcc3618957b4d4dee50f6.tar.gz
console: Add non-verbose print config option
Shorten certain long prints and reduce the precision of timestamp prints when CONFIG_CONSOLE_VERBOSE is undef'd. BUG=chromium:688743 BRANCH=gru TEST=On kevin, cold reset the EC, boot to OS, and verify cros_ec.log contains all data since sysjump and is < 2K bytes (~1500 bytes). Change-Id: Ia9390867788d0ab3087f827b0296107b4e9d4bca Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/438932 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'common/printf.c')
-rw-r--r--common/printf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/printf.c b/common/printf.c
index f22233c855..ef3800c585 100644
--- a/common/printf.c
+++ b/common/printf.c
@@ -193,7 +193,12 @@ int vfnprintf(int (*addchar)(void *context, int c), void *context,
if (c == 'T') {
v = get_time().val;
flags |= PF_64BIT;
+#ifdef CONFIG_CONSOLE_VERBOSE
precision = 6;
+#else
+ precision = 3;
+ v /= 1000;
+#endif
} else if (flags & PF_64BIT) {
v = va_arg(args, uint64_t);
} else {