All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org,
	"Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Subject: [PATCH v3 02/20] kernel-shark: Add stream_id to kshark_entry
Date: Thu, 12 Nov 2020 16:23:40 +0200	[thread overview]
Message-ID: <20201112142358.36821-3-y.karadz@gmail.com> (raw)
In-Reply-To: <20201112142358.36821-1-y.karadz@gmail.com>

kshark_entry contains all information from one trace record, needed
in order to visualize the time-series of trace records. Here we
reorganize the data fields of kshark_entry in order to make room for
the unique identifier of the Data stream this entry belongs to.

The Id is coded in 16 bits that are taken from the "event_id" field.
So far "event_id" uses 32 bits but we found that it is coded with only
16 bits inside the kernel, so we still have 16 unused (spare) bits in
it.

Because the stream Id is coded with int8_t, we need to set an upper
limit (127) for the total number of Data streams loaded.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 src/libkshark.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/libkshark.h b/src/libkshark.h
index 9eecc2d0..7d8b53b0 100644
--- a/src/libkshark.h
+++ b/src/libkshark.h
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1 */
 
 /*
- * Copyright (C) 2017 VMware Inc, Yordan Karadzhov <y.karadz@gmail.com>
+ * Copyright (C) 2017 VMware Inc, Yordan Karadzhov (VMware) <y.karadz@gmail.com>
  */
 
  /**
@@ -51,15 +51,18 @@ struct kshark_entry {
 	 */
 	uint16_t	visible;
 
+	/** Data stream identifier. */
+	int16_t		stream_id;
+
+	/** Unique Id of the trace event type. */
+	int16_t		event_id;
+
 	/** The CPU core of the record. */
 	int16_t		cpu;
 
 	/** The PID of the task the record was generated. */
 	int32_t		pid;
 
-	/** Unique Id ot the trace event type. */
-	int32_t		event_id;
-
 	/** The offset into the trace file, used to find the record. */
 	int64_t		offset;
 
-- 
2.25.1


  parent reply	other threads:[~2020-11-12 14:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 14:23 [PATCH v3 00/20] Start KernelShark v2 transformation Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 01/20] kernel-shark: Use only signed types in kshark_entry Yordan Karadzhov (VMware)
2020-11-12 14:23 ` Yordan Karadzhov (VMware) [this message]
2020-11-12 14:23 ` [PATCH v3 03/20] kernel-shark: Introduce libkshark-hash Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 04/20] kernel-shark: Introduce Data streams Yordan Karadzhov (VMware)
2020-11-12 20:50   ` Steven Rostedt
2020-11-13 13:47     ` Yordan Karadzhov (VMware)
2020-11-13 14:42       ` Steven Rostedt
2020-11-13 14:49       ` Steven Rostedt
2020-11-13 15:08         ` Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 05/20] kernel-shark: Rename static methods in libkshark Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 06/20] kernel-shark: Add basic methods for Data streams Yordan Karadzhov (VMware)
2020-11-12 21:17   ` Steven Rostedt
2020-11-13 13:55     ` Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 07/20] kernel-shark: Housekeeping before implementing stream interface Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 08/20] kernel-shark: Add stream interface for trace-cmd data Yordan Karadzhov (VMware)
2020-11-12 22:10   ` Steven Rostedt
2020-11-13 13:58     ` Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 09/20] kernel-shark: Start introducing KernelShark 2.0 Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 10/20] kernel-shark: Start using data streams Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 11/20] kernel-shark: Remove dead code Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 12/20] kernel-shark: Redesign the plugin interface Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 13/20] kernel-shark: Complete the stream integration Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 14/20] kernel-shark: Provide merging of multiple data streams Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 15/20] kernel-shark: Integrate the stream definitions with data model Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 16/20] kernel-shark: Use only signed types for model defs Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 17/20] kernel-shark: Add ksmodel_get_bin() Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 18/20] kernel-shark: Protect ksmodel_set_in_range_bining() Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 19/20] kernel-shark: Add methods for time calibration Yordan Karadzhov (VMware)
2020-11-12 14:23 ` [PATCH v3 20/20] kernel-shark: Integrate streams with libkshark-configio Yordan Karadzhov (VMware)

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=20201112142358.36821-3-y.karadz@gmail.com \
    --to=y.karadz@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.