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=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 40196C4727D for ; Thu, 24 Sep 2020 20:27:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CD42F20EDD for ; Thu, 24 Sep 2020 20:27:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="Mb1z+0+b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD42F20EDD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 63C166B0062; Thu, 24 Sep 2020 16:27:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5EBA16B0068; Thu, 24 Sep 2020 16:27:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 416586B006C; Thu, 24 Sep 2020 16:27:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 15CA06B0062 for ; Thu, 24 Sep 2020 16:27:36 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D4D0E3654 for ; Thu, 24 Sep 2020 20:27:35 +0000 (UTC) X-FDA: 77299090470.13.trick77_14062bd27161 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id B6886181415A0 for ; Thu, 24 Sep 2020 20:27:35 +0000 (UTC) X-HE-Tag: trick77_14062bd27161 X-Filterd-Recvd-Size: 4280 Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Thu, 24 Sep 2020 20:27:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id B3E932D8CD5; Thu, 24 Sep 2020 16:27:34 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id P6-DlwbzrdhB; Thu, 24 Sep 2020 16:27:34 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 82C572D8EB7; Thu, 24 Sep 2020 16:27:34 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 82C572D8EB7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1600979254; bh=VWAAUSy3q2f1VKXG0qi/7cIhdZcmoPgz+peeSW6yLys=; h=Date:From:To:Message-ID:MIME-Version; b=Mb1z+0+bxZk4sbyxiYEgrUriRvJz2OVA3ZEFRSSVxHFQC0N8D/rOIRpAYe0QH1VM8 JDgYV23ecyfs8hprvXHQ/Zbpp3dqYRiwmcERuy8/r2wJuIhhZlht452CCgepbWSipS eYVv1BdIkbmNAYWtuU+WxFxXeVCQhvBRWZC7fo1evroAKnO6pSvgbrCOYaKwEvBd8f ptMOZYzc4TzlQd7lxF65TFddNSD0WrjLVIdX6H4nmv+/lesS6DCF2Y0DByiCiPDGaG nd8W9WpGuar3tsBtuCgg82yJORYwpgt70bepbWfiHAkHz3R1ShJHthx/VfNVTAL9PI MmfZtD1IiynOg== X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 37zL9rzPIwht; Thu, 24 Sep 2020 16:27:34 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 734432D8CD2; Thu, 24 Sep 2020 16:27:34 -0400 (EDT) Date: Thu, 24 Sep 2020 16:27:34 -0400 (EDT) From: Mathieu Desnoyers To: rostedt Cc: linux-kernel , Yafang Shao , Axel Rasmussen , Andrew Morton , Vlastimil Babka , Michel Lespinasse , Daniel Jordan , Davidlohr Bueso , linux-mm , Ingo Molnar , Joonsoo Kim Message-ID: <1430794518.69084.1600979254425.JavaMail.zimbra@efficios.com> In-Reply-To: <20200924161328.760f5e79@oasis.local.home> References: <20200924170928.466191266@goodmis.org> <20200924171846.993048030@goodmis.org> <2006335081.68212.1600969345189.JavaMail.zimbra@efficios.com> <20200924143025.58dc3c1f@gandalf.local.home> <166273261.68446.1600974510284.JavaMail.zimbra@efficios.com> <20200924153517.73f5f257@oasis.local.home> <221547373.69067.1600977935633.JavaMail.zimbra@efficios.com> <20200924161328.760f5e79@oasis.local.home> Subject: Re: [PATCH 1/2] tracepoints: Add helper to test if tracepoint is enabled in a header MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.26.124] X-Mailer: Zimbra 8.8.15_GA_3965 (ZimbraWebClient - FF80 (Linux)/8.8.15_GA_3963) Thread-Topic: tracepoints: Add helper to test if tracepoint is enabled in a header Thread-Index: o2U8/o9Dn5/x/EZln0vPYatbBRgl3g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: ----- On Sep 24, 2020, at 4:13 PM, rostedt rostedt@goodmis.org wrote: > On Thu, 24 Sep 2020 16:05:35 -0400 (EDT) > Mathieu Desnoyers wrote: > >> If headers which happens to be included by include/trace/events/ headers are >> the issue, and they happen to only be needed by CREATE_TRACE_PROBES, then we >> should consider wrapping those #include with #ifdef CREATE_TRACE_PROBES guards. > > Well, we are at a point you can't even use preempt_disable(). > > Whatever wants to use this tracepoint_enabled() macro, is going to have > to include something that doesn't include tracepoint.h. I'd be a bit more specific: so far, the msr.h use-case requires to include directly tracepoint-defs.h and use a tracepoint_enabled() macro defined there. Other less "core" header use-cases could still include tracepoint.h, as long as there is no circular dependency. Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com