Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5208796pxj; Wed, 9 Jun 2021 11:44:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcZ7m5jVV+TQtKAoIsUfrCs3/04ju/5ws3dv1c7O0n4LUOjSnYULzxrzm77RHsbM+QlziR X-Received: by 2002:a17:907:7b91:: with SMTP id ne17mr1223164ejc.58.1623264260655; Wed, 09 Jun 2021 11:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623264260; cv=none; d=google.com; s=arc-20160816; b=IS9wXxC0klAYvOmSUB+e///yym9sQ3+wJwhp5+K7e3A89feTdcPkYgcKVZ8MREMkIe M6FEA2cj4uVn6blOwt9qMy4ZMBA0evQH3hdDkYkp9mWmSxU5HceeryO4nIbqh/yZtsa3 89w4WydC5s6hE3EOVXoJt/HuOhT6xoT2PMYioEHu7vCaze1VD5mhXahpj1vkqbWFyN10 TmbRYbOIgGXyyNEDeefZ/8uzV3X5AGApNi0tWvyXdSbwOsAGuOOiRlBk7LNAAeW+k5GU 1Ll7c4ISYgZkVgihLDqeFqt317rFSs+9pk5Y9YA8E6Ks3XtvZpxnT+zNDZci5tACPlN7 RZiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=d1nCSA2dJ/0uCTsbfve6YOvrlzkNdY3Q5nIQqZjR1lw=; b=vlFF8PrDUbvym0+xqDl+rRkgamJT5gt+mBNsCP0izMKY6Ch3xFR85pyY+UfjzzqqT0 aO2Ss7PE5oiY2JDjEaQ99XCQ6UKjg5eXDljJkeHxBnRVPXyxteSNp3B0uyTg0Ud3T4TF L36BTtqIzPfzBCjo5mWRadPIxuL/AXl40COMLtWsUHaplkzxmO69Y5GGa2r2xrBnKVuT EKQLkKufnL9pgc/L+5bjHp0d5Jt7JiwFtaC/KcW1R+HobcHELUZNR7uiWhgBVX6OfKyR D+RwVgZLa9mGu75GoxhZyyAOaYX5cNDWcPnVd6WQhbqZ8MD7e+vwP15oQ0NH72/c6+hU cf/Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh4si487267ejb.680.2021.06.09.11.43.56; Wed, 09 Jun 2021 11:44:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233726AbhFINF1 (ORCPT + 99 others); Wed, 9 Jun 2021 09:05:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:60368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231466AbhFINF0 (ORCPT ); Wed, 9 Jun 2021 09:05:26 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A276061108; Wed, 9 Jun 2021 13:03:30 +0000 (UTC) Date: Wed, 9 Jun 2021 09:03:29 -0400 From: Steven Rostedt To: Daniel Bristot de Oliveira Cc: linux-kernel@vger.kernel.org, Phil Auld , Sebastian Andrzej Siewior , Kate Carcia , Jonathan Corbet , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Alexandre Chartre , Clark Willaims , John Kacur , Juri Lelli , linux-doc@vger.kernel.org Subject: Re: [PATCH V3 8/9] tracing: Add osnoise tracer Message-ID: <20210609090329.53679e79@oasis.local.home> In-Reply-To: <06d72b7d-4beb-1dff-b537-e7449abf3d4e@redhat.com> References: <20210604172803.527aa070@oasis.local.home> <06d72b7d-4beb-1dff-b537-e7449abf3d4e@redhat.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Jun 2021 14:14:17 +0200 Daniel Bristot de Oliveira wrote: > On 6/4/21 11:28 PM, Steven Rostedt wrote: > >> +#ifdef CONFIG_X86_LOCAL_APIC > > I wonder if we should move this into a separate file, making the > > __trace_irq_entry() a more name space safe name and have it call that. > > I have a bit of a distaste for arch specific code in a generic file. > > > > I am placing the intel specific file in: > > arch/x86/kernel/trace_osnoise.c I would make it just arch/x86/kernel/trace.c so that it can hold all arch specific tracing information, and not need to create a file for anything else we might need later. > > and the kernel/trace/trace_osnoise.h looks like this: > > #ifdef CONFIG_X86_LOCAL_APIC > int osnoise_arch_register(void); > int osnoise_arch_unregister(void); > #else /* CONFIG_X86_LOCAL_APIC */ > #define osnoise_arch_register() do {} while (0) > #define osnoise_arch_unregister() do {} while (0) > #endif /* CONFIG_X86_LOCAL_APIC */ > > This can be used by other archs as well... > > sound reasonable? > The proper way to d that is to use weak functions in the C code in the generic file. int __weak osnoise_arch_register(void) { return 0; } int __weak osnoise_arch_unregister(void) { return 0; } Hmm, does the unregister really need a return value? -- Steve