From patchwork Tue Jun 17 12:59:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 4366091 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A3B8BBEEAA for ; Tue, 17 Jun 2014 12:59:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BCD7B202B4 for ; Tue, 17 Jun 2014 12:59:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B6F97201FE for ; Tue, 17 Jun 2014 12:59:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756016AbaFQM70 (ORCPT ); Tue, 17 Jun 2014 08:59:26 -0400 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.229]:27039 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755936AbaFQM7Z (ORCPT ); Tue, 17 Jun 2014 08:59:25 -0400 Received: from [67.246.153.56] ([67.246.153.56:51124] helo=gandalf.local.home) by cdptpa-oedge03 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 0A/E7-16046-5AB30A35; Tue, 17 Jun 2014 12:59:24 +0000 Date: Tue, 17 Jun 2014 08:59:16 -0400 From: Steven Rostedt To: "Chen, Gong" Cc: tony.luck@intel.com, bp@alien8.de, m.chehab@samsung.com, linux-acpi@vger.kernel.org Subject: Re: [PATCH 5/7 REVISION] trace, RAS: Add eMCA trace event interface Message-ID: <20140617085916.33a3a428@gandalf.local.home> In-Reply-To: <20140617020937.GA14404@gchen.bj.intel.com> References: <1402475691-30045-1-git-send-email-gong.chen@linux.intel.com> <1402553517-30208-1-git-send-email-gong.chen@linux.intel.com> <20140612092808.5f7bec5e@gandalf.local.home> <20140613021956.GA17509@gchen.bj.intel.com> <20140612230117.46758e3c@gandalf.local.home> <20140612230833.3c0f41b2@gandalf.local.home> <20140613070928.GA29351@gchen.bj.intel.com> <20140617020937.GA14404@gchen.bj.intel.com> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-RR-Connecting-IP: 107.14.168.142:25 X-Cloudmark-Score: 0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, 16 Jun 2014 22:09:37 -0400 "Chen, Gong" wrote: > > Any update, Steven? Here, apply the below patch and then use "__field_struct()" instead of "__field()". That should work. If so, I can add it to my repo (needs some cleanup and documentation) in a separate branch that can be pulled to base your patches on top of. -- Steve --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 0fd06fe..26b4f2e 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h @@ -44,6 +44,12 @@ #undef __field_ext #define __field_ext(type, item, filter_type) type item; +#undef __field_struct +#define __field_struct(type, item) type item; + +#undef __field_struct_ext +#define __field_struct_ext(type, item, filter_type) type item; + #undef __array #define __array(type, item, len) type item[len]; @@ -122,6 +128,12 @@ #undef __field_ext #define __field_ext(type, item, filter_type) +#undef __field_struct +#define __field_struct(type, item) + +#undef __field_struct_ext +#define __field_struct_ext(type, item, filter_type) + #undef __array #define __array(type, item, len) @@ -315,9 +327,21 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \ if (ret) \ return ret; +#undef __field_struct_ext +#define __field_struct_ext(type, item, filter_type) \ + ret = trace_define_field(event_call, #type, #item, \ + offsetof(typeof(field), item), \ + sizeof(field.item), \ + 0, filter_type); \ + if (ret) \ + return ret; + #undef __field #define __field(type, item) __field_ext(type, item, FILTER_OTHER) +#undef __field_struct +#define __field_struct(type, item) __field_struct_ext(type, item, FILTER_OTHER) + #undef __array #define __array(type, item, len) \ do { \ @@ -379,6 +403,12 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ #undef __field_ext #define __field_ext(type, item, filter_type) +#undef __field_struct +#define __field_struct(type, item) + +#undef __field_struct_ext +#define __field_struct_ext(type, item, filter_type) + #undef __array #define __array(type, item, len) @@ -550,6 +580,9 @@ static inline notrace int ftrace_get_offsets_##call( \ #undef __field #define __field(type, item) +#undef __field_struct +#define __field_struct(type, item) + #undef __array #define __array(type, item, len)