Linux-Trace-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v4 00/23] TSC trace clock to nanosecond conversion
@ 2021-03-25  6:40 Tzvetomir Stoyanov (VMware)
  2021-03-25  6:40 ` [PATCH v4 01/23] trace-cmd: Add initial perf interface in trace-cmd library Tzvetomir Stoyanov (VMware)
                   ` (22 more replies)
  0 siblings, 23 replies; 26+ messages in thread
From: Tzvetomir Stoyanov (VMware) @ 2021-03-25  6:40 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

Added new logic for converting TSC event's timestamps to nanoseconds. This
trace clock is used by default in host-guest tracing session in combination
with KVM time sync plugin. The parameters for conversion are retrieved by
the perf kernel interface.
New option is added to "trace-cmd report" command to force displaying raw
time stamps from the trace file, without any corrections to the time stamps.

These changes depend on "Refactoring and improvements of time sync logic"
patch set.

v4 changes:
 - Improved getting the clock for the trace session, if there is no user
   specified one. The clock of the first host instance is used, instead of
   the top intstane.
 - Improved printing the clocks from the trace file with trace-cmd dump
   command
 - Fixed bugs, addressed Steven's comments.

v3 changes:
 - Split logically the changes in more patches.
 - Extended the TRACECLOCK option with trace clocks.
 - Fixed the TRACEID option to expect at least 8 bytes, so it can be
   extended in the future without breaking the old logic.
 - Code cleanup and coding style fixes.
v2 changes:
 - Added new trace clock "-C tsc2nsec", which does not depend on host-guest
   tracing use case.
 - A few minor improvements and fixes. 

Tzvetomir Stoyanov (VMware) (23):
  trace-cmd: Add initial perf interface in trace-cmd library
  trace-cmd: Extend trace-cmd dump subcommand to display the clock
  trace-cmd: Save only the selected clock in the trace.dat file
  trace-cmd: Internal refactoring, move logic for local tep handler in
    its own function
  trace-cmd: Add new local function to check if a trace clock is
    supported
  trace-cmd: Add new trace-cmd clock tsc2nsec
  trace-cmd: Define a new option for tsc2nsec conversion
  trace-cmd: Save information for tsc to nanoseconds conversion in trace
    file
  trace-cmd: Read information for tsc to nanoseconds conversion from
    trace file
  trace-cmd: Save tsc2nsec clock in trace.dat file
  trace-cmd: Append new options into guest trace file at the end of the
    tracing session
  trace-cmd: Remove unneeded multiply in events timestamp reading
  trace-cmd: Perform all timestamp corrections in a single function
  trace-cmd: Convert tsc timestamps to nanosecods when reading trace
    data from a file
  trace-cmd: Set order and priorities when applying timestamp
    corrections
  trace-cmd: Add a new flag to disable any timestamp corrections
  trace-cmd: Change "--nodate" option to affect "--date" option only
  trace-cmd: Add new parameter "--raw-ts" to "trace-cmd report" command
  trace-cmd: Print times in TimeShift options as unsigned in trace-cmd
    dump
  trace-cmd: Use tsc clock for host-guest tracing, if available
  trace-cmd: Get current clock for host-guest tracing session
  trace-cmd: Save the trace clocks in TRACECLOCK option
  trace-cmd: Read at least 8 bytes trace-id option

 Documentation/trace-cmd/trace-cmd-dump.1.txt  |   2 +
 Makefile                                      |   6 +
 lib/trace-cmd/Makefile                        |   3 +
 .../include/private/trace-cmd-private.h       |  22 +
 lib/trace-cmd/trace-input.c                   | 103 +++--
 lib/trace-cmd/trace-output.c                  |  66 ++-
 lib/trace-cmd/trace-perf.c                    | 105 +++++
 lib/trace-cmd/trace-timesync.c                |   1 -
 tracecmd/include/trace-local.h                |   7 +
 tracecmd/trace-dump.c                         |  57 ++-
 tracecmd/trace-read.c                         |   9 +-
 tracecmd/trace-record.c                       | 401 +++++++++++++++---
 tracecmd/trace-usage.c                        |   1 +
 13 files changed, 678 insertions(+), 105 deletions(-)
 create mode 100644 lib/trace-cmd/trace-perf.c

-- 
2.30.2


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, back to index

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25  6:40 [PATCH v4 00/23] TSC trace clock to nanosecond conversion Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 01/23] trace-cmd: Add initial perf interface in trace-cmd library Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 02/23] trace-cmd: Extend trace-cmd dump subcommand to display the clock Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 03/23] trace-cmd: Save only the selected clock in the trace.dat file Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 04/23] trace-cmd: Internal refactoring, move logic for local tep handler in its own function Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 05/23] trace-cmd: Add new local function to check if a trace clock is supported Tzvetomir Stoyanov (VMware)
2021-03-26 21:21   ` Steven Rostedt
2021-03-25  6:40 ` [PATCH v4 06/23] trace-cmd: Add new trace-cmd clock tsc2nsec Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 07/23] trace-cmd: Define a new option for tsc2nsec conversion Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 08/23] trace-cmd: Save information for tsc to nanoseconds conversion in trace file Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 09/23] trace-cmd: Read information for tsc to nanoseconds conversion from " Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 10/23] trace-cmd: Save tsc2nsec clock in trace.dat file Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 11/23] trace-cmd: Append new options into guest trace file at the end of the tracing session Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 12/23] trace-cmd: Remove unneeded multiply in events timestamp reading Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 13/23] trace-cmd: Perform all timestamp corrections in a single function Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 14/23] trace-cmd: Convert tsc timestamps to nanosecods when reading trace data from a file Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 15/23] trace-cmd: Set order and priorities when applying timestamp corrections Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 16/23] trace-cmd: Add a new flag to disable any " Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 17/23] trace-cmd: Change "--nodate" option to affect "--date" option only Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 18/23] trace-cmd: Add new parameter "--raw-ts" to "trace-cmd report" command Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 19/23] trace-cmd: Print times in TimeShift options as unsigned in trace-cmd dump Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 20/23] trace-cmd: Use tsc clock for host-guest tracing, if available Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 21/23] trace-cmd: Get current clock for host-guest tracing session Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 22/23] trace-cmd: Save the trace clocks in TRACECLOCK option Tzvetomir Stoyanov (VMware)
2021-03-25  6:40 ` [PATCH v4 23/23] trace-cmd: Read at least 8 bytes trace-id option Tzvetomir Stoyanov (VMware)
2021-03-26 21:18   ` Steven Rostedt

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git