From patchwork Tue Aug 10 20:48:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 495519 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72848C432BE for ; Tue, 10 Aug 2021 20:48:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5621B61075 for ; Tue, 10 Aug 2021 20:48:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233362AbhHJUsu (ORCPT ); Tue, 10 Aug 2021 16:48:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:44260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230419AbhHJUsr (ORCPT ); Tue, 10 Aug 2021 16:48:47 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 572876108C; Tue, 10 Aug 2021 20:48:25 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.94.2) (envelope-from ) id 1mDYfg-003hAQ-9N; Tue, 10 Aug 2021 16:48:24 -0400 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Tom Zanussi , Daniel Bristot de Oliveira , Masami Hiramatsu , Namhyung Kim , linux-rt-users , Clark Williams , "Steven Rostedt (VMware)" Subject: [PATCH 8/9] libtracefs: Have tracefs_hist_bucket_key flags save the type Date: Tue, 10 Aug 2021 16:48:17 -0400 Message-Id: <20210810204818.880714-9-rostedt@goodmis.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210810204818.880714-1-rostedt@goodmis.org> References: <20210810204818.880714-1-rostedt@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org From: "Steven Rostedt (VMware)" 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) --- 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; }