From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=no 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 7B130C433E0 for ; Thu, 14 Jan 2021 02:17:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3FD2B23741 for ; Thu, 14 Jan 2021 02:17:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729052AbhAMVQB (ORCPT ); Wed, 13 Jan 2021 16:16:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:38346 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728988AbhAMVKd (ORCPT ); Wed, 13 Jan 2021 16:10:33 -0500 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 3525721D95; Wed, 13 Jan 2021 21:10:46 +0000 (UTC) Date: Wed, 13 Jan 2021 16:10:44 -0500 From: Steven Rostedt To: Alexander Potapenko Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Marco Elver , Andrey Konovalov , Dmitry Vyukov , Ingo Molnar , Petr Mladek , Sergey Senozhatsky , linux-mm@kvack.org Subject: Re: [PATCH 1/4] tracing: add error_report trace points Message-ID: <20210113161044.43bc1c1a@gandalf.local.home> In-Reply-To: <20210113091657.1456216-2-glider@google.com> References: <20210113091657.1456216-1-glider@google.com> <20210113091657.1456216-2-glider@google.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Jan 2021 10:16:54 +0100 Alexander Potapenko wrote: > +DECLARE_EVENT_CLASS(error_report_template, > + TP_PROTO(const char *error_detector, unsigned long id), Instead of having a random string, as this should be used by a small finite set of subsystems, why not make the above into an enum? > + TP_ARGS(error_detector, id), > + TP_STRUCT__entry(__field(const char *, error_detector) > + __field(unsigned long, id)), > + TP_fast_assign(__entry->error_detector = error_detector; > + __entry->id = id;), > + TP_printk("[%s] %lx", __entry->error_detector, Then the [%s] portion of this could also be just a __print_symbolic(). -- Steve > + __entry->id)); > + > +/**