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 6FC4AC4363D for ; Thu, 24 Sep 2020 20:25:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16E2E20738 for ; Thu, 24 Sep 2020 20:25:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="TAtF/dk3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726466AbgIXUZl (ORCPT ); Thu, 24 Sep 2020 16:25:41 -0400 Received: from mail.efficios.com ([167.114.26.124]:42232 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725208AbgIXUZk (ORCPT ); Thu, 24 Sep 2020 16:25:40 -0400 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- 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