From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752027AbcBLQOi (ORCPT ); Fri, 12 Feb 2016 11:14:38 -0500 Received: from mga01.intel.com ([192.55.52.88]:7564 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750963AbcBLQL6 (ORCPT ); Fri, 12 Feb 2016 11:11:58 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,436,1449561600"; d="scan'208";a="913926920" From: Tom Zanussi To: ast@plumgrid.com, rostedt@goodmis.org Cc: masami.hiramatsu.pt@hitachi.com, namhyung@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, Tom Zanussi Subject: [RFC][PATCH 03/10] tracing: Add an 'accessor' function to ftrace_event_field Date: Fri, 12 Feb 2016 10:11:21 -0600 Message-Id: <64bd9650795874b09613ae8c0ea0d23b325fc10f.1455291671.git.tom.zanussi@linux.intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For grabbing the contents of an event field from a trace record, it would be useful to associate a field-specific accessor function with an event field. This defines an accessor prototype and adds an accessor field to struct ftrace_event_field for that purpose. Signed-off-by: Tom Zanussi --- kernel/trace/trace.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index fed2ae0..7b48a3c 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -1030,11 +1030,16 @@ static inline void trace_branch_disable(void) /* set ring buffers to default size if not already done so */ int tracing_update_buffers(void); +struct ftrace_event_field; + +typedef u64 (*ftrace_event_field_fn_t) (struct ftrace_event_field *field, void *event); + struct ftrace_event_field { struct list_head link; const char *name; const char *type; int filter_type; + ftrace_event_field_fn_t accessor; int offset; int size; int is_signed; -- 1.9.3