aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYordan Karadzhov (VMware) <y.karadz@gmail.com>2020-12-11 17:07:31 +0200
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2020-12-21 19:11:05 -0500
commit6453e3b91890d4c9c3bae9bda6f77ef7bd7a6f81 (patch)
tree537a4e5accaf1bc8504f5c1485330f1098168cbc
parent12910f751755ed8faf5ae3af2e1179ea8d4e6e54 (diff)
downloadkernel-shark-6453e3b91890d4c9c3bae9bda6f77ef7bd7a6f81.tar.gz
kernel-shark: Add stream_id to kshark_entry
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. Link: https://lore.kernel.org/linux-trace-devel/20201211150756.577366-8-y.karadz@gmail.com Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--src/libkshark.h11
1 files 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;