linux-btrace.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linux-btrace@vger.kernel.org
Subject: Recent changes (master)
Date: Wed, 25 Sep 2019 12:00:01 +0000	[thread overview]
Message-ID: <20190925120001.5EBDA2C02C1@kernel.dk> (raw)
In-Reply-To: <20130320050001.E340522DFC@kernel.dk>

The following changes since commit 667ac92a1a72b6038f0fae4acfc6a280fd69697b:

  btreplay: fix device IO remap functionality (2019-09-16 10:30:23 -0600)

are available in the Git repository at:

  git://git.kernel.dk/blktrace.git master

for you to fetch changes up to 9c73da91540b27adaaf56065629e831cc50c5a3d:

  doc: tex: add absolute timestamp printing option (2019-09-25 00:22:13 -0600)

----------------------------------------------------------------
Hiroaki Mihara (4):
      blkparse: man: add absolute timestamp printing option
      blkparse: split off the timestamp correction code in to a separate function
      blkparse: fix absolute timestamp when reading from file
      doc: tex: add absolute timestamp printing option

 blkparse.c       | 37 +++++++++++++++++++++++++------------
 doc/blkparse.1   |  3 +++
 doc/blktrace.tex |  1 +
 3 files changed, 29 insertions(+), 12 deletions(-)

---

Diff of recent changes:

diff --git a/blkparse.c b/blkparse.c
index 3de2ebe..28bdf15 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -2022,6 +2022,22 @@ static void show_device_and_cpu_stats(void)
 	}
 }
 
+static void correct_abs_start_time(void)
+{
+	long delta = genesis_time - start_timestamp;
+
+	abs_start_time.tv_sec  += SECONDS(delta);
+	abs_start_time.tv_nsec += NANO_SECONDS(delta);
+	if (abs_start_time.tv_nsec < 0) {
+		abs_start_time.tv_nsec += 1000000000;
+		abs_start_time.tv_sec -= 1;
+	} else
+	if (abs_start_time.tv_nsec > 1000000000) {
+		abs_start_time.tv_nsec -= 1000000000;
+		abs_start_time.tv_sec += 1;
+	}
+}
+
 static void find_genesis(void)
 {
 	struct trace *t = trace_list;
@@ -2039,18 +2055,7 @@ static void find_genesis(void)
 	 */
 	if (start_timestamp
 	 && start_timestamp != genesis_time) {
-		long delta = genesis_time - start_timestamp;
-
-		abs_start_time.tv_sec  += SECONDS(delta);
-		abs_start_time.tv_nsec += NANO_SECONDS(delta);
-		if (abs_start_time.tv_nsec < 0) {
-			abs_start_time.tv_nsec += 1000000000;
-			abs_start_time.tv_sec -= 1;
-		} else
-		if (abs_start_time.tv_nsec > 1000000000) {
-			abs_start_time.tv_nsec -= 1000000000;
-			abs_start_time.tv_sec += 1;
-		}
+		correct_abs_start_time();
 	}
 }
 
@@ -2704,6 +2709,14 @@ static int do_file(void)
 	if (ms_head)
 		genesis_time = ms_peek_time(ms_head);
 
+	/*
+	 * Correct abs_start_time if necessary
+	 */
+	if (start_timestamp
+	 && start_timestamp != genesis_time) {
+		correct_abs_start_time();
+	}
+
 	/*
 	 * Keep processing traces while any are left
 	 */
diff --git a/doc/blkparse.1 b/doc/blkparse.1
index 627b7b1..e494b6e 100644
--- a/doc/blkparse.1
+++ b/doc/blkparse.1
@@ -368,6 +368,9 @@ Elapsed value in microseconds (\fI\-t\fR command line option)
 .IP \fBU\fR 4
 Payload unsigned integer
 
+.IP \fBz\fR 4
+The absolute time, as local time in your time zone, with no date displayed
+
 .PP
 Note that the user can optionally specify field display width, and optionally a
 left-aligned specifier. These precede field specifiers, with a '%' character,
diff --git a/doc/blktrace.tex b/doc/blktrace.tex
index 4d8278e..3647c75 100644
--- a/doc/blktrace.tex
+++ b/doc/blktrace.tex
@@ -613,6 +613,7 @@ the event's device \\
 \emph{T} & Time stamp (seconds) \\ \hline
 \emph{u} & Elapsed value in microseconds (\emph{-t} command line option) \\ \hline
 \emph{U} & Payload unsigned integer \\ \hline
+\emph{z} & Absolute time stamp \\ \hline
 \end{tabular}
 
 Note that the user can optionally specify field display width, and

  parent reply	other threads:[~2019-09-25 12:00 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20  5:00 Recent changes (master) Jens Axboe
2013-08-02  4:00 ` Jens Axboe
2013-12-04  4:56 ` Jens Axboe
2014-04-12 12:00 ` Jens Axboe
2014-09-09 12:00 ` Jens Axboe
2014-09-26 12:00 ` Jens Axboe
2015-02-19 13:00 ` Jens Axboe
2015-08-21 12:00 ` Jens Axboe
2015-09-16 12:00 ` Jens Axboe
2016-01-09 13:00 ` Jens Axboe
2016-02-10 13:00 ` Jens Axboe
2016-04-26 12:00 ` Jens Axboe
2016-05-04 12:00 ` Jens Axboe
2016-05-06 12:00 ` Jens Axboe
2016-05-20 12:00 ` Jens Axboe
2016-08-24 12:00 ` Jens Axboe
2017-01-27 13:00 ` Jens Axboe
2017-11-05 13:00 ` Jens Axboe
2017-11-06 13:00 ` Jens Axboe
2017-11-08 13:00 ` Jens Axboe
2018-01-24 13:00 ` Jens Axboe
2018-01-25 13:00 ` Jens Axboe
2018-04-10 12:00 ` Jens Axboe
2018-05-03 12:00 ` Jens Axboe
2018-05-17 12:00 ` Jens Axboe
2018-08-31 12:00 ` Jens Axboe
2018-09-01 12:00 ` Jens Axboe
2019-05-22 12:00 ` Jens Axboe
2019-09-17 12:00 ` Jens Axboe
2019-09-25 12:00 ` Jens Axboe [this message]
2020-01-17 13:00 ` Jens Axboe
2020-03-21 12:00 ` Jens Axboe
2020-05-08 12:00 ` Jens Axboe
2020-05-21 12:00 ` Jens Axboe
2021-02-20 13:00 ` Jens Axboe
2021-04-20 12:00 ` Jens Axboe
2021-06-15 11:59 ` Jens Axboe
2021-06-29 12:00 ` Jens Axboe
2021-10-22 12:00 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2024-01-18 13:00 Jens Axboe
2024-06-13 12:00 Jens Axboe
2024-10-09 12:00 Jens Axboe
2025-01-31 13:00 Jens Axboe
2025-03-20 12:00 Jens Axboe
2025-12-11 13:00 Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190925120001.5EBDA2C02C1@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-btrace@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).