Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp601401pxk; Thu, 24 Sep 2020 13:29:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVcOvxR5+2Og4Osc4p/+zlM3G7+K/4Q4Wy1QD85hMYXHKM3gZxldlKzw0v4KxwC42V/Hc4 X-Received: by 2002:a17:906:b24e:: with SMTP id ce14mr397854ejb.494.1600979350199; Thu, 24 Sep 2020 13:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600979350; cv=none; d=google.com; s=arc-20160816; b=nU6Y75yq0FhGvBirDvfs9I6N3Jsc+tgABxlYb6Y2KLIafkxwzkpvx5eNRXV0jupn5B s1m6TTwHQLgbddzBYVrna5vjByGDQuhBrf9v8tdZn7GdbBUAZXzvUoR9M9flSRTM/EYU VmanvlxroniiJjfJPTHNVDXQqtbsw6QaRy3YMQ8FEe7XABclnU2xiiAToXqEBufNlC89 FCwhtHN3pjg6TZ6S2Zak6FJ7cbFLc/KfbXjyjQVDQ/bU2YKS86dIjfTx9DwhVN8HbIYB 3q1KzzJguqBsJSqwkW9cpWqoFI5nLk8LALgyotRSwQ9rxQnsgY6fDM/9zj3wauDycVGV WVYg== 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=VWAAUSy3q2f1VKXG0qi/7cIhdZcmoPgz+peeSW6yLys=; b=e5iJQjDFeXoNJ+qLlCRCS5diIDMzm0Ni9jW+UK6oV5nHuZyx3DcQtJZnJEZSu8+uuM W+vbyBOUZPJCmn6wdRk2nh/QBu36SMRlAomcaZyJQjbcBNAk4iLZnxrM0Fgh27cFjPUP ohZUvaKIeiuqsgt5bgipAuxSauNweBSoPnSb8O7fb4Zm65QATtBwby04T504Y8ZEb8vl bPhxH+/vdsLLUjDwkDlu4v8gMHcPGK/R+IKp5p5/mX48iFObjLa6vLjpCWWQ0PXbFwsE yHtaBT1HUN4CkPyLMfyoxe960T4WVkkD4FndPAw6Cbpg6GiX1nJ718knd3cAvQMHRD8H mLmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=default header.b=Mb1z+0+b; 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 r6si354662edm.211.2020.09.24.13.28.47; Thu, 24 Sep 2020 13:29:10 -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=Mb1z+0+b; 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 S1726588AbgIXU1i (ORCPT + 99 others); Thu, 24 Sep 2020 16:27:38 -0400 Received: from mail.efficios.com ([167.114.26.124]:43158 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725208AbgIXU1g (ORCPT ); Thu, 24 Sep 2020 16:27:36 -0400 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- 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