From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AD973A04B0; Fri, 14 Aug 2020 20:39:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CD5AC1C0BD; Fri, 14 Aug 2020 20:39:33 +0200 (CEST) Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by dpdk.org (Postfix) with ESMTP id CCEBD1C044 for ; Fri, 14 Aug 2020 20:39:31 +0200 (CEST) Received: by mail-lj1-f196.google.com with SMTP id v12so10937109ljc.10 for ; Fri, 14 Aug 2020 11:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GONgK9pefC5adGypgFFNl8kGya2bDQwUF+3pDyinc7E=; b=slLPq8WcSEGIYaq108qIHx5wF962aeehNaGpYIQNhFjQ5FDb49dfldXmi/zQRFLbUl OxsKI0Cfe3dHrQoQnYuLB4PgQDVUKQDL5parl38UaRqWHmx4M0mxaqsT0DS41cRWZDQZ nyL0Ss85E79OO8+XECUj3SL1plM6ZFe76SmiAnf6WAcmxHE/nLXwGV+LHzjDMex5l4tx RXHpHjAXIwaoyBH2gjcf7SrGytvmc6lTp7sfExPXUHyUPCAl/d5o7tsSrl8P8rQ2L0wj Rxq7jhj+sIEHGOd1AvE4+U9f/WLgWRuTgVO4kJJ082S6/a2RaGcnWcw0Sce2yNmMacSE r5ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GONgK9pefC5adGypgFFNl8kGya2bDQwUF+3pDyinc7E=; b=s6z6dfjmRgNJ2QDOsUoZxT6DUvJz1tRSZk3jOHvH4kcXgn9P3dGsgyv933fUMiDSZk 6BsJJcDPQYrnBlPBnEcnfbWvROM1LhUZ1xsodbWYPiRf3mVeck2bFvhcnQDMahpgixpr M9bS5Px7melfKT//Hlu00xs5ld/SRxYn+vXWDN1vTIB3WO4qbYQ8CU9fPCAnpbOF+TvZ 2gmIVMTH3gdHJwBbhkRnQl1x6qZhh1z702/PDqfFXBJtu8jfJIFD0Riu341qhmcbOqqS cqXpcsgaLJrC5EmrIFXpPSfGKUykoIoNOv5yuF9inmsP/j0EchTStCGMGzUzxW/a2Uv7 ADTQ== X-Gm-Message-State: AOAM530yNONNny2y/BHLmn/oe+DitXcfkqDRqPP+jQkacGs6ud4u+aLY soUvOz/VDuJi6HiELZ5yh9twspHdaeUGtg== X-Google-Smtp-Source: ABdhPJz4D2J3Slv6ubvUBqSs4wG/no26dHPotn9A+bLgiICyWU+kYzWu0XP8yx+T3PM3DcDpIXAk0w== X-Received: by 2002:a2e:988a:: with SMTP id b10mr1735179ljj.26.1597430371216; Fri, 14 Aug 2020 11:39:31 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id y28sm2044174lfl.15.2020.08.14.11.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2020 11:39:30 -0700 (PDT) Date: Fri, 14 Aug 2020 21:39:29 +0300 From: Dmitry Kozlyuk To: Stephen Hemminger Cc: dev@dpdk.org Message-ID: <20200814213929.1d7ca040@sovereign> In-Reply-To: <20200814173441.23086-1-stephen@networkplumber.org> References: <20200814173441.23086-1-stephen@networkplumber.org> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] eal: add option to put timestamp on console output X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 14 Aug 2020 10:34:41 -0700, Stephen Hemminger wrote: > When debugging driver or startup issues, it is useful to have > a timestamp on each message printed. The messages in syslog > already have a timestamp, but often syslog is not available > during testing. The timestamp format is chosen to look > like the default Linux dmesg timestamp. > > Example: > [ 0.000040] EAL: Probing VFIO support... > > Signed-off-by: Stephen Hemminger > --- > doc/guides/linux_gsg/linux_eal_parameters.rst | 5 +++ > lib/librte_eal/common/eal_common_options.c | 5 +++ > lib/librte_eal/common/eal_internal_cfg.h | 1 + > lib/librte_eal/common/eal_options.h | 2 + > lib/librte_eal/linux/eal_log.c | 41 +++++++++++++++++-- > 5 files changed, 51 insertions(+), 3 deletions(-) [snip] > @@ -1945,6 +1949,7 @@ eal_common_usage(void) > " --"OPT_PROC_TYPE" Type of this process (primary|secondary|auto)\n" > #ifndef RTE_EXEC_ENV_WINDOWS > " --"OPT_SYSLOG" Set syslog facility\n" > + " --"OPT_LOG_TIMESTAMP" Timestamp log output\n" > #endif Seems like FreeBSD doesn't support this option as well. It is clear that iovec approach saves a syscall on each write, but is it worth implementing log timestamps on each platform instead of prepending it in common code (with a second fwrite call)? For fast event stream with precise timestamps, there is tracing framework.