Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp601576pxk; Thu, 24 Sep 2020 13:29:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrZtsapHLITXrL85nG21wxH+uaa87QxTNDCzk8El7kEaBDT3JS6ouAgpcd9P2Z+Dgc39F8 X-Received: by 2002:a17:906:2712:: with SMTP id z18mr417573ejc.380.1600979366576; Thu, 24 Sep 2020 13:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600979366; cv=none; d=google.com; s=arc-20160816; b=bUosV8yVmf4gYhHgW1bL7u48unGYuuTeJnosVYAk+3UZWa9PRHRegTVfK0tC0ejpQL 6zv5hH4sJvnLYNvGKPZ6oAAVa1h2THS0DZ7XSeEdrnM1n4DFJVGqEwE7xiX0i/W3pWG8 1FHgbZpA+xJ+USQFPCoBUuQrajDJQN4txWz0qa6Vo4fRYNOR+V2BOeCw8i9uoSNEY+IB 3/bDQJ/zuNqaPQjQ7nEmYrUKCC5kSN7DIdvG/XPGo9semI2UA0GHNMHpU17MyWuMXW2s /BG52NIEolxzhJPnjngxFqNoz/7AxXe6po2djk/pEAjJoL3FG+bskFI71SBx6NSTlInt 0c6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:dkim-signature:dkim-filter; bh=9qP9LZF8ULzw711fz24KyU37d2yeb0aqYee00FSFgeY=; b=R7CqfCbwMRtuuAGLiIG0UOZw+1sosTYRO/ypDehsfsUmlxw0z14nVZ3lu12CmpKSlc CwtnyXVTfk8Z0pxvm3f4kRinQefvRziLPeYLkRUvRytVkZutQS7r6GbSwxZDCVepzixl dJuLJDpHfLCEzvna7qRflQ2faLBHzLyUtfkMjlzMoo75SFuqkMkzAtiOB9D5ipHCo93C hO1iep44YR6PeDFZyoKFAKkpHaWaqBzGhf9ZhWDghXvI9ZCGNUUDtOtpqgl4gYfSFRJq x6qhoqDgvPGO0OL6O+TzUUSlFCjaL9ngPbmLVEppXvbJGgco3kbKBx1rjUEiVYU0l0nq toMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b="TAtF/dk3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn4si538510ejb.143.2020.09.24.13.29.03; Thu, 24 Sep 2020 13:29:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b="TAtF/dk3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726414AbgIXUZk (ORCPT + 99 others); Thu, 24 Sep 2020 16:25:40 -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