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 A910FC4727E for ; Thu, 24 Sep 2020 20:25:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2707F2396E for ; Thu, 24 Sep 2020 20:25:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="TAtF/dk3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2707F2396E 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 2E59E6B005C; Thu, 24 Sep 2020 16:25:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2BC406B005D; Thu, 24 Sep 2020 16:25:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D3056B0062; Thu, 24 Sep 2020 16:25:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0221.hostedemail.com [216.40.44.221]) by kanga.kvack.org (Postfix) with ESMTP id 042BD6B005C for ; Thu, 24 Sep 2020 16:25:41 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BB34D362E for ; Thu, 24 Sep 2020 20:25:40 +0000 (UTC) X-FDA: 77299085640.09.jewel36_5306dea27161 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 8D17F180AD806 for ; Thu, 24 Sep 2020 20:25:40 +0000 (UTC) X-HE-Tag: jewel36_5306dea27161 X-Filterd-Recvd-Size: 4316 Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Thu, 24 Sep 2020 20:25:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 594102D8AD5; Thu, 24 Sep 2020 16:25:39 -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 LHhl6wuY2O7m; Thu, 24 Sep 2020 16:25:39 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 1B6A52D8F00; Thu, 24 Sep 2020 16:25:39 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 1B6A52D8F00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=default; t=1600979139; bh=9qP9LZF8ULzw711fz24KyU37d2yeb0aqYee00FSFgeY=; h=Date:From:To:Message-ID:MIME-Version; b=TAtF/dk34XCpbBTek1ItKhEaLcT6PKToglElHdG+J+wopv41T1s0R0PKR16rGWnoH Wc84WdKiNYBZQIE63Lvk8Zf0JRBH6q1E8MikhQJ+21uJ8TQWphfb9Ww/i/B5jYVM1A 0HW0v8SO+TV3lxQ+T8UxgtuvWdWrxw2YwrDc8rII92B2Wqy1Q79r4ZuOC8nxQzlwOf Aj+a6deWHpmV6rzfNqnosyMbzCXMCCiurXfQDEY7Dv2AbqjPE1VXfdDY8EtXY+0MqF DxlGDLIUo/DEbizTSpqJ8SVUdzgX/4uk3Xe4VC6KGjlqYBhNMyStOtJTWBBqEEqcZK uCkUYfew1Yb1g== 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 uOC-VpRcyvvA; Thu, 24 Sep 2020 16:25:39 -0400 (EDT) Received: from mail03.efficios.com (mail03.efficios.com [167.114.26.124]) by mail.efficios.com (Postfix) with ESMTP id 059962D8AD4; Thu, 24 Sep 2020 16:25:39 -0400 (EDT) Date: Thu, 24 Sep 2020 16:25:38 -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: <1676229796.69080.1600979138922.JavaMail.zimbra@efficios.com> In-Reply-To: <20200924154009.4b45d56e@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> <20200924154009.4b45d56e@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: 78LRJNuS3GaFV58uE9BR0KXLBrgDKg== 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 3:40 PM, rostedt rostedt@goodmis.org wrote: > On Thu, 24 Sep 2020 15:35:17 -0400 > Steven Rostedt wrote: > >> > I'm ok with tracepoint_enabled(). However, I would have placed it in >> > tracepoint.h rather than tracepoint-defs.h, and we should figure out >> > why people complain that tracepoint.h is including headers too >> > eagerly. >> >> I could see if it would work in tracepoints.h. >> >> It might. I was just being extra cautious. > > Well that blew up quick! > > Try using tracepoint.h in include/linux/page_ref.h and > arch/x86/include/asm/msr.h and see what happens. Indeed, msr.h is an issue. So having tracepoint_enabled() in include/linux/tracepoints-defs.h and going through a function would make sense for this kind of core use-case I guess. I tried including tracepoint.h from include/linux/page_ref.h and did not notice any compile issue. Am I missing something to trigger an issue related to that scenario ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com