Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp305728rdb; Thu, 25 Jan 2024 16:33:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGgqOT4ERBhJ5+Mz/ZBKEC8c6zfvQc/Rlv9zRG04+ELtxeYnqvhWo6+rz1aoljvtG8AjDrX X-Received: by 2002:ac8:5807:0:b0:42a:32e5:85df with SMTP id g7-20020ac85807000000b0042a32e585dfmr730308qtg.113.1706229189976; Thu, 25 Jan 2024 16:33:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706229189; cv=pass; d=google.com; s=arc-20160816; b=DpST7WUTc65C7TZoHr54xGkVgShPtHrhZVtEMvQogX8YXqVJpbfNeMGTnSFL/N9QrW BZl1ecqXfn3zI91V1I+n7bm1Gv9Kc5CCVyRaS1AyFafU7SB6JIuO8DUZr/oi/smoLnw5 eQ9FOF0l6lGzfKTg8l1QHe775k0AFIT9eicIAjPZ8u4qVBV8NKfZxVQn/RA2bSwaia7H rPLgp+cka1HgX18rs84/A6s/2DoGiXVCmlIhHugV0WfGIgashNcsc5fl5jnmm25X56Qb cA/t/l3vrz2cIbw6VcmEEFesVzvxAy/PBPPv+Sgc+0RsfXh7KHv35o4TwN1AfVkRUYNl Obow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=Zxu7z2YUTqPXoXUSOq/UQnmZD9OMFAgowUg3TD3FfMw=; fh=m81CCTuCbCiEBQNSfKwMhBKHJZmcJ/zxh0iGF2IisCs=; b=TsIpSIiCrTLuy0oSfKRrVpfP2aJFjtfwo7GKH93VZ7xiJk+H/rospW/kRQ0025u9mk voW6u9VuKhYDQxqBMEzyIke4rEVNP3Ltf60UdZi70C/6xWAw2NQc6DBZidRFQZxcuJK4 T5zuCwEtWFFp7tbF/JpOIWhP2Pq4+sW+eXDlkf55szxjDRUfHFWLQxwLWaHAulxyMG4Z ElyaQJJb4kjynBm/2NFmNGjF5GUHtfIfIG1HFJ24qx3gVnafeRfE94EPJ6FjRnPLFycC di37jvRAC3KbD2bQGKgHQl0HdxXz+nhul3fq4hIYNKgNO+Bpl2HwkAtcWxZN9gqIS1l5 4EzQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MIGDIChI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-39460-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f19-20020ac87f13000000b0042a030c6790si18847qtk.681.2024.01.25.16.33.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 16:33:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39460-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MIGDIChI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-39460-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39460-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B8A241C210F0 for ; Fri, 26 Jan 2024 00:33:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F26C64F; Fri, 26 Jan 2024 00:33:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MIGDIChI" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45328362; Fri, 26 Jan 2024 00:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706229182; cv=none; b=XLYEvP2DcrcNuBLRejGJy3Te1FE+q3Y19G3BmFR+AO/ayEZTTaLXjZ4gbBr45wpGnfC45yv6cq1i9KRyEJ++a0GnSslhwMBxN9fZBdP1z3G8AZdXKZS6BbYWWSTP8tzExNhfSBpbtJI5kCUGrtSqxP0/iAPAFRimxV4jc78ErOE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706229182; c=relaxed/simple; bh=lSI0go3BG4ZdZbQTC+VyUNDK8V+IL0abc+hKz2wuQi4=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=bcdphEW2GvhskU7Doc1hZ9lYdEFtwHWY5WEO6UEuw7hY9AxDpS/wwmk35J+d9LGhxS08OcCvFxqr5eHdI/FhbxAi1bTwP/Gc4Quz1Qcgk7n0zGcCTRHWQEoZO29JwVHFkagsaSqFuKBL2kw9kC7IbBa6Rsbld8waTeUsvsUlamU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MIGDIChI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 084EEC433C7; Fri, 26 Jan 2024 00:32:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706229181; bh=lSI0go3BG4ZdZbQTC+VyUNDK8V+IL0abc+hKz2wuQi4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MIGDIChIXho+jx/227a2S0HfhSwDn43zM/Eb7pznDp2/kVkxMMgF4aYtG0ufm0AiY BRyVjsDtO12/hsq0s02YFyVeypCwcK937y614dP+yF8CrMCNMr55qdjLeTxvg6CdXW DjsE2auo/obcBA27ZFiDQbBH7nGBmxM3+YKjI5g3s/1gVnM0nBK+0JiOVMKNNSasz7 1E2CdoKLpEVubyNziuwTwSFGaJOa/jEcztdfXLSH8qKStWeo2iBWWNjk6Xn1Xm3FMp C6MfH25NhF05fiNYU0GQxFlP8r+/6ACJAB6aqMPFvVdqZf+XibOdqtG2G1pr2vuwVO dLwZrIvl3bKog== Date: Fri, 26 Jan 2024 09:32:57 +0900 From: Masami Hiramatsu (Google) To: Vincent Donnefort Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, kernel-team@android.com Subject: Re: [PATCH v12 3/6] tracing: Add snapshot refcount Message-Id: <20240126093257.b6059a4c4fa1b1d345132350@kernel.org> In-Reply-To: References: <20240123110757.3657908-1-vdonnefort@google.com> <20240123110757.3657908-4-vdonnefort@google.com> <20240125001149.364c0b08237e8b7f0a69bd56@kernel.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi Vincent, On Thu, 25 Jan 2024 14:53:40 +0000 Vincent Donnefort wrote: > > > @@ -1470,12 +1483,20 @@ register_snapshot_trigger(char *glob, > > > struct event_trigger_data *data, > > > struct trace_event_file *file) > > > { > > > - if (tracing_alloc_snapshot_instance(file->tr) != 0) > > > + if (tracing_arm_snapshot(file->tr)) > > > return 0; > > > > BTW, is this return value correct? It seems that the register_*_trigger() > > will return error code when it fails. > > It should indeed be > > ret = tracing_arm_snapshot() > if (ret) > return ret; OK, then there is a bug. We need to fix it before changing this for backporting. Thank you, -- Masami Hiramatsu (Google)