@@ -489,7 +489,7 @@ static inline void unset_event_filter_flag(struct kshark_context *kshark_ctx,
e->visible &= ~event_mask;
}
-static void set_all_visible(uint16_t *v) {
+static void set_all_visible(uint8_t *v) {
/* Keep the original value of the PLUGIN_UNTOUCHED bit flag. */
*v |= 0xFF & ~KS_PLUGIN_UNTOUCHED_MASK;
}
@@ -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>
*/
/**
@@ -50,7 +50,10 @@ struct kshark_entry {
* kshark_filter_masks to check the level of visibility/invisibility
* of the entry.
*/
- uint16_t visible;
+ uint8_t visible;
+
+ /** Data stream identifier. */
+ int8_t stream_id;
/** The CPU core of the record. */
int16_t cpu;
@@ -58,7 +61,7 @@ struct kshark_entry {
/** The PID of the task the record was generated. */
int32_t pid;
- /** Unique Id ot the trace event type. */
+ /** Unique Id of the trace event type. */
int32_t event_id;
/** The offset into the trace file, used to find the record. */
@@ -351,6 +354,9 @@ struct kshark_data_stream {
struct kshark_data_stream_interface interface;
};
+/** Hard-coded maximum number of data stream. */
+#define KS_MAX_NUM_STREAMS 127
+
/** Size of the task's hash table. */
#define KS_TASK_HASH_SHIFT 16
#define KS_TASK_HASH_SIZE (1 << KS_TASK_HASH_SHIFT)
kshark_entry contains all information from one trace record, needed in order to visualize the time-series of trace records. Here we reorganize data fields to kshark_entry in order to make room for the unique identifier of the Data stream this entry belongs to. Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> --- src/libkshark.c | 2 +- src/libkshark.h | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-)