Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5209874pxj; Wed, 9 Jun 2021 11:45:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/sZxWwE2UhYMsr4rOLKOeF/SxzN0uf+I/ezX11Pqb/zIhytW55WhZV+Zd7V9lMjxExWwL X-Received: by 2002:a17:906:dd6:: with SMTP id p22mr1189570eji.191.1623264353905; Wed, 09 Jun 2021 11:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623264353; cv=none; d=google.com; s=arc-20160816; b=AYpoDX1WjIjZzYcETY3YD4g9RAHX3Ky8epCpuzVAlyigb6h+ZNKwGbm2oM2LePyLlZ IDs76U7LlC+fzvqezZGDfKYlSJIod3vJ2oCG5I0+BLHVkqU1cABRZ0ujRUQ1FKZk37nR 7EXqrcekn7kj/KbvnzkWRFQV4IOehNgG/LO9jPk8/nY0+5biBDFRT9GipFXHNOS8Vile dRSMwXoCm8CC9Rw8TppnxFN1FznGOyqtttFnPQHPu3CVCu1DQozHJ3OI9H0rvRLDxYi5 mSgsU36Fb05Z4aU2jb8HZ/xEMdYO8k2G70MeLoLBp+bUPMISF4zvBZ9fqjqiBgDgdBZA +A/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=W7L7JBT7+RaBdq8+y+T8lbBR7/kh6fTxG2yTLzyTFAI=; b=aamrQIE+BM7mHf9qY1EJwpgDhE7QY68FX1cWf117oGeWfOA8X14WfVWhLQ1ozE7CQU r9DZMI3CUYApzGyPgUq7383U8/+a+64Zw9yaIM7wQa5frsj17DxnDipOKEU59TrmBhck w6nxS6v6IbDuCjGOZ/S5wuHdoI1fAFrj7QqGYOu4xm5JmY38yzbH+8HsgJDhxyLGSc+w GKP923YwP0TjHU3IosvkOc1WvjLROFfgkE72mPs9hcxa5URNKgrAKxbjwO0NisWNmhbM +tPgRjP6FxAsqYuwVqTXkEKWBU8CJ8C6xQG5VCXkEyXrx1ZrfqIb7nL5Pnliqh7P5ezX uMRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=P5rAmvBi; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id aq18si442049ejc.117.2021.06.09.11.45.29; Wed, 09 Jun 2021 11:45:53 -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=@redhat.com header.s=mimecast20190719 header.b=P5rAmvBi; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236536AbhFINqf (ORCPT + 99 others); Wed, 9 Jun 2021 09:46:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51848 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236535AbhFINqd (ORCPT ); Wed, 9 Jun 2021 09:46:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623246278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W7L7JBT7+RaBdq8+y+T8lbBR7/kh6fTxG2yTLzyTFAI=; b=P5rAmvBiFA58HH8JKZ7xY160BKkIXDGLPxZoyoS8B4aDNsCwxxCWx8VAhJkQSl3jD5VpJ4 5npeivTMDTVYvhbLSNojh8mRBmKjYTKb0v1kBsZIqv8ITnhieuwjP5qtOyGRHeFgC8BTIy PUaTrKTTblOP/TP8pQVIIclx6V0h70M= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-157-6TL8b7pbNaa3nVb1qd0aZw-1; Wed, 09 Jun 2021 09:44:37 -0400 X-MC-Unique: 6TL8b7pbNaa3nVb1qd0aZw-1 Received: by mail-ej1-f70.google.com with SMTP id p5-20020a17090653c5b02903db1cfa514dso8054643ejo.13 for ; Wed, 09 Jun 2021 06:44:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=W7L7JBT7+RaBdq8+y+T8lbBR7/kh6fTxG2yTLzyTFAI=; b=XFlfM8wAq3P/oLUcC8tpjaSf3m2uE7QCTmhMYfs5jiBBO4Do/OzMyZhkDukSx+9Ex4 S9NoYYqSb+xFOxwuSuFROzEphMW+yRcrHfuvjYI6we6Rw07hcGy1XyDXpAqyHAyYnOyn fRmcGvqCf4GwBocnBtWhaXvLEW8RKGfc8P7laoZvDZUOYwB9/MXImpDTDdugvbkn/6UD LEmepLB6PCc2cqyMSfqA3ZTaM4FFmM1YAVJNgN/vwXmuaLxzFFAgTiFroq9MF1L17eyF XHPd0fZnobIbYtwZiGT18flnrqLKv7NY3kDciXjHeZPFh6oFJFUYsBr/PH8ShYbAs0WH Ri6w== X-Gm-Message-State: AOAM5302Q03cvEVscZ8GBLPCXbpWSTELNHhSOAoXEme/omwO20IXJEpP VDMZVC+UQ9se33nFAeGZ5vLod0iDZr380VcUMZD8jN0zHYjbPAcuj+Maz/2L4f5JC+cHq4yDecR 0LHx0BkmYOpgRdjA6PwKtleUG X-Received: by 2002:a05:6402:1216:: with SMTP id c22mr30617134edw.36.1623246276469; Wed, 09 Jun 2021 06:44:36 -0700 (PDT) X-Received: by 2002:a05:6402:1216:: with SMTP id c22mr30617104edw.36.1623246276220; Wed, 09 Jun 2021 06:44:36 -0700 (PDT) Received: from x1.bristot.me (host-79-23-205-114.retail.telecomitalia.it. [79.23.205.114]) by smtp.gmail.com with ESMTPSA id f10sm1160643edx.60.2021.06.09.06.44.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 06:44:35 -0700 (PDT) Subject: Re: [PATCH V3 8/9] tracing: Add osnoise tracer To: Steven Rostedt 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 References: <20210604172803.527aa070@oasis.local.home> <06d72b7d-4beb-1dff-b537-e7449abf3d4e@redhat.com> <20210609090329.53679e79@oasis.local.home> From: Daniel Bristot de Oliveira Message-ID: <30ed6e4f-2320-7389-c560-2c7a25250442@redhat.com> Date: Wed, 9 Jun 2021 15:44:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210609090329.53679e79@oasis.local.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/9/21 3:03 PM, Steven Rostedt wrote: > 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 moved! > 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? it was always returning 0, changed it to void. -- Daniel