[PATCH 8/9] libtracefs: Have tracefs_hist_bucket_key flags save the type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: [PATCH 8/9] libtracefs: Have tracefs_hist_bucket_key flags save the type
- From: Steven Rostedt <rostedt@xxxxxxxxxxx>
- Date: Tue, 10 Aug 2021 16:48:17 -0400
- Cc: linux-kernel@xxxxxxxxxxxxxxx, Tom Zanussi <zanussi@xxxxxxxxxx>, Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Namhyung Kim <namhyung@xxxxxxxxxx>, linux-rt-users <linux-rt-users@xxxxxxxxxxxxxxx>, Clark Williams <williams@xxxxxxxxxx>, "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>
- In-reply-to: <20210810204818.880714-1-rostedt@goodmis.org>
- References: <20210810204818.880714-1-rostedt@goodmis.org>
From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>
Add the key_type enum as a bit flag in the key->flags for
tracefs_hist_bucket_key such that a user could know how to handle the
type.
Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
src/tracefs-hist-data.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/tracefs-hist-data.c b/src/tracefs-hist-data.c
index 0f811d6e3154..90c9cb2c7df8 100644
--- a/src/tracefs-hist-data.c
+++ b/src/tracefs-hist-data.c
@@ -399,6 +399,9 @@ static int __do_key_val(struct tracefs_hist_data *hdata,
break;
}
+ if (hdata->current_key_type->type < TRACEFS_HIST_KEY_MAX)
+ key->flags |= (1 << hdata->current_key_type->type);
+
return 0;
}
--
2.30.2
[Index of Archives]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]